rename minimum oil pressure to ref pressure

This commit is contained in:
Tor Harald Sandve 2024-01-11 10:24:25 +01:00
parent b670c48699
commit 739337a63a
3 changed files with 28 additions and 28 deletions

View File

@ -282,7 +282,7 @@ public:
serializer(maxOilSaturation_);
serializer(polymer_);
serializer(maxWaterSaturation_);
serializer(minOilPressure_);
serializer(minRefPressure_);
serializer(overburdenPressure_);
serializer(solventSaturation_);
serializer(solventRsw_);
@ -363,7 +363,7 @@ protected:
PolymerSolutionContainer<Scalar> polymer_;
std::vector<Scalar> maxOilSaturation_;
std::vector<Scalar> maxWaterSaturation_;
std::vector<Scalar> minOilPressure_;
std::vector<Scalar> minRefPressure_;
std::vector<Scalar> overburdenPressure_;
std::vector<Scalar> solventSaturation_;
std::vector<Scalar> solventRsw_;

View File

@ -103,7 +103,7 @@ serializationTestObject(const EclipseState& eclState,
EclGenericProblem result(eclState, schedule, gridView);
result.maxOilSaturation_ = {1.0, 2.0};
result.maxWaterSaturation_ = {6.0};
result.minOilPressure_ = {7.0, 8.0, 9.0, 10.0};
result.minRefPressure_ = {7.0, 8.0, 9.0, 10.0};
result.overburdenPressure_ = {11.0};
result.solventSaturation_ = {15.0};
result.solventRsw_ = {18.0};
@ -238,7 +238,7 @@ readRockCompactionParameters_()
case RockConfig::Hysteresis::IRREVERS:
// interpolate the porv volume multiplier using the minimum pressure in the cell
// i.e. don't allow re-inflation.
minOilPressure_.resize(numElem, 1e99);
minRefPressure_.resize(numElem, 1e99);
break;
default:
throw std::runtime_error("Not support ROCKOMP hysteresis option ");
@ -597,10 +597,10 @@ template<class GridView, class FluidSystem, class Scalar>
Scalar EclGenericProblem<GridView,FluidSystem,Scalar>::
minOilPressure(unsigned globalDofIdx) const
{
if (minOilPressure_.empty())
if (minRefPressure_.empty())
return 0.0;
return minOilPressure_[globalDofIdx];
return minRefPressure_[globalDofIdx];
}
template<class GridView, class FluidSystem, class Scalar>
@ -775,7 +775,7 @@ bool EclGenericProblem<GridView,FluidSystem,Scalar>::
operator==(const EclGenericProblem& rhs) const
{
return this->maxWaterSaturation_ == rhs.maxWaterSaturation_ &&
this->minOilPressure_ == rhs.minOilPressure_ &&
this->minRefPressure_ == rhs.minRefPressure_ &&
this->overburdenPressure_ == rhs.overburdenPressure_ &&
this->solventSaturation_ == rhs.solventSaturation_ &&
this->solventRsw_ == rhs.solventRsw_ &&

View File

@ -1646,19 +1646,19 @@ public:
tableIdx = this->rockTableIdx_[elementIdx];
const auto& fs = intQuants.fluidState();
LhsEval effectiveOilPressure = decay<LhsEval>(fs.pressure(refPressurePhaseIdx_()));
if (!this->minOilPressure_.empty())
LhsEval effectivePressure = decay<LhsEval>(fs.pressure(refPressurePhaseIdx_()));
if (!this->minRefPressure_.empty())
// The pore space change is irreversible
effectiveOilPressure =
effectivePressure =
min(decay<LhsEval>(fs.pressure(refPressurePhaseIdx_())),
this->minOilPressure_[elementIdx]);
this->minRefPressure_[elementIdx]);
if (!this->overburdenPressure_.empty())
effectiveOilPressure -= this->overburdenPressure_[elementIdx];
effectivePressure -= this->overburdenPressure_[elementIdx];
if (!this->rockCompPoroMult_.empty()) {
return this->rockCompPoroMult_[tableIdx].eval(effectiveOilPressure, /*extrapolation=*/true);
return this->rockCompPoroMult_[tableIdx].eval(effectivePressure, /*extrapolation=*/true);
}
// water compaction
@ -1666,7 +1666,7 @@ public:
LhsEval SwMax = max(decay<LhsEval>(fs.saturation(waterPhaseIdx)), this->maxWaterSaturation_[elementIdx]);
LhsEval SwDeltaMax = SwMax - initialFluidStates_[elementIdx].saturation(waterPhaseIdx);
return this->rockCompPoroMultWc_[tableIdx].eval(effectiveOilPressure, SwDeltaMax, /*extrapolation=*/true);
return this->rockCompPoroMultWc_[tableIdx].eval(effectivePressure, SwDeltaMax, /*extrapolation=*/true);
}
/*!
@ -1686,26 +1686,26 @@ public:
tableIdx = this->rockTableIdx_[elementIdx];
const auto& fs = intQuants.fluidState();
LhsEval effectiveOilPressure = decay<LhsEval>(fs.pressure(refPressurePhaseIdx_()));
LhsEval effectivePressure = decay<LhsEval>(fs.pressure(refPressurePhaseIdx_()));
if (!this->minOilPressure_.empty())
if (!this->minRefPressure_.empty())
// The pore space change is irreversible
effectiveOilPressure =
effectivePressure =
min(decay<LhsEval>(fs.pressure(refPressurePhaseIdx_())),
this->minOilPressure_[elementIdx]);
this->minRefPressure_[elementIdx]);
if (!this->overburdenPressure_.empty())
effectiveOilPressure -= this->overburdenPressure_[elementIdx];
effectivePressure -= this->overburdenPressure_[elementIdx];
if (!this->rockCompTransMult_.empty())
return this->rockCompTransMult_[tableIdx].eval(effectiveOilPressure, /*extrapolation=*/true);
return this->rockCompTransMult_[tableIdx].eval(effectivePressure, /*extrapolation=*/true);
// water compaction
assert(!this->rockCompTransMultWc_.empty());
LhsEval SwMax = max(decay<LhsEval>(fs.saturation(waterPhaseIdx)), this->maxWaterSaturation_[elementIdx]);
LhsEval SwDeltaMax = SwMax - initialFluidStates_[elementIdx].saturation(waterPhaseIdx);
return this->rockCompTransMultWc_[tableIdx].eval(effectiveOilPressure, SwDeltaMax, /*extrapolation=*/true);
return this->rockCompTransMultWc_[tableIdx].eval(effectivePressure, SwDeltaMax, /*extrapolation=*/true);
}
/*!
@ -1954,7 +1954,7 @@ protected:
{
OPM_TIMEBLOCK(updateMinPressure);
// IRREVERS option is used in ROCKCOMP
if (this->minOilPressure_.empty())
if (this->minRefPressure_.empty())
return false;
this->updateProperty_("EclProblem::updateMinPressure_() failed:",
@ -1968,10 +1968,10 @@ protected:
bool updateMinPressure_(unsigned compressedDofIdx, const IntensiveQuantities& iq){
OPM_TIMEBLOCK_LOCAL(updateMinPressure);
const auto& fs = iq.fluidState();
const Scalar mo = getValue(fs.pressure(refPressurePhaseIdx_()));
auto& mos = this->minOilPressure_;
if(mos[compressedDofIdx]> mo){
mos[compressedDofIdx] = mo;
const Scalar min_pressure = getValue(fs.pressure(refPressurePhaseIdx_()));
auto& min_pressures = this->minRefPressure_;
if(min_pressures[compressedDofIdx]> min_pressure){
min_pressures[compressedDofIdx] = min_pressure;
return true;
}else{
return false;
@ -2113,8 +2113,8 @@ protected:
this->maxWaterSaturation_[elemIdx] = std::max(this->maxWaterSaturation_[elemIdx], fs.saturation(waterPhaseIdx));
if (!this->maxOilSaturation_.empty())
this->maxOilSaturation_[elemIdx] = std::max(this->maxOilSaturation_[elemIdx], fs.saturation(oilPhaseIdx));
if (!this->minOilPressure_.empty())
this->minOilPressure_[elemIdx] = std::min(this->minOilPressure_[elemIdx], fs.pressure(refPressurePhaseIdx_()));
if (!this->minRefPressure_.empty())
this->minRefPressure_[elemIdx] = std::min(this->minRefPressure_[elemIdx], fs.pressure(refPressurePhaseIdx_()));
}