mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
phase-KR: Don't emit empty property arrays
Check that we actually have data values for relative permeability properties {WAT,OIL,GAS}KR before attempting to output the arrays. While here, also correct an apparent misprint in the criterion for whether or not to activate relperm output. We should check 'liquid_active' and 'vapour_active', not 'aqua_active', when considering OILKR and GASKR properties respectively.
This commit is contained in:
parent
67db2a5e5b
commit
964c0142cc
@ -532,25 +532,43 @@ namespace Opm
|
|||||||
* Relative permeabilities for water, oil, gas
|
* Relative permeabilities for water, oil, gas
|
||||||
*/
|
*/
|
||||||
if (aqua_active && outKeywords["KRW"] > 0) {
|
if (aqua_active && outKeywords["KRW"] > 0) {
|
||||||
outKeywords["KRW"] = 0;
|
if (sd.rq[aqua_idx].kr.size() > 0) {
|
||||||
simProps.emplace_back(data::CellData{
|
outKeywords["KRW"] = 0;
|
||||||
"WATKR",
|
simProps.emplace_back(data::CellData{
|
||||||
Opm::UnitSystem::measure::permeability,
|
"WATKR",
|
||||||
std::move(adbToDoubleVector(sd.rq[aqua_idx].kr))});
|
Opm::UnitSystem::measure::permeability,
|
||||||
|
std::move(adbToDoubleVector(sd.rq[aqua_idx].kr))});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Opm::OpmLog::warning("Empty:WATKR",
|
||||||
|
"Not emitting empty Water Rel-Perm");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (aqua_active && outKeywords["KRO"] > 0) {
|
if (liquid_active && outKeywords["KRO"] > 0) {
|
||||||
outKeywords["KRO"] = 0;
|
if (sd.rq[liquid_idx].kr.size() > 0) {
|
||||||
simProps.emplace_back(data::CellData{
|
outKeywords["KRO"] = 0;
|
||||||
"OILKR",
|
simProps.emplace_back(data::CellData{
|
||||||
Opm::UnitSystem::measure::permeability,
|
"OILKR",
|
||||||
std::move(adbToDoubleVector(sd.rq[liquid_idx].kr))});
|
Opm::UnitSystem::measure::permeability,
|
||||||
|
std::move(adbToDoubleVector(sd.rq[liquid_idx].kr))});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Opm::OpmLog::warning("Empty:OILKR",
|
||||||
|
"Not emitting empty Oil Rel-Perm");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (aqua_active && outKeywords["KRG"] > 0) {
|
if (vapour_active && outKeywords["KRG"] > 0) {
|
||||||
outKeywords["KRG"] = 0;
|
if (sd.rq[vapour_idx].kr.size() > 0) {
|
||||||
simProps.emplace_back(data::CellData{
|
outKeywords["KRG"] = 0;
|
||||||
"GASKR",
|
simProps.emplace_back(data::CellData{
|
||||||
Opm::UnitSystem::measure::permeability,
|
"GASKR",
|
||||||
std::move(adbToDoubleVector(sd.rq[vapour_idx].kr))});
|
Opm::UnitSystem::measure::permeability,
|
||||||
|
std::move(adbToDoubleVector(sd.rq[vapour_idx].kr))});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Opm::OpmLog::warning("Empty:GASKR",
|
||||||
|
"Not emitting empty Gas Rel-Perm");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user