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. |
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.
Baseline updates1. Input Format Changes (No Numerical Differences)The new implementation introduced changes to the input format. For most of the affected cases, this resulted in baseline diffs solely due to this. There are actually no numerical differences. 2. PVT Consistency Fixes (
|
||||||||||||
| 1. Input Format Changes (No Numerical Differences) | |
co2_hybrid_1d_01, co2_hybrid_1d_02, co2_hybrid_1d_03, co2_flux_3d_01, co2_flux_3d_08, co2_flux_3d_27, initialization_2phase_01, initialization_2phase_02, initialization_2phase_no_cappres_01, initialization_2phase_no_cappres_02, staircase_co2_wells_3d_01, staircase_co2_wells_3d_08, staircase_co2_wells_hybrid_3d_01, staircase_co2_wells_hybrid_3d_08, isothm_mass_inj_table_01, isothm_mass_inj_table_02, isothm_vol_inj_table_01, isothm_vol_inj_table_02, staged_close_perf_1_01, staged_close_perf_1_04, staged_close_perf_2_01, staged_close_perf_2_04, staged_open_perf_1_01, staged_open_perf_1_04, staged_open_perf_2_01, staged_open_perf_2_04, PoroElastic_staircase_co2_3d_fim_01, PoroElastic_staircase_co2_3d_fim_04, PoroElastic_staircase_co2_3d_sequential_01, PoroElastic_staircase_co2_3d_sequential_04, PoroElastic_hybridHexPrism_co2_fim_3d_01, PoroElastic_hybridHexPrism_co2_fim_3d_04, PoroElastic_hybridHexPrism_co2_sequential_3d_01, PoroElastic_hybridHexPrism_co2_sequential_3d_04, co2_thermal_2d_01, co2_thermal_2d_04, ThermoPoroElastic_staircase_co2_smoke_01, ThermoPoroElastic_staircase_co2_smoke_04, thermalLeakyWell_smoke_3d_01, thermalLeakyWell_smoke_3d_04, co2_2d_plume_Z_01, co2_2d_plume_Z_04, grav_seg_drain_Z_01, grav_seg_drain_Z_02, ALM_multiphasePoromechanics_curvedFrac_smoke_01, ALM_multiphasePoromechanics_curvedFrac_smoke_04, multiphasePoromechanics_FaultModel_smoke_01, multiphasePoromechanics_FaultModel_smoke_04, multiphasePoromechanics_FaultModel_well_fim_smoke_01, multiphasePoromechanics_FaultModel_well_fim_smoke_04, multiphasePoromechanics_FaultModel_well_seq_smoke_01, multiphasePoromechanics_FaultModel_well_seq_smoke_04[cite: 1]
|
|
| 2. PVT Consistency Fixes | |
testPVT_01, testPVT_CO2Brine_01, testPVT_CO2BrineTables_01, testPVT_docExample_01[cite: 1]
|
|
| 3. Table Evaluation Variations | |
class09_pb3_smoke_3d_01, class09_pb3_smoke_3d_08, co2_flux_dirichlet_01, co2_flux_dirichlet_06[cite: 1]
|
|
| "{0} into a set of evenly spaced values. If a positive is givem, it defines the " | ||
| "spacing between generated points across the full range from the first to the " | ||
| "last input value. If zero or a negative number is given then the points in {0} " | ||
| " are left as is.", viewKeyStruct::pressureIntervalString() )). |
There was a problem hiding this comment.
Perhaps this should be viewKeyStruct::pressureCoordinatesString() instead of viewKeyStruct::pressureIntervalString()?
| "{0} into a set of evenly spaced values. If a positive is givem, it defines the " | ||
| "spacing between generated points across the full range from the first to the " | ||
| "last input value. If zero or a negative number is given then the points in {0} " | ||
| " are left as is.", viewKeyStruct::temperatureIntervalString() )). |
There was a problem hiding this comment.
Perhaps this should be viewKeyStruct:: temperatureIntervalString() instead of viewKeyStruct:: temperatureCoordinatesString()?
| // Water compressibility must be positive | ||
| GEOS_THROW_IF_LT_MSG( m_waterCompressibility, MultiFluidConstants::epsilon, | ||
| GEOS_FMT( "{}: invalid water compressibility {}. " | ||
| "Value must be positive", fullName, viewKeyStruct::waterCompressibilityString() ), |
There was a problem hiding this comment.
Perhaps it should be m_waterCompressibility
There was a problem hiding this comment.
I have actually added both the value and the field name.
| // Flash tolerance must be positive | ||
| GEOS_THROW_IF_LT_MSG( m_tolerance, MultiFluidConstants::epsilon, | ||
| GEOS_FMT( "{}: invalid flash tolerance {}. " | ||
| "Value must be positive", fullName, viewKeyStruct::toleranceString() ), |
There was a problem hiding this comment.
Perhaps it should be m_tolerance
| // Salinity must not be negative | ||
| GEOS_THROW_IF_LT_MSG( m_salinity, 0.0, | ||
| GEOS_FMT( "{}: invalid salinity {}. " | ||
| "Value must not be negative", fullName, viewKeyStruct::salinityString() ), |
There was a problem hiding this comment.
Perhaps it should be m_salinity
| GEOS_THROW_IF_GT_MSG( maxTemp, maxTempInK, | ||
| GEOS_FMT( "{}: Maximum temperature must be at most {}K ({} in C). " | ||
| "The highest value provided in {} is {}K", fullName, | ||
| maxTempInK, minimumTemperature, |
There was a problem hiding this comment.
perhaps this should be maximumTemperature?
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