Opm::BlackoilSequentialModel< Grid, WellModel, PressureModelT, TransportModelT > Class Template Reference

A sequential splitting model implementation for three-phase black oil. More...

#include <BlackoilSequentialModel.hpp>

List of all members.

Public Types

typedef BlackoilState ReservoirState
typedef
WellStateFullyImplicitBlackoil 
WellState
typedef
BlackoilSequentialModelParameters 
ModelParameters
typedef
DefaultBlackoilSolutionState 
SolutionState
typedef PressureModelT< Grid,
WellModel > 
PressureModel
typedef TransportModelT< Grid,
WellModel > 
TransportModel
typedef NonlinearSolver
< PressureModel > 
PressureSolver
typedef NonlinearSolver
< TransportModel > 
TransportSolver
typedef
TransportModel::SimulatorData 
SimulatorData
typedef TransportModel::FIPDataType FIPDataType

Public Member Functions

 BlackoilSequentialModel (const ModelParameters &param, const Grid &grid, const BlackoilPropsAdFromDeck &fluid, const DerivedGeology &geo, const RockCompressibility *rock_comp_props, const WellModel well_model, const NewtonIterationBlackoilInterface &linsolver, std::shared_ptr< const EclipseState > eclState, const bool has_disgas, const bool has_vapoil, const bool terminal_output)
 Construct the model.
void prepareStep (const SimulatorTimerInterface &, const ReservoirState &reservoir_state, const WellState &well_state)
 Called once before each time step.
template<class NonlinearSolverType >
SimulatorReport nonlinearIteration (const int iteration, const SimulatorTimerInterface &timer, NonlinearSolverType &, ReservoirState &reservoir_state, WellState &well_state)
 Called once per nonlinear iteration.
void afterStep (const SimulatorTimerInterface &, ReservoirState &, WellState &)
 Called once after each time step.
void setThresholdPressures (const std::vector< double > &threshold_pressures_by_face)
 Set threshold pressures that prevent or reduce flow.
bool terminalOutputEnabled () const
 Return true if output to cout is wanted.
double relativeChange (const SimulationDataContainer &previous, const SimulationDataContainer &current) const
 Return the relative change in variables relevant to this model.
const WellModel & wellModel () const
 Return the well model.
std::vector< std::vector
< double > > 
computeFluidInPlace (const ReservoirState &x, const std::vector< int > &fipnum) const
 Compute fluid in place.
const SimulatorData & getSimulatorData (const SimulationDataContainer &localState) const
 Return reservoir simulation data (for output functionality).
FIPDataType getFIPData () const
 Return fluid-in-place data (for output functionality).
const SimulatorReport & failureReport () const
 return the statistics if the nonlinearIteration() method failed.

Protected Attributes

SimulatorReport failureReport_
std::unique_ptr< PressureModel > pressure_model_
std::unique_ptr< TransportModel > transport_model_
PressureSolver pressure_solver_
TransportSolver transport_solver_
ReservoirState initial_reservoir_state_
WellState initial_well_state_
bool iterate_to_fully_implicit_

Detailed Description

template<class Grid, class WellModel, template< class G, class W > class PressureModelT, template< class G, class W > class TransportModelT>
class Opm::BlackoilSequentialModel< Grid, WellModel, PressureModelT, TransportModelT >

A sequential splitting model implementation for three-phase black oil.


Constructor & Destructor Documentation

template<class Grid , class WellModel , template< class G, class W > class PressureModelT, template< class G, class W > class TransportModelT>
Opm::BlackoilSequentialModel< Grid, WellModel, PressureModelT, TransportModelT >::BlackoilSequentialModel ( const ModelParameters param,
const Grid &  grid,
const BlackoilPropsAdFromDeck fluid,
const DerivedGeology geo,
const RockCompressibility *  rock_comp_props,
const WellModel  well_model,
const NewtonIterationBlackoilInterface linsolver,
std::shared_ptr< const EclipseState >  eclState,
const bool  has_disgas,
const bool  has_vapoil,
const bool  terminal_output 
) [inline]

Construct the model.

It will retain references to the arguments of this functions, and they are expected to remain in scope for the lifetime of the solver.

Parameters:
[in] param parameters
[in] grid grid data structure
[in] fluid fluid properties
[in] geo rock properties
[in] rock_comp_props if non-null, rock compressibility properties
[in] wells well structure
[in] vfp_properties Vertical flow performance tables
[in] linsolver linear solver
[in] eclState eclipse state
[in] has_disgas turn on dissolved gas
[in] has_vapoil turn on vaporized oil feature
[in] terminal_output request output to cout/cerr

Member Function Documentation

template<class Grid , class WellModel , template< class G, class W > class PressureModelT, template< class G, class W > class TransportModelT>
void Opm::BlackoilSequentialModel< Grid, WellModel, PressureModelT, TransportModelT >::afterStep ( const SimulatorTimerInterface ,
ReservoirState &  ,
WellState  
) [inline]

Called once after each time step.

In this class, this function does nothing.

Parameters:
[in] timer simulation timer
[in,out] reservoir_state reservoir state variables
[in,out] well_state well state variables
template<class Grid , class WellModel , template< class G, class W > class PressureModelT, template< class G, class W > class TransportModelT>
std::vector<std::vector<double> > Opm::BlackoilSequentialModel< Grid, WellModel, PressureModelT, TransportModelT >::computeFluidInPlace ( const ReservoirState &  x,
const std::vector< int > &  fipnum 
) const [inline]

Compute fluid in place.

Parameters:
[in] ReservoirState 
[in] FIPNUM for active cells not global cells.
Returns:
fluid in place, number of fip regions, each region contains 5 values which are liquid, vapour, water, free gas and dissolved gas.
template<class Grid , class WellModel , template< class G, class W > class PressureModelT, template< class G, class W > class TransportModelT>
const SimulatorReport& Opm::BlackoilSequentialModel< Grid, WellModel, PressureModelT, TransportModelT >::failureReport (  )  const [inline]

return the statistics if the nonlinearIteration() method failed.

NOTE: for the flow_legacy simulator family this method is a stub, i.e. the failure report object will *not* contain any meaningful data.

template<class Grid , class WellModel , template< class G, class W > class PressureModelT, template< class G, class W > class TransportModelT>
template<class NonlinearSolverType >
SimulatorReport Opm::BlackoilSequentialModel< Grid, WellModel, PressureModelT, TransportModelT >::nonlinearIteration ( const int  iteration,
const SimulatorTimerInterface timer,
NonlinearSolverType &  ,
ReservoirState &  reservoir_state,
WellState well_state 
) [inline]

Called once per nonlinear iteration.

This model will first solve the pressure model to convergence, then the transport model.

Parameters:
[in] iteration should be 0 for the first call of a new timestep
[in] timer simulation timer
[in] nonlinear_solver nonlinear solver used (for oscillation/relaxation control)
[in,out] reservoir_state reservoir state variables
[in,out] well_state well state variables
template<class Grid , class WellModel , template< class G, class W > class PressureModelT, template< class G, class W > class TransportModelT>
void Opm::BlackoilSequentialModel< Grid, WellModel, PressureModelT, TransportModelT >::prepareStep ( const SimulatorTimerInterface ,
const ReservoirState &  reservoir_state,
const WellState well_state 
) [inline]

Called once before each time step.

Parameters:
[in] timer simulation timer
[in] reservoir_state reservoir state variables
[in] well_state well state variables
template<class Grid , class WellModel , template< class G, class W > class PressureModelT, template< class G, class W > class TransportModelT>
void Opm::BlackoilSequentialModel< Grid, WellModel, PressureModelT, TransportModelT >::setThresholdPressures ( const std::vector< double > &  threshold_pressures_by_face  )  [inline]

Set threshold pressures that prevent or reduce flow.

This prevents flow across faces if the potential difference is less than the threshold. If the potential difference is greater, the threshold value is subtracted before calculating flow. This is treated symmetrically, so flow is prevented or reduced in both directions equally.

Parameters:
[in] threshold_pressures_by_face array of size equal to the number of faces of the grid passed in the constructor.

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

Generated on 26 Mar 2018 by  doxygen 1.6.1