34 controls(controls_arg)
38 bool hasControl(WellProducerCMode cmode_arg)
const
40 return (this->controls &
static_cast<int>(cmode_arg)) != 0;
43 void skipControl(WellProducerCMode cmode_arg) {
44 auto int_arg =
static_cast<int>(cmode_arg);
45 if ((this->controls & int_arg) != 0)
46 this->controls -= int_arg;
49 void addControl(WellProducerCMode cmode_arg) {
50 auto int_arg =
static_cast<int>(cmode_arg);
51 if ((this->controls & int_arg) == 0)
52 this->controls += int_arg;
59 bool anyZeroRateConstraint()
const {
60 auto is_zero = [](
const double x)
62 return std::isfinite(x) && !std::isnormal(x);
65 if (this->hasControl(WellProducerCMode::ORAT) && is_zero(this->oil_rate)) {
69 if (this->hasControl(WellProducerCMode::WRAT) && is_zero(this->water_rate)) {
73 if (this->hasControl(WellProducerCMode::GRAT) && is_zero(this->gas_rate)) {
77 if (this->hasControl(WellProducerCMode::LRAT) && is_zero(this->liquid_rate)) {
81 if (this->hasControl(WellProducerCMode::RESV) && is_zero(this->resv_rate)) {
90 return this->cmode == other.cmode &&
91 this->oil_rate == other.oil_rate &&
92 this->water_rate == other.water_rate &&
93 this->gas_rate == other.gas_rate &&
94 this->liquid_rate == other.liquid_rate &&
95 this->resv_rate == other.resv_rate &&
96 this->bhp_history == other.bhp_history &&
97 this->thp_history == other.thp_history &&
98 this->bhp_limit == other.bhp_limit &&
99 this->thp_limit == other.thp_limit &&
100 this->alq_value == other.alq_value &&
101 this->vfp_table_number == other.vfp_table_number &&
102 this->prediction_mode == other.prediction_mode;
105 WellProducerCMode cmode = WellProducerCMode::NONE;
107 double water_rate{0};
109 double liquid_rate{0};
111 double bhp_history{0};
112 double thp_history{0};
116 int vfp_table_number{0};
117 bool prediction_mode{0};
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30