mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-25 08:41:00 -06:00
Merge pull request #924 from totto82/drsdtcon_pvtnum
support drsdtcon with pvtnum
This commit is contained in:
commit
fa610b49a3
@ -144,7 +144,7 @@ public:
|
||||
|
||||
struct ConvectiveMixingModuleParam
|
||||
{
|
||||
bool active_{false};
|
||||
std::vector<bool> active_;
|
||||
std::vector<Scalar> Xhi_;
|
||||
std::vector<Scalar> Psi_;
|
||||
};
|
||||
@ -155,19 +155,19 @@ public:
|
||||
// check that Xhi and Psi didn't change
|
||||
std::size_t numRegions = eclState.runspec().tabdims().getNumPVTTables();
|
||||
const auto& control = schedule[episodeIdx].oilvap();
|
||||
info.active_ = control.drsdtConvective();
|
||||
if (!info.active_) {
|
||||
return;
|
||||
}
|
||||
if (info.Xhi_.empty()) {
|
||||
if (info.active_.empty()) {
|
||||
info.active_.resize(numRegions);
|
||||
info.Xhi_.resize(numRegions);
|
||||
info.Psi_.resize(numRegions);
|
||||
}
|
||||
for (size_t i = 0; i < numRegions; ++i ) {
|
||||
info.active_[i] = control.drsdtConvective(i);
|
||||
if (control.drsdtConvective(i)) {
|
||||
info.Xhi_[i] = control.getMaxDRSDT(i);
|
||||
info.Psi_[i] = control.getPsi(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void modifyAvgDensity(Evaluation& rhoAvg,
|
||||
@ -176,7 +176,10 @@ public:
|
||||
const unsigned phaseIdx,
|
||||
const ConvectiveMixingModuleParam& info) {
|
||||
|
||||
if (!info.active_) {
|
||||
if (info.active_.empty()) {
|
||||
return;
|
||||
}
|
||||
if (!info.active_[ intQuantsIn.pvtRegionIndex()] || !info.active_[ intQuantsEx.pvtRegionIndex()]) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -269,7 +272,11 @@ public:
|
||||
const Scalar faceArea,
|
||||
const ConvectiveMixingModuleParam& info)
|
||||
{
|
||||
if (!info.active_) {
|
||||
if (info.active_.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!info.active_[ intQuantsIn.pvtRegionIndex()] || !info.active_[ intQuantsEx.pvtRegionIndex()]) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user