mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -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
|
struct ConvectiveMixingModuleParam
|
||||||
{
|
{
|
||||||
bool active_{false};
|
std::vector<bool> active_;
|
||||||
std::vector<Scalar> Xhi_;
|
std::vector<Scalar> Xhi_;
|
||||||
std::vector<Scalar> Psi_;
|
std::vector<Scalar> Psi_;
|
||||||
};
|
};
|
||||||
@ -155,19 +155,19 @@ public:
|
|||||||
// check that Xhi and Psi didn't change
|
// check that Xhi and Psi didn't change
|
||||||
std::size_t numRegions = eclState.runspec().tabdims().getNumPVTTables();
|
std::size_t numRegions = eclState.runspec().tabdims().getNumPVTTables();
|
||||||
const auto& control = schedule[episodeIdx].oilvap();
|
const auto& control = schedule[episodeIdx].oilvap();
|
||||||
info.active_ = control.drsdtConvective();
|
if (info.active_.empty()) {
|
||||||
if (!info.active_) {
|
info.active_.resize(numRegions);
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (info.Xhi_.empty()) {
|
|
||||||
info.Xhi_.resize(numRegions);
|
info.Xhi_.resize(numRegions);
|
||||||
info.Psi_.resize(numRegions);
|
info.Psi_.resize(numRegions);
|
||||||
}
|
}
|
||||||
for (size_t i = 0; i < numRegions; ++i ) {
|
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.Xhi_[i] = control.getMaxDRSDT(i);
|
||||||
info.Psi_[i] = control.getPsi(i);
|
info.Psi_[i] = control.getPsi(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void modifyAvgDensity(Evaluation& rhoAvg,
|
static void modifyAvgDensity(Evaluation& rhoAvg,
|
||||||
@ -176,7 +176,10 @@ public:
|
|||||||
const unsigned phaseIdx,
|
const unsigned phaseIdx,
|
||||||
const ConvectiveMixingModuleParam& info) {
|
const ConvectiveMixingModuleParam& info) {
|
||||||
|
|
||||||
if (!info.active_) {
|
if (info.active_.empty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!info.active_[ intQuantsIn.pvtRegionIndex()] || !info.active_[ intQuantsEx.pvtRegionIndex()]) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,7 +272,11 @@ public:
|
|||||||
const Scalar faceArea,
|
const Scalar faceArea,
|
||||||
const ConvectiveMixingModuleParam& info)
|
const ConvectiveMixingModuleParam& info)
|
||||||
{
|
{
|
||||||
if (!info.active_) {
|
if (info.active_.empty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!info.active_[ intQuantsIn.pvtRegionIndex()] || !info.active_[ intQuantsEx.pvtRegionIndex()]) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user