mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
implement support for the 'FREE' option of DRSDT
funnily enough, DRVDT does not exhibit such a flag...
This commit is contained in:
parent
9a5a8c53dc
commit
5a1413476a
@ -92,6 +92,7 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
namespace Ewoms {
|
namespace Ewoms {
|
||||||
template <class TypeTag>
|
template <class TypeTag>
|
||||||
@ -385,6 +386,12 @@ public:
|
|||||||
maxDRsDt_ = drsdtKeyword.getRecord(0).getItem("DRSDT_MAX").getSIDouble(0);
|
maxDRsDt_ = drsdtKeyword.getRecord(0).getItem("DRSDT_MAX").getSIDouble(0);
|
||||||
size_t numDof = this->model().numGridDof();
|
size_t numDof = this->model().numGridDof();
|
||||||
lastRs_.resize(numDof, 0.0);
|
lastRs_.resize(numDof, 0.0);
|
||||||
|
|
||||||
|
std::string drsdtFlag =
|
||||||
|
drsdtKeyword.getRecord(0).getItem("Option").getTrimmedString(0);
|
||||||
|
std::transform(drsdtFlag.begin(), drsdtFlag.end(), drsdtFlag.begin(), ::toupper);
|
||||||
|
|
||||||
|
dRsDtOnlyFreeGas_ = (drsdtFlag == "FREE");
|
||||||
}
|
}
|
||||||
|
|
||||||
// deal with DRVDT
|
// deal with DRVDT
|
||||||
@ -1198,11 +1205,14 @@ private:
|
|||||||
|
|
||||||
typedef typename std::decay<decltype(fs) >::type FluidState;
|
typedef typename std::decay<decltype(fs) >::type FluidState;
|
||||||
|
|
||||||
lastRs_[compressedDofIdx] =
|
if (!dRsDtOnlyFreeGas_ || fs.saturation(gasPhaseIdx) > 1e-5)
|
||||||
Opm::BlackOil::template getRs_<FluidSystem,
|
lastRs_[compressedDofIdx] =
|
||||||
Scalar,
|
Opm::BlackOil::template getRs_<FluidSystem,
|
||||||
FluidState>(fs,
|
Scalar,
|
||||||
iq.pvtRegionIndex());
|
FluidState>(fs,
|
||||||
|
iq.pvtRegionIndex());
|
||||||
|
else
|
||||||
|
lastRs_[compressedDofIdx] = 1e4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1817,6 +1827,7 @@ private:
|
|||||||
std::vector<Scalar> solventSaturation_;
|
std::vector<Scalar> solventSaturation_;
|
||||||
|
|
||||||
bool drsdtActive_; // if no, VAPPARS *might* be active
|
bool drsdtActive_; // if no, VAPPARS *might* be active
|
||||||
|
bool dRsDtOnlyFreeGas_; // apply the DRSDT rate limit only to cells that exhibit free gas
|
||||||
std::vector<Scalar> lastRs_;
|
std::vector<Scalar> lastRs_;
|
||||||
Scalar maxDRsDt_;
|
Scalar maxDRsDt_;
|
||||||
Scalar maxDRs_;
|
Scalar maxDRs_;
|
||||||
|
Loading…
Reference in New Issue
Block a user