This commit is contained in:
Tor Harald Sandve 2023-11-26 11:16:25 +00:00 committed by GitHub
commit f200b68927
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 76 additions and 6 deletions

View File

@ -470,6 +470,8 @@ public:
const Nupcol& nupcol() const noexcept;
const Tracers& tracers() const;
bool co2Storage() const noexcept;
bool co2Sol() const noexcept;
bool h2Sol() const noexcept;
bool h2Storage() const noexcept;
bool micp() const noexcept;
bool mech() const noexcept;
@ -495,6 +497,8 @@ public:
serializer(m_sfuncctrl);
serializer(m_nupcol);
serializer(m_co2storage);
serializer(m_co2sol);
serializer(m_h2sol);
serializer(m_h2storage);
serializer(m_micp);
serializer(m_mech);
@ -517,6 +521,8 @@ private:
Nupcol m_nupcol;
Tracers m_tracers;
bool m_co2storage;
bool m_co2sol;
bool m_h2sol;
bool m_h2storage;
bool m_micp;
bool m_mech;

View File

@ -624,6 +624,8 @@ Runspec::Runspec( const Deck& deck )
, m_nupcol( )
, m_tracers( deck )
, m_co2storage (false)
, m_co2sol (false)
, m_h2sol (false)
, m_h2storage (false)
, m_micp (false)
, m_mech (false)
@ -660,6 +662,30 @@ Runspec::Runspec( const Deck& deck )
}
if (runspecSection.hasKeyword<ParserKeywords::CO2SOL>()) {
m_co2sol = true;
if (phases().active(Phase::SOLVENT)) {
std::string msg = "The CO2SOL option is given together with SOLVENT. PVT properties from the CO2-Brine system is used \n"
"See the OPM manual for details on the used models.";
OpmLog::note(msg);
} else {
throw std::runtime_error("The CO2SOL option is given. Activate SOLVENT.");
}
}
if (runspecSection.hasKeyword<ParserKeywords::H2SOL>()) {
m_h2sol = true;
if (phases().active(Phase::SOLVENT)) {
std::string msg = "The H2SOL option is given together with SOLVENT. PVT properties from the H2-Brine system is used \n"
"See the OPM manual for details on the used models.";
OpmLog::note(msg);
} else {
throw std::runtime_error("The H2SOL option is given. Activate SOLVENT.");
}
}
if (runspecSection.hasKeyword<ParserKeywords::H2STORE>()) {
m_h2storage = true;
std::string msg = "The H2 storage option is given. PVT properties from the Brine-H2 system is used \n"
@ -699,6 +725,8 @@ Runspec Runspec::serializationTestObject()
result.m_sfuncctrl = SatFuncControls::serializationTestObject();
result.m_nupcol = Nupcol::serializationTestObject();
result.m_co2storage = true;
result.m_co2sol = true;
result.m_h2sol = true;
result.m_h2storage = true;
result.m_micp = true;
result.m_mech = true;
@ -766,6 +794,16 @@ bool Runspec::co2Storage() const noexcept
return this->m_co2storage;
}
bool Runspec::co2Sol() const noexcept
{
return this->m_co2sol;
}
bool Runspec::h2Sol() const noexcept
{
return this->m_h2sol;
}
bool Runspec::h2Storage() const noexcept
{
return this->m_h2storage;
@ -818,6 +856,8 @@ bool Runspec::rst_cmp(const Runspec& full_spec, const Runspec& rst_spec) {
full_spec.saturationFunctionControls() == rst_spec.saturationFunctionControls() &&
full_spec.m_nupcol == rst_spec.m_nupcol &&
full_spec.m_co2storage == rst_spec.m_co2storage &&
full_spec.m_co2sol == rst_spec.m_co2sol &&
full_spec.m_h2sol == rst_spec.m_h2sol &&
full_spec.m_h2storage == rst_spec.m_h2storage &&
full_spec.m_micp == rst_spec.m_micp &&
full_spec.m_mech == rst_spec.m_mech &&
@ -837,6 +877,8 @@ bool Runspec::operator==(const Runspec& data) const {
this->saturationFunctionControls() == data.saturationFunctionControls() &&
this->m_nupcol == data.m_nupcol &&
this->m_co2storage == data.m_co2storage &&
this->m_co2sol == data.m_co2sol &&
this->m_h2sol == data.m_h2sol &&
this->m_h2storage == data.m_h2storage &&
this->m_micp == data.m_micp &&
this->m_mech == data.m_mech;

View File

@ -0,0 +1,6 @@
{
"name": "CO2SOL",
"sections": [
"RUNSPEC"
]
}

View File

@ -0,0 +1,6 @@
{
"name": "H2SOL",
"sections": [
"RUNSPEC"
]
}

View File

@ -1049,6 +1049,7 @@ set( keywords
001_Eclipse300/C/CIRCLE
001_Eclipse300/C/CNAMES
001_Eclipse300/C/COMPS
001_Eclipse300/C/CO2SOL
001_Eclipse300/C/CO2STORE
001_Eclipse300/C/CREF
001_Eclipse300/C/CREFS
@ -1115,6 +1116,7 @@ set( keywords
900_OPM/G/GCOMPIDX
900_OPM/G/GASDENT
900_OPM/G/GASJT
900_OPM/H/H2SOL
900_OPM/H/H2STORE
900_OPM/M/MECH
900_OPM/M/MICP

View File

@ -84,9 +84,11 @@ initFromState(const EclipseState& eclState, const Schedule& schedule)
if (eclState.getSimulationConfig().hasDISGASW()) {
if (eclState.runspec().co2Storage() || eclState.runspec().h2Storage())
setEnableDissolvedGasInWater(eclState.getSimulationConfig().hasDISGASW());
else
else if (eclState.runspec().co2Sol() || eclState.runspec().h2Sol()) {
} else
OPM_THROW(std::runtime_error,
"DISGASW only supported in combination with CO2STORE or H2STORE");
"DISGASW only supported in combination with CO2STORE/H2STORE or CO2SOL/H2SOL");
}
if (phaseIsActive(gasPhaseIdx)) {

View File

@ -48,8 +48,11 @@ initFromState(const EclipseState& eclState, const Schedule&)
"BRINE PVT properties are computed based on the Hu et al. "
"pvt model and PVDO/PVTO input is ignored.");
}
setEnableDissolvedGas(eclState.getSimulationConfig().hasDISGASW() || eclState.getSimulationConfig().hasDISGAS());
// enable co2 dissolution into brine for co2sol case with DISGASW
// or co2store case with DISGASW or DISGAS
bool co2sol_dis = eclState.runspec().co2Sol() && eclState.getSimulationConfig().hasDISGASW();
bool co2storage_dis = eclState.runspec().co2Storage() && (eclState.getSimulationConfig().hasDISGASW() || eclState.getSimulationConfig().hasDISGAS());
setEnableDissolvedGas(co2sol_dis || co2storage_dis);
setEnableSaltConcentration(eclState.runspec().phases().active(Phase::BRINE));
// We only supported single pvt region for the co2-brine module
size_t numRegions = 1;

View File

@ -47,8 +47,11 @@ initFromState(const EclipseState& eclState, const Schedule&)
"H2 PVT properties are calculated internally, "
"and PVDO/PVTO input is ignored.");
}
// Check if DISGAS has been activated (enables H2 dissolved in brine)
setEnableDissolvedGas(eclState.getSimulationConfig().hasDISGASW() || eclState.getSimulationConfig().hasDISGAS());
// enable h2 dissolution into brine for h2sol case with DISGASW
// or h2store case with DISGASW or DISGAS
bool h2sol_dis = eclState.runspec().h2Sol() && eclState.getSimulationConfig().hasDISGASW();
bool h2storage_dis = eclState.runspec().h2Storage() && (eclState.getSimulationConfig().hasDISGASW() || eclState.getSimulationConfig().hasDISGAS());
setEnableDissolvedGas(h2sol_dis || h2storage_dis);
// Check if BRINE has been activated (varying salt concentration in brine)
setEnableSaltConcentration(eclState.runspec().phases().active(Phase::BRINE));