20 #ifndef OPM_GROUP_ECONOMIC_LIMITS_CHECKER_HEADER_INCLUDED 21 #define OPM_GROUP_ECONOMIC_LIMITS_CHECKER_HEADER_INCLUDED 23 #include <opm/input/eclipse/Schedule/Group/GroupEconProductionLimits.hpp> 24 #include <opm/input/eclipse/Units/UnitSystem.hpp> 35 template<
typename Scalar,
typename IndexTraits>
class BlackoilWellModelGeneric;
38 template<
typename Scalar,
typename IndexTraits>
class WellState;
41 template<
typename Scalar,
typename IndexTraits>
45 enum class RatioViolation {
54 RatioViolation violation;
55 std::string ratio_type;
58 UnitSystem::measure measure;
62 WellTestState& well_test_state,
64 const double simulation_time,
65 const int report_step_idx,
70 std::optional<RatioDetails> waterCut();
71 std::optional<RatioDetails> GOR();
72 std::optional<RatioDetails> WGR();
73 std::optional<RatioDetails> ratioViolation();
76 int numProducersOpenInitially();
77 int numProducersOpen();
78 void activateEndRun();
79 std::string message_separator(
const char sep_char =
'*',
80 const size_t sep_length = 110)
const 81 {
return std::string(sep_length, sep_char); }
83 static constexpr
int NUM_PHASES = 3;
86 void displayDebugMessage(
const std::string& msg)
const;
87 void addPrintMessage(
const std::string& msg,
90 const UnitSystem::measure measure);
91 bool closeWellsRecursive(
const Group& group,
int level = 0);
92 void throwNotImplementedError(
const std::string& error)
const;
95 void collectProducerWells(
const Group& group,
96 std::vector<std::string>& well_names)
const;
101 std::optional<Scalar> computeWellRatio(
const std::string& well_name,
102 const RatioViolation ratio_violation)
const;
107 void closeWorstOffendingRatioWell(
const RatioDetails& ratio_details);
109 std::optional<RatioDetails> groupRatioDetails(
const RatioViolation ratio_violation)
const;
113 const double simulation_time_;
114 const int report_step_idx_;
116 const std::string date_string_;
117 const UnitSystem& unit_system_;
119 WellTestState& well_test_state_;
120 const Schedule& schedule_;
121 GroupEconProductionLimits::GEconGroupProp gecon_props_;
123 std::array<Scalar,NUM_PHASES> production_rates_;
124 std::map<int, unsigned> phase_idx_map_ = {
125 {0, IndexTraits::oilPhaseIdx},
126 {1, IndexTraits::gasPhaseIdx},
127 {2, IndexTraits::waterPhaseIdx}
129 std::map<unsigned, int> phase_idx_reverse_map_;
130 std::string message_;
135 #endif // OPM_GROUP_ECONOMIC_LIMITS_CHECKER_HEADER_INCLUDED
Definition: GroupEconomicLimitsChecker.hpp:52
Definition: GroupEconomicLimitsChecker.hpp:42
Structs needed for tpfalinearizer and its gpuparams struct extracted to be defined in one place that ...
Definition: blackoilbioeffectsmodules.hh:45
Definition: DeferredLogger.hpp:56
The state of a set of wells, tailored for use by the fully implicit blackoil simulator.
Definition: TemperatureModel.hpp:65