mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
correct the formulation for PAV calculations.
This commit is contained in:
parent
5f1bcb2a59
commit
490dbbf133
@ -2359,8 +2359,8 @@ namespace detail {
|
||||
// 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];
|
||||
values[fipnum[c]-1][6] += pv[c] * state.pressure.value()[c];
|
||||
values[fipnum[c]-1][5] += pv[c] * (s.col(Gas)[c] + s.col(Oil)[c]);
|
||||
values[fipnum[c]-1][6] += pv[c] * state.pressure.value()[c] * (s.col(Gas)[c] + s.col(Oil)[c]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ namespace Opm
|
||||
std::vector<V>& fip);
|
||||
|
||||
V
|
||||
FIPTotals(const std::vector<V>& fip, const std::vector<double>& press);
|
||||
FIPTotals(const std::vector<V>& fip, const ReservoirState& state);
|
||||
|
||||
void
|
||||
outputFluidInPlace(const V& oip, const V& cip, const UnitSystem& units, const int reg);
|
||||
|
@ -271,8 +271,8 @@ namespace Opm
|
||||
std::vector<V> COIP;
|
||||
COIP = solver->computeFluidInPlace(state, fipnum);
|
||||
FIPUnitConvert(eclipse_state_->getUnits(), COIP);
|
||||
V OOIP_totals = FIPTotals(OOIP, state.pressure());
|
||||
V COIP_totals = FIPTotals(COIP, state.pressure());
|
||||
V OOIP_totals = FIPTotals(OOIP, state);
|
||||
V COIP_totals = FIPTotals(COIP, state);
|
||||
outputFluidInPlace(OOIP_totals, COIP_totals,eclipse_state_->getUnits(), 0);
|
||||
for (size_t reg = 0; reg < OOIP.size(); ++reg) {
|
||||
outputFluidInPlace(OOIP[reg], COIP[reg], eclipse_state_->getUnits(), reg+1);
|
||||
@ -682,7 +682,7 @@ namespace Opm
|
||||
|
||||
template <class Implementation>
|
||||
V
|
||||
SimulatorBase<Implementation>::FIPTotals(const std::vector<V>& fip, const std::vector<double>& press)
|
||||
SimulatorBase<Implementation>::FIPTotals(const std::vector<V>& fip, const ReservoirState& state)
|
||||
{
|
||||
V totals(V::Zero(7));
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
@ -690,9 +690,12 @@ namespace Opm
|
||||
totals[i] += fip[reg][i];
|
||||
}
|
||||
}
|
||||
const V p = Eigen::Map<const V>(& press[0], press.size());
|
||||
totals[5] = geo_.poreVolume().sum();
|
||||
totals[6] = unit::convert::to((p * geo_.poreVolume()).sum() / totals[5], unit::barsa);
|
||||
const int nc = Opm::AutoDiffGrid::numCells(grid_);
|
||||
const int np = state.numPhases();
|
||||
const DataBlock s = Eigen::Map<const DataBlock>(& state.saturation()[0], nc, np);
|
||||
const V p = Eigen::Map<const V>(& state.pressure()[0], nc);
|
||||
totals[5] = (geo_.poreVolume() * (s.col(Oil) + s.col(Gas))).sum();
|
||||
totals[6] = unit::convert::to((p * geo_.poreVolume() * (s.col(Oil) + s.col(Gas))).sum() / totals[5], unit::barsa);
|
||||
|
||||
return totals;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user