mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-26 17:20:59 -06:00
use PV weighted pressure when HCPV is zero.
This commit is contained in:
parent
d5b4194a0e
commit
4b88d4edd1
@ -2324,8 +2324,6 @@ namespace detail {
|
||||
|
||||
const std::vector<PhasePresence> cond = phaseCondition();
|
||||
|
||||
|
||||
|
||||
const ADB pv_mult = poroMult(state.pressure);
|
||||
const V& pv = geo_.poreVolume();
|
||||
const int maxnp = Opm::BlackoilPhases::MaxNumPhases;
|
||||
@ -2356,17 +2354,25 @@ namespace detail {
|
||||
}
|
||||
}
|
||||
|
||||
// compute PAV and PORV or every regions.
|
||||
// compute PAV and PORV for every regions.
|
||||
const V hydrocarbon = state.saturation[Oil].value() + state.saturation[Gas].value();
|
||||
V hcpv = V::Zero(nc);
|
||||
V pres = V::Zero(nc);
|
||||
for (int c = 0; c < nc; ++c) {
|
||||
if (fipnum[c] != 0) {
|
||||
values[fipnum[c]-1][5] += pv[c] * hydrocarbon[c];
|
||||
hcpv[fipnum[c]-1] += pv[c] * hydrocarbon[c];
|
||||
pres[fipnum[c]-1] += pv[c] * state.pressure.value()[c];
|
||||
values[fipnum[c]-1][5] += pv[c];
|
||||
values[fipnum[c]-1][6] += pv[c] * state.pressure.value()[c] * hydrocarbon[c];
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& val : values) {
|
||||
val[6] = val[6] / val[5];
|
||||
for (int reg = 0; reg < dims; ++reg) {
|
||||
if (hcpv[reg] != 0) {
|
||||
values[reg][6] /= hcpv[reg];
|
||||
} else {
|
||||
values[reg][6] = pres[reg] / values[reg][5];
|
||||
}
|
||||
}
|
||||
|
||||
return values;
|
||||
|
@ -698,8 +698,8 @@ namespace Opm
|
||||
const V sg = pu.phase_used[BlackoilPhases::Vapour] ? V(s.col(BlackoilPhases::Vapour)) : V::Zero(nc);
|
||||
const V hydrocarbon = so + sg;
|
||||
const V p = Eigen::Map<const V>(& state.pressure()[0], nc);
|
||||
totals[5] = (geo_.poreVolume() * hydrocarbon).sum();
|
||||
totals[6] = unit::convert::to((p * geo_.poreVolume() * hydrocarbon).sum() / totals[5], unit::barsa);
|
||||
totals[5] = geo_.poreVolume().sum();
|
||||
totals[6] = unit::convert::to((p * geo_.poreVolume() * hydrocarbon).sum() / ((geo_.poreVolume() * hydrocarbon).sum()), unit::barsa);
|
||||
|
||||
return totals;
|
||||
}
|
||||
@ -722,18 +722,22 @@ namespace Opm
|
||||
if (units.getType() == UnitSystem::UnitType::UNIT_TYPE_METRIC) {
|
||||
ss << " : PAV =" << std::setw(14) << cip[6] << " BARSA :\n"
|
||||
<< std::fixed << std::setprecision(0)
|
||||
<< " : PORV =" << std::setw(14) << cip[5] << " RM3 :\n"
|
||||
<< " : Pressure is weighted by hydrocarbon pore volume :\n"
|
||||
<< " : Porv volumes are taken at reference conditions :\n"
|
||||
<< " :--------------- Oil SM3 ---------------:-- Wat SM3 --:--------------- Gas SM3 ---------------:\n";
|
||||
<< " : PORV =" << std::setw(14) << cip[5] << " RM3 :\n";
|
||||
if (!reg) {
|
||||
ss << " : Pressure is weighted by hydrocarbon pore volume :\n"
|
||||
<< " : Porv volumes are taken at reference conditions :\n";
|
||||
}
|
||||
ss << " :--------------- Oil SM3 ---------------:-- Wat SM3 --:--------------- Gas SM3 ---------------:\n";
|
||||
}
|
||||
if (units.getType() == UnitSystem::UnitType::UNIT_TYPE_FIELD) {
|
||||
ss << " : PAV =" << std::setw(14) << cip[6] << " PSIA :\n"
|
||||
<< std::fixed << std::setprecision(0)
|
||||
<< " : PORV =" << std::setw(14) << cip[5] << " RB :\n"
|
||||
<< " : Pressure is weighted by hydrocarbon pore voulme :\n"
|
||||
<< " : Pore volumes are taken at reference conditions :\n"
|
||||
<< " :--------------- Oil STB ---------------:-- Wat STB --:--------------- Gas MSCF ---------------:\n";
|
||||
<< " : PORV =" << std::setw(14) << cip[5] << " RB :\n";
|
||||
if (!reg) {
|
||||
ss << " : Pressure is weighted by hydrocarbon pore voulme :\n"
|
||||
<< " : Pore volumes are taken at reference conditions :\n";
|
||||
}
|
||||
ss << " :--------------- Oil STB ---------------:-- Wat STB --:--------------- Gas MSCF ---------------:\n";
|
||||
}
|
||||
ss << " : Liquid Vapour Total : Total : Free Dissolved Total :" << "\n"
|
||||
<< ":------------------------:------------------------------------------:----------------:------------------------------------------:" << "\n"
|
||||
|
@ -565,7 +565,8 @@ namespace {
|
||||
|
||||
const int dims = *std::max_element(fipnum.begin(), fipnum.end());
|
||||
std::vector<V> values(dims, V::Zero(7));
|
||||
|
||||
V hcpv = V::Zero(nc);
|
||||
V pres = V::Zero(nc);
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
for (int c = 0; c < nc; ++c) {
|
||||
if (fipnum[c] != 0) {
|
||||
@ -577,13 +578,19 @@ namespace {
|
||||
// compute PAV and PORV or every regions.
|
||||
for (int c = 0; c < nc; ++c) {
|
||||
if (fipnum[c] != 0) {
|
||||
values[fipnum[c]-1][5] += pv[c] * s.col(Oil)[c];
|
||||
hcpv[fipnum[c]-1] += pv[c] * s.col(Oil)[c];
|
||||
pres[fipnum[c]-1] += pv[c] * state.pressure.value()[c];
|
||||
values[fipnum[c]-1][5] += pv[c];
|
||||
values[fipnum[c]-1][6] += pv[c] * state.pressure.value()[c] * s.col(Oil)[c];
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& val : values) {
|
||||
val[6] = val[6] / val[5];
|
||||
for (int reg = 0; reg < dims; ++reg) {
|
||||
if (hcpv[reg] != 0) {
|
||||
values[reg][6] /= hcpv[reg];
|
||||
} else {
|
||||
values[reg][6] = pres[reg] / values[reg][5];
|
||||
}
|
||||
}
|
||||
|
||||
return values;
|
||||
|
Loading…
Reference in New Issue
Block a user