3#ifndef OPM_ADAPTIVE_TIME_STEPPING_EBOS_HPP
4#define OPM_ADAPTIVE_TIME_STEPPING_EBOS_HPP
6#include <dune/common/version.hh>
7#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 8)
8#include <dune/istl/istlexception.hh>
10#include <dune/istl/ilu.hh>
13#include <opm/common/Exceptions.hpp>
14#include <opm/common/ErrorMacros.hpp>
15#include <opm/common/OpmLog/OpmLog.hpp>
17#include <opm/core/props/phaseUsageFromDeck.hpp>
19#include <opm/grid/utility/StopWatch.hpp>
21#include <opm/input/eclipse/Schedule/ScheduleState.hpp>
22#include <opm/input/eclipse/Units/Units.hpp>
24#include <opm/models/utils/basicproperties.hh>
25#include <opm/models/utils/parametersystem.hh>
26#include <opm/models/utils/propertysystem.hh>
28#include <opm/simulators/timestepping/AdaptiveSimulatorTimer.hpp>
29#include <opm/simulators/timestepping/SimulatorReport.hpp>
30#include <opm/simulators/timestepping/SimulatorTimer.hpp>
31#include <opm/simulators/timestepping/TimeStepControl.hpp>
32#include <opm/simulators/timestepping/TimeStepControlInterface.hpp>
46namespace Opm::Properties {
52template<
class TypeTag,
class MyTypeTag>
54 using type = UndefinedProperty;
56template<
class TypeTag,
class MyTypeTag>
58 using type = UndefinedProperty;
60template<
class TypeTag,
class MyTypeTag>
62 using type = UndefinedProperty;
64template<
class TypeTag,
class MyTypeTag>
66 using type = UndefinedProperty;
68template<
class TypeTag,
class MyTypeTag>
70 using type = UndefinedProperty;
72template<
class TypeTag,
class MyTypeTag>
74 using type = UndefinedProperty;
76template<
class TypeTag,
class MyTypeTag>
78 using type = UndefinedProperty;
80template<
class TypeTag,
class MyTypeTag>
82 using type = UndefinedProperty;
84template<
class TypeTag,
class MyTypeTag>
86 using type = UndefinedProperty;
88template<
class TypeTag,
class MyTypeTag>
90 using type = UndefinedProperty;
92template<
class TypeTag,
class MyTypeTag>
94 using type = UndefinedProperty;
96template<
class TypeTag,
class MyTypeTag>
98 using type = UndefinedProperty;
100template<
class TypeTag,
class MyTypeTag>
102 using type = UndefinedProperty;
104template<
class TypeTag,
class MyTypeTag>
106 using type = UndefinedProperty;
108template<
class TypeTag,
class MyTypeTag>
110 using type = UndefinedProperty;
112template<
class TypeTag,
class MyTypeTag>
114 using type = UndefinedProperty;
116template<
class TypeTag,
class MyTypeTag>
118 using type = UndefinedProperty;
120template<
class TypeTag,
class MyTypeTag>
122 using type = UndefinedProperty;
124template<
class TypeTag,
class MyTypeTag>
126 using type = UndefinedProperty;
128template<
class TypeTag,
class MyTypeTag>
130 using type = UndefinedProperty;
132template<
class TypeTag,
class MyTypeTag>
134 using type = UndefinedProperty;
136template<
class TypeTag,
class MyTypeTag>
138 using type = UndefinedProperty;
140template<
class TypeTag,
class MyTypeTag>
142 using type = UndefinedProperty;
145template<
class TypeTag>
147 using type = GetPropType<TypeTag, Scalar>;
148 static constexpr type value = 0.33;
150template<
class TypeTag>
152 using type = GetPropType<TypeTag, Scalar>;
153 static constexpr type value = 2.0;
155template<
class TypeTag>
157 using type = GetPropType<TypeTag, Scalar>;
158 static constexpr type value = 3.0;
160template<
class TypeTag>
162 using type = GetPropType<TypeTag, Scalar>;
163 static constexpr type value = 365.0;
165template<
class TypeTag>
167 using type = GetPropType<TypeTag, Scalar>;
168 static constexpr type value = 1.0e-12;
170template<
class TypeTag>
172 static constexpr bool value =
false;
174template<
class TypeTag>
176 static constexpr int value = 10;
178template<
class TypeTag>
180 static constexpr int value = 1;
182template<
class TypeTag>
184 static constexpr int value = 1;
186template<
class TypeTag>
188 using type = GetPropType<TypeTag, Scalar>;
189 static constexpr type value = 1.0;
191template<
class TypeTag>
193 static constexpr bool value =
false;
195template<
class TypeTag>
197 using type = GetPropType<TypeTag, Scalar>;
198 static constexpr type value = -1.0;
200template<
class TypeTag>
202 static constexpr auto value =
"pid+newtoniteration";
204template<
class TypeTag>
206 using type = GetPropType<TypeTag, Scalar>;
207 static constexpr type value = 1e-1;
209template<
class TypeTag>
211 static constexpr int value = 30;
213template<
class TypeTag>
215 static constexpr int value = 8;
217template<
class TypeTag>
219 using type = GetPropType<TypeTag, Scalar>;
220 static constexpr type value = 0.75;
222template<
class TypeTag>
224 using type = GetPropType<TypeTag, Scalar>;
225 static constexpr type value = 1.25;
227template<
class TypeTag>
229 using type = GetPropType<TypeTag, Scalar>;
230 static constexpr type value = 1.0;
232template<
class TypeTag>
234 using type = GetPropType<TypeTag, Scalar>;
235 static constexpr type value = 3.2;
237template<
class TypeTag>
239 static constexpr auto value =
"timesteps";
241template<
class TypeTag>
243 using type = GetPropType<TypeTag, Scalar>;
244 static constexpr type value = 0.01;
247template<
class TypeTag>
249 using type = GetPropType<TypeTag, Scalar>;
250 static constexpr type value = 0.0;
263std::set<std::string> consistentlyFailingWells(
const std::vector<StepReport>& sr);
269 template<
class TypeTag>
272 template <
class Solver>
275 const Solver& solver_;
277 SolutionTimeErrorSolverWrapperEbos(
const Solver& solver)
282 double relativeChange()
const
283 {
return solver_.model().relativeChange(); }
287 void logException_(
const E& exception,
bool verbose)
291 message =
"Caught Exception: ";
292 message += exception.what();
293 OpmLog::debug(message);
302 const bool terminalOutput =
true)
304 ,
restartFactor_(EWOMS_GET_PARAM(TypeTag, double, SolverRestartFactor))
305 ,
growthFactor_(EWOMS_GET_PARAM(TypeTag, double, SolverGrowthFactor))
306 ,
maxGrowth_(EWOMS_GET_PARAM(TypeTag, double, SolverMaxGrowth))
307 ,
maxTimeStep_(EWOMS_GET_PARAM(TypeTag, double, SolverMaxTimeStepInDays)*24*60*60)
308 ,
minTimeStep_(unitSystem.to_si(UnitSystem::measure::time, EWOMS_GET_PARAM(TypeTag, double, SolverMinTimeStep)))
311 ,
solverVerbose_(EWOMS_GET_PARAM(TypeTag, int, SolverVerbosity) > 0 && terminalOutput)
312 ,
timestepVerbose_(EWOMS_GET_PARAM(TypeTag, int, TimeStepVerbosity) > 0 && terminalOutput)
317 , minTimeStepBeforeShuttingProblematicWells_(EWOMS_GET_PARAM(TypeTag, double, MinTimeStepBeforeShuttingProblematicWellsInDays)*unit::day)
329 const Tuning& tuning,
330 const UnitSystem& unitSystem,
331 const bool terminalOutput =
true)
340 ,
solverVerbose_(EWOMS_GET_PARAM(TypeTag, int, SolverVerbosity) > 0 && terminalOutput)
341 ,
timestepVerbose_(EWOMS_GET_PARAM(TypeTag, int, TimeStepVerbosity) > 0 && terminalOutput)
346 , minTimeStepBeforeShuttingProblematicWells_(EWOMS_GET_PARAM(TypeTag, double, MinTimeStepBeforeShuttingProblematicWellsInDays)*unit::day)
351 static void registerParameters()
354 EWOMS_REGISTER_PARAM(TypeTag,
double, SolverRestartFactor,
355 "The factor time steps are elongated after restarts");
356 EWOMS_REGISTER_PARAM(TypeTag,
double, SolverGrowthFactor,
357 "The factor time steps are elongated after a successful substep");
358 EWOMS_REGISTER_PARAM(TypeTag,
double, SolverMaxGrowth,
359 "The maximum factor time steps are elongated after a report step");
360 EWOMS_REGISTER_PARAM(TypeTag,
double, SolverMaxTimeStepInDays,
361 "The maximum size of a time step in days");
362 EWOMS_REGISTER_PARAM(TypeTag,
double, SolverMinTimeStep,
363 "The minimum size of a time step in days for field and metric and hours for lab. If a step cannot converge without getting cut below this step size the simulator will stop");
364 EWOMS_REGISTER_PARAM(TypeTag,
bool, SolverContinueOnConvergenceFailure,
365 "Continue instead of stop when minimum solver time step is reached");
366 EWOMS_REGISTER_PARAM(TypeTag,
int, SolverMaxRestarts,
367 "The maximum number of breakdowns before a substep is given up and the simulator is terminated");
368 EWOMS_REGISTER_PARAM(TypeTag,
int, SolverVerbosity,
369 "Specify the \"chattiness\" of the non-linear solver itself");
370 EWOMS_REGISTER_PARAM(TypeTag,
int, TimeStepVerbosity,
371 "Specify the \"chattiness\" during the time integration");
372 EWOMS_REGISTER_PARAM(TypeTag,
double, InitialTimeStepInDays,
373 "The size of the initial time step in days");
374 EWOMS_REGISTER_PARAM(TypeTag,
bool, FullTimeStepInitially,
375 "Always attempt to finish a report step using a single substep");
376 EWOMS_REGISTER_PARAM(TypeTag,
double, TimeStepAfterEventInDays,
377 "Time step size of the first time step after an event occurs during the simulation in days");
378 EWOMS_REGISTER_PARAM(TypeTag, std::string, TimeStepControl,
379 "The algorithm used to determine time-step sizes. valid options are: 'pid' (default), 'pid+iteration', 'pid+newtoniteration', 'iterationcount', 'newtoniterationcount' and 'hardcoded'");
380 EWOMS_REGISTER_PARAM(TypeTag,
double, TimeStepControlTolerance,
381 "The tolerance used by the time step size control algorithm");
382 EWOMS_REGISTER_PARAM(TypeTag,
int, TimeStepControlTargetIterations,
383 "The number of linear iterations which the time step control scheme should aim for (if applicable)");
384 EWOMS_REGISTER_PARAM(TypeTag,
int, TimeStepControlTargetNewtonIterations,
385 "The number of Newton iterations which the time step control scheme should aim for (if applicable)");
386 EWOMS_REGISTER_PARAM(TypeTag,
double, TimeStepControlDecayRate,
387 "The decay rate of the time step size of the number of target iterations is exceeded");
388 EWOMS_REGISTER_PARAM(TypeTag,
double, TimeStepControlGrowthRate,
389 "The growth rate of the time step size of the number of target iterations is undercut");
390 EWOMS_REGISTER_PARAM(TypeTag,
double, TimeStepControlDecayDampingFactor,
391 "The decay rate of the time step decrease when the target iterations is exceeded");
392 EWOMS_REGISTER_PARAM(TypeTag,
double, TimeStepControlGrowthDampingFactor,
393 "The growth rate of the time step increase when the target iterations is undercut");
394 EWOMS_REGISTER_PARAM(TypeTag, std::string, TimeStepControlFileName,
395 "The name of the file which contains the hardcoded time steps sizes");
396 EWOMS_REGISTER_PARAM(TypeTag,
double, MinTimeStepBeforeShuttingProblematicWellsInDays,
397 "The minimum time step size in days for which problematic wells are not shut");
398 EWOMS_REGISTER_PARAM(TypeTag,
double, MinTimeStepBasedOnNewtonIterations,
399 "The minimum time step size (in days for field and metric unit and hours for lab unit) can be reduced to based on newton iteration counts");
405 template <
class Solver>
409 const std::vector<int>* fipnum =
nullptr)
428 auto& ebosSimulator = solver.model().ebosSimulator();
429 auto& ebosProblem = ebosSimulator.problem();
438 while (!substepTimer.
done()) {
442 detail::logTimer(substepTimer);
446 std::string causeOfFailure;
448 substepReport = solver.step(substepTimer);
451 OpmLog::debug(
"Overall linear iterations used: " + std::to_string(substepReport.total_linear_iterations));
454 catch (
const TooManyIterations& e) {
455 substepReport = solver.failureReport();
456 causeOfFailure =
"Solver convergence failure - Iteration limit reached";
461 catch (
const LinearSolverProblem& e) {
462 substepReport = solver.failureReport();
463 causeOfFailure =
"Linear solver convergence failure";
468 catch (
const NumericalProblem& e) {
469 substepReport = solver.failureReport();
470 causeOfFailure =
"Solver convergence failure - Numerical problem encountered";
475 catch (
const std::runtime_error& e) {
476 substepReport = solver.failureReport();
481 catch (
const Dune::ISTLError& e) {
482 substepReport = solver.failureReport();
487 catch (
const Dune::MatrixBlockError& e) {
488 substepReport = solver.failureReport();
495 ebosSimulator.problem().setSubStepReport(substepReport);
497 report += substepReport;
501 if (continue_on_uncoverged_solution) {
502 const auto msg = std::string(
"Solver failed to converge but timestep ")
503 + std::to_string(dt) +
" is smaller or equal to "
504 + std::to_string(
minTimeStep_) +
"\n which is the minimum threshold given"
505 +
"by option --solver-min-time-step= \n";
511 if (substepReport.converged || continue_on_uncoverged_solution) {
517 SolutionTimeErrorSolverWrapperEbos<Solver> relativeChange(solver);
521 : substepReport.total_linear_iterations;
522 double dtEstimate =
timeStepControl_->computeTimeStepSize(dt, iterations, relativeChange,
525 assert(dtEstimate > 0);
527 dtEstimate = std::min(dtEstimate,
double(
maxGrowth_ * dt));
528 assert(dtEstimate > 0);
538 if (solver.model().wellModel().hasTHPConstraints()) {
539 const double maxPredictionTHPTimestep = 16.0 * unit::day;
540 dtEstimate = std::min(dtEstimate, maxPredictionTHPTimestep);
542 assert(dtEstimate > 0);
544 std::ostringstream ss;
546 OpmLog::info(ss.str());
553 if (!substepTimer.
done()) {
555 solver.computeFluidInPlace(*fipnum);
557 time::StopWatch perfTimer;
560 ebosProblem.writeOutput();
562 report.success.output_write_time += perfTimer.secsSinceStart();
568 report.success.converged = substepTimer.
done();
578 const auto msg = std::string(
"Solver failed to converge after cutting timestep ")
579 + std::to_string(restarts) +
" times.";
583 OPM_THROW_NOLOG(NumericalProblem, msg);
593 const auto msg = std::string(
"Solver failed to converge after cutting timestep to ")
594 + std::to_string(
minTimeStep_) +
"\n which is the minimum threshold given"
595 +
"by option --solver-min-time-step= \n";
599 OPM_THROW_NOLOG(NumericalProblem, msg);
603 auto chopTimestep = [&]() {
607 msg = causeOfFailure +
"\nTimestep chopped to "
608 + std::to_string(unit::convert::to(substepTimer.
currentStepLength(), unit::day)) +
" days\n";
609 OpmLog::problem(msg);
614 const double minimumChoppedTimestep = minTimeStepBeforeShuttingProblematicWells_;
615 if (newTimeStep > minimumChoppedTimestep) {
620 std::set<std::string> failing_wells = detail::consistentlyFailingWells(solver.model().stepReports());
621 if (failing_wells.empty()) {
626 int num_shut_wells = 0;
627 for (
const auto& well : failing_wells) {
628 bool was_shut = solver.model().wellModel().forceShutWellByName(well, substepTimer.
simulationTimeElapsed());
633 if (num_shut_wells == 0) {
641 msg =
"\nProblematic well(s) were shut: ";
642 for (
const auto& well : failing_wells) {
646 msg +=
"(retrying timestep)\n";
647 OpmLog::problem(msg);
659 std::ostringstream ss;
661 ss <<
"Suggested next step size = " << unit::convert::to(
suggestedNextTimestep_, unit::day) <<
" (days)" << std::endl;
662 OpmLog::debug(ss.str());
677 void setSuggestedNextStep(
const double x)
680 void updateTUNING(
double max_next_tstep,
const Tuning& tuning)
690 template<
class Serializer>
691 void serializeOp(Serializer& serializer)
695 case TimeStepControlType::HardCodedTimeStep:
696 allocAndSerialize<HardcodedTimeStepControl>(serializer);
698 case TimeStepControlType::PIDAndIterationCount:
699 allocAndSerialize<PIDAndIterationCountTimeStepControl>(serializer);
701 case TimeStepControlType::SimpleIterationCount:
702 allocAndSerialize<SimpleIterationCountTimeStepControl>(serializer);
704 case TimeStepControlType::PID:
705 allocAndSerialize<PIDTimeStepControl>(serializer);
721 serializer(minTimeStepBeforeShuttingProblematicWells_);
724 static AdaptiveTimeSteppingEbos<TypeTag> serializationTestObjectHardcoded()
726 return serializationTestObject_<HardcodedTimeStepControl>();
729 static AdaptiveTimeSteppingEbos<TypeTag> serializationTestObjectPID()
731 return serializationTestObject_<PIDTimeStepControl>();
734 static AdaptiveTimeSteppingEbos<TypeTag> serializationTestObjectPIDIt()
736 return serializationTestObject_<PIDAndIterationCountTimeStepControl>();
739 static AdaptiveTimeSteppingEbos<TypeTag> serializationTestObjectSimple()
741 return serializationTestObject_<SimpleIterationCountTimeStepControl>();
744 bool operator==(
const AdaptiveTimeSteppingEbos<TypeTag>& rhs)
754 case TimeStepControlType::HardCodedTimeStep:
755 result = castAndComp<HardcodedTimeStepControl>(rhs);
757 case TimeStepControlType::PIDAndIterationCount:
758 result = castAndComp<PIDAndIterationCountTimeStepControl>(rhs);
760 case TimeStepControlType::SimpleIterationCount:
761 result = castAndComp<SimpleIterationCountTimeStepControl>(rhs);
763 case TimeStepControlType::PID:
764 result = castAndComp<PIDTimeStepControl>(rhs);
780 this->minTimeStepBeforeShuttingProblematicWells_ ==
781 rhs.minTimeStepBeforeShuttingProblematicWells_;
785 template<
class Controller>
786 static AdaptiveTimeSteppingEbos<TypeTag> serializationTestObject_()
788 AdaptiveTimeSteppingEbos<TypeTag> result;
790 result.restartFactor_ = 1.0;
791 result.growthFactor_ = 2.0;
792 result.maxGrowth_ = 3.0;
793 result.maxTimeStep_ = 4.0;
794 result.minTimeStep_ = 5.0;
795 result.ignoreConvergenceFailure_ =
true;
796 result.solverRestartMax_ = 6;
797 result.solverVerbose_ =
true;
798 result.timestepVerbose_ =
true;
799 result.suggestedNextTimestep_ = 7.0;
800 result.fullTimestepInitially_ =
true;
801 result.useNewtonIteration_ =
true;
802 result.minTimeStepBeforeShuttingProblematicWells_ = 9.0;
803 result.timeStepControlType_ = Controller::Type;
804 result.timeStepControl_ = std::make_unique<Controller>(Controller::serializationTestObject());
808 template<
class T,
class Serializer>
809 void allocAndSerialize(Serializer& serializer)
811 if (!serializer.isSerializing()) {
818 bool castAndComp(
const AdaptiveTimeSteppingEbos<TypeTag>& Rhs)
const
821 const T* rhs =
static_cast<const T*
>(Rhs.timeStepControl_.get());
826 void init_(
const UnitSystem& unitSystem)
829 std::string control = EWOMS_GET_PARAM(TypeTag, std::string, TimeStepControl);
831 const double tol = EWOMS_GET_PARAM(TypeTag,
double, TimeStepControlTolerance);
832 if (control ==
"pid") {
836 else if (control ==
"pid+iteration") {
837 const int iterations = EWOMS_GET_PARAM(TypeTag,
int, TimeStepControlTargetIterations);
838 const double decayDampingFactor = EWOMS_GET_PARAM(TypeTag,
double, TimeStepControlDecayDampingFactor);
839 const double growthDampingFactor = EWOMS_GET_PARAM(TypeTag,
double, TimeStepControlGrowthDampingFactor);
840 timeStepControl_ = std::make_unique<PIDAndIterationCountTimeStepControl>(iterations, decayDampingFactor, growthDampingFactor, tol);
843 else if (control ==
"pid+newtoniteration") {
844 const int iterations = EWOMS_GET_PARAM(TypeTag,
int, TimeStepControlTargetNewtonIterations);
845 const double decayDampingFactor = EWOMS_GET_PARAM(TypeTag,
double, TimeStepControlDecayDampingFactor);
846 const double growthDampingFactor = EWOMS_GET_PARAM(TypeTag,
double, TimeStepControlGrowthDampingFactor);
847 const double nonDimensionalMinTimeStepIterations = EWOMS_GET_PARAM(TypeTag,
double, MinTimeStepBasedOnNewtonIterations);
849 double minTimeStepReducedByIterations = unitSystem.to_si(UnitSystem::measure::time, nonDimensionalMinTimeStepIterations);
850 timeStepControl_ = std::make_unique<PIDAndIterationCountTimeStepControl>(iterations, decayDampingFactor,
851 growthDampingFactor, tol, minTimeStepReducedByIterations);
855 else if (control ==
"iterationcount") {
856 const int iterations = EWOMS_GET_PARAM(TypeTag,
int, TimeStepControlTargetIterations);
857 const double decayrate = EWOMS_GET_PARAM(TypeTag,
double, TimeStepControlDecayRate);
858 const double growthrate = EWOMS_GET_PARAM(TypeTag,
double, TimeStepControlGrowthRate);
859 timeStepControl_ = std::make_unique<SimpleIterationCountTimeStepControl>(iterations, decayrate, growthrate);
862 else if (control ==
"newtoniterationcount") {
863 const int iterations = EWOMS_GET_PARAM(TypeTag,
int, TimeStepControlTargetNewtonIterations);
864 const double decayrate = EWOMS_GET_PARAM(TypeTag,
double, TimeStepControlDecayRate);
865 const double growthrate = EWOMS_GET_PARAM(TypeTag,
double, TimeStepControlGrowthRate);
866 timeStepControl_ = std::make_unique<SimpleIterationCountTimeStepControl>(iterations, decayrate, growthrate);
870 else if (control ==
"hardcoded") {
871 const std::string filename = EWOMS_GET_PARAM(TypeTag, std::string, TimeStepControlFileName);
876 OPM_THROW(std::runtime_error,
877 "Unsupported time step control selected " + control);
883 using TimeStepController = std::unique_ptr<TimeStepControlInterface>;
900 double minTimeStepBeforeShuttingProblematicWells_;
Simulation timer for adaptive time stepping.
Definition: AdaptiveSimulatorTimer.hpp:41
bool done() const
Definition: AdaptiveSimulatorTimer.cpp:130
double currentStepLength() const
Definition: AdaptiveSimulatorTimer.cpp:112
void provideTimeStepEstimate(const double dt_estimate)
provide and estimate for new time step size
Definition: AdaptiveSimulatorTimer.cpp:76
void report(std::ostream &os) const
report start and end time as well as used steps so far
Definition: AdaptiveSimulatorTimer.cpp:157
double simulationTimeElapsed() const
Definition: AdaptiveSimulatorTimer.cpp:128
void setLastStepFailed(bool lastStepFailed)
tell the timestepper whether timestep failed or not
Definition: AdaptiveSimulatorTimer.hpp:104
Definition: AdaptiveTimeSteppingEbos.hpp:271
double maxTimeStep_
maximal allowed time step size in days
Definition: AdaptiveTimeSteppingEbos.hpp:890
TimeStepControlType timeStepControlType_
type of time step control object
Definition: AdaptiveTimeSteppingEbos.hpp:885
double growthFactor_
factor to multiply time step when solver recovered from failed convergence
Definition: AdaptiveTimeSteppingEbos.hpp:888
double minTimeStep_
minimal allowed time step size before throwing
Definition: AdaptiveTimeSteppingEbos.hpp:891
bool fullTimestepInitially_
beginning with the size of the time step from data file
Definition: AdaptiveTimeSteppingEbos.hpp:897
double suggestedNextStep() const
Returns the simulator report for the failed substeps of the last report step.
Definition: AdaptiveTimeSteppingEbos.hpp:674
int solverRestartMax_
how many restart of solver are allowed
Definition: AdaptiveTimeSteppingEbos.hpp:893
double timestepAfterEvent_
suggested size of timestep after an event
Definition: AdaptiveTimeSteppingEbos.hpp:898
AdaptiveTimeSteppingEbos(const UnitSystem &unitSystem, const bool terminalOutput=true)
contructor taking parameter object
Definition: AdaptiveTimeSteppingEbos.hpp:301
TimeStepController timeStepControl_
time step control object
Definition: AdaptiveTimeSteppingEbos.hpp:886
bool timestepVerbose_
timestep verbosity
Definition: AdaptiveTimeSteppingEbos.hpp:895
bool ignoreConvergenceFailure_
continue instead of stop when minimum time step is reached
Definition: AdaptiveTimeSteppingEbos.hpp:892
double restartFactor_
factor to multiply time step with when solver fails to converge
Definition: AdaptiveTimeSteppingEbos.hpp:887
SimulatorReport step(const SimulatorTimer &simulatorTimer, Solver &solver, const bool isEvent, const std::vector< int > *fipnum=nullptr)
step method that acts like the solver::step method in a sub cycle of time steps
Definition: AdaptiveTimeSteppingEbos.hpp:406
bool solverVerbose_
solver verbosity
Definition: AdaptiveTimeSteppingEbos.hpp:894
AdaptiveTimeSteppingEbos(double max_next_tstep, const Tuning &tuning, const UnitSystem &unitSystem, const bool terminalOutput=true)
contructor taking parameter object
Definition: AdaptiveTimeSteppingEbos.hpp:328
bool useNewtonIteration_
use newton iteration count for adaptive time step control
Definition: AdaptiveTimeSteppingEbos.hpp:899
double suggestedNextTimestep_
suggested size of next timestep
Definition: AdaptiveTimeSteppingEbos.hpp:896
double maxGrowth_
factor that limits the maximum growth of a time step
Definition: AdaptiveTimeSteppingEbos.hpp:889
RelativeChangeInterface.
Definition: TimeStepControlInterface.hpp:32
Definition: SimulatorTimer.hpp:38
double currentStepLength() const override
Current step length.
Definition: SimulatorTimer.cpp:107
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: BlackoilPhases.hpp:27
Definition: AdaptiveTimeSteppingEbos.hpp:93
Definition: AdaptiveTimeSteppingEbos.hpp:89
Definition: AdaptiveTimeSteppingEbos.hpp:141
Definition: AdaptiveTimeSteppingEbos.hpp:137
Definition: AdaptiveTimeSteppingEbos.hpp:73
Definition: AdaptiveTimeSteppingEbos.hpp:57
Definition: AdaptiveTimeSteppingEbos.hpp:61
Definition: AdaptiveTimeSteppingEbos.hpp:77
Definition: AdaptiveTimeSteppingEbos.hpp:65
Definition: AdaptiveTimeSteppingEbos.hpp:69
Definition: AdaptiveTimeSteppingEbos.hpp:53
Definition: AdaptiveTimeSteppingEbos.hpp:81
Definition: AdaptiveTimeSteppingEbos.hpp:49
Definition: AdaptiveTimeSteppingEbos.hpp:97
Definition: AdaptiveTimeSteppingEbos.hpp:125
Definition: AdaptiveTimeSteppingEbos.hpp:117
Definition: AdaptiveTimeSteppingEbos.hpp:133
Definition: AdaptiveTimeSteppingEbos.hpp:129
Definition: AdaptiveTimeSteppingEbos.hpp:121
Definition: AdaptiveTimeSteppingEbos.hpp:109
Definition: AdaptiveTimeSteppingEbos.hpp:113
Definition: AdaptiveTimeSteppingEbos.hpp:105
Definition: AdaptiveTimeSteppingEbos.hpp:101
Definition: AdaptiveTimeSteppingEbos.hpp:85
A struct for returning timing data from a simulator to its caller.
Definition: SimulatorReport.hpp:34
void reportStep(std::ostream &os) const
Print a report suitable for a single simulation step.
Definition: SimulatorReport.cpp:95
Definition: SimulatorReport.hpp:100
Definition: ConvergenceReport.hpp:225