mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #4086 from GitPaean/better_naming_max_strict_iter
changing max_strict_iter_ to min_strict_cnv_iter_
This commit is contained in:
commit
fc259fdb91
@ -205,7 +205,7 @@ public:
|
|||||||
EWOMS_HIDE_PARAM(TypeTag, MaxNewtonIterationsWithInnerWellIterations);
|
EWOMS_HIDE_PARAM(TypeTag, MaxNewtonIterationsWithInnerWellIterations);
|
||||||
EWOMS_HIDE_PARAM(TypeTag, MaxInnerIterWells);
|
EWOMS_HIDE_PARAM(TypeTag, MaxInnerIterWells);
|
||||||
EWOMS_HIDE_PARAM(TypeTag, MaxSinglePrecisionDays);
|
EWOMS_HIDE_PARAM(TypeTag, MaxSinglePrecisionDays);
|
||||||
EWOMS_HIDE_PARAM(TypeTag, MaxStrictIter);
|
EWOMS_HIDE_PARAM(TypeTag, MinStrictCnvIter);
|
||||||
EWOMS_HIDE_PARAM(TypeTag, SolveWelleqInitially);
|
EWOMS_HIDE_PARAM(TypeTag, SolveWelleqInitially);
|
||||||
EWOMS_HIDE_PARAM(TypeTag, UpdateEquationsScaling);
|
EWOMS_HIDE_PARAM(TypeTag, UpdateEquationsScaling);
|
||||||
EWOMS_HIDE_PARAM(TypeTag, UseUpdateStabilization);
|
EWOMS_HIDE_PARAM(TypeTag, UseUpdateStabilization);
|
||||||
|
@ -857,11 +857,10 @@ namespace Opm {
|
|||||||
cnvErrorPvFraction /= (pvSum - numAquiferPvSum);
|
cnvErrorPvFraction /= (pvSum - numAquiferPvSum);
|
||||||
|
|
||||||
const double tol_mb = param_.tolerance_mb_;
|
const double tol_mb = param_.tolerance_mb_;
|
||||||
// Default value of relaxed_max_pv_fraction_ is 1 and
|
// Default value of relaxed_max_pv_fraction_ is 0.03 and min_strict_cnv_iter_ is 0.
|
||||||
// max_strict_iter_ is 8. Hence only iteration chooses
|
// For each iteration, we need to determine whether to use the relaxed CNV tolerance.
|
||||||
// whether to use relaxed or not.
|
// To disable the usage of relaxed CNV tolerance, you can set the relaxed_max_pv_fraction_ to be 0.
|
||||||
// To activate only fraction use fraction below 1 and iter 0.
|
const bool use_relaxed = cnvErrorPvFraction < param_.relaxed_max_pv_fraction_ && iteration >= param_.min_strict_cnv_iter_;
|
||||||
const bool use_relaxed = cnvErrorPvFraction < param_.relaxed_max_pv_fraction_ && iteration >= param_.max_strict_iter_;
|
|
||||||
const double tol_cnv = use_relaxed ? param_.tolerance_cnv_relaxed_ : param_.tolerance_cnv_;
|
const double tol_cnv = use_relaxed ? param_.tolerance_cnv_relaxed_ : param_.tolerance_cnv_;
|
||||||
|
|
||||||
// Finish computation
|
// Finish computation
|
||||||
|
@ -84,7 +84,7 @@ struct MaxSinglePrecisionDays {
|
|||||||
using type = UndefinedProperty;
|
using type = UndefinedProperty;
|
||||||
};
|
};
|
||||||
template<class TypeTag, class MyTypeTag>
|
template<class TypeTag, class MyTypeTag>
|
||||||
struct MaxStrictIter {
|
struct MinStrictCnvIter {
|
||||||
using type = UndefinedProperty;
|
using type = UndefinedProperty;
|
||||||
};
|
};
|
||||||
template<class TypeTag, class MyTypeTag>
|
template<class TypeTag, class MyTypeTag>
|
||||||
@ -224,7 +224,7 @@ struct MaxSinglePrecisionDays<TypeTag, TTag::FlowModelParameters> {
|
|||||||
static constexpr type value = 20.0;
|
static constexpr type value = 20.0;
|
||||||
};
|
};
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct MaxStrictIter<TypeTag, TTag::FlowModelParameters> {
|
struct MinStrictCnvIter<TypeTag, TTag::FlowModelParameters> {
|
||||||
static constexpr int value = 0;
|
static constexpr int value = 0;
|
||||||
};
|
};
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
@ -342,7 +342,7 @@ namespace Opm
|
|||||||
double tolerance_mb_;
|
double tolerance_mb_;
|
||||||
/// Local convergence tolerance (max of local saturation errors).
|
/// Local convergence tolerance (max of local saturation errors).
|
||||||
double tolerance_cnv_;
|
double tolerance_cnv_;
|
||||||
/// Relaxed local convergence tolerance (used when iter >= max_strict_iter_).
|
/// Relaxed local convergence tolerance (can be used when iter >= min_strict_cnv_iter_ && cnvViolatedPV < relaxed_max_pv_fraction_).
|
||||||
double tolerance_cnv_relaxed_;
|
double tolerance_cnv_relaxed_;
|
||||||
/// Well convergence tolerance.
|
/// Well convergence tolerance.
|
||||||
double tolerance_wells_;
|
double tolerance_wells_;
|
||||||
@ -388,8 +388,8 @@ namespace Opm
|
|||||||
/// for solving for the Jacobian
|
/// for solving for the Jacobian
|
||||||
double maxSinglePrecisionTimeStep_;
|
double maxSinglePrecisionTimeStep_;
|
||||||
|
|
||||||
/// Maximum number of Newton iterations before we give up on the CNV convergence criterion
|
/// Minimum number of Newton iterations before we can use relaxed CNV convergence criterion
|
||||||
int max_strict_iter_;
|
int min_strict_cnv_iter_;
|
||||||
|
|
||||||
/// Solve well equation initially
|
/// Solve well equation initially
|
||||||
bool solve_welleq_initially_;
|
bool solve_welleq_initially_;
|
||||||
@ -449,7 +449,7 @@ namespace Opm
|
|||||||
shut_unsolvable_wells_ = EWOMS_GET_PARAM(TypeTag, bool, ShutUnsolvableWells);
|
shut_unsolvable_wells_ = EWOMS_GET_PARAM(TypeTag, bool, ShutUnsolvableWells);
|
||||||
max_inner_iter_wells_ = EWOMS_GET_PARAM(TypeTag, int, MaxInnerIterWells);
|
max_inner_iter_wells_ = EWOMS_GET_PARAM(TypeTag, int, MaxInnerIterWells);
|
||||||
maxSinglePrecisionTimeStep_ = EWOMS_GET_PARAM(TypeTag, Scalar, MaxSinglePrecisionDays) *24*60*60;
|
maxSinglePrecisionTimeStep_ = EWOMS_GET_PARAM(TypeTag, Scalar, MaxSinglePrecisionDays) *24*60*60;
|
||||||
max_strict_iter_ = EWOMS_GET_PARAM(TypeTag, int, MaxStrictIter);
|
min_strict_cnv_iter_ = EWOMS_GET_PARAM(TypeTag, int, MinStrictCnvIter);
|
||||||
solve_welleq_initially_ = EWOMS_GET_PARAM(TypeTag, bool, SolveWelleqInitially);
|
solve_welleq_initially_ = EWOMS_GET_PARAM(TypeTag, bool, SolveWelleqInitially);
|
||||||
update_equations_scaling_ = EWOMS_GET_PARAM(TypeTag, bool, UpdateEquationsScaling);
|
update_equations_scaling_ = EWOMS_GET_PARAM(TypeTag, bool, UpdateEquationsScaling);
|
||||||
use_update_stabilization_ = EWOMS_GET_PARAM(TypeTag, bool, UseUpdateStabilization);
|
use_update_stabilization_ = EWOMS_GET_PARAM(TypeTag, bool, UseUpdateStabilization);
|
||||||
@ -487,7 +487,7 @@ namespace Opm
|
|||||||
EWOMS_REGISTER_PARAM(TypeTag, bool, AlternativeWellRateInit, "Use alternative well rate initialization procedure");
|
EWOMS_REGISTER_PARAM(TypeTag, bool, AlternativeWellRateInit, "Use alternative well rate initialization procedure");
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, Scalar, RegularizationFactorWells, "Regularization factor for wells");
|
EWOMS_REGISTER_PARAM(TypeTag, Scalar, RegularizationFactorWells, "Regularization factor for wells");
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, Scalar, MaxSinglePrecisionDays, "Maximum time step size where single precision floating point arithmetic can be used solving for the linear systems of equations");
|
EWOMS_REGISTER_PARAM(TypeTag, Scalar, MaxSinglePrecisionDays, "Maximum time step size where single precision floating point arithmetic can be used solving for the linear systems of equations");
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, int, MaxStrictIter, "Maximum number of Newton iterations before relaxed tolerances are used for the CNV convergence criterion");
|
EWOMS_REGISTER_PARAM(TypeTag, int, MinStrictCnvIter, "Minimum number of Newton iterations before relaxed tolerances can be used for the CNV convergence criterion");
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, bool, SolveWelleqInitially, "Fully solve the well equations before each iteration of the reservoir model");
|
EWOMS_REGISTER_PARAM(TypeTag, bool, SolveWelleqInitially, "Fully solve the well equations before each iteration of the reservoir model");
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, bool, UpdateEquationsScaling, "Update scaling factors for mass balance equations during the run");
|
EWOMS_REGISTER_PARAM(TypeTag, bool, UpdateEquationsScaling, "Update scaling factors for mass balance equations during the run");
|
||||||
EWOMS_REGISTER_PARAM(TypeTag, bool, UseUpdateStabilization, "Try to detect and correct oscillations or stagnation during the Newton method");
|
EWOMS_REGISTER_PARAM(TypeTag, bool, UseUpdateStabilization, "Try to detect and correct oscillations or stagnation during the Newton method");
|
||||||
|
Loading…
Reference in New Issue
Block a user