mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #3774 from plgbrts/expli-salt
allow for explicit initialization of SALT and SALTP
This commit is contained in:
commit
a520733d5b
@ -2573,6 +2573,8 @@ private:
|
|||||||
bool has_rs = fp.has_double("RS");
|
bool has_rs = fp.has_double("RS");
|
||||||
bool has_rv = fp.has_double("RV");
|
bool has_rv = fp.has_double("RV");
|
||||||
bool has_pressure = fp.has_double("PRESSURE");
|
bool has_pressure = fp.has_double("PRESSURE");
|
||||||
|
bool has_salt = fp.has_double("SALT");
|
||||||
|
bool has_saltp = fp.has_double("SALTP");
|
||||||
|
|
||||||
// make sure all required quantities are enables
|
// make sure all required quantities are enables
|
||||||
if (Indices::numPhases > 1) {
|
if (Indices::numPhases > 1) {
|
||||||
@ -2592,6 +2594,12 @@ private:
|
|||||||
if (FluidSystem::enableVaporizedOil() && !has_rv)
|
if (FluidSystem::enableVaporizedOil() && !has_rv)
|
||||||
throw std::runtime_error("The ECL input file requires the RV keyword to be present if"
|
throw std::runtime_error("The ECL input file requires the RV keyword to be present if"
|
||||||
" vaporized oil is enabled");
|
" vaporized oil is enabled");
|
||||||
|
if (enableBrine && !has_salt)
|
||||||
|
throw std::runtime_error("The ECL input file requires the SALT keyword to be present if"
|
||||||
|
" brine is enabled and the model is initialized explicitly");
|
||||||
|
if (enableSaltPrecipitation && !has_saltp)
|
||||||
|
throw std::runtime_error("The ECL input file requires the SALTP keyword to be present if"
|
||||||
|
" salt precipitation is enabled and the model is initialized explicitly");
|
||||||
|
|
||||||
size_t numDof = this->model().numGridDof();
|
size_t numDof = this->model().numGridDof();
|
||||||
|
|
||||||
@ -2603,6 +2611,8 @@ private:
|
|||||||
std::vector<double> rsData;
|
std::vector<double> rsData;
|
||||||
std::vector<double> rvData;
|
std::vector<double> rvData;
|
||||||
std::vector<double> tempiData;
|
std::vector<double> tempiData;
|
||||||
|
std::vector<double> saltData;
|
||||||
|
std::vector<double> saltpData;
|
||||||
|
|
||||||
if (FluidSystem::phaseIsActive(waterPhaseIdx) && Indices::numPhases > 1)
|
if (FluidSystem::phaseIsActive(waterPhaseIdx) && Indices::numPhases > 1)
|
||||||
waterSaturationData = fp.get_double("SWAT");
|
waterSaturationData = fp.get_double("SWAT");
|
||||||
@ -2624,6 +2634,14 @@ private:
|
|||||||
// initial reservoir temperature
|
// initial reservoir temperature
|
||||||
tempiData = fp.get_double("TEMPI");
|
tempiData = fp.get_double("TEMPI");
|
||||||
|
|
||||||
|
// initial salt concentration data
|
||||||
|
if (enableBrine)
|
||||||
|
saltData = fp.get_double("SALT");
|
||||||
|
|
||||||
|
// initial precipitated salt saturation data
|
||||||
|
if (enableSaltPrecipitation)
|
||||||
|
saltpData = fp.get_double("SALTP");
|
||||||
|
|
||||||
// calculate the initial fluid states
|
// calculate the initial fluid states
|
||||||
for (size_t dofIdx = 0; dofIdx < numDof; ++dofIdx) {
|
for (size_t dofIdx = 0; dofIdx < numDof; ++dofIdx) {
|
||||||
auto& dofFluidState = initialFluidStates_[dofIdx];
|
auto& dofFluidState = initialFluidStates_[dofIdx];
|
||||||
@ -2638,6 +2656,18 @@ private:
|
|||||||
temperatureLoc = FluidSystem::surfaceTemperature;
|
temperatureLoc = FluidSystem::surfaceTemperature;
|
||||||
dofFluidState.setTemperature(temperatureLoc);
|
dofFluidState.setTemperature(temperatureLoc);
|
||||||
|
|
||||||
|
//////
|
||||||
|
// set salt concentration
|
||||||
|
//////
|
||||||
|
if (enableBrine)
|
||||||
|
dofFluidState.setSaltConcentration(saltData[dofIdx]);
|
||||||
|
|
||||||
|
//////
|
||||||
|
// set precipitated salt saturation
|
||||||
|
//////
|
||||||
|
if (enableSaltPrecipitation)
|
||||||
|
dofFluidState.setSaltSaturation(saltpData[dofIdx]);
|
||||||
|
|
||||||
//////
|
//////
|
||||||
// set saturations
|
// set saturations
|
||||||
//////
|
//////
|
||||||
|
@ -555,7 +555,6 @@ const KeywordValidation::UnsupportedKeywords& unsupportedKeywords()
|
|||||||
{"SKIP", {false, std::nullopt}},
|
{"SKIP", {false, std::nullopt}},
|
||||||
{"SKIP100", {false, std::nullopt}},
|
{"SKIP100", {false, std::nullopt}},
|
||||||
{"SKIP300", {false, std::nullopt}},
|
{"SKIP300", {false, std::nullopt}},
|
||||||
{"SALT", {false, std::nullopt}},
|
|
||||||
{"SALTNODE", {false, std::nullopt}},
|
{"SALTNODE", {false, std::nullopt}},
|
||||||
{"SALTREST", {false, std::nullopt}},
|
{"SALTREST", {false, std::nullopt}},
|
||||||
{"SCALELIM", {false, std::nullopt}},
|
{"SCALELIM", {false, std::nullopt}},
|
||||||
|
Loading…
Reference in New Issue
Block a user