Add parameter --alternative-well-rate-init.

With this, a slightly more sophisticated procedure is used for well rate intialization.
Since it changes existing results, it defaults to false, giving the existing behaviour.
This commit is contained in:
Atgeirr Flø Rasmussen 2020-10-15 17:56:11 +02:00
parent 6155188a70
commit 24b2393334
3 changed files with 17 additions and 3 deletions

View File

@ -145,6 +145,10 @@ template<class TypeTag, class MyTypeTag>
struct MaxInnerIterWells {
using type = UndefinedProperty;
};
template<class TypeTag, class MyTypeTag>
struct AlternativeWellRateInit {
using type = UndefinedProperty;
};
template<class TypeTag>
struct DbhpMaxRel<TypeTag, TTag::FlowModelParameters> {
@ -251,6 +255,10 @@ struct MaxInnerIterWells<TypeTag, TTag::FlowModelParameters> {
static constexpr int value = 50;
};
template<class TypeTag>
struct AlternativeWellRateInit<TypeTag, TTag::FlowModelParameters> {
static constexpr bool value = false;
};
template<class TypeTag>
struct StrictInnerIterMsWells<TypeTag, TTag::FlowModelParameters> {
static constexpr int value = 40;
};
@ -432,6 +440,7 @@ namespace Opm
EWOMS_REGISTER_PARAM(TypeTag, int, StrictInnerIterMsWells, "Number of inner iterations for multi-segment wells with strict tolerance");
EWOMS_REGISTER_PARAM(TypeTag, bool, UseInnerIterationsWells, "Use nested iterations for standard wells");
EWOMS_REGISTER_PARAM(TypeTag, int, MaxInnerIterWells, "Maximum number of inner iterations for standard wells");
EWOMS_REGISTER_PARAM(TypeTag, bool, AlternativeWellRateInit, "Use alternative well rate initialization procedure");
EWOMS_REGISTER_PARAM(TypeTag, Scalar, RegularizationFactorMsw, "Regularization factor for ms 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, int, MaxStrictIter, "Maximum number of Newton iterations before relaxed tolerances are used for the CNV convergence criterion");

View File

@ -307,6 +307,7 @@ namespace Opm {
bool initial_step_;
bool report_step_starts_;
bool glift_debug = false;
bool alternative_well_rate_init_;
std::unique_ptr<RateConverterType> rateConverter_;
std::unique_ptr<VFPProperties<VFPInjProperties,VFPProdProperties>> vfp_properties_;

View File

@ -63,6 +63,8 @@ namespace Opm {
value);
return candidate == parallel_wells.end() || *candidate != value;
};
alternative_well_rate_init_ = EWOMS_GET_PARAM(TypeTag, bool, AlternativeWellRateInit);
}
template<typename TypeTag>
@ -393,9 +395,11 @@ namespace Opm {
local_deferredLogger.warning("WELL_POTENTIAL_CALCULATION_FAILED", msg);
}
// Update the well rates to match state, if only single-phase rates.
for (auto& well : well_container_) {
well->updateWellStateRates(ebosSimulator_, well_state_, local_deferredLogger);
if (alternative_well_rate_init_) {
// Update the well rates to match state, if only single-phase rates.
for (auto& well : well_container_) {
well->updateWellStateRates(ebosSimulator_, well_state_, local_deferredLogger);
}
}
//compute well guideRates