#include <AdaptiveTimeStepping.hpp>

Public Types

using TuningUpdateCallback = std::function< bool(const double, const double, const int)>
 

Public Member Functions

 AdaptiveTimeStepping ()=default
 
 AdaptiveTimeStepping (const UnitSystem &unitSystem, const SimulatorReport &full_report, const double max_next_tstep=-1.0, const bool terminalOutput=true)
 contructor taking parameter object More...
 
 AdaptiveTimeStepping (double max_next_tstep, const Tuning &tuning, const UnitSystem &unitSystem, const SimulatorReport &full_report, const bool terminalOutput=true)
 contructor More...
 
bool operator== (const AdaptiveTimeStepping< TypeTag > &rhs)
 
void setSuggestedNextStep (const double x)
 
double suggestedNextStep () const
 
const TimeStepControlInterfacetimeStepControl () const
 
template<class Solver >
SimulatorReport step (const SimulatorTimer &simulator_timer, Solver &solver, const bool is_event, const TuningUpdateCallback &tuning_updater)
 step method that acts like the solver::step method in a sub cycle of time steps More...
 
void updateTUNING (double max_next_tstep, const Tuning &tuning)
 
void updateNEXTSTEP (double max_next_tstep)
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 
SimulatorReportreport ()
 

Static Public Member Functions

static void registerParameters ()
 
static AdaptiveTimeStepping< TypeTag > serializationTestObjectHardcoded ()
 
static AdaptiveTimeStepping< TypeTag > serializationTestObjectPID ()
 
static AdaptiveTimeStepping< TypeTag > serializationTestObjectPIDIt ()
 
static AdaptiveTimeStepping< TypeTag > serializationTestObjectSimple ()
 
static AdaptiveTimeStepping< TypeTag > serializationTestObject3rdOrder ()
 

Protected Types

using TimeStepController = std::unique_ptr< TimeStepControlInterface >
 

Protected Member Functions

void init_ (const UnitSystem &unitSystem)
 

Protected Attributes

TimeStepControlType time_step_control_type_ {TimeStepControlType::PIDAndIterationCount}
 type of time step control object More...
 
TimeStepController time_step_control_ {}
 time step control object More...
 
double restart_factor_ {}
 factor to multiply time step with when solver fails to converge More...
 
double growth_factor_ {}
 factor to multiply time step when solver recovered from failed convergence More...
 
double max_growth_ {}
 factor that limits the maximum growth of a time step More...
 
double max_time_step_ {}
 maximal allowed time step size in days More...
 
double min_time_step_ {}
 minimal allowed time step size before throwing More...
 
bool ignore_convergence_failure_ {false}
 continue instead of stop when minimum time step is reached More...
 
int solver_restart_max_ {}
 how many restart of solver are allowed More...
 
bool solver_verbose_ {false}
 solver verbosity More...
 
bool timestep_verbose_ {false}
 timestep verbosity More...
 
double suggested_next_timestep_ {}
 suggested size of next timestep More...
 
bool full_timestep_initially_ {false}
 beginning with the size of the time step from data file More...
 
double timestep_after_event_ {}
 suggested size of timestep after an event More...
 
bool use_newton_iteration_ {false}
 use newton iteration count for adaptive time step control More...
 
double min_time_step_before_shutting_problematic_wells_ {}
 < shut problematic wells when time step size in days are less than this More...
 
SimulatorReport report_ {}
 

Member Typedef Documentation

◆ TimeStepController

template<class TypeTag >
using Opm::AdaptiveTimeStepping< TypeTag >::TimeStepController = std::unique_ptr<TimeStepControlInterface>
protected

◆ TuningUpdateCallback

template<class TypeTag >
using Opm::AdaptiveTimeStepping< TypeTag >::TuningUpdateCallback = std::function<bool(const double, const double, const int)>

Constructor & Destructor Documentation

◆ AdaptiveTimeStepping() [1/3]

template<class TypeTag >
Opm::AdaptiveTimeStepping< TypeTag >::AdaptiveTimeStepping ( )
default

◆ AdaptiveTimeStepping() [2/3]

template<class TypeTag >
Opm::AdaptiveTimeStepping< TypeTag >::AdaptiveTimeStepping ( const UnitSystem &  unitSystem,
const SimulatorReport full_report,
const double  max_next_tstep = -1.0,
const bool  terminalOutput = true 
)

contructor taking parameter object

References Opm::AdaptiveTimeStepping< TypeTag >::init_().

◆ AdaptiveTimeStepping() [3/3]

template<class TypeTag >
Opm::AdaptiveTimeStepping< TypeTag >::AdaptiveTimeStepping ( double  max_next_tstep,
const Tuning &  tuning,
const UnitSystem &  unit_system,
const SimulatorReport report,
const bool  terminal_output = true 
)

contructor

Parameters
tuningPointer to ecl TUNING keyword

References Opm::AdaptiveTimeStepping< TypeTag >::init_().

Member Function Documentation

◆ init_()

template<class TypeTag >
void Opm::AdaptiveTimeStepping< TypeTag >::init_ ( const UnitSystem &  unitSystem)
protected

◆ operator==()

◆ registerParameters()

template<class TypeTag >
void Opm::AdaptiveTimeStepping< TypeTag >::registerParameters
static

◆ report()

template<class TypeTag >
SimulatorReport & Opm::AdaptiveTimeStepping< TypeTag >::report

◆ serializationTestObject3rdOrder()

template<class TypeTag >
AdaptiveTimeStepping< TypeTag > Opm::AdaptiveTimeStepping< TypeTag >::serializationTestObject3rdOrder
static

◆ serializationTestObjectHardcoded()

template<class TypeTag >
AdaptiveTimeStepping< TypeTag > Opm::AdaptiveTimeStepping< TypeTag >::serializationTestObjectHardcoded
static

◆ serializationTestObjectPID()

template<class TypeTag >
AdaptiveTimeStepping< TypeTag > Opm::AdaptiveTimeStepping< TypeTag >::serializationTestObjectPID
static

◆ serializationTestObjectPIDIt()

template<class TypeTag >
AdaptiveTimeStepping< TypeTag > Opm::AdaptiveTimeStepping< TypeTag >::serializationTestObjectPIDIt
static

◆ serializationTestObjectSimple()

template<class TypeTag >
AdaptiveTimeStepping< TypeTag > Opm::AdaptiveTimeStepping< TypeTag >::serializationTestObjectSimple
static

◆ serializeOp()

template<class TypeTag >
template<class Serializer >
void Opm::AdaptiveTimeStepping< TypeTag >::serializeOp ( Serializer &  serializer)

◆ setSuggestedNextStep()

template<class TypeTag >
void Opm::AdaptiveTimeStepping< TypeTag >::setSuggestedNextStep ( const double  x)

◆ step()

template<class TypeTag >
template<class Solver >
SimulatorReport Opm::AdaptiveTimeStepping< TypeTag >::step ( const SimulatorTimer simulator_timer,
Solver &  solver,
const bool  is_event,
const TuningUpdateCallback tuning_updater 
)

step method that acts like the solver::step method in a sub cycle of time steps

Parameters
tuningUpdaterFunction used to update TUNING parameters before each time step. ACTIONX might change tuning.

◆ suggestedNextStep()

template<class TypeTag >
double Opm::AdaptiveTimeStepping< TypeTag >::suggestedNextStep

◆ timeStepControl()

template<class TypeTag >
const TimeStepControlInterface & Opm::AdaptiveTimeStepping< TypeTag >::timeStepControl

◆ updateNEXTSTEP()

template<class TypeTag >
void Opm::AdaptiveTimeStepping< TypeTag >::updateNEXTSTEP ( double  max_next_tstep)

◆ updateTUNING()

template<class TypeTag >
void Opm::AdaptiveTimeStepping< TypeTag >::updateTUNING ( double  max_next_tstep,
const Tuning &  tuning 
)

Member Data Documentation

◆ full_timestep_initially_

template<class TypeTag >
bool Opm::AdaptiveTimeStepping< TypeTag >::full_timestep_initially_ {false}
protected

beginning with the size of the time step from data file

Referenced by Opm::AdaptiveTimeStepping< TypeTag >::operator==().

◆ growth_factor_

template<class TypeTag >
double Opm::AdaptiveTimeStepping< TypeTag >::growth_factor_ {}
protected

factor to multiply time step when solver recovered from failed convergence

Referenced by Opm::AdaptiveTimeStepping< TypeTag >::operator==().

◆ ignore_convergence_failure_

template<class TypeTag >
bool Opm::AdaptiveTimeStepping< TypeTag >::ignore_convergence_failure_ {false}
protected

continue instead of stop when minimum time step is reached

Referenced by Opm::AdaptiveTimeStepping< TypeTag >::operator==().

◆ max_growth_

template<class TypeTag >
double Opm::AdaptiveTimeStepping< TypeTag >::max_growth_ {}
protected

factor that limits the maximum growth of a time step

Referenced by Opm::AdaptiveTimeStepping< TypeTag >::operator==().

◆ max_time_step_

template<class TypeTag >
double Opm::AdaptiveTimeStepping< TypeTag >::max_time_step_ {}
protected

maximal allowed time step size in days

Referenced by Opm::AdaptiveTimeStepping< TypeTag >::operator==().

◆ min_time_step_

template<class TypeTag >
double Opm::AdaptiveTimeStepping< TypeTag >::min_time_step_ {}
protected

minimal allowed time step size before throwing

Referenced by Opm::AdaptiveTimeStepping< TypeTag >::operator==().

◆ min_time_step_before_shutting_problematic_wells_

template<class TypeTag >
double Opm::AdaptiveTimeStepping< TypeTag >::min_time_step_before_shutting_problematic_wells_ {}
protected

< shut problematic wells when time step size in days are less than this

Referenced by Opm::AdaptiveTimeStepping< TypeTag >::operator==().

◆ report_

template<class TypeTag >
SimulatorReport Opm::AdaptiveTimeStepping< TypeTag >::report_ {}
protected

◆ restart_factor_

template<class TypeTag >
double Opm::AdaptiveTimeStepping< TypeTag >::restart_factor_ {}
protected

factor to multiply time step with when solver fails to converge

Referenced by Opm::AdaptiveTimeStepping< TypeTag >::operator==().

◆ solver_restart_max_

template<class TypeTag >
int Opm::AdaptiveTimeStepping< TypeTag >::solver_restart_max_ {}
protected

how many restart of solver are allowed

Referenced by Opm::AdaptiveTimeStepping< TypeTag >::operator==().

◆ solver_verbose_

template<class TypeTag >
bool Opm::AdaptiveTimeStepping< TypeTag >::solver_verbose_ {false}
protected

solver verbosity

Referenced by Opm::AdaptiveTimeStepping< TypeTag >::operator==().

◆ suggested_next_timestep_

template<class TypeTag >
double Opm::AdaptiveTimeStepping< TypeTag >::suggested_next_timestep_ {}
protected

suggested size of next timestep

◆ time_step_control_

template<class TypeTag >
TimeStepController Opm::AdaptiveTimeStepping< TypeTag >::time_step_control_ {}
protected

time step control object

Referenced by Opm::AdaptiveTimeStepping< TypeTag >::operator==().

◆ time_step_control_type_

template<class TypeTag >
TimeStepControlType Opm::AdaptiveTimeStepping< TypeTag >::time_step_control_type_ {TimeStepControlType::PIDAndIterationCount}
protected

type of time step control object

Referenced by Opm::AdaptiveTimeStepping< TypeTag >::operator==().

◆ timestep_after_event_

template<class TypeTag >
double Opm::AdaptiveTimeStepping< TypeTag >::timestep_after_event_ {}
protected

suggested size of timestep after an event

Referenced by Opm::AdaptiveTimeStepping< TypeTag >::operator==().

◆ timestep_verbose_

template<class TypeTag >
bool Opm::AdaptiveTimeStepping< TypeTag >::timestep_verbose_ {false}
protected

timestep verbosity

◆ use_newton_iteration_

template<class TypeTag >
bool Opm::AdaptiveTimeStepping< TypeTag >::use_newton_iteration_ {false}
protected

use newton iteration count for adaptive time step control

Referenced by Opm::AdaptiveTimeStepping< TypeTag >::operator==().


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