Opm::SimulatorBase< Implementation > Class Template Reference

Class collecting all necessary components for a two-phase simulation. More...

#include <SimulatorBase.hpp>

Inheritance diagram for Opm::SimulatorBase< Implementation >:
Inheritance graph

Public Types

typedef Traits::ReservoirState ReservoirState
 
typedef Traits::WellState WellState
 
typedef Traits::OutputWriter OutputWriter
 
typedef Traits::Grid Grid
 
typedef Traits::Solver Solver
 

Public Member Functions

 SimulatorBase (const parameter::ParameterGroup &param, const Grid &grid, const DerivedGeology &geo, BlackoilPropsAdInterface &props, const RockCompressibility *rock_comp_props, NewtonIterationBlackoilInterface &linsolver, const double *gravity, const bool disgas, const bool vapoil, std::shared_ptr< EclipseState > eclipse_state, OutputWriter &output_writer, const std::vector< double > &threshold_pressures_by_face)
 
SimulatorReport run (SimulatorTimer &timer, ReservoirState &state)
 

Protected Types

typedef
RateConverter::SurfaceToReservoirVoidage
< BlackoilPropsAdInterface,
std::vector< int > > 
RateConverterType
 
typedef Traits::Model Model
 
typedef Model::ModelParameters ModelParameters
 
typedef Solver::SolverParameters SolverParameters
 

Protected Member Functions

Implementation & asImpl ()
 
const Implementation & asImpl () const
 
void handleAdditionalWellInflow (SimulatorTimer &timer, WellsManager &wells_manager, WellState &well_state, const Wells *wells)
 
std::unique_ptr< SolvercreateSolver (const Wells *wells)
 
void computeRESV (const std::size_t step, const Wells *wells, const BlackoilState &x, WellState &xw)
 

Protected Attributes

const parameter::ParameterGroup param_
 
ModelParameters model_param_
 
SolverParameters solver_param_
 
const Gridgrid_
 
BlackoilPropsAdInterfaceprops_
 
const RockCompressibility * rock_comp_props_
 
const double * gravity_
 
const DerivedGeologygeo_
 
NewtonIterationBlackoilInterfacesolver_
 
std::vector< int > allcells_
 
const bool has_disgas_
 
const bool has_vapoil_
 
bool terminal_output_
 
std::shared_ptr< EclipseState > eclipse_state_
 
OutputWriteroutput_writer_
 
RateConverterType rateConverter_
 
std::vector< double > threshold_pressures_by_face_
 
bool is_parallel_run_
 

Detailed Description

template<class Implementation>
class Opm::SimulatorBase< Implementation >

Class collecting all necessary components for a two-phase simulation.

Member Typedef Documentation

template<class Implementation>
typedef Traits::Grid Opm::SimulatorBase< Implementation >::Grid
template<class Implementation>
typedef Traits::Model Opm::SimulatorBase< Implementation >::Model
protected
template<class Implementation>
typedef Model::ModelParameters Opm::SimulatorBase< Implementation >::ModelParameters
protected
template<class Implementation>
typedef Traits::OutputWriter Opm::SimulatorBase< Implementation >::OutputWriter
template<class Implementation>
typedef RateConverter:: SurfaceToReservoirVoidage< BlackoilPropsAdInterface, std::vector<int> > Opm::SimulatorBase< Implementation >::RateConverterType
protected
template<class Implementation>
typedef Traits::ReservoirState Opm::SimulatorBase< Implementation >::ReservoirState
template<class Implementation>
typedef Traits::Solver Opm::SimulatorBase< Implementation >::Solver
template<class Implementation>
typedef Solver::SolverParameters Opm::SimulatorBase< Implementation >::SolverParameters
protected
template<class Implementation>
typedef Traits::WellState Opm::SimulatorBase< Implementation >::WellState

Constructor & Destructor Documentation

template<class Implementation >
Opm::SimulatorBase< Implementation >::SimulatorBase ( const parameter::ParameterGroup &  param,
const Grid grid,
const DerivedGeology geo,
BlackoilPropsAdInterface props,
const RockCompressibility *  rock_comp_props,
NewtonIterationBlackoilInterface linsolver,
const double *  gravity,
const bool  disgas,
const bool  vapoil,
std::shared_ptr< EclipseState >  eclipse_state,
OutputWriter output_writer,
const std::vector< double > &  threshold_pressures_by_face 
)

Initialise from parameters and objects to observe.

Parameters
[in]paramparameters, this class accepts the following:

parameter (default) effect

output (true) write output to files? output_dir ("output") output directoty output_interval (1) output every nth step nl_pressure_residual_tolerance (0.0) pressure solver residual tolerance (in Pascal) nl_pressure_change_tolerance (1.0) pressure solver change tolerance (in Pascal) nl_pressure_maxiter (10) max nonlinear iterations in pressure nl_maxiter (30) max nonlinear iterations in transport nl_tolerance (1e-9) transport solver absolute residual tolerance num_transport_substeps (1) number of transport steps per pressure step use_segregation_split (false) solve for gravity segregation (if false, segregation is ignored).

Parameters
[in]gridgrid data structure
[in]geoderived geological properties
[in]propsfluid and rock properties
[in]rock_comp_propsif non-null, rock compressibility properties
[in]linsolverlinear solver
[in]gravityif non-null, gravity vector
[in]disgastrue for dissolved gas option
[in]vapoiltrue for vaporized oil option
[in]eclipse_state
[in]output_writer
[in]threshold_pressures_by_faceif nonempty, threshold pressures that inhibit flow

References Opm::SimulatorBase< Implementation >::allcells_, Opm::SimulatorBase< Implementation >::is_parallel_run_, Opm::NewtonIterationBlackoilInterface::parallelInformation(), Opm::SimulatorBase< Implementation >::solver_, and Opm::SimulatorBase< Implementation >::terminal_output_.

Member Function Documentation

template<class Implementation>
Implementation& Opm::SimulatorBase< Implementation >::asImpl ( )
inlineprotected
template<class Implementation>
const Implementation& Opm::SimulatorBase< Implementation >::asImpl ( ) const
inlineprotected
template<class Implementation >
void Opm::SimulatorBase< Implementation >::computeRESV ( const std::size_t  step,
const Wells *  wells,
const BlackoilState &  x,
WellState xw 
)
protected
template<class Implementation >
auto Opm::SimulatorBase< Implementation >::createSolver ( const Wells *  wells)
protected
template<class Implementation >
void Opm::SimulatorBase< Implementation >::handleAdditionalWellInflow ( SimulatorTimer &  timer,
WellsManager &  wells_manager,
WellState well_state,
const Wells *  wells 
)
protected
template<class Implementation >
SimulatorReport Opm::SimulatorBase< Implementation >::run ( SimulatorTimer &  timer,
ReservoirState state 
)

Run the simulation. This will run succesive timesteps until timer.done() is true. It will modify the reservoir and well states.

Parameters
[in,out]timergoverns the requested reporting timesteps
[in,out]statestate of reservoir: pressure, fluxes
[in,out]well_statestate of wells: bhp, perforation rates
Returns
simulation report, with timing data

Member Data Documentation

template<class Implementation>
std::vector<int> Opm::SimulatorBase< Implementation >::allcells_
protected
template<class Implementation>
std::shared_ptr<EclipseState> Opm::SimulatorBase< Implementation >::eclipse_state_
protected
template<class Implementation>
const DerivedGeology& Opm::SimulatorBase< Implementation >::geo_
protected
template<class Implementation>
const double* Opm::SimulatorBase< Implementation >::gravity_
protected
template<class Implementation>
const Grid& Opm::SimulatorBase< Implementation >::grid_
protected
template<class Implementation>
const bool Opm::SimulatorBase< Implementation >::has_disgas_
protected
template<class Implementation>
const bool Opm::SimulatorBase< Implementation >::has_vapoil_
protected
template<class Implementation>
bool Opm::SimulatorBase< Implementation >::is_parallel_run_
protected
template<class Implementation>
ModelParameters Opm::SimulatorBase< Implementation >::model_param_
protected
template<class Implementation>
OutputWriter& Opm::SimulatorBase< Implementation >::output_writer_
protected
template<class Implementation>
const parameter::ParameterGroup Opm::SimulatorBase< Implementation >::param_
protected
template<class Implementation>
BlackoilPropsAdInterface& Opm::SimulatorBase< Implementation >::props_
protected
template<class Implementation>
RateConverterType Opm::SimulatorBase< Implementation >::rateConverter_
protected
template<class Implementation>
const RockCompressibility* Opm::SimulatorBase< Implementation >::rock_comp_props_
protected
template<class Implementation>
NewtonIterationBlackoilInterface& Opm::SimulatorBase< Implementation >::solver_
protected
template<class Implementation>
SolverParameters Opm::SimulatorBase< Implementation >::solver_param_
protected
template<class Implementation>
bool Opm::SimulatorBase< Implementation >::terminal_output_
protected
template<class Implementation>
std::vector<double> Opm::SimulatorBase< Implementation >::threshold_pressures_by_face_
protected

The documentation for this class was generated from the following files: