mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
add computeFIP method.
This commit is contained in:
committed by
Atgeirr Flø Rasmussen
parent
379bd967e1
commit
148038939d
@@ -157,6 +157,8 @@ namespace Opm
|
|||||||
const Wells* wells,
|
const Wells* wells,
|
||||||
const BlackoilState& x,
|
const BlackoilState& x,
|
||||||
WellState& xw);
|
WellState& xw);
|
||||||
|
double computeFIP(const ReservoirState& state);
|
||||||
|
|
||||||
|
|
||||||
void computeWellPotentials(const Wells* wells,
|
void computeWellPotentials(const Wells* wells,
|
||||||
const WellState& xw,
|
const WellState& xw,
|
||||||
|
|||||||
@@ -178,6 +178,12 @@ namespace Opm
|
|||||||
// Compute reservoir volumes for RESV controls.
|
// Compute reservoir volumes for RESV controls.
|
||||||
asImpl().computeRESV(timer.currentStepNum(), wells, state, well_state);
|
asImpl().computeRESV(timer.currentStepNum(), wells, state, well_state);
|
||||||
|
|
||||||
|
// Comput original FIP.
|
||||||
|
OpmLog::info("PORV: " + std::to_string(unit::convert::to(geo_.poreVolume().sum(), unit::stb)));
|
||||||
|
const V OOIP = asImpl().computeFIP(state);
|
||||||
|
OpmLog::info("Original Fluid oil in place: " + std::to_string(unit::convert::to(original_fip, unit::stb)));
|
||||||
|
|
||||||
|
//OpmLog::info("Original Fluid oil in place: " + std::to_string(original_fip));
|
||||||
// Run a multiple steps of the solver depending on the time step control.
|
// Run a multiple steps of the solver depending on the time step control.
|
||||||
solver_timer.start();
|
solver_timer.start();
|
||||||
|
|
||||||
@@ -249,6 +255,9 @@ namespace Opm
|
|||||||
// Report timing.
|
// Report timing.
|
||||||
const double st = solver_timer.secsSinceStart();
|
const double st = solver_timer.secsSinceStart();
|
||||||
|
|
||||||
|
const double current_fip = asImpl().computeFIP(state);
|
||||||
|
OpmLog::info("Currnet Fluid oil in place: " + std::to_string(unit::convert::to(current_fip, unit::stb)));
|
||||||
|
//OpmLog::info("Currnet Fluid oil in place: " + std::to_string(current_fip));
|
||||||
// accumulate total time
|
// accumulate total time
|
||||||
stime += st;
|
stime += st;
|
||||||
|
|
||||||
@@ -626,7 +635,27 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <class Implementation>
|
||||||
|
V SimulatorBase<Implementation>::computeFIP(const ReservoirState& state)
|
||||||
|
{
|
||||||
|
using namespace Opm::AutoDiffGrid;
|
||||||
|
const int np = state.numPhases();
|
||||||
|
const int nc = numCells(grid_);
|
||||||
|
const Opm::PhaseUsage& pu = props_.phaseUsage();
|
||||||
|
V so = V::Zero(nc);
|
||||||
|
V sw = V::Zero(nc);
|
||||||
|
V sg = V::Zero(nc);
|
||||||
|
for (int c = 0; c < nc; ++c) {
|
||||||
|
so[c] = state.saturation()[c*np + pu.phase_pos[BlackoilPhases::Liquid]];
|
||||||
|
sw[c] = state.saturation()[c*np + pu.phase_pos[BlackoilPhases::Aqua]];
|
||||||
|
sg[c] = state.saturation()[c*np + pu.phase_pos[BlackoilPhases::Vapour]];
|
||||||
|
}
|
||||||
|
V fip(V::Zero(np));
|
||||||
|
fip[0] = (geo_.poreVolume() * so).sum();
|
||||||
|
fip[1] = (geo_.poreVolume() * sw).sum();
|
||||||
|
fip[2] = (geo_.poreVolume() * sg).sum();
|
||||||
|
return fip;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template <class Implementation>
|
template <class Implementation>
|
||||||
|
|||||||
Reference in New Issue
Block a user