Fixed hysteresis input/output in flow_legacy

This commit is contained in:
babrodtk
2017-04-07 14:36:36 +02:00
parent 8340d26890
commit 1fd36e9451
10 changed files with 167 additions and 25 deletions

View File

@@ -94,6 +94,7 @@ namespace Opm
// This is a restart, populate WellState and ReservoirState state objects from restart file
output_writer_.initFromRestartFile(props_.phaseUsage(), grid_, state, prev_well_state, extra);
initHydroCarbonState(state, props_.phaseUsage(), Opm::UgGridHelpers::numCells(grid_), has_disgas_, has_vapoil_);
initHysteresisParams(state);
}
// Create timers and file for writing timing info.
@@ -844,4 +845,25 @@ namespace Opm
well_state, list_econ_limited);
}
template <class Implementation>
void
SimulatorBase<Implementation>::
initHysteresisParams(ReservoirState& state)
{
typedef std::vector<double> VectorType;
const VectorType& somax = state.getCellData( "SOMAX" );
VectorType& pcSwMdc_ow = state.getCellData( "PCSWMDC_OW" );
VectorType& krnSwMdc_ow = state.getCellData( "KRNSWMDC_OW" );
VectorType& pcSwMdc_go = state.getCellData( "PCSWMDC_GO" );
VectorType& krnSwMdc_go = state.getCellData( "KRNSWMDC_GO" );
props_.setSatOilMax(somax);
props_.setOilWaterHystParams(pcSwMdc_ow, krnSwMdc_ow, allcells_);
props_.setGasOilHystParams(pcSwMdc_go, krnSwMdc_go, allcells_);
}
} // namespace Opm