Opm::SimulatorFullyImplicitBlackoil< TypeTag > Class Template Reference

a simulator for the blackoil model More...

#include <SimulatorFullyImplicitBlackoil.hpp>

Inheritance diagram for Opm::SimulatorFullyImplicitBlackoil< TypeTag >:
Inheritance graph

Public Types

using Simulator = GetPropType< TypeTag, Properties::Simulator >
 
using Grid = GetPropType< TypeTag, Properties::Grid >
 
using FluidSystem = GetPropType< TypeTag, Properties::FluidSystem >
 
using ElementContext = GetPropType< TypeTag, Properties::ElementContext >
 
using BlackoilIndices = GetPropType< TypeTag, Properties::Indices >
 
using PrimaryVariables = GetPropType< TypeTag, Properties::PrimaryVariables >
 
using MaterialLaw = GetPropType< TypeTag, Properties::MaterialLaw >
 
using SolutionVector = GetPropType< TypeTag, Properties::SolutionVector >
 
using MaterialLawParams = GetPropType< TypeTag, Properties::MaterialLawParams >
 
using AquiferModel = GetPropType< TypeTag, Properties::AquiferModel >
 
using TimeStepper = AdaptiveTimeStepping< TypeTag >
 
using PolymerModule = BlackOilPolymerModule< TypeTag >
 
using MICPModule = BlackOilMICPModule< TypeTag >
 
using Model = BlackoilModel< TypeTag >
 
using Solver = NonlinearSolver< TypeTag, Model >
 
using ModelParameters = typename Model::ModelParameters
 
using SolverParameters = typename Solver::SolverParameters
 
using WellModel = BlackoilWellModel< TypeTag >
 

Public Member Functions

 SimulatorFullyImplicitBlackoil (Simulator &simulator)
 
 ~SimulatorFullyImplicitBlackoil ()
 
SimulatorReport run (SimulatorTimer &timer)
 
void init (SimulatorTimer &timer)
 
void updateTUNING (const Tuning &tuning)
 
bool runStep (SimulatorTimer &timer)
 
SimulatorReport finalize ()
 
const Gridgrid () const
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 
const Modelmodel () const
 

Static Public Member Functions

static void registerParameters ()
 

Protected Member Functions

void loadState (HDF5Serializer &serializer, const std::string &groupName) override
 Load simulator state from hdf5 serializer. More...
 
void saveState (HDF5Serializer &serializer, const std::string &groupName) const override
 Save simulator state using hdf5 serializer. More...
 
std::array< std::string, 5 > getHeader () const override
 Returns header data. More...
 
const std::vector< int > & getCellMapping () const override
 Returns local-to-global cell mapping. More...
 
std::unique_ptr< SolvercreateSolver (WellModel &wellModel)
 
const EclipseState & eclState () const
 
const Schedule & schedule () const
 
bool isRestart () const
 
WellModelwellModel_ ()
 
const WellModelwellModel_ () const
 
void startConvergenceOutputThread (std::string_view convOutputOptions, std::string_view optionName)
 
void writeConvergenceOutput (std::vector< StepReport > &&reports)
 
void endConvergenceOutputThread ()
 

Protected Attributes

Simulatorsimulator_
 
ModelParameters modelParam_
 
SolverParameters solverParam_
 
std::unique_ptr< Solversolver_
 
PhaseUsage phaseUsage_
 
bool terminalOutput_
 
SimulatorReport report_
 
std::size_t already_reported_steps_ = 0
 
std::unique_ptr< time::StopWatch > solverTimer_
 
std::unique_ptr< time::StopWatch > totalTimer_
 
std::unique_ptr< TimeStepperadaptiveTimeStepping_
 
std::optional< ConvergenceReportQueueconvergenceOutputQueue_ {}
 
std::optional< ConvergenceOutputThreadconvergenceOutputObject_ {}
 
std::optional< std::thread > convergenceOutputThread_ {}
 
SimulatorSerializer serializer_
 

Detailed Description

template<class TypeTag>
class Opm::SimulatorFullyImplicitBlackoil< TypeTag >

a simulator for the blackoil model

Member Typedef Documentation

◆ AquiferModel

template<class TypeTag >
using Opm::SimulatorFullyImplicitBlackoil< TypeTag >::AquiferModel = GetPropType<TypeTag, Properties::AquiferModel>

◆ BlackoilIndices

template<class TypeTag >
using Opm::SimulatorFullyImplicitBlackoil< TypeTag >::BlackoilIndices = GetPropType<TypeTag, Properties::Indices>

◆ ElementContext

template<class TypeTag >
using Opm::SimulatorFullyImplicitBlackoil< TypeTag >::ElementContext = GetPropType<TypeTag, Properties::ElementContext>

◆ FluidSystem

template<class TypeTag >
using Opm::SimulatorFullyImplicitBlackoil< TypeTag >::FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>

◆ Grid

template<class TypeTag >
using Opm::SimulatorFullyImplicitBlackoil< TypeTag >::Grid = GetPropType<TypeTag, Properties::Grid>

◆ MaterialLaw

template<class TypeTag >
using Opm::SimulatorFullyImplicitBlackoil< TypeTag >::MaterialLaw = GetPropType<TypeTag, Properties::MaterialLaw>

◆ MaterialLawParams

template<class TypeTag >
using Opm::SimulatorFullyImplicitBlackoil< TypeTag >::MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>

◆ MICPModule

template<class TypeTag >
using Opm::SimulatorFullyImplicitBlackoil< TypeTag >::MICPModule = BlackOilMICPModule<TypeTag>

◆ Model

template<class TypeTag >
using Opm::SimulatorFullyImplicitBlackoil< TypeTag >::Model = BlackoilModel<TypeTag>

◆ ModelParameters

template<class TypeTag >
using Opm::SimulatorFullyImplicitBlackoil< TypeTag >::ModelParameters = typename Model::ModelParameters

◆ PolymerModule

template<class TypeTag >
using Opm::SimulatorFullyImplicitBlackoil< TypeTag >::PolymerModule = BlackOilPolymerModule<TypeTag>

◆ PrimaryVariables

template<class TypeTag >
using Opm::SimulatorFullyImplicitBlackoil< TypeTag >::PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>

◆ Simulator

template<class TypeTag >
using Opm::SimulatorFullyImplicitBlackoil< TypeTag >::Simulator = GetPropType<TypeTag, Properties::Simulator>

◆ SolutionVector

template<class TypeTag >
using Opm::SimulatorFullyImplicitBlackoil< TypeTag >::SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>

◆ Solver

template<class TypeTag >
using Opm::SimulatorFullyImplicitBlackoil< TypeTag >::Solver = NonlinearSolver<TypeTag, Model>

◆ SolverParameters

template<class TypeTag >
using Opm::SimulatorFullyImplicitBlackoil< TypeTag >::SolverParameters = typename Solver::SolverParameters

◆ TimeStepper

template<class TypeTag >
using Opm::SimulatorFullyImplicitBlackoil< TypeTag >::TimeStepper = AdaptiveTimeStepping<TypeTag>

◆ WellModel

template<class TypeTag >
using Opm::SimulatorFullyImplicitBlackoil< TypeTag >::WellModel = BlackoilWellModel<TypeTag>

Constructor & Destructor Documentation

◆ SimulatorFullyImplicitBlackoil()

template<class TypeTag >
Opm::SimulatorFullyImplicitBlackoil< TypeTag >::SimulatorFullyImplicitBlackoil ( Simulator simulator)
inline

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]propsfluid and rock properties
[in]linsolverlinear solver
[in]eclipse_statethe object which represents an internalized ECL deck
[in]output_writer
[in]threshold_pressures_by_faceif nonempty, threshold pressures that inhibit flow

References Opm::SimulatorFullyImplicitBlackoil< TypeTag >::eclState(), Opm::SimulatorFullyImplicitBlackoil< TypeTag >::grid(), Opm::SimulatorFullyImplicitBlackoil< TypeTag >::phaseUsage_, Opm::phaseUsageFromDeck(), Opm::SimulatorFullyImplicitBlackoil< TypeTag >::startConvergenceOutputThread(), and Opm::SimulatorFullyImplicitBlackoil< TypeTag >::terminalOutput_.

◆ ~SimulatorFullyImplicitBlackoil()

Member Function Documentation

◆ createSolver()

◆ eclState()

◆ endConvergenceOutputThread()

◆ finalize()

◆ getCellMapping()

template<class TypeTag >
const std::vector< int > & Opm::SimulatorFullyImplicitBlackoil< TypeTag >::getCellMapping ( ) const
inlineoverrideprotectedvirtual

Returns local-to-global cell mapping.

Implements Opm::SerializableSim.

References Opm::SimulatorFullyImplicitBlackoil< TypeTag >::simulator_.

◆ getHeader()

template<class TypeTag >
std::array< std::string, 5 > Opm::SimulatorFullyImplicitBlackoil< TypeTag >::getHeader ( ) const
inlineoverrideprotectedvirtual

◆ grid()

◆ init()

◆ isRestart()

template<class TypeTag >
bool Opm::SimulatorFullyImplicitBlackoil< TypeTag >::isRestart ( ) const
inlineprotected

◆ loadState()

template<class TypeTag >
void Opm::SimulatorFullyImplicitBlackoil< TypeTag >::loadState ( HDF5Serializer serializer,
const std::string &  groupName 
)
inlineoverrideprotectedvirtual

Load simulator state from hdf5 serializer.

Implements Opm::SerializableSim.

◆ model()

◆ registerParameters()

template<class TypeTag >
static void Opm::SimulatorFullyImplicitBlackoil< TypeTag >::registerParameters ( )
inlinestatic

◆ run()

template<class TypeTag >
SimulatorReport Opm::SimulatorFullyImplicitBlackoil< TypeTag >::run ( SimulatorTimer timer)
inline

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
Returns
simulation report, with timing data

References Opm::SimulatorTimer::done(), Opm::SimulatorFullyImplicitBlackoil< TypeTag >::finalize(), Opm::SimulatorFullyImplicitBlackoil< TypeTag >::init(), Opm::SimulatorFullyImplicitBlackoil< TypeTag >::runStep(), and Opm::SimulatorFullyImplicitBlackoil< TypeTag >::simulator_.

◆ runStep()

template<class TypeTag >
bool Opm::SimulatorFullyImplicitBlackoil< TypeTag >::runStep ( SimulatorTimer timer)
inline

References Opm::SimulatorFullyImplicitBlackoil< TypeTag >::adaptiveTimeStepping_, Opm::SimulatorFullyImplicitBlackoil< TypeTag >::already_reported_steps_, Opm::BlackoilWellModel< TypeTag >::beginReportStep(), Opm::SimulatorFullyImplicitBlackoil< TypeTag >::createSolver(), Opm::SimulatorTimer::currentStepLength(), Opm::SimulatorTimer::currentStepNum(), Opm::SimulatorReportSingle::exit_status, Opm::SimulatorFullyImplicitBlackoil< TypeTag >::grid(), Opm::SimulatorTimer::initialStep(), Opm::SimulatorSerializer::loadState(), Opm::SimulatorSerializer::loadStep(), Opm::SimulatorSerializer::loadTimerInfo(), Opm::SimulatorReportSingle::output_write_time, Opm::details::outputReportStep(), Opm::BlackoilWellModel< TypeTag >::prepareDeserialize(), Opm::SimulatorTimer::report(), Opm::SimulatorFullyImplicitBlackoil< TypeTag >::report_, Opm::SimulatorSerializer::save(), Opm::SimulatorFullyImplicitBlackoil< TypeTag >::schedule(), Opm::SimulatorFullyImplicitBlackoil< TypeTag >::serializer_, Opm::SimulatorSerializer::shouldLoad(), Opm::SimulatorFullyImplicitBlackoil< TypeTag >::simulator_, Opm::SimulatorFullyImplicitBlackoil< TypeTag >::solver_, Opm::SimulatorReportSingle::solver_time, Opm::SimulatorFullyImplicitBlackoil< TypeTag >::solverTimer_, Opm::SimulatorReport::success, Opm::SimulatorFullyImplicitBlackoil< TypeTag >::terminalOutput_, Opm::to_string(), Opm::SimulatorFullyImplicitBlackoil< TypeTag >::updateTUNING(), Opm::SimulatorFullyImplicitBlackoil< TypeTag >::wellModel_(), and Opm::SimulatorFullyImplicitBlackoil< TypeTag >::writeConvergenceOutput().

Referenced by Opm::SimulatorFullyImplicitBlackoil< TypeTag >::run().

◆ saveState()

template<class TypeTag >
void Opm::SimulatorFullyImplicitBlackoil< TypeTag >::saveState ( HDF5Serializer serializer,
const std::string &  groupName 
) const
inlineoverrideprotectedvirtual

Save simulator state using hdf5 serializer.

Implements Opm::SerializableSim.

◆ schedule()

◆ serializeOp()

◆ startConvergenceOutputThread()

◆ updateTUNING()

◆ wellModel_() [1/2]

◆ wellModel_() [2/2]

template<class TypeTag >
const WellModel & Opm::SimulatorFullyImplicitBlackoil< TypeTag >::wellModel_ ( ) const
inlineprotected

◆ writeConvergenceOutput()

Member Data Documentation

◆ adaptiveTimeStepping_

◆ already_reported_steps_

template<class TypeTag >
std::size_t Opm::SimulatorFullyImplicitBlackoil< TypeTag >::already_reported_steps_ = 0
protected

◆ convergenceOutputObject_

template<class TypeTag >
std::optional<ConvergenceOutputThread> Opm::SimulatorFullyImplicitBlackoil< TypeTag >::convergenceOutputObject_ {}
protected

◆ convergenceOutputQueue_

◆ convergenceOutputThread_

◆ modelParam_

◆ phaseUsage_

◆ report_

◆ serializer_

template<class TypeTag >
SimulatorSerializer Opm::SimulatorFullyImplicitBlackoil< TypeTag >::serializer_
protected

◆ simulator_

◆ solver_

◆ solverParam_

template<class TypeTag >
SolverParameters Opm::SimulatorFullyImplicitBlackoil< TypeTag >::solverParam_
protected

◆ solverTimer_

template<class TypeTag >
std::unique_ptr<time::StopWatch> Opm::SimulatorFullyImplicitBlackoil< TypeTag >::solverTimer_
protected

◆ terminalOutput_

◆ totalTimer_

template<class TypeTag >
std::unique_ptr<time::StopWatch> Opm::SimulatorFullyImplicitBlackoil< TypeTag >::totalTimer_
protected

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