custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp
Go to the documentation of this file.
1/*
2 Copyright 2019 Equinor ASA.
3
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20
21#ifndef WELL2_HPP
22#define WELL2_HPP
23
24#include <string>
25#include <iosfwd>
26
40
42
43namespace Opm {
44
45class DeckRecord;
46class EclipseGrid;
47class DeckKeyword;
48struct WellInjectionProperties;
49class WellProductionProperties;
50class UDQActive;
51class UDQConfig;
52
53namespace RestartIO {
54struct RstWell;
55}
56
57
58class Well {
59public:
60
61 enum class Status {
62 OPEN = 1,
63 STOP = 2,
64 SHUT = 3,
65 AUTO = 4
66 };
67 static std::string Status2String(Status enumValue);
68 static Status StatusFromString(const std::string& stringValue);
69
70
71
72
73 /*
74 The elements in this enum are used as bitmasks to keep track
75 of which controls are present, i.e. the 2^n structure must
76 be intact.
77 */
78 enum class InjectorCMode : int{
79 RATE = 1 ,
80 RESV = 2 ,
81 BHP = 4 ,
82 THP = 8 ,
83 GRUP = 16 ,
84 CMODE_UNDEFINED = 512
85 };
88
89
90 /*
91 The items BHP, THP and GRUP only apply in prediction mode:
92 WCONPROD. The elements in this enum are used as bitmasks to
93 keep track of which controls are present, i.e. the 2^n
94 structure must be intact.The NONE item is only used in WHISTCTL
95 to cancel its effect.
96
97 The properties are initialized with the CMODE_UNDEFINED
98 value, but the undefined value is never assigned apart from
99 that; and it is not part of the string conversion routines.
100 */
101 enum class ProducerCMode : int {
102 NONE = 0,
103 ORAT = 1,
104 WRAT = 2,
105 GRAT = 4,
106 LRAT = 8,
107 CRAT = 16,
108 RESV = 32,
109 BHP = 64,
110 THP = 128,
111 GRUP = 256,
112 CMODE_UNDEFINED = 1024
113 };
116
117
118
119 enum class WELTARGCMode {
120 ORAT = 1,
121 WRAT = 2,
122 GRAT = 3,
123 LRAT = 4,
124 CRAT = 5, // Not supported
125 RESV = 6,
126 BHP = 7,
127 THP = 8,
128 VFP = 9,
129 LIFT = 10, // Not supported
130 GUID = 11
131 };
132
134
135
136 enum class GuideRateTarget {
137 OIL = 0,
138 WAT = 1,
139 GAS = 2,
140 LIQ = 3,
141 COMB = 4,
142 WGA = 5,
143 CVAL = 6,
144 RAT = 7,
145 RES = 8,
146 UNDEFINED = 9
147 };
150
151
152 enum class GasInflowEquation {
153 STD = 0,
154 R_G = 1,
155 P_P = 2,
156 GPP = 3
157 };
160
161
162
168
170 {
171 WellGuideRate result;
172 result.available = true;
173 result.guide_rate = 1.0;
175 result.scale_factor = 2.0;
176
177 return result;
178 }
179
180 bool operator==(const WellGuideRate& data) const {
181 return available == data.available &&
182 guide_rate == data.guide_rate &&
183 guide_phase == data.guide_phase &&
184 scale_factor == data.scale_factor;
185 }
186
187 template<class Serializer>
188 void serializeOp(Serializer& serializer)
189 {
190 serializer(available);
191 serializer(guide_rate);
192 serializer(guide_phase);
193 serializer(scale_factor);
194 }
195 };
196
197
199 public:
200 InjectionControls(int controls_arg) :
201 controls(controls_arg)
202 {}
203
204 double bhp_limit;
205 double thp_limit;
206
207
215
216 bool hasControl(InjectorCMode cmode_arg) const {
217 return (this->controls & static_cast<int>(cmode_arg)) != 0;
218 }
219
220 private:
221 int controls;
222 };
223
224
225
232
233 double bhp_hist_limit = 0.0;
234 double thp_hist_limit = 0.0;
235
237 double BHPH;
238 double THPH;
244
245 bool operator==(const WellInjectionProperties& other) const;
246 bool operator!=(const WellInjectionProperties& other) const;
247
249 WellInjectionProperties(const UnitSystem& units, const std::string& wname);
250
252
253 void handleWELTARG(WELTARGCMode cmode, double newValue, double SIFactorP);
254 void handleWCONINJE(const DeckRecord& record, bool availableForGroupControl, const std::string& well_name);
255 void handleWCONINJH(const DeckRecord& record, bool is_producer, const std::string& well_name);
256 bool hasInjectionControl(InjectorCMode controlModeArg) const {
257 if (injectionControls & static_cast<int>(controlModeArg))
258 return true;
259 else
260 return false;
261 }
262
263 void dropInjectionControl(InjectorCMode controlModeArg) {
264 auto int_arg = static_cast<int>(controlModeArg);
265 if ((injectionControls & int_arg) != 0)
266 injectionControls -= int_arg;
267 }
268
269 void addInjectionControl(InjectorCMode controlModeArg) {
270 auto int_arg = static_cast<int>(controlModeArg);
271 if ((injectionControls & int_arg) == 0)
272 injectionControls += int_arg;
273 }
274
277 void setBHPLimit(const double limit);
278 InjectionControls controls(const UnitSystem& unit_system, const SummaryState& st, double udq_default) const;
279 bool updateUDQActive(const UDQConfig& udq_config, UDQActive& active) const;
280
281 template<class Serializer>
282 void serializeOp(Serializer& serializer)
283 {
284 serializer(name);
287 BHPTarget.serializeOp(serializer);
288 THPTarget.serializeOp(serializer);
289 serializer(bhp_hist_limit);
290 serializer(thp_hist_limit);
291 serializer(temperature);
292 serializer(BHPH);
293 serializer(THPH);
294 serializer(VFPTableNumber);
295 serializer(predictionMode);
296 serializer(injectionControls);
297 serializer(injectorType);
298 serializer(controlMode);
299 }
300 };
301
303 public:
304 ProductionControls(int controls_arg) :
305 controls(controls_arg)
306 {
307 }
308
310 double oil_rate;
312 double gas_rate;
314 double resv_rate;
317 double bhp_limit;
318 double thp_limit;
319 double alq_value;
322
323 bool hasControl(ProducerCMode cmode_arg) const {
324 return (this->controls & static_cast<int>(cmode_arg)) != 0;
325 }
326
327 private:
328 int controls;
329 };
330
331
333 public:
334 // the rates serve as limits under prediction mode
335 // while they are observed rates under historical mode
344
345 // BHP and THP limit
346 double bhp_hist_limit = 0.0;
347 double thp_hist_limit = 0.0;
348
349 // historical BHP and THP under historical mode
350 double BHPH = 0.0;
351 double THPH = 0.0;
353 double ALQValue = 0.0;
354 bool predictionMode = false;
357
358 bool operator==(const WellProductionProperties& other) const;
359 bool operator!=(const WellProductionProperties& other) const;
360
362 WellProductionProperties(const UnitSystem& units, const std::string& name_arg);
363
365
366 bool hasProductionControl(ProducerCMode controlModeArg) const {
367 return (m_productionControls & static_cast<int>(controlModeArg)) != 0;
368 }
369
371 if (hasProductionControl(controlModeArg))
372 m_productionControls -= static_cast<int>(controlModeArg);
373 }
374
375 void addProductionControl(ProducerCMode controlModeArg) {
376 if (! hasProductionControl(controlModeArg))
377 m_productionControls += static_cast<int>(controlModeArg);
378 }
379
380 // this is used to check whether the specified control mode is an effective history matching production mode
382 void handleWCONPROD( const std::string& well, const DeckRecord& record);
383 void handleWCONHIST( const DeckRecord& record);
384 void handleWELTARG( WELTARGCMode cmode, double newValue, double SiFactorP);
387 ProductionControls controls(const SummaryState& st, double udq_default) const;
388 bool updateUDQActive(const UDQConfig& udq_config, UDQActive& active) const;
389
390 void setBHPLimit(const double limit);
391 int productionControls() const { return this->m_productionControls; }
392
393 template<class Serializer>
394 void serializeOp(Serializer& serializer)
395 {
396 serializer(name);
397 OilRate.serializeOp(serializer);
398 WaterRate.serializeOp(serializer);
399 GasRate.serializeOp(serializer);
400 LiquidRate.serializeOp(serializer);
401 ResVRate.serializeOp(serializer);
402 BHPTarget.serializeOp(serializer);
403 THPTarget.serializeOp(serializer);
404 serializer(bhp_hist_limit);
405 serializer(thp_hist_limit);
406 serializer(BHPH);
407 serializer(THPH);
408 serializer(VFPTableNumber);
409 serializer(ALQValue);
410 serializer(predictionMode);
411 serializer(controlMode);
412 serializer(whistctl_cmode);
413 serializer(m_productionControls);
414 }
415
416 private:
417 int m_productionControls = 0;
418 void init_rates( const DeckRecord& record );
419
420 void init_history(const DeckRecord& record);
421
423
424 double getBHPLimit() const;
425 };
426
427
428 Well() = default;
429 Well(const std::string& wname,
430 const std::string& gname,
431 std::size_t init_step,
432 std::size_t insert_index,
433 int headI,
434 int headJ,
435 double ref_depth,
436 const WellType& wtype_arg,
437 ProducerCMode whistctl_cmode,
438 Connection::Order ordering,
439 const UnitSystem& unit_system,
440 double udq_undefined,
441 double dr,
442 bool allow_xflow,
443 bool auto_shutin,
444 int pvt_table,
445 GasInflowEquation inflow_eq);
446
447 Well(const RestartIO::RstWell& rst_well,
448 int report_step,
449 const UnitSystem& unit_system,
450 double udq_undefined);
451
453
454 bool isMultiSegment() const;
456 double getGuideRate() const;
459
460 bool hasBeenDefined(size_t timeStep) const;
461 std::size_t firstTimeStep() const;
462 const WellType& wellType() const;
463 bool predictionMode() const;
464 bool canOpen() const;
465 bool isProducer() const;
466 bool isInjector() const;
468 size_t seqIndex() const;
469 bool getAutomaticShutIn() const;
470 bool getAllowCrossFlow() const;
471 const std::string& name() const;
472 int getHeadI() const;
473 int getHeadJ() const;
474 double getRefDepth() const;
475 double getDrainageRadius() const;
476 double getEfficiencyFactor() const;
477 double getSolventFraction() const;
479 const std::string& groupName() const;
482 const WellSegments& getSegments() const;
483
491 /* The rate of a given phase under the following assumptions:
492 * * Returns zero if production is requested for an injector (and vice
493 * versa)
494 * * If this is an injector and something else than the
495 * requested phase is injected, returns 0, i.e.
496 * water_injector.injection_rate( gas ) == 0
497 * * Mixed injection is not supported and always returns 0.
498 */
499 double production_rate( const SummaryState& st, Phase phase) const;
500 double injection_rate( const SummaryState& st, Phase phase) const;
501 static bool wellNameInWellNamePattern(const std::string& wellName, const std::string& wellNamePattern);
502
503 /*
504 The getCompletions() function will return a map:
505
506 {
507 1 : [Connection, Connection],
508 2 : [Connection, Connection, Connecton],
509 3 : [Connection],
510 4 : [Connection]
511 }
512
513 The integer ID's correspond to the COMPLETION id given by the COMPLUMP
514 keyword.
515 */
516 std::map<int, std::vector<Connection>> getCompletions() const;
517
518 bool updatePrediction(bool prediction_mode);
519 bool updateAutoShutin(bool auto_shutin);
520 bool updateCrossFlow(bool allow_cross_flow);
521 bool updatePVTTable(int pvt_table);
522 bool updateHead(int I, int J);
523 bool updateRefDepth(double ref_dpeth);
524 bool updateDrainageRadius(double drainage_radius);
525 void updateSegments(std::shared_ptr<WellSegments> segments_arg);
526 bool updateConnections(std::shared_ptr<WellConnections> connections);
527 bool updateConnections(std::shared_ptr<WellConnections> connections, const EclipseGrid& grid, const std::vector<int>& pvtnum);
528 bool updateStatus(Status status, bool update_connections);
529 bool updateGroup(const std::string& group);
530 bool updateWellGuideRate(bool available, double guide_rate, GuideRateTarget guide_phase, double scale_factor);
531 bool updateWellGuideRate(double guide_rate);
532 bool updateEfficiencyFactor(double efficiency_factor);
533 bool updateSolventFraction(double solvent_fraction);
534 bool updateTracer(std::shared_ptr<WellTracerProperties> tracer_properties);
535 bool updateFoamProperties(std::shared_ptr<WellFoamProperties> foam_properties);
536 bool updatePolymerProperties(std::shared_ptr<WellPolymerProperties> polymer_properties);
537 bool updateBrineProperties(std::shared_ptr<WellBrineProperties> brine_properties);
538 bool updateEconLimits(std::shared_ptr<WellEconProductionLimits> econ_limits);
539 bool updateProduction(std::shared_ptr<WellProductionProperties> production);
540 bool updateInjection(std::shared_ptr<WellInjectionProperties> injection);
541 bool updateWSEGSICD(const std::vector<std::pair<int, SpiralICD> >& sicd_pairs);
542 bool updateWSEGVALV(const std::vector<std::pair<int, Valve> >& valve_pairs);
543
545 bool handleCOMPSEGS(const DeckKeyword& keyword, const EclipseGrid& grid, const ParseContext& parseContext, ErrorGuard& errors);
546 bool handleWELOPEN(const DeckRecord& record, Connection::State status, bool action_mode);
547 bool handleCOMPLUMP(const DeckRecord& record);
548 bool handleWPIMULT(const DeckRecord& record);
549
553 int vfp_table_number() const;
554 int pvt_table_number() const;
555 int fip_region_number() const;
557 bool segmented_density_calculation() const { return true; }
558 double alq_value() const;
559 double temperature() const;
560
561 bool cmp_structure(const Well& other) const;
562 bool operator==(const Well& data) const;
563 void setInsertIndex(std::size_t index);
564
565 template<class Serializer>
566 void serializeOp(Serializer& serializer)
567 {
568 serializer(wname);
569 serializer(group_name);
570 serializer(init_step);
571 serializer(insert_index);
572 serializer(headI);
573 serializer(headJ);
574 serializer(ref_depth);
575 unit_system.serializeOp(serializer);
576 serializer(udq_undefined);
577 serializer(status);
578 serializer(drainage_radius);
579 serializer(allow_cross_flow);
580 serializer(automatic_shutin);
581 serializer(pvt_table);
582 serializer(gas_inflow);
583 wtype.serializeOp(serializer);
584 guide_rate.serializeOp(serializer);
585 serializer(efficiency_factor);
586 serializer(solvent_fraction);
587 serializer(prediction_mode);
588 serializer(econ_limits);
589 serializer(foam_properties);
590 serializer(polymer_properties);
591 serializer(brine_properties);
592 serializer(tracer_properties);
593 serializer(connections);
594 serializer(production);
595 serializer(injection);
596 serializer(segments);
597 }
598
599private:
600 void switchToInjector();
601 void switchToProducer();
602
603 std::string wname;
604 std::string group_name;
605 std::size_t init_step;
606 std::size_t insert_index;
607 int headI;
608 int headJ;
609 double ref_depth;
610 double drainage_radius;
611 bool allow_cross_flow;
612 bool automatic_shutin;
613 int pvt_table;
614 GasInflowEquation gas_inflow = GasInflowEquation::STD; // Will NOT be loaded/assigned from restart file
615 UnitSystem unit_system;
616 double udq_undefined;
617 Status status;
618 WellType wtype;
619 WellGuideRate guide_rate;
620 double efficiency_factor;
621 double solvent_fraction;
622 bool prediction_mode = true;
623
624
625 std::shared_ptr<WellEconProductionLimits> econ_limits;
626 std::shared_ptr<WellFoamProperties> foam_properties;
627 std::shared_ptr<WellPolymerProperties> polymer_properties;
628 std::shared_ptr<WellBrineProperties> brine_properties;
629 std::shared_ptr<WellTracerProperties> tracer_properties;
630 std::shared_ptr<WellConnections> connections; // The WellConnections object can not be const because of the filterConnections method - would be beneficial to rewrite to enable const
631 std::shared_ptr<WellProductionProperties> production;
632 std::shared_ptr<WellInjectionProperties> injection;
633 std::shared_ptr<WellSegments> segments;
634};
635
636std::ostream& operator<<( std::ostream&, const Well::WellInjectionProperties& );
637std::ostream& operator<<( std::ostream&, const WellProductionProperties& );
638
640 const InjectorType itype,
641 const Well::Status wellStatus);
642
644 const Well::Status wellStatus);
645
646int eclipseControlMode(const Well& well,
647 const SummaryState& st);
648
649std::ostream& operator<<(std::ostream& os, const Well::Status& st);
650std::ostream& operator<<(std::ostream& os, const Well::ProducerCMode& cm);
651std::ostream& operator<<(std::ostream& os, const Well::InjectorCMode& cm);
652
653}
654#endif
int index
Definition: cJSON.h:168
const char *const string
Definition: cJSON.h:170
Simple class capturing active cells of a grid.
Definition: ActiveGridCells.hpp:35
Order
Definition: parser/eclipse/EclipseState/Schedule/Well/connection.hpp:67
State
Definition: parser/eclipse/EclipseState/Schedule/Well/connection.hpp:47
Definition: DeckKeyword.hpp:38
Definition: DeckRecord.hpp:32
Definition: EclipseGrid.hpp:54
Definition: ErrorGuard.hpp:29
Definition: ParseContext.hpp:84
Definition: Serializer.hpp:38
Definition: SummaryState.hpp:65
Definition: UDAValue.hpp:32
void serializeOp(Serializer &serializer)
Definition: UDAValue.hpp:72
Definition: UDQActive.hpp:35
Definition: UDQConfig.hpp:41
Definition: UnitSystem.hpp:32
void serializeOp(Serializer &serializer)
Definition: UnitSystem.hpp:121
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:332
UDAValue GasRate
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:339
UDAValue LiquidRate
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:340
double BHPH
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:350
int productionControls() const
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:391
bool operator!=(const WellProductionProperties &other) const
void handleWCONHIST(const DeckRecord &record)
std::string name
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:336
void addProductionControl(ProducerCMode controlModeArg)
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:375
bool predictionMode
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:354
void handleWELTARG(WELTARGCMode cmode, double newValue, double SiFactorP)
WellProductionProperties(const UnitSystem &units, const std::string &name_arg)
bool operator==(const WellProductionProperties &other) const
void handleWCONPROD(const std::string &well, const DeckRecord &record)
UDAValue BHPTarget
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:342
double bhp_hist_limit
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:346
ProducerCMode controlMode
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:355
bool hasProductionControl(ProducerCMode controlModeArg) const
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:366
static WellProductionProperties serializeObject()
double thp_hist_limit
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:347
static bool effectiveHistoryProductionControl(ProducerCMode cmode)
int VFPTableNumber
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:352
ProductionControls controls(const SummaryState &st, double udq_default) const
void serializeOp(Serializer &serializer)
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:394
double THPH
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:351
UDAValue WaterRate
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:338
void setBHPLimit(const double limit)
double ALQValue
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:353
bool updateUDQActive(const UDQConfig &udq_config, UDQActive &active) const
UDAValue ResVRate
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:341
UDAValue OilRate
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:337
void dropProductionControl(ProducerCMode controlModeArg)
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:370
UDAValue THPTarget
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:343
ProducerCMode whistctl_cmode
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:356
Definition: WellConnections.hpp:31
Definition: WellEconProductionLimits.hpp:29
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:58
bool operator==(const Well &data) const
static std::string Status2String(Status enumValue)
Well(const RestartIO::RstWell &rst_well, int report_step, const UnitSystem &unit_system, double udq_undefined)
const WellType & wellType() const
void setInsertIndex(std::size_t index)
bool updateDrainageRadius(double drainage_radius)
const WellTracerProperties & getTracerProperties() const
WELTARGCMode
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:119
bool updateConnections(std::shared_ptr< WellConnections > connections, const EclipseGrid &grid, const std::vector< int > &pvtnum)
bool isAvailableForGroupControl() const
Status getStatus() const
bool updateRefDepth(double ref_dpeth)
GuideRateTarget
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:136
double getEfficiencyFactor() const
bool updateTracer(std::shared_ptr< WellTracerProperties > tracer_properties)
bool updateConnections(std::shared_ptr< WellConnections > connections)
double getRefDepth() const
static const std::string ProducerCMode2String(ProducerCMode enumValue)
Status
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:61
static Well serializeObject()
static WELTARGCMode WELTARGCModeFromString(const std::string &stringValue)
double production_rate(const SummaryState &st, Phase phase) const
int vfp_table_number() const
Well(const std::string &wname, const std::string &gname, std::size_t init_step, std::size_t insert_index, int headI, int headJ, double ref_depth, const WellType &wtype_arg, ProducerCMode whistctl_cmode, Connection::Order ordering, const UnitSystem &unit_system, double udq_undefined, double dr, bool allow_xflow, bool auto_shutin, int pvt_table, GasInflowEquation inflow_eq)
bool cmp_structure(const Well &other) const
bool isMultiSegment() const
int getHeadI() const
ProducerCMode
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:101
bool handleWELOPEN(const DeckRecord &record, Connection::State status, bool action_mode)
bool updatePolymerProperties(std::shared_ptr< WellPolymerProperties > polymer_properties)
bool isProducer() const
double injection_rate(const SummaryState &st, Phase phase) const
const WellFoamProperties & getFoamProperties() const
bool updateBrineProperties(std::shared_ptr< WellBrineProperties > brine_properties)
int getHeadJ() const
bool hasBeenDefined(size_t timeStep) const
bool updateWellGuideRate(double guide_rate)
bool predictionMode() const
int fip_region_number() const
Phase getPreferredPhase() const
void updateSegments(std::shared_ptr< WellSegments > segments_arg)
const WellBrineProperties & getBrineProperties() const
GasInflowEquation gas_inflow_equation() const
ProductionControls productionControls(const SummaryState &st) const
static GasInflowEquation GasInflowEquationFromString(const std::string &stringValue)
bool updateAutoShutin(bool auto_shutin)
bool updateGroup(const std::string &group)
double alq_value() const
static InjectorCMode InjectorCModeFromString(const std::string &stringValue)
const WellSegments & getSegments() const
static ProducerCMode ProducerCModeFromString(const std::string &stringValue)
std::map< int, std::vector< Connection > > getCompletions() const
Well()=default
const std::string & name() const
GasInflowEquation
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:152
bool updateFoamProperties(std::shared_ptr< WellFoamProperties > foam_properties)
void filterConnections(const ActiveGridCells &grid)
bool updateCrossFlow(bool allow_cross_flow)
bool segmented_density_calculation() const
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:557
std::size_t firstTimeStep() const
bool updateWSEGVALV(const std::vector< std::pair< int, Valve > > &valve_pairs)
bool canOpen() const
bool updateEconLimits(std::shared_ptr< WellEconProductionLimits > econ_limits)
const WellEconProductionLimits & getEconLimits() const
void serializeOp(Serializer &serializer)
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:566
InjectorType injectorType() const
int pvt_table_number() const
double getDrainageRadius() const
static const std::string InjectorCMode2String(InjectorCMode enumValue)
double temperature() const
bool updateProduction(std::shared_ptr< WellProductionProperties > production)
static const std::string GuideRateTarget2String(GuideRateTarget enumValue)
bool handleCOMPSEGS(const DeckKeyword &keyword, const EclipseGrid &grid, const ParseContext &parseContext, ErrorGuard &errors)
bool updatePrediction(bool prediction_mode)
bool updateEfficiencyFactor(double efficiency_factor)
bool updateSolventFraction(double solvent_fraction)
static bool wellNameInWellNamePattern(const std::string &wellName, const std::string &wellNamePattern)
bool isInjector() const
size_t seqIndex() const
bool updateWSEGSICD(const std::vector< std::pair< int, SpiralICD > > &sicd_pairs)
const WellConnections & getConnections() const
bool updateStatus(Status status, bool update_connections)
InjectionControls injectionControls(const SummaryState &st) const
bool handleCOMPLUMP(const DeckRecord &record)
static GuideRateTarget GuideRateTargetFromString(const std::string &stringValue)
bool handleWELSEGS(const DeckKeyword &keyword)
bool updateWellGuideRate(bool available, double guide_rate, GuideRateTarget guide_phase, double scale_factor)
InjectorCMode
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:78
const WellInjectionProperties & getInjectionProperties() const
bool updatePVTTable(int pvt_table)
static Status StatusFromString(const std::string &stringValue)
double getSolventFraction() const
bool getAutomaticShutIn() const
const WellPolymerProperties & getPolymerProperties() const
bool handleWPIMULT(const DeckRecord &record)
double getGuideRate() const
const std::string & groupName() const
bool updateHead(int I, int J)
bool updateInjection(std::shared_ptr< WellInjectionProperties > injection)
bool getAllowCrossFlow() const
GuideRateTarget getGuideRatePhase() const
static const std::string GasInflowEquation2String(GasInflowEquation enumValue)
const WellProductionProperties & getProductionProperties() const
double getGuideRateScalingFactor() const
Definition: WellSegments.hpp:37
Definition: WellTracerProperties.hpp:28
Definition: ScheduleTypes.hpp:38
void serializeOp(Serializer &serializer)
Definition: ScheduleTypes.hpp:64
UDAKeyword keyword(UDAControl control)
Definition: A.hpp:4
std::ostream & operator<<(std::ostream &os, const UniformTableLinear< T > &t)
Definition: UniformTableLinear.hpp:249
InjectorType
Definition: ScheduleTypes.hpp:28
int eclipseControlMode(const Well::InjectorCMode imode, const InjectorType itype, const Well::Status wellStatus)
Phase
Definition: Runspec.hpp:34
static std::string data()
Definition: exprtk.hpp:40022
Definition: custom-opm-common/opm-common/opm/io/eclipse/rst/well.hpp:39
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:198
InjectorType injector_type
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:208
double thp_limit
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:205
bool hasControl(InjectorCMode cmode_arg) const
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:216
bool prediction_mode
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:214
InjectorCMode cmode
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:209
double temperature
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:212
InjectionControls(int controls_arg)
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:200
double surface_rate
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:210
int vfp_table_number
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:213
double reservoir_rate
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:211
double bhp_limit
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:204
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:302
double bhp_limit
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:317
double alq_value
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:319
bool hasControl(ProducerCMode cmode_arg) const
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:323
double thp_history
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:316
bool prediction_mode
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:321
double thp_limit
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:318
int vfp_table_number
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:320
double resv_rate
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:314
double water_rate
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:311
double bhp_history
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:315
double liquid_rate
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:313
double oil_rate
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:310
double gas_rate
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:312
ProducerCMode cmode
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:309
ProductionControls(int controls_arg)
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:304
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:163
GuideRateTarget guide_phase
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:166
void serializeOp(Serializer &serializer)
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:188
double guide_rate
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:165
double scale_factor
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:167
bool operator==(const WellGuideRate &data) const
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:180
bool available
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:164
static WellGuideRate serializeObject()
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:169
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:226
bool hasInjectionControl(InjectorCMode controlModeArg) const
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:256
UDAValue surfaceInjectionRate
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:228
double bhp_hist_limit
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:233
void serializeOp(Serializer &serializer)
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:282
double BHPH
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:237
static WellInjectionProperties serializeObject()
bool predictionMode
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:240
void addInjectionControl(InjectorCMode controlModeArg)
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:269
bool operator!=(const WellInjectionProperties &other) const
WellInjectionProperties(const UnitSystem &units, const std::string &wname)
int injectionControls
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:241
double thp_hist_limit
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:234
int VFPTableNumber
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:239
void dropInjectionControl(InjectorCMode controlModeArg)
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:263
UDAValue THPTarget
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:231
bool updateUDQActive(const UDQConfig &udq_config, UDQActive &active) const
void setBHPLimit(const double limit)
InjectorCMode controlMode
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:243
InjectionControls controls(const UnitSystem &unit_system, const SummaryState &st, double udq_default) const
double temperature
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:236
void handleWCONINJH(const DeckRecord &record, bool is_producer, const std::string &well_name)
double THPH
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:238
UDAValue reservoirInjectionRate
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:229
UDAValue BHPTarget
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:230
InjectorType injectorType
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:242
void handleWCONINJE(const DeckRecord &record, bool availableForGroupControl, const std::string &well_name)
void handleWELTARG(WELTARGCMode cmode, double newValue, double SIFactorP)
bool operator==(const WellInjectionProperties &other) const
std::string name
Definition: custom-opm-common/opm-common/opm/parser/eclipse/EclipseState/Schedule/Well/well.hpp:227
Definition: WellBrineProperties.hpp:29
Definition: WellFoamProperties.hpp:29
Definition: WellPolymerProperties.hpp:28