20#ifndef GAS_LIFT_OPT_HPP
21#define GAS_LIFT_OPT_HPP
23#include <opm/io/eclipse/rst/group.hpp>
24#include <opm/io/eclipse/rst/well.hpp>
71 return this->m_max_lift_gas;
79 if (! (value < 0.0)) {
80 this->m_max_lift_gas = value;
91 return this->m_max_total_gas;
100 if (! (value < 0.0)) {
101 this->m_max_total_gas = value;
108 const std::string&
name()
const
118 template<
class Serializer>
122 serializer(m_max_lift_gas);
123 serializer(m_max_total_gas);
140 std::string m_name{};
143 std::optional<double> m_max_lift_gas{};
147 std::optional<double> m_max_total_gas{};
192 const std::string&
name()
const
200 return this->m_use_glo;
208 this->m_max_rate = value;
226 return this->m_max_rate;
234 if (this->m_use_glo) {
235 this->m_weight = value;
242 return this->m_weight;
250 if (this->m_use_glo) {
251 this->m_inc_weight = value;
258 return this->m_inc_weight;
268 if (this->m_use_glo) {
269 this->m_min_rate = value;
276 return this->m_min_rate;
285 if (this->m_use_glo) {
286 this->m_alloc_extra_gas = value;
294 return this->m_alloc_extra_gas;
302 template<
class Serializer>
306 serializer(m_use_glo);
307 serializer(m_max_rate);
308 serializer(m_min_rate);
309 serializer(m_weight);
310 serializer(m_inc_weight);
311 serializer(m_alloc_extra_gas);
328 std::string m_name{};
333 std::optional<double> m_max_rate{};
336 double m_min_rate { 0.0 };
339 bool m_use_glo {
false };
342 double m_weight { 1.0 };
345 double m_inc_weight { 0.0 };
349 bool m_alloc_extra_gas {
false };
453 return this->m_wells.size();
473 template<
class Serializer>
476 serializer(m_increment);
477 serializer(m_min_eco_gradient);
478 serializer(m_min_wait);
479 serializer(m_all_newton);
480 serializer(m_groups);
486 double m_increment { 0.0 };
490 double m_min_eco_gradient { 0.0 };
493 double m_min_wait { 0.0 };
500 bool m_all_newton {
true };
504 std::map<std::string, GasLiftGroup> m_groups{};
508 std::map<std::string, GasLiftWell> m_wells{};
Gas lift optimisation parameters at the group level.
Definition GasLiftOpt.hpp:35
void max_lift_gas(const double value)
Assign maximum lift gas limit for this group.
Definition GasLiftOpt.hpp:77
static GasLiftGroup serializationTestObject()
Create a serialisation test object.
Definition GasLiftOpt.cpp:49
static bool active(const RestartIO::RstGroup &rst_group)
Predicate for whether or not gas lift optimisation applies to a group at simulation restart time.
Definition GasLiftOpt.cpp:37
void serializeOp(Serializer &serializer)
Convert between byte array and object representation.
Definition GasLiftOpt.hpp:119
const std::string & name() const
Group name.
Definition GasLiftOpt.hpp:108
bool operator==(const GasLiftGroup &other) const
Equality predicate.
Definition GasLiftOpt.cpp:60
void max_total_gas(const double value)
Assign maximum total gas limit for this group.
Definition GasLiftOpt.hpp:98
GasLiftGroup(const std::string &name)
Construct gas lift optimisation parameter collection for a single group.
Definition GasLiftOpt.hpp:47
GasLiftGroup()=default
Default constructor.
const std::optional< double > & max_lift_gas() const
Maximum lift gas limit for this group.
Definition GasLiftOpt.hpp:69
const std::optional< double > & max_total_gas() const
Maximum total gas limit for this group.
Definition GasLiftOpt.hpp:89
Gas lift optimisation parameters for all wells and groups.
Definition GasLiftOpt.hpp:356
void serializeOp(Serializer &serializer)
Convert between byte array and object representation.
Definition GasLiftOpt.hpp:474
void add_well(const GasLiftWell &well)
Incorporate gas lift and gas lift optimisation parameters for a single well into collection.
Definition GasLiftOpt.cpp:192
std::size_t num_wells() const
Number of wells currently known to gas lift optimisation facility.
Definition GasLiftOpt.hpp:451
bool active() const
Whether or not gas lift optimisation is currently enabled in the run.
Definition GasLiftOpt.cpp:120
const GasLiftGroup & group(const std::string &gname) const
Retrieve gas lift optimisation parameters for a single named group.
Definition GasLiftOpt.cpp:165
bool all_newton() const
Whether or not to include gas lift optimisation in all of the first "NUPCOL" non-linear iterations.
Definition GasLiftOpt.cpp:160
void add_group(const GasLiftGroup &group)
Incorporate gas lift optimisation parameters for a single group into collection.
Definition GasLiftOpt.cpp:187
double min_wait() const
Retrieve minimum wait time between gas lift optimisation runs.
Definition GasLiftOpt.cpp:150
bool operator==(const GasLiftOpt &other) const
Equality predicate.
Definition GasLiftOpt.cpp:228
bool has_well(const std::string &well) const
Whether or not gas lift parameters exists for single named well.
Definition GasLiftOpt.cpp:177
const GasLiftWell & well(const std::string &wname) const
Retrieve gas lift and gas lift optimisation parameters for a single named well.
Definition GasLiftOpt.cpp:197
double gaslift_increment() const
Lift gas rate increment.
Definition GasLiftOpt.cpp:130
static GasLiftOpt serializationTestObject()
Create a serialisation test object.
Definition GasLiftOpt.cpp:209
bool has_group(const std::string &group) const
Whether or not gas lift optimisation parameters exists for single named group.
Definition GasLiftOpt.cpp:182
double min_eco_gradient() const
Retrieve minimum economical gradient threshold to continue increasing lift gas injection rate.
Definition GasLiftOpt.cpp:140
Gas lift and gas lift optimisation parameters at the well level.
Definition GasLiftOpt.hpp:154
const std::optional< double > & max_rate() const
Retrieve maximum gas lift rate for this well.
Definition GasLiftOpt.hpp:224
void inc_weight_factor(const double value)
Assign incremental gas rate weighting factor for this well.
Definition GasLiftOpt.hpp:248
void min_rate(const double value)
Assign minimum rate of lift gas injection for this well.
Definition GasLiftOpt.hpp:266
bool operator==(const GasLiftWell &other) const
Equality predicate.
Definition GasLiftOpt.cpp:106
double min_rate() const
Retrieve this well's minimum lift gas injection rate.
Definition GasLiftOpt.hpp:274
static bool active(const RestartIO::RstWell &rst_well)
Predicate for whether or not gas lift optimisation applies to a group at simulation restart time.
Definition GasLiftOpt.cpp:84
GasLiftWell(const std::string &name, const bool use_glo)
Construct gas lift optimisation parameter collection for a single well.
Definition GasLiftOpt.hpp:169
bool alloc_extra_gas() const
Whether or not to allocate extra lift gas if available, even if group target is or would be exceeded.
Definition GasLiftOpt.hpp:292
double weight_factor() const
Retrieve weighting factor for preferential allocation of lift gas.
Definition GasLiftOpt.hpp:240
GasLiftWell()=default
Default constructor.
void weight_factor(const double value)
Assign weighting factor for preferential allocation of lift gas.
Definition GasLiftOpt.hpp:232
void alloc_extra_gas(const bool value)
Assign flag for whether or not to allocate extra lift gas if available, even if group target is or wo...
Definition GasLiftOpt.hpp:283
const std::string & name() const
Well name.
Definition GasLiftOpt.hpp:192
void serializeOp(Serializer &serializer)
Convert between byte array and object representation.
Definition GasLiftOpt.hpp:303
bool use_glo() const
Whether or not this well is subject to gas lift optimisation.
Definition GasLiftOpt.hpp:198
double inc_weight_factor() const
Retrieve incremental gas rate weighting factor for this well.
Definition GasLiftOpt.hpp:256
static GasLiftWell serializationTestObject()
Create a serialisation test object.
Definition GasLiftOpt.cpp:91
void max_rate(const double value)
Assign maximum gas lift rate for this well.
Definition GasLiftOpt.hpp:206
Class for (de-)serializing.
Definition Serializer.hpp:94
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30