opm-common
Loading...
Searching...
No Matches
Well.hpp
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#ifndef WELL2_HPP
21#define WELL2_HPP
22
23#include <opm/input/eclipse/Deck/UDAValue.hpp>
24#include <opm/input/eclipse/EclipseState/Phase.hpp>
25#include <opm/input/eclipse/Schedule/ScheduleTypes.hpp>
26#include <opm/input/eclipse/Schedule/VFPProdTable.hpp>
27#include <opm/input/eclipse/Schedule/Well/Connection.hpp>
28#include <opm/input/eclipse/Schedule/Well/PAvg.hpp>
29#include <opm/input/eclipse/Schedule/Well/WellEnums.hpp>
30#include <opm/input/eclipse/Schedule/Well/WellInjectionControls.hpp>
31#include <opm/input/eclipse/Schedule/Well/WellProductionControls.hpp>
32#include <opm/input/eclipse/Schedule/Well/WINJMULT.hpp>
33#include <opm/input/eclipse/Units/UnitSystem.hpp>
34
35#include <cstddef>
36#include <iosfwd>
37#include <map>
38#include <memory>
39#include <optional>
40#include <string>
41#include <utility>
42#include <vector>
43
44namespace Opm {
45
46class ActiveGridCells;
47class AutoICD;
48class DeckKeyword;
49class DeckRecord;
50class ErrorGuard;
51class EclipseGrid;
52class KeywordLocation;
53class ParseContext;
54class ScheduleGrid;
55class SICD;
56class SummaryState;
57class UDQActive;
58class UDQConfig;
59class Valve;
60class TracerConfig;
61class WellConnections;
67class WellSegments;
69class WVFPEXP;
70class WVFPDP;
71class WDFAC;
72
73namespace RestartIO {
74struct RstWell;
75}
76
77class Well {
78public:
79 using Status = WellStatus;
80
81 /*
82 * The mode for the keyword WINJMULT. It can have four different values: WREV, CREV, CIRR and NONE.
83 */
84 using InjMultMode = InjMult::InjMultMode;
85
86 /*
87 The elements in this enum are used as bitmasks to keep track
88 of which controls are present, i.e. the 2^n structure must
89 be intact.
90 */
91 using InjectorCMode = WellInjectorCMode;
92
93 /*
94 The properties are initialized with the CMODE_UNDEFINED
95 value, but the undefined value is never assigned apart from
96 that; and it is not part of the string conversion routines.
97 */
98 using ProducerCMode = WellProducerCMode;
99
100 using WELTARGCMode = WellWELTARGCMode;
101
102 using GuideRateTarget = WellGuideRateTarget;
103
104 using GasInflowEquation = WellGasInflowEquation;
105
106 void flag_lgr_well();
107 void set_lgr_well_tag(const std::string& lgr_tag_name);
108 void setInsertIndexLGR(const std::size_t index);
109 void setInsertIndexAllLGR(const std::size_t index);
110
111 std::size_t seqIndexLGR() const { return insert_index_lgr; }
112 std::size_t seqIndexAllLGR() const { return insert_index_all_lgr; }
113
114 bool is_lgr_well() const;
115 std::optional<std::string> get_lgr_well_tag() const;
117 bool available;
118 double guide_rate;
119 GuideRateTarget guide_phase;
120 double scale_factor;
121
122 static WellGuideRate serializationTestObject()
123 {
124 WellGuideRate result;
125 result.available = true;
126 result.guide_rate = 1.0;
127 result.guide_phase = GuideRateTarget::COMB;
128 result.scale_factor = 2.0;
129
130 return result;
131 }
132
133 bool operator==(const WellGuideRate& data) const {
134 return available == data.available &&
135 guide_rate == data.guide_rate &&
136 guide_phase == data.guide_phase &&
137 scale_factor == data.scale_factor;
138 }
139
140 template<class Serializer>
141 void serializeOp(Serializer& serializer)
142 {
143 serializer(available);
144 serializer(guide_rate);
145 serializer(guide_phase);
146 serializer(scale_factor);
147 }
148 };
149
150 using InjectionControls = WellInjectionControls;
151
152 struct WellInjectionProperties {
153 std::string name;
154 UDAValue surfaceInjectionRate;
155 UDAValue reservoirInjectionRate;
156 UDAValue BHPTarget;
157 UDAValue THPTarget;
158
159 double bhp_hist_limit = 0.0;
160 double thp_hist_limit = 0.0;
161
162 double BHPH;
163 double THPH;
164 int VFPTableNumber;
165 bool predictionMode;
166 int injectionControls;
167 InjectorType injectorType;
168 InjectorCMode controlMode;
169
170 double rsRvInj;
171
172 // injection stream compostion for compositional simulation
173 std::optional<std::vector<double>> gas_inj_composition{};
174
175 bool operator==(const WellInjectionProperties& other) const;
176 bool operator!=(const WellInjectionProperties& other) const;
177
178 WellInjectionProperties();
179 WellInjectionProperties(const UnitSystem& units, const std::string& wname);
180
181 static WellInjectionProperties serializationTestObject();
182
183 void handleWELTARG(WELTARGCMode cmode, const UDAValue& new_arg, double SIFactorP);
184
191 void handleWCONINJE(const DeckRecord& record,
192 const double bhp_def,
193 bool availableForGroupControl,
194 const std::string& well_name,
195 const KeywordLocation& location);
196
204 void handleWCONINJH(const DeckRecord& record,
205 const int vfp_table_nr,
206 const double bhp_def,
207 const bool is_producer,
208 const std::string& well_name,
209 const KeywordLocation& loc);
210
211 bool hasInjectionControl(InjectorCMode controlModeArg) const {
212 if (injectionControls & static_cast<int>(controlModeArg))
213 return true;
214 else
215 return false;
216 }
217
218 void dropInjectionControl(InjectorCMode controlModeArg) {
219 auto int_arg = static_cast<int>(controlModeArg);
220 if ((injectionControls & int_arg) != 0)
221 injectionControls -= int_arg;
222 }
223
224 void addInjectionControl(InjectorCMode controlModeArg) {
225 auto int_arg = static_cast<int>(controlModeArg);
226 if ((injectionControls & int_arg) == 0)
227 injectionControls += int_arg;
228 }
229
230 void clearControls();
231
232 void resetDefaultHistoricalBHPLimit();
233 void resetBHPLimit();
234 void setBHPLimit(const double limit);
235 InjectionControls controls(const UnitSystem& unit_system, const SummaryState& st, double udq_default) const;
236 bool updateUDQActive(const UDQConfig& udq_config, UDQActive& active) const;
237 bool updateUDQActive(const UDQConfig& udq_config, const WELTARGCMode cmode, UDQActive& active) const;
238 void update_uda(const UDQConfig& udq_config, UDQActive& udq_active, UDAControl control, const UDAValue& value);
239 void handleWTMULT(Well::WELTARGCMode cmode, double factor);
240
241 void setGasInjComposition(const std::vector<double>& composition);
242 const std::vector<double>& gasInjComposition() const;
243
244 template<class Serializer>
245 void serializeOp(Serializer& serializer)
246 {
247 serializer(name);
248 serializer(surfaceInjectionRate);
249 serializer(reservoirInjectionRate);
250 serializer(BHPTarget);
251 serializer(THPTarget);
252 serializer(bhp_hist_limit);
253 serializer(thp_hist_limit);
254 serializer(BHPH);
255 serializer(THPH);
256 serializer(VFPTableNumber);
257 serializer(predictionMode);
258 serializer(injectionControls);
259 serializer(injectorType);
260 serializer(controlMode);
261 serializer(rsRvInj);
262 serializer(gas_inj_composition);
263 }
264 };
265
266 using ProductionControls = WellProductionControls;
267
268 class WellProductionProperties {
269 public:
270 // the rates serve as limits under prediction mode
271 // while they are observed rates under historical mode
272 std::string name;
273 UDAValue OilRate;
274 UDAValue WaterRate;
275 UDAValue GasRate;
276 UDAValue LiquidRate;
277 UDAValue ResVRate;
278 UDAValue BHPTarget;
279 UDAValue THPTarget;
280 UDAValue ALQValue;
281
282 // BHP and THP limit
283 double bhp_hist_limit = 0.0;
284 double thp_hist_limit = 0.0;
285 bool bhp_hist_limit_defaulted = true; // Tracks whether value was defaulted or not
286
287 // historical BHP and THP under historical mode
288 double BHPH = 0.0;
289 double THPH = 0.0;
290 int VFPTableNumber = 0;
291 bool predictionMode = false;
292 ProducerCMode controlMode = ProducerCMode::CMODE_UNDEFINED;
293 ProducerCMode whistctl_cmode = ProducerCMode::CMODE_UNDEFINED;
294
295 bool operator==(const WellProductionProperties& other) const;
296 bool operator!=(const WellProductionProperties& other) const;
297
298 WellProductionProperties();
299 WellProductionProperties(const UnitSystem& units, const std::string& name_arg);
300
301 static WellProductionProperties serializationTestObject();
302
303 bool hasProductionControl(ProducerCMode controlModeArg) const {
304 return (m_productionControls & static_cast<int>(controlModeArg)) != 0;
305 }
306
307 void dropProductionControl(ProducerCMode controlModeArg) {
308 if (hasProductionControl(controlModeArg))
309 m_productionControls -= static_cast<int>(controlModeArg);
310 }
311
312 void addProductionControl(ProducerCMode controlModeArg) {
313 if (! hasProductionControl(controlModeArg))
314 m_productionControls += static_cast<int>(controlModeArg);
315 }
316
317 // this is used to check whether the specified control mode is an effective history matching production mode
318 static bool effectiveHistoryProductionControl(ProducerCMode cmode);
319
328 void handleWCONPROD(const std::optional<VFPProdTable::ALQ_TYPE>& alq_type,
329 const int vfp_table_nr,
330 const double bhp_def,
331 const UnitSystem& unit_system,
332 const std::string& well,
333 const DeckRecord& record,
334 const KeywordLocation& location);
335
342 void handleWCONHIST(const std::optional<VFPProdTable::ALQ_TYPE>& alq_type,
343 const int vfp_table_nr,
344 const double bhp_def,
345 const UnitSystem& unit_system,
346 const DeckRecord& record);
347 void handleWELTARG( WELTARGCMode cmode, const UDAValue& new_arg, double SiFactorP);
348 void resetDefaultBHPLimit();
349 void clearControls();
350 ProductionControls controls(const SummaryState& st, double udq_default) const;
351 bool updateUDQActive(const UDQConfig& udq_config, UDQActive& active) const;
352 bool updateUDQActive(const UDQConfig& udq_config, const WELTARGCMode cmode, UDQActive& active) const;
353 void update_uda(const UDQConfig& udq_config, UDQActive& udq_active, UDAControl control, const UDAValue& value);
354
355 void setBHPLimit(const double limit);
356 int productionControls() const { return this->m_productionControls; }
357 void handleWTMULT(Well::WELTARGCMode cmode, double factor);
358
359 template<class Serializer>
360 void serializeOp(Serializer& serializer)
361 {
362 serializer(name);
363 serializer(OilRate);
364 serializer(WaterRate);
365 serializer(GasRate);
366 serializer(LiquidRate);
367 serializer(ResVRate);
368 serializer(BHPTarget);
369 serializer(THPTarget);
370 serializer(ALQValue);
371 serializer(bhp_hist_limit);
372 serializer(thp_hist_limit);
373 serializer(BHPH);
374 serializer(THPH);
375 serializer(VFPTableNumber);
376 serializer(predictionMode);
377 serializer(controlMode);
378 serializer(whistctl_cmode);
379 serializer(m_productionControls);
380 }
381
382 private:
383 int m_productionControls = 0;
384 void init_rates( const DeckRecord& record );
385
386 void init_history(const DeckRecord& record);
387 void init_vfp(const std::optional<VFPProdTable::ALQ_TYPE>& alq_type, const int vfp_table_nr, const UnitSystem& unit_system, const DeckRecord& record);
388
389 explicit WellProductionProperties(const DeckRecord& record);
390
391 double getBHPLimit() const;
392 };
393
394 static int eclipseControlMode(const Well::InjectorCMode imode,
395 const InjectorType itype);
396
397 static int eclipseControlMode(const Well::ProducerCMode pmode);
398
399 static int eclipseControlMode(const Well& well,
400 const SummaryState& st);
401
402 Well() = default;
403 Well(const std::string& wname,
404 const std::string& gname,
405 std::size_t init_step,
406 std::size_t insert_index,
407 int headI,
408 int headJ,
409 const std::optional<double>& ref_depth,
410 const WellType& wtype_arg,
411 ProducerCMode whistctl_cmode,
412 Connection::Order ordering,
413 const UnitSystem& unit_system,
414 double udq_undefined,
415 double dr,
416 bool allow_xflow,
417 bool auto_shutin,
418 int pvt_table,
419 GasInflowEquation inflow_eq,
420 bool temp_option = false);
421
422 Well(const RestartIO::RstWell& rst_well,
423 int report_step,
424 int rst_whistctl_cmode,
425 const TracerConfig& tracer_config,
426 const UnitSystem& unit_system,
427 double udq_undefined,
428 const std::optional<VFPProdTable::ALQ_TYPE>& alq_type);
429
430 static Well serializationTestObject();
431
432 bool isMultiSegment() const;
433 bool isAvailableForGroupControl() const;
434 double getGuideRate() const;
435 GuideRateTarget getGuideRatePhase() const;
436 GuideRateTarget getRawGuideRatePhase() const;
437 double getGuideRateScalingFactor() const;
438
439 bool hasBeenDefined(std::size_t timeStep) const;
440 std::size_t firstTimeStep() const;
441 const WellType& wellType() const;
442 bool predictionMode() const;
443 bool isProducer() const;
444 bool isInjector() const;
445 InjectorCMode injection_cmode() const;
446 ProducerCMode production_cmode() const;
447 InjectorType injectorType() const;
448 std::size_t seqIndex() const;
449 bool getAutomaticShutIn() const;
450 bool getAllowCrossFlow() const;
451 const std::string& name() const;
452 const std::vector<std::string>& wListNames() const;
453 int getHeadI() const;
454 int getHeadJ() const;
455 double getWPaveRefDepth() const;
456 bool hasRefDepth() const;
457 double getRefDepth() const;
458 double getDrainageRadius() const;
459 double getEfficiencyFactor(bool network = false) const;
460 double getSolventFraction() const;
461 Status getStatus() const;
462 const std::string& groupName() const;
463 Phase getPreferredPhase() const;
464 InjMultMode getInjMultMode() const;
465 const InjMult& getWellInjMult() const;
466 bool aciveWellInjMult() const;
467
468 bool hasConnections() const;
469 std::vector<const Connection *> getConnections(int completion) const;
470 const WellConnections& getConnections() const;
471 WellConnections& getConnections();
472 const WellSegments& getSegments() const;
473 int maxSegmentID() const;
474 int maxBranchID() const;
475
476 const WellProductionProperties& getProductionProperties() const;
477 const WellInjectionProperties& getInjectionProperties() const;
478 const WellEconProductionLimits& getEconLimits() const;
479 const WellFoamProperties& getFoamProperties() const;
480 const WellPolymerProperties& getPolymerProperties() const;
481 const WellMICPProperties& getMICPProperties() const;
482 const WellBrineProperties& getBrineProperties() const;
483 const WellTracerProperties& getTracerProperties() const;
484 const WVFPDP& getWVFPDP() const;
485 const WVFPEXP& getWVFPEXP() const;
486 const WDFAC& getWDFAC() const;
487
488 /* The rate of a given phase under the following assumptions:
489 * * Returns zero if production is requested for an injector (and vice
490 * versa)
491 * * If this is an injector and something else than the
492 * requested phase is injected, returns 0, i.e.
493 * water_injector.injection_rate( gas ) == 0
494 * * Mixed injection is not supported and always returns 0.
495 */
496 double production_rate( const SummaryState& st, Phase phase) const;
497 double injection_rate( const SummaryState& st, Phase phase) const;
498 static bool wellNameInWellNamePattern(const std::string& wellName, const std::string& wellNamePattern);
499
500 /*
501 The getCompletions() function will return a map:
502
503 {
504 1 : [Connection, Connection],
505 2 : [Connection, Connection, Connecton],
506 3 : [Connection],
507 4 : [Connection]
508 }
509
510 The integer ID's correspond to the COMPLETION id given by the COMPLUMP
511 keyword.
512 */
513 std::map<int, std::vector<Connection>> getCompletions() const;
514 /*
515 For hasCompletion(int completion) and getConnections(int completion) the
516 completion argument is an integer ID used to denote a collection of
517 connections. The integer ID is assigned with the COMPLUMP keyword.
518 */
519 bool hasCompletion(int completion) const;
520 bool updatePrediction(bool prediction_mode);
521 bool updateAutoShutin(bool auto_shutin);
522 bool updateCrossFlow(bool allow_cross_flow);
523 bool updatePVTTable(std::optional<int> pvt_table);
524 bool updateHead(std::optional<int> I, std::optional<int> J);
525 void updateRefDepth();
526 bool updateRefDepth(std::optional<double> ref_dpeth);
527 bool updateDrainageRadius(std::optional<double> drainage_radius);
528 void updateSegments(std::shared_ptr<WellSegments> segments_arg);
529 bool updateConnections(std::shared_ptr<WellConnections> connections, bool force);
530 bool updateConnections(std::shared_ptr<WellConnections> connections, const ScheduleGrid& grid);
531 bool updateStatus(Status status);
532 bool updateGroup(const std::string& group);
533 bool updateWellGuideRate(bool available, double guide_rate, GuideRateTarget guide_phase, double scale_factor);
534 bool updateWellGuideRate(double guide_rate);
535 bool updateAvailableForGroupControl(bool available);
536 bool updateEfficiencyFactor(double efficiency_factor, bool use_efficiency_in_network);
537
538 bool updateSolventFraction(double solvent_fraction);
539 bool updateTracer(std::shared_ptr<WellTracerProperties> tracer_properties);
540 bool updateFoamProperties(std::shared_ptr<WellFoamProperties> foam_properties);
541 bool updatePolymerProperties(std::shared_ptr<WellPolymerProperties> polymer_properties);
542 bool updateMICPProperties(std::shared_ptr<WellMICPProperties> micp_properties);
543 bool updateBrineProperties(std::shared_ptr<WellBrineProperties> brine_properties);
544 bool updateEconLimits(std::shared_ptr<WellEconProductionLimits> econ_limits);
545 bool updateProduction(std::shared_ptr<WellProductionProperties> production);
546 bool updateInjection(std::shared_ptr<WellInjectionProperties> injection);
547 bool updateWellProductivityIndex();
548 bool updateWSEGSICD(const std::vector<std::pair<int, SICD> >& sicd_pairs);
549 bool updateWSEGVALV(const std::vector<std::pair<int, Valve> >& valve_pairs);
550 bool updateWSEGAICD(const std::vector<std::pair<int, AutoICD> >& aicd_pairs, const KeywordLocation& location);
551 bool updateWPAVE(const PAvg& pavg);
552
553
554 void updateWPaveRefDepth(double ref_depth);
555 bool updateWVFPDP(std::shared_ptr<WVFPDP> wvfpdp);
556 bool updateWVFPEXP(std::shared_ptr<WVFPEXP> wvfpexp);
557 bool updateWDFAC(std::shared_ptr<WDFAC> wdfac);
558
559 bool handleWELSEGS(const DeckKeyword& keyword);
560 bool handleCOMPSEGS(const DeckKeyword& keyword, const ScheduleGrid& grid, const ParseContext& parseContext, ErrorGuard& errors);
561 bool handleWELOPENConnections(const DeckRecord& record, Connection::State status);
562 bool handleCSKIN(const DeckRecord& record, const KeywordLocation& location);
563 bool handleCOMPLUMP(const DeckRecord& record);
564 bool handleWPIMULT(const DeckRecord& record);
565 bool handleWINJCLN(const DeckRecord& record, const KeywordLocation& location);
566 bool handleWINJDAM(const DeckRecord& record, const KeywordLocation& location);
567 bool handleWINJMULT(const DeckRecord& record, const KeywordLocation& location);
568 void setFilterConc(const UDAValue& conc);
569 double evalFilterConc(const SummaryState& summary_sate) const;
570 bool applyGlobalWPIMULT(double scale_factor);
571
572 void filterConnections(const ActiveGridCells& grid);
573 ProductionControls productionControls(const SummaryState& st) const;
574 InjectionControls injectionControls(const SummaryState& st) const;
575 int vfp_table_number() const;
576 int pvt_table_number() const;
577 int fip_region_number() const;
578 GasInflowEquation gas_inflow_equation() const;
579 bool segmented_density_calculation() const { return true; }
580 double alq_value(const SummaryState& st) const;
581 double inj_temperature() const;
582 bool hasInjTemperature() const;
583 void setWellInjTemperature(const double temp);
584 bool hasInjected( ) const;
585 bool hasProduced( ) const;
586 bool updateHasInjected( );
587 bool updateHasProduced();
588 bool cmp_structure(const Well& other) const;
589 bool operator==(const Well& data) const;
590 bool hasSameConnectionsPointers(const Well& other) const;
591 void setInsertIndex(std::size_t index);
592 double convertDeckPI(double deckPI) const;
593 void applyWellProdIndexScaling(const double scalingFactor,
594 std::vector<bool>& scalingApplicable);
595 const PAvg& pavg() const;
596
598 void updateUnitSystem(const UnitSystem* usys) { unit_system = usys; }
599
600 template<class Serializer>
601 void serializeOp(Serializer& serializer)
602 {
603 serializer(wname);
604 serializer(group_name);
605 serializer(init_step);
606 serializer(insert_index);
607 serializer(insert_index_lgr);
608 serializer(insert_index_all_lgr);
609 serializer(headI);
610 serializer(headJ);
611 serializer(ref_depth);
612 serializer(wpave_ref_depth);
613 serializer(udq_undefined);
614 serializer(status);
615 serializer(drainage_radius);
616 serializer(allow_cross_flow);
617 serializer(automatic_shutin);
618 serializer(pvt_table);
619 serializer(gas_inflow);
620 serializer(wtype);
621 serializer(ref_type);
622 serializer(lgr_tag);
623 serializer(guide_rate);
624 serializer(efficiency_factor);
625 serializer(use_efficiency_in_network);
626 serializer(solvent_fraction);
627 serializer(has_produced);
628 serializer(has_injected);
629 serializer(prediction_mode);
630 serializer(derive_refdepth_from_conns_);
631 serializer(econ_limits);
632 serializer(foam_properties);
633 serializer(polymer_properties);
634 serializer(micp_properties);
635 serializer(brine_properties);
636 serializer(tracer_properties);
637 serializer(connections);
638 serializer(production);
639 serializer(injection);
640 serializer(segments);
641 serializer(wvfpdp);
642 serializer(wdfac);
643 serializer(wvfpexp);
644 serializer(m_pavg);
645 serializer(well_inj_temperature);
646 serializer(default_well_inj_temperature);
647 serializer(inj_mult_mode);
648 serializer(well_inj_mult);
649 serializer(m_filter_concentration);
650 }
651
652private:
653 enum class WellRefinementType {
654 STANDARD,
655 LGR,
656 MIXED,
657 };
658 void switchToInjector();
659 void switchToProducer();
660
661 GuideRateTarget preferredPhaseAsGuideRatePhase() const;
662
663 std::string wname{};
664 std::string group_name{};
665
666 std::size_t init_step{};
667 std::size_t insert_index{};
668 // counts wells in a single LGR
669 std::size_t insert_index_lgr{0};
670 // counts wells in all LGRs combined
671 std::size_t insert_index_all_lgr{0};
672 int headI{};
673 int headJ{};
674 std::optional<double> ref_depth{};
675 std::optional<double> wpave_ref_depth{};
676 double drainage_radius{};
677 bool allow_cross_flow{false};
678 bool automatic_shutin{false};
679 int pvt_table{};
680
681
682 // Will NOT be loaded/assigned from restart file
683 GasInflowEquation gas_inflow = GasInflowEquation::STD;
684
685 const UnitSystem* unit_system{nullptr};
686 double udq_undefined{};
687 WellType wtype{};
688 WellRefinementType ref_type{WellRefinementType::STANDARD};
689 std::string lgr_tag{};
690 WellGuideRate guide_rate{};
691 double efficiency_factor{};
692 bool use_efficiency_in_network{};
693 double solvent_fraction{};
694 bool has_produced = false;
695 bool has_injected = false;
696 bool prediction_mode = true;
697 bool derive_refdepth_from_conns_ { true };
698
699 std::shared_ptr<WellEconProductionLimits> econ_limits{};
700 std::shared_ptr<WellFoamProperties> foam_properties{};
701 std::shared_ptr<WellPolymerProperties> polymer_properties{};
702 std::shared_ptr<WellMICPProperties> micp_properties{};
703 std::shared_ptr<WellBrineProperties> brine_properties{};
704 std::shared_ptr<WellTracerProperties> tracer_properties{};
705
706 // The WellConnections object cannot be const because of WELPI and the
707 // filterConnections method
708 std::shared_ptr<WellConnections> connections{};
709
710 std::shared_ptr<WellProductionProperties> production{};
711 std::shared_ptr<WellInjectionProperties> injection{};
712 std::shared_ptr<WellSegments> segments{};
713 std::shared_ptr<WVFPDP> wvfpdp{};
714 std::shared_ptr<WVFPEXP> wvfpexp{};
715 std::shared_ptr<WDFAC> wdfac{};
716
717 Status status{Status::AUTO};
718 PAvg m_pavg{};
719 std::optional<double> well_inj_temperature{};
720 std::optional<double> default_well_inj_temperature{std::nullopt};
721 InjMultMode inj_mult_mode = InjMultMode::NONE;
722 std::optional<InjMult> well_inj_mult{};
723 UDAValue m_filter_concentration{};
724};
725
726std::ostream& operator<<( std::ostream&, const Well::WellInjectionProperties& );
727std::ostream& operator<<( std::ostream&, const Well::WellProductionProperties& );
728
729}
730#endif
Simple class capturing active cells of a grid.
Definition ActiveGridCells.hpp:36
Definition AICD.hpp:44
Definition DeckKeyword.hpp:36
Definition DeckRecord.hpp:32
About cell information and dimension: The actual grid information is held in a pointer to an ERT ecl_...
Definition EclipseGrid.hpp:61
Definition ErrorGuard.hpp:30
Definition KeywordLocation.hpp:27
Definition PAvg.hpp:30
Definition ParseContext.hpp:84
Definition SICD.hpp:46
Collection of intersected cells and associate properties for all simulation grids,...
Definition ScheduleGrid.hpp:50
Class for (de-)serializing.
Definition Serializer.hpp:94
Definition SummaryState.hpp:72
Definition TracerConfig.hpp:33
Definition UDAValue.hpp:31
Internalised representation of all UDAs in a simulation run.
Definition UDQActive.hpp:50
Collection of all user-defined quantities in the current simulation run.
Definition UDQConfig.hpp:69
Definition UnitSystem.hpp:34
Definition Valve.hpp:63
Definition WDFAC.hpp:40
Definition WVFPDP.hpp:34
Definition WVFPEXP.hpp:34
Definition WellConnections.hpp:48
Definition WellEconProductionLimits.hpp:33
Definition WellSegments.hpp:48
Definition WellTracerProperties.hpp:35
Definition ScheduleTypes.hpp:40
void handleWCONHIST(const std::optional< VFPProdTable::ALQ_TYPE > &alq_type, const int vfp_table_nr, const double bhp_def, const UnitSystem &unit_system, const DeckRecord &record)
Handle WCONHIST keyword.
Definition WellProductionProperties.cpp:238
void handleWCONPROD(const std::optional< VFPProdTable::ALQ_TYPE > &alq_type, const int vfp_table_nr, const double bhp_def, const UnitSystem &unit_system, const std::string &well, const DeckRecord &record, const KeywordLocation &location)
Handle WCONPROD keyword.
Definition WellProductionProperties.cpp:169
Definition Well.hpp:77
void updateUnitSystem(const UnitSystem *usys)
Used by schedule deserialization.
Definition Well.hpp:598
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30
Definition WINJMULT.hpp:30
Definition well.hpp:43
Definition WellBrineProperties.hpp:29
Definition WellFoamProperties.hpp:29
Definition WellInjectionControls.hpp:31
Definition WellMICPProperties.hpp:29
Definition WellPolymerProperties.hpp:28
Definition WellProductionControls.hpp:31
Definition Well.hpp:116
Definition Well.hpp:152
void handleWCONINJE(const DeckRecord &record, const double bhp_def, bool availableForGroupControl, const std::string &well_name, const KeywordLocation &location)
Handle a WCONINJE keyword.
Definition WellInjectionProperties.cpp:91
void handleWCONINJH(const DeckRecord &record, const int vfp_table_nr, const double bhp_def, const bool is_producer, const std::string &well_name, const KeywordLocation &loc)
Handle a WCONINJH keyword.
Definition WellInjectionProperties.cpp:201