Calculation the original FIP at the beginning

This commit is contained in:
Tor Harald Sandve 2016-11-14 10:16:57 +01:00
parent 5a917a4828
commit 36ce159411

View File

@ -52,6 +52,7 @@ public:
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid;
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 WellStateFullyImplicitBlackoilDense WellState;
@ -248,18 +249,32 @@ public:
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;
if (!timer.initialStep() && !ooip_computed) {
if (!ooip_computed) {
OOIP = solver->computeFluidInPlace(fipnum);
FIPUnitConvert(eclState().getUnits(), OOIP);
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_ )
{
std::ostringstream step_msg;