feat: Move CO2-Brine parameters to xml#3777
Conversation
|
This is really a good thing. This will also allow to simply unit tests. |
No. This is a breaking change. The idea is to add an issue describing how to change the parameters. |
| { | ||
| for( integer ic = 0; ic < 3; ic++ ) | ||
| { | ||
| m_ezrokhiDensityCoefficients.emplace_back( 0.0 ); |
There was a problem hiding this comment.
I suggest we set default values here, and then remove these parameters from the integrated test XMLs unless they differ from the default. It looks like they all use the same set of values.
| { | ||
| for( integer ic = 0; ic < 3; ic++ ) | ||
| { | ||
| m_ezrokhiViscosityCoefficients.emplace_back( 0.0 ); |
There was a problem hiding this comment.
Ditto. Could set good default values. Users may not know how to set these params properly.
| ezrokhiDensityCoefficients="{0.1033, -2.2991e-5, -2.3658e-6}" | ||
| ezrokhiViscosityCoefficients="{0, 0, 0}" /> |
There was a problem hiding this comment.
Suggest we set default values and remove these coefficients wherever possible from XMLs.
| InputError ); | ||
|
|
||
| // Salinity must not be negative | ||
| GEOS_THROW_IF_LT_MSG( m_salinity, 0.0, |
There was a problem hiding this comment.
I think this check could be handled by the BrineFluidParameters object itself. We could centralize all checking of parameter physicality there?
|
|
||
| .. note:: | ||
| It is the responsibility of the user to make sure that the pressure and temperature values encountered in the simulation (in the reservoir and in the well) are within the bounds specified in the PVT files. GEOS will not throw an error if a value outside these bounds is encountered, but the (nonlinear) behavior of the simulation and the quality of the results will likely be negatively impacted. | ||
| It is the responsibility of the user to make sure that the pressure and temperature values encountered in the simulation (in the reservoir and in the well) are within the bounds specified by the coordinate attributes in the XML. GEOS will not throw an error if a value outside these bounds is encountered, but the (nonlinear) behavior of the simulation and the quality of the results will likely be negatively impacted. |
There was a problem hiding this comment.
Not specific to this PR, but this is such a common user error I wonder if we should revisit the idea that it is not our responsibility to check for out of bounds and warn the user. Would be nice if this was a flaggable check. We could probably even just check the initial formation pressure range and any BHP conditions flagged in the XML and say someone is likely to exceed bounds, without doing range checking at every table call mid-simulation.
There was a problem hiding this comment.
Or once a timestep compute the (max / min) (pressure / temp) over the whole domain and see if those values are in bounds for the table.
joshua-white
left a comment
There was a problem hiding this comment.
Looks great. Just a few comments regarding providing default values and making sure we do good parameter consistency checking when possible.
This PR removes the parameter files used for CO2-Brine model input. This is replaced by direct xml entries. This is a breaking change in terms of user interaction requiring changes to input models. This is evidenced by the extensive changes required in the geos integrated tests.
The key change is the removal of the two fields
phasePVTParaFilesandflashModelParaFileon theCO2BrineFluidmodels. The information that was in these files is now required within the xml itself. This includes:pressureCoordinatescaptures the range while thepressureIntervalcaptures the step and similarly for temperature. The new formulation is different from the old in thatpressureCoordinatesand ignorepressureInterval. This is useful in some cases where a log space might be more appropriate.ezrokhiDensityCoefficientsandezrokhiViscosityCoefficients. These default to 0 if not specified.DuanSun(default),SpycherPruessandTables). The table formulation works in conjunction with thesolubilityTablesfield in which the user provides (externally generated) solubility tables directly.The implementation involves creation of the
BrineFluidParametersobject to contain all the parameters. This is then passed around when creating PVT models instead of lists of strings.The CO2-Brine documentation has been updated to reflect not only the changes but also to include all previously developed features that had not been documented.
Changes in results:
Example change:
Since this is a breaking change, detailed migration instructions are posted at #4022