AdaptiveTimeStepping: remove initial_fraction (use restart factor instead) and use

average of previously used time steps to suggest next time step.
This commit is contained in:
Robert K 2015-02-10 13:10:39 +01:00
parent b1ab170219
commit c52f2cc621
2 changed files with 5 additions and 4 deletions

View File

@ -74,7 +74,6 @@ namespace Opm {
typedef std::unique_ptr< TimeStepControlInterface > TimeStepControlType;
TimeStepControlType timeStepControl_; //!< time step control object
const double initial_fraction_; //!< fraction to take as a guess for initial time interval
const double restart_factor_; //!< factor to multiply time step with when solver fails to converge
const double growth_factor_; //!< factor to multiply time step when solver recovered from failed convergence
const double max_time_step_; //!< maximal allowed time step size

View File

@ -34,7 +34,6 @@ namespace Opm {
AdaptiveTimeStepping::AdaptiveTimeStepping( const parameter::ParameterGroup& param )
: timeStepControl_()
, initial_fraction_( param.getDefault("solver.initialfraction", double(0.25) ) )
, restart_factor_( param.getDefault("solver.restartfactor", double(0.1) ) )
, growth_factor_( param.getDefault("solver.growthfactor", double(1.25) ) )
// default is 1 year, convert to seconds
@ -100,9 +99,12 @@ namespace Opm {
// init last time step as a fraction of the given time step
if( last_timestep_ < 0 ) {
last_timestep_ = initial_fraction_ * timestep;
last_timestep_ = restart_factor_ * timestep;
}
// TODO
// take change in well state into account
// create adaptive step timer with previously used sub step size
AdaptiveSimulatorTimer substepTimer( simulatorTimer, last_timestep_, max_time_step_ );
@ -207,7 +209,7 @@ namespace Opm {
// store max of the small time step for next reportStep
last_timestep_ = substepTimer.maxStepLength();
last_timestep_ = substepTimer.averageStepLength();
if( timestep_verbose_ )
{
substepTimer.report( std::cout );