Merge pull request #2909 from alfbr/time-stepping

Switched time step control and changed damping factor for it
This commit is contained in:
Tor Harald Sandve
2020-11-11 20:55:26 +01:00
committed by GitHub
2 changed files with 5 additions and 6 deletions

View File

@@ -913,8 +913,7 @@ if(MPI_FOUND)
FILENAME SPE1FOAM
SIMULATOR flow
ABS_TOL ${abs_tol}
REL_TOL ${rel_tol}
TEST_ARGS --linear-solver-reduction=1e-7 --tolerance-cnv=5e-6 --tolerance-mb=1e-8)
REL_TOL ${coarse_rel_tol_parallel})
add_test_compare_parallel_simulation(CASENAME spe1_thermal
FILENAME SPE1CASE2_THERMAL

View File

@@ -162,7 +162,7 @@ struct TimeStepAfterEventInDays<TypeTag, TTag::FlowTimeSteppingParameters> {
};
template<class TypeTag>
struct TimeStepControl<TypeTag, TTag::FlowTimeSteppingParameters> {
static constexpr auto value = "pid";
static constexpr auto value = "pid+newtoniteration";
};
template<class TypeTag>
struct TimeStepControlTolerance<TypeTag, TTag::FlowTimeSteppingParameters> {
@@ -195,7 +195,7 @@ struct TimeStepControlDecayDampingFactor<TypeTag, TTag::FlowTimeSteppingParamete
template<class TypeTag>
struct TimeStepControlGrowthDampingFactor<TypeTag, TTag::FlowTimeSteppingParameters> {
using type = GetPropType<TypeTag, Scalar>;
static constexpr type value = 1.0/1.2;
static constexpr type value = 3.2;
};
template<class TypeTag>
struct TimeStepControlFileName<TypeTag, TTag::FlowTimeSteppingParameters> {
@@ -629,13 +629,13 @@ namespace Opm {
else if (control == "pid+iteration") {
const int iterations = EWOMS_GET_PARAM(TypeTag, int, TimeStepControlTargetIterations); // 30
const double decayDampingFactor = EWOMS_GET_PARAM(TypeTag, double, TimeStepControlDecayDampingFactor); // 1.0
const double growthDampingFactor = EWOMS_GET_PARAM(TypeTag, double, TimeStepControlGrowthDampingFactor); // 1.0/1.2
const double growthDampingFactor = EWOMS_GET_PARAM(TypeTag, double, TimeStepControlGrowthDampingFactor); // 3.2
timeStepControl_ = TimeStepControlType(new PIDAndIterationCountTimeStepControl(iterations, decayDampingFactor, growthDampingFactor, tol));
}
else if (control == "pid+newtoniteration") {
const int iterations = EWOMS_GET_PARAM(TypeTag, int, TimeStepControlTargetNewtonIterations); // 8
const double decayDampingFactor = EWOMS_GET_PARAM(TypeTag, double, TimeStepControlDecayDampingFactor); // 1.0
const double growthDampingFactor = EWOMS_GET_PARAM(TypeTag, double, TimeStepControlGrowthDampingFactor); // 1.0/1.2
const double growthDampingFactor = EWOMS_GET_PARAM(TypeTag, double, TimeStepControlGrowthDampingFactor); // 3.2
timeStepControl_ = TimeStepControlType(new PIDAndIterationCountTimeStepControl(iterations, decayDampingFactor, growthDampingFactor, tol));
useNewtonIteration_ = true;
}