mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
6155188a70
commit
24b2393334
@ -145,6 +145,10 @@ template<class TypeTag, class MyTypeTag>
|
|||||||
struct MaxInnerIterWells {
|
struct MaxInnerIterWells {
|
||||||
using type = UndefinedProperty;
|
using type = UndefinedProperty;
|
||||||
};
|
};
|
||||||
|
template<class TypeTag, class MyTypeTag>
|
||||||
|
struct AlternativeWellRateInit {
|
||||||
|
using type = UndefinedProperty;
|
||||||
|
};
|
||||||
|
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
struct DbhpMaxRel<TypeTag, TTag::FlowModelParameters> {
|
struct DbhpMaxRel<TypeTag, TTag::FlowModelParameters> {
|
||||||
@ -251,6 +255,10 @@ struct MaxInnerIterWells<TypeTag, TTag::FlowModelParameters> {
|
|||||||
static constexpr int value = 50;
|
static constexpr int value = 50;
|
||||||
};
|
};
|
||||||
template<class TypeTag>
|
template<class TypeTag>
|
||||||
|
struct AlternativeWellRateInit<TypeTag, TTag::FlowModelParameters> {
|
||||||
|
static constexpr bool value = false;
|
||||||
|
};
|
||||||
|
template<class TypeTag>
|
||||||
struct StrictInnerIterMsWells<TypeTag, TTag::FlowModelParameters> {
|
struct StrictInnerIterMsWells<TypeTag, TTag::FlowModelParameters> {
|
||||||
static constexpr int value = 40;
|
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, 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, 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, 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, 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, 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, MaxStrictIter, "Maximum number of Newton iterations before relaxed tolerances are used for the CNV convergence criterion");
|
||||||
|
@ -307,6 +307,7 @@ namespace Opm {
|
|||||||
bool initial_step_;
|
bool initial_step_;
|
||||||
bool report_step_starts_;
|
bool report_step_starts_;
|
||||||
bool glift_debug = false;
|
bool glift_debug = false;
|
||||||
|
bool alternative_well_rate_init_;
|
||||||
std::unique_ptr<RateConverterType> rateConverter_;
|
std::unique_ptr<RateConverterType> rateConverter_;
|
||||||
std::unique_ptr<VFPProperties<VFPInjProperties,VFPProdProperties>> vfp_properties_;
|
std::unique_ptr<VFPProperties<VFPInjProperties,VFPProdProperties>> vfp_properties_;
|
||||||
|
|
||||||
|
@ -63,6 +63,8 @@ namespace Opm {
|
|||||||
value);
|
value);
|
||||||
return candidate == parallel_wells.end() || *candidate != value;
|
return candidate == parallel_wells.end() || *candidate != value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
alternative_well_rate_init_ = EWOMS_GET_PARAM(TypeTag, bool, AlternativeWellRateInit);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename TypeTag>
|
template<typename TypeTag>
|
||||||
@ -393,9 +395,11 @@ namespace Opm {
|
|||||||
local_deferredLogger.warning("WELL_POTENTIAL_CALCULATION_FAILED", msg);
|
local_deferredLogger.warning("WELL_POTENTIAL_CALCULATION_FAILED", msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the well rates to match state, if only single-phase rates.
|
if (alternative_well_rate_init_) {
|
||||||
for (auto& well : well_container_) {
|
// Update the well rates to match state, if only single-phase rates.
|
||||||
well->updateWellStateRates(ebosSimulator_, well_state_, local_deferredLogger);
|
for (auto& well : well_container_) {
|
||||||
|
well->updateWellStateRates(ebosSimulator_, well_state_, local_deferredLogger);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//compute well guideRates
|
//compute well guideRates
|
||||||
|
Loading…
Reference in New Issue
Block a user