diff --git a/ebos/eclgenericproblem.hh b/ebos/eclgenericproblem.hh index cc665d394..d2fe37cb0 100644 --- a/ebos/eclgenericproblem.hh +++ b/ebos/eclgenericproblem.hh @@ -367,10 +367,6 @@ protected: bool enableTuning_; Scalar initialTimeStepSize_; Scalar maxTimeStepAfterWellEvent_; - Scalar maxTimeStepSize_; - Scalar restartShrinkFactor_; - unsigned maxFails_; - Scalar minTimeStepSize_; // equilibration parameters int numPressurePointsEquil_; diff --git a/ebos/eclgenericproblem_impl.hh b/ebos/eclgenericproblem_impl.hh index f7edb38a6..ae5124412 100644 --- a/ebos/eclgenericproblem_impl.hh +++ b/ebos/eclgenericproblem_impl.hh @@ -471,9 +471,6 @@ beginEpisode_(bool enableExperiments, const auto& tuning = sched_state.tuning(); initialTimeStepSize_ = sched_state.max_next_tstep(); maxTimeStepAfterWellEvent_ = tuning.TMAXWC; - maxTimeStepSize_ = tuning.TSMAXZ; - restartShrinkFactor_ = 1./tuning.TSFCNV; - minTimeStepSize_ = tuning.TSMINZ; return true; } diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index 5e0c579c9..e7608f188 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -78,6 +78,7 @@ #include #include +#include #include #include #include @@ -222,10 +223,6 @@ public: if constexpr (enableExperiments) EWOMS_REGISTER_PARAM(TypeTag, bool, EclEnableAquifers, "Enable analytic and numeric aquifer models"); - EWOMS_REGISTER_PARAM(TypeTag, Scalar, EclMaxTimeStepSizeAfterWellEvent, - "Maximum time step size after an well event"); - EWOMS_REGISTER_PARAM(TypeTag, Scalar, EclRestartShrinkFactor, - "Factor by which the time step is reduced after convergence failure"); EWOMS_REGISTER_PARAM(TypeTag, bool, EclEnableTuning, "Honor some aspects of the TUNING keyword from the ECL deck."); EWOMS_REGISTER_PARAM(TypeTag, std::string, OutputMode, @@ -233,7 +230,6 @@ public: EWOMS_REGISTER_PARAM(TypeTag, int, NumPressurePointsEquil, "Number of pressure points (in each direction) in tables used for equilibration"); EWOMS_HIDE_PARAM(TypeTag, NumPressurePointsEquil); // Users will typically not need to modify this parameter.. - } @@ -307,11 +303,7 @@ public: this->enableTuning_ = EWOMS_GET_PARAM(TypeTag, bool, EclEnableTuning); this->initialTimeStepSize_ = EWOMS_GET_PARAM(TypeTag, Scalar, InitialTimeStepSize); - this->minTimeStepSize_ = EWOMS_GET_PARAM(TypeTag, Scalar, MinTimeStepSize); - this->maxTimeStepSize_ = EWOMS_GET_PARAM(TypeTag, Scalar, MaxTimeStepSize); - this->maxTimeStepAfterWellEvent_ = EWOMS_GET_PARAM(TypeTag, Scalar, EclMaxTimeStepSizeAfterWellEvent); - this->restartShrinkFactor_ = EWOMS_GET_PARAM(TypeTag, Scalar, EclRestartShrinkFactor); - this->maxFails_ = EWOMS_GET_PARAM(TypeTag, unsigned, MaxTimeStepDivisions); + this->maxTimeStepAfterWellEvent_ = EWOMS_GET_PARAM(TypeTag, double, TimeStepAfterEventInDays)*24*60*60; // The value N for this parameter is defined in the following order of presedence: // 1. Command line value (--num-pressure-points-equil=N) @@ -365,9 +357,6 @@ public: const auto& tuning = schedule[0].tuning(); this->initialTimeStepSize_ = tuning.TSINIT; this->maxTimeStepAfterWellEvent_ = tuning.TMAXWC; - this->maxTimeStepSize_ = tuning.TSMAXZ; - this->restartShrinkFactor_ = 1./tuning.TSFCNV; - this->minTimeStepSize_ = tuning.TSMINZ; } this->initFluidSystem_(); diff --git a/ebos/eclproblem_properties.hh b/ebos/eclproblem_properties.hh index 578f8a122..7f54a06d6 100644 --- a/ebos/eclproblem_properties.hh +++ b/ebos/eclproblem_properties.hh @@ -124,14 +124,6 @@ struct EclEnableAquifers { // time stepping parameters template -struct EclMaxTimeStepSizeAfterWellEvent { - using type = UndefinedProperty; -}; -template -struct EclRestartShrinkFactor { - using type = UndefinedProperty; -}; -template struct EclEnableTuning { using type = UndefinedProperty; }; @@ -534,16 +526,6 @@ struct EnableExperiments { // set defaults for the time stepping parameters template -struct EclMaxTimeStepSizeAfterWellEvent { - using type = GetPropType; - static constexpr type value = 3600*24*365.25; -}; -template -struct EclRestartShrinkFactor { - using type = GetPropType; - static constexpr type value = 3; -}; -template struct EclEnableTuning { static constexpr bool value = false; }; diff --git a/opm/simulators/flow/FlowMainEbos.hpp b/opm/simulators/flow/FlowMainEbos.hpp index 64347cac7..03e6f744c 100644 --- a/opm/simulators/flow/FlowMainEbos.hpp +++ b/opm/simulators/flow/FlowMainEbos.hpp @@ -164,8 +164,6 @@ void handleExtraConvergenceOutput(SimulatorReport& report, EWOMS_HIDE_PARAM(TypeTag, MinTimeStepSize); EWOMS_HIDE_PARAM(TypeTag, PredeterminedTimeStepsFile); - EWOMS_HIDE_PARAM(TypeTag, EclMaxTimeStepSizeAfterWellEvent); - EWOMS_HIDE_PARAM(TypeTag, EclRestartShrinkFactor); EWOMS_HIDE_PARAM(TypeTag, EclEnableTuning); // flow also does not use the eWoms Newton method diff --git a/tests/test_RestartSerialization.cpp b/tests/test_RestartSerialization.cpp index 686f7a0e9..3af0bd1e8 100644 --- a/tests/test_RestartSerialization.cpp +++ b/tests/test_RestartSerialization.cpp @@ -57,6 +57,14 @@ #include +namespace Opm::Properties { + namespace TTag { + struct TestRestartTypeTag { + using InheritsFrom = std::tuple; + }; + } +} + template std::tuple PackUnpack(T& in) { @@ -427,11 +435,12 @@ namespace { struct AquiferFixture { AquiferFixture() { - using TT = Opm::Properties::TTag::EbosTypeTag; + using TT = Opm::Properties::TTag::TestRestartTypeTag; const char* argv[] = { "test_RestartSerialization", "--ecl-deck-file-name=GLIFT1.DATA" }; + Opm::AdaptiveTimeSteppingEbos::registerParameters(); Opm::setupParameters_(2, argv, /*registerParams=*/true); Opm::EclGenericVanguard::setCommunication(std::make_unique()); } @@ -444,7 +453,7 @@ BOOST_GLOBAL_FIXTURE(AquiferFixture); #define TEST_FOR_AQUIFER(TYPE) \ BOOST_AUTO_TEST_CASE(TYPE) \ { \ - using TT = Opm::Properties::TTag::EbosTypeTag; \ + using TT = Opm::Properties::TTag::TestRestartTypeTag; \ Opm::EclGenericVanguard::readDeck("GLIFT1.DATA"); \ using Simulator = Opm::GetPropType; \ Simulator sim; \ @@ -465,7 +474,7 @@ TEST_FOR_AQUIFER(AquiferFetkovich) BOOST_AUTO_TEST_CASE(AquiferNumerical) { - using TT = Opm::Properties::TTag::EbosTypeTag; + using TT = Opm::Properties::TTag::TestRestartTypeTag; Opm::EclGenericVanguard::readDeck("GLIFT1.DATA"); using Simulator = Opm::GetPropType; Simulator sim; @@ -483,7 +492,7 @@ BOOST_AUTO_TEST_CASE(AquiferNumerical) BOOST_AUTO_TEST_CASE(AquiferConstantFlux) { - using TT = Opm::Properties::TTag::EbosTypeTag; + using TT = Opm::Properties::TTag::TestRestartTypeTag; Opm::EclGenericVanguard::readDeck("GLIFT1.DATA"); using Simulator = Opm::GetPropType; Simulator sim; diff --git a/tests/test_equil.cc b/tests/test_equil.cc index df8f92b0b..9a8819238 100644 --- a/tests/test_equil.cc +++ b/tests/test_equil.cc @@ -82,7 +82,7 @@ namespace TTag { struct TestEquilTypeTag { - using InheritsFrom = std::tuple; + using InheritsFrom = std::tuple; }; struct TestEquilVapwatTypeTag { using InheritsFrom = std::tuple; @@ -239,6 +239,7 @@ struct EquilFixture { #endif Opm::EclGenericVanguard::setCommunication(std::make_unique()); Opm::BlackoilModelParametersEbos::registerParameters(); + Opm::AdaptiveTimeSteppingEbos::registerParameters(); Opm::Parameters::registerParam("EnableTerminalOutput", "EnableTerminalOutput", Opm::getPropValue(), diff --git a/tests/test_glift1.cpp b/tests/test_glift1.cpp index 2ee603cc0..12e8f488d 100644 --- a/tests/test_glift1.cpp +++ b/tests/test_glift1.cpp @@ -67,7 +67,7 @@ namespace Opm::Properties { namespace TTag { struct TestGliftTypeTag { - using InheritsFrom = std::tuple; + using InheritsFrom = std::tuple; }; } } @@ -86,6 +86,7 @@ initSimulator(const char *filename) filename_arg.c_str() }; + Opm::AdaptiveTimeSteppingEbos::registerParameters(); Opm::setupParameters_(/*argc=*/sizeof(argv)/sizeof(argv[0]), argv, /*registerParams=*/true); Opm::EclGenericVanguard::readDeck(filename);