Merge pull request #3731 from bska/rescale-swatinit-pcow-at-restart

Support SWATINIT-Like Rescaling of PCOW at Restart
This commit is contained in:
Bård Skaflestad
2023-10-25 15:40:04 +02:00
committed by GitHub
2 changed files with 28 additions and 0 deletions

View File

@@ -257,6 +257,16 @@ public:
Scalar pcow,
Scalar Sw);
/// Apply SWATINIT-like scaling of oil/water capillary pressure curve at
/// simulation restart.
///
/// \param[in] elemIdx Active cell index
///
/// \param[in] maxPcow Scaled maximum oil/water capillary pressure.
/// Typically the PPCW restart file array's entry for the
/// corresponding cell.
void applyRestartSwatInit(const unsigned elemIdx, const Scalar maxPcow);
bool enableEndPointScaling() const
{ return enableEndPointScaling_; }

View File

@@ -211,6 +211,24 @@ applySwatinit(unsigned elemIdx,
return {Sw, newSwatInit};
}
template<class TraitsT>
void
EclMaterialLawManager<TraitsT>::applyRestartSwatInit(const unsigned elemIdx,
const Scalar maxPcow)
{
// Maximum capillary pressure adjusted from SWATINIT data.
auto& elemScaledEpsInfo =
this->oilWaterScaledEpsInfoDrainage_[elemIdx];
elemScaledEpsInfo.maxPcow = maxPcow;
this->oilWaterScaledEpsPointsDrainage(elemIdx)
.init(elemScaledEpsInfo,
*this->oilWaterEclEpsConfig_,
EclTwoPhaseSystemType::OilWater);
}
template<class TraitsT>
const typename EclMaterialLawManager<TraitsT>::MaterialLawParams&
EclMaterialLawManager<TraitsT>::