Allowing for non-eclipse output SALTP and PERMFACT

This commit is contained in:
Paul Egberts 2022-01-06 12:32:38 +01:00
parent 3317f10c4a
commit dfe298a424
3 changed files with 41 additions and 0 deletions

View File

@ -75,6 +75,7 @@ EclGenericOutputBlackoilModule(const EclipseState& eclState,
bool enablePolymer,
bool enableFoam,
bool enableBrine,
bool enableSaltPrecipitation,
bool enableExtbo,
bool enableMICP)
: eclState_(eclState)
@ -87,6 +88,7 @@ EclGenericOutputBlackoilModule(const EclipseState& eclState,
, enablePolymer_(enablePolymer)
, enableFoam_(enableFoam)
, enableBrine_(enableBrine)
, enableSaltPrecipitation_(enableSaltPrecipitation)
, enableExtbo_(enableExtbo)
, enableMICP_(enableMICP)
{
@ -655,6 +657,8 @@ assignToSolution(data::Solution& sol)
{"RV", UnitSystem::measure::oil_gas_ratio, data::TargetType::RESTART_SOLUTION, rv_},
{"RVSAT", UnitSystem::measure::oil_gas_ratio, data::TargetType::RESTART_AUXILIARY, oilVaporizationFactor_},
{"SALT", UnitSystem::measure::salinity, data::TargetType::RESTART_SOLUTION, cSalt_},
{"SALTP", UnitSystem::measure::identity, data::TargetType::RESTART_AUXILIARY, pSalt_},
{"PERMFACT", UnitSystem::measure::identity, data::TargetType::RESTART_AUXILIARY, permFact_},
{"SOMAX", UnitSystem::measure::identity, data::TargetType::RESTART_SOLUTION, soMax_},
{"SSOLVENT", UnitSystem::measure::identity, data::TargetType::RESTART_SOLUTION, sSol_},
{"SS_X", UnitSystem::measure::identity, data::TargetType::RESTART_SOLUTION, extboX_},
@ -761,6 +765,10 @@ setRestart(const data::Solution& sol,
cFoam_[elemIdx] = sol.data("FOAM")[globalDofIndex];
if (!cSalt_.empty() && sol.has("SALT"))
cSalt_[elemIdx] = sol.data("SALT")[globalDofIndex];
if (!pSalt_.empty() && sol.has("SALTP"))
pSalt_[elemIdx] = sol.data("SALTP")[globalDofIndex];
if (!permFact_.empty() && sol.has("PERMFACT"))
permFact_[elemIdx] = sol.data("PERMFACT")[globalDofIndex];
if (!soMax_.empty() && sol.has("SOMAX"))
soMax_[elemIdx] = sol.data("SOMAX")[globalDofIndex];
if (!pcSwMdcOw_.empty() &&sol.has("PCSWM_OW"))
@ -954,6 +962,10 @@ doAllocBuffers(unsigned bufferSize,
cFoam_.resize(bufferSize, 0.0);
if (enableBrine_)
cSalt_.resize(bufferSize, 0.0);
if (enableSaltPrecipitation_) {
pSalt_.resize(bufferSize, 0.0);
permFact_.resize(bufferSize, 0.0);
}
if (enableExtbo_) {
extboX_.resize(bufferSize, 0.0);
extboY_.resize(bufferSize, 0.0);

View File

@ -128,6 +128,22 @@ public:
return 0;
}
Scalar getSaltSaturation(unsigned elemIdx) const
{
if (pSalt_.size() > elemIdx)
return pSalt_[elemIdx];
return 0;
}
Scalar getPermFactor(unsigned elemIdx) const
{
if (permFact_.size() > elemIdx)
return permFact_[elemIdx];
return 0;
}
Scalar getMicrobialConcentration(unsigned elemIdx) const
{
if (cMicrobes_.size() > elemIdx)
@ -204,6 +220,7 @@ protected:
bool enablePolymer,
bool enableFoam,
bool enableBrine,
bool enableSaltPrecipitation,
bool enableExtbo,
bool enableMICP);
@ -360,6 +377,7 @@ protected:
bool enablePolymer_;
bool enableFoam_;
bool enableBrine_;
bool enableSaltPrecipitation_;
bool enableExtbo_;
bool enableMICP_;
@ -393,6 +411,8 @@ protected:
ScalarBuffer cPolymer_;
ScalarBuffer cFoam_;
ScalarBuffer cSalt_;
ScalarBuffer pSalt_;
ScalarBuffer permFact_;
ScalarBuffer extboX_;
ScalarBuffer extboY_;
ScalarBuffer extboZ_;

View File

@ -135,6 +135,7 @@ public:
getPropValue<TypeTag, Properties::EnablePolymer>(),
getPropValue<TypeTag, Properties::EnableFoam>(),
getPropValue<TypeTag, Properties::EnableBrine>(),
getPropValue<TypeTag, Properties::EnableSaltPrecipitation>(),
getPropValue<TypeTag, Properties::EnableExtbo>(),
getPropValue<TypeTag, Properties::EnableMICP>())
, simulator_(simulator)
@ -332,6 +333,14 @@ public:
this->cSalt_[globalDofIdx] = fs.saltConcentration().value();
}
if (!this->pSalt_.empty()) {
this->pSalt_[globalDofIdx] = intQuants.saltSaturation().value();
}
if (!this->permFact_.empty()) {
this->permFact_[globalDofIdx] = intQuants.permFactor().value();
}
if (!this->extboX_.empty()) {
this->extboX_[globalDofIdx] = intQuants.xVolume().value();
}