Mult well trans due to perm reduction in salt prec

This commit is contained in:
David Landa Marban
2023-10-09 14:08:18 +02:00
parent bf72698310
commit c93d46c1be
3 changed files with 43 additions and 9 deletions

View File

@@ -1666,6 +1666,40 @@ public:
return this->rockCompTransMultWc_[tableIdx].eval(effectiveOilPressure, SwDeltaMax, /*extrapolation=*/true);
}
/*!
* \brief Calculate the transmissibility multiplier due to porosity reduction.
*
* TODO: The API of this is a bit ad-hoc, it would be better to use context objects.
*/
template <class LhsEval>
LhsEval permFactTransMultiplier(const IntensiveQuantities& intQuants) const
{
OPM_TIMEBLOCK_LOCAL(permFactTransMultiplier);
if (!enableSaltPrecipitation)
return 1.0;
const auto& fs = intQuants.fluidState();
unsigned tableIdx = fs.pvtRegionIndex();
LhsEval porosityFactor = decay<LhsEval>(1. - fs.saltSaturation());
porosityFactor = min(porosityFactor, 1.0);
const auto& permfactTable = BrineModule::permfactTable(tableIdx);
return permfactTable.eval(porosityFactor, /*extrapolation=*/true);
}
/*!
* \brief Return the well transmissibility multiplier due to rock changues.
*/
template <class LhsEval>
LhsEval wellTransMultiplier(const IntensiveQuantities& intQuants, unsigned elementIdx) const
{
OPM_TIMEBLOCK_LOCAL(wellTransMultiplier);
double trans_mult = this->simulator().problem().template rockCompTransMultiplier<double>(intQuants, elementIdx);
trans_mult *= this->simulator().problem().template permFactTransMultiplier<double>(intQuants);
return trans_mult;
}
std::pair<BCType, RateVector> boundaryCondition(const unsigned int globalSpaceIdx, const int directionId) const
{
OPM_TIMEBLOCK_LOCAL(boundaryCondition);