mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-02 12:36:54 -06:00
Allowing for non-eclipse output SALTP and PERMFACT
This commit is contained in:
parent
3317f10c4a
commit
dfe298a424
@ -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);
|
||||
|
@ -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_;
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user