mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Replace assert with warning.
Replace assert with warning when group rates exceeds target.
This commit is contained in:
@@ -737,7 +737,10 @@ getRateWithGroupLimit_(
|
|||||||
double gr_target_temp = *gr_target_opt;
|
double gr_target_temp = *gr_target_opt;
|
||||||
double gr_rate_temp =
|
double gr_rate_temp =
|
||||||
this->group_info_.getRate(rate_type, group_name_temp);
|
this->group_info_.getRate(rate_type, group_name_temp);
|
||||||
assert(gr_rate_temp <= gr_target_temp);
|
if (gr_rate_temp > gr_target_temp) {
|
||||||
|
warnGroupInfoGroupRatesExceedTarget(
|
||||||
|
rate_type, group_name_temp, gr_rate_temp, gr_target_temp);
|
||||||
|
}
|
||||||
double new_gr_rate_temp = gr_rate_temp + efficiency_temp * delta_rate;
|
double new_gr_rate_temp = gr_rate_temp + efficiency_temp * delta_rate;
|
||||||
if (new_gr_rate_temp > gr_target_temp) {
|
if (new_gr_rate_temp > gr_target_temp) {
|
||||||
double limited_rate_temp =
|
double limited_rate_temp =
|
||||||
@@ -1334,6 +1337,20 @@ useFixedAlq_(const GasLiftOpt::Well& well)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
GasLiftSingleWellGeneric::
|
||||||
|
warnGroupInfoGroupRatesExceedTarget(
|
||||||
|
Rate rate_type, const std::string& gr_name, double rate, double target) const
|
||||||
|
{
|
||||||
|
double fraction = 100.0*std::fabs(rate-target)/target;
|
||||||
|
const std::string msg = fmt::format("Warning: {} rate for group {} exceeds target: "
|
||||||
|
"rate = {}, target = {}, relative overrun = {}%",
|
||||||
|
GasLiftGroupInfo::rateToString(rate_type),
|
||||||
|
gr_name, rate, target, fraction);
|
||||||
|
displayDebugMessage_(msg);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
GasLiftSingleWellGeneric::
|
GasLiftSingleWellGeneric::
|
||||||
warnMaxIterationsExceeded_()
|
warnMaxIterationsExceeded_()
|
||||||
|
|||||||
@@ -309,6 +309,8 @@ protected:
|
|||||||
const LimitedRates& rates, const LimitedRates& new_rates) const;
|
const LimitedRates& rates, const LimitedRates& new_rates) const;
|
||||||
void updateWellStateAlqFixedValue_(const GasLiftOpt::Well& well);
|
void updateWellStateAlqFixedValue_(const GasLiftOpt::Well& well);
|
||||||
bool useFixedAlq_(const GasLiftOpt::Well& well);
|
bool useFixedAlq_(const GasLiftOpt::Well& well);
|
||||||
|
void warnGroupInfoGroupRatesExceedTarget(
|
||||||
|
Rate rate_type, const std::string& gr_name, double rate, double target) const;
|
||||||
void warnMaxIterationsExceeded_();
|
void warnMaxIterationsExceeded_();
|
||||||
|
|
||||||
const GroupState& group_state_;
|
const GroupState& group_state_;
|
||||||
|
|||||||
Reference in New Issue
Block a user