mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Calculation the original FIP at the beginning
This commit is contained in:
parent
5a917a4828
commit
36ce159411
@ -52,6 +52,7 @@ public:
|
|||||||
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
|
||||||
typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid;
|
typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid;
|
||||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||||
|
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
|
||||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) BlackoilIndices;
|
typedef typename GET_PROP_TYPE(TypeTag, Indices) BlackoilIndices;
|
||||||
|
|
||||||
typedef WellStateFullyImplicitBlackoilDense WellState;
|
typedef WellStateFullyImplicitBlackoilDense WellState;
|
||||||
@ -248,18 +249,32 @@ public:
|
|||||||
|
|
||||||
auto solver = createSolver(well_model);
|
auto solver = createSolver(well_model);
|
||||||
|
|
||||||
|
// write the inital state at the report stage
|
||||||
|
if (timer.initialStep()) {
|
||||||
|
|
||||||
|
// calculate Intensive Quantities
|
||||||
|
const auto& gridManager = ebosSimulator_.gridManager();
|
||||||
|
const auto& gridView = gridManager.gridView();
|
||||||
|
auto elemIt = gridView.template begin<0>();
|
||||||
|
auto elemEndIt = gridView.template end<0>();
|
||||||
|
ElementContext elemCtx(ebosSimulator_);
|
||||||
|
for (; elemIt != elemEndIt; ++ elemIt) {
|
||||||
|
// this is convenient, but slightly inefficient: one only needs to update
|
||||||
|
// the primary intensive quantities
|
||||||
|
elemCtx.updateAll(*elemIt);
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO:: fiz seg_fault
|
||||||
|
//output_writer_.writeTimeStep( timer, state, well_state, solver->model() );
|
||||||
|
}
|
||||||
|
|
||||||
// Compute orignal FIP;
|
// Compute orignal FIP;
|
||||||
if (!timer.initialStep() && !ooip_computed) {
|
if (!ooip_computed) {
|
||||||
OOIP = solver->computeFluidInPlace(fipnum);
|
OOIP = solver->computeFluidInPlace(fipnum);
|
||||||
FIPUnitConvert(eclState().getUnits(), OOIP);
|
FIPUnitConvert(eclState().getUnits(), OOIP);
|
||||||
ooip_computed = true;
|
ooip_computed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// write the inital state at the report stage
|
|
||||||
if (timer.initialStep()) {
|
|
||||||
//output_writer_.writeTimeStep( timer, state, well_state, solver->model() );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( terminal_output_ )
|
if( terminal_output_ )
|
||||||
{
|
{
|
||||||
std::ostringstream step_msg;
|
std::ostringstream step_msg;
|
||||||
|
Loading…
Reference in New Issue
Block a user