-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add constant k-value flash #3299
base: develop
Are you sure you want to change the base?
Conversation
…s' into feature/dkachuma/eos-parameters
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3299 +/- ##
===========================================
+ Coverage 56.89% 57.10% +0.21%
===========================================
Files 1154 1159 +5
Lines 99885 100443 +558
===========================================
+ Hits 56825 57362 +537
- Misses 43060 43081 +21 ☔ View full report in Codecov by Sentry. |
} | ||
else | ||
{ | ||
GEOS_ERROR( GEOS_FMT( "Rachford-Rice solve for {} phases not implemented.", NUM_PHASE )); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no 3 phase yet, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet. Need to write the 3-phase RR solver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok i see, maybe let's disable 3 phase completely for now?
template<> | ||
struct KValueFlashName< 3 > | ||
{ | ||
static constexpr char const * name = "ThreePhaseKValue"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe no big need for these two, can be done directly with catalogName
{ | ||
string pressureTableName; | ||
string temperatureTableName; | ||
m_parameters->createTables( functionName(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it going to create those tables every time?
integer const numDofs = 2 + m_numComponents; | ||
|
||
// Calculate k-values at p,t | ||
real64 pa = 0.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these manipulations would be easier to understand with some comments
if( numPressurePoints == 1 ) | ||
{ | ||
numPressurePoints = 2; | ||
maxPressure = minPressure + 1.0e7; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to say something about the ranges here
} | ||
|
||
template< integer NUM_PHASE > | ||
bool KValueFlashParameters< NUM_PHASE >::isIncreasing( arraySlice1d< real64 const > const & array ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should go into some utils place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also add an xml into inputFiles
Setting this back to draft. Need to work on 3-phase RR solve. |
Implements a constant k-value compositional fluid model using a compositional density and LBC viscosity. With this model, k-values are dependent only on pressure and temperature but not composition. The user provides a 2D table of k-values for each component as in the example below
The calculation then looks up the values from this table and does a single Rachford-Rice solve to determine the phase split.
The user provided tables are used to create a 4D hypercube at sample values of p and t. This hypercube is then used to do the actual computation of the k-values. The user can select the points at which this sampling is done.