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