56 static Scalar sumWellPhaseRates(
bool res_rates,
57 const Opm::Group& group,
58 const Opm::Schedule& schedule,
59 const WellStateType& wellState,
60 const SummaryState& summaryState,
61 const int reportStepIdx,
64 const bool network =
false);
66 static Scalar satelliteInjectionRate(
const ScheduleState& sched,
72 static Scalar satelliteProductionRate(
const SummaryState& summaryState,
73 const ScheduleState& sched,
75 const GSatProd::GSatProdGroupProp::Rate rateComp,
78 static std::optional<GSatProd::GSatProdGroupProp::Rate>
81 static void setCmodeGroup(
const Group& group,
82 const Schedule& schedule,
83 const SummaryState& summaryState,
84 const int reportStepIdx,
87 static void accumulateGroupEfficiencyFactor(
const Group& group,
88 const Schedule& schedule,
89 const int reportStepIdx,
92 static Scalar sumWellSurfaceRates(
const Group& group,
93 const Schedule& schedule,
94 const WellStateType& wellState,
95 const int reportStepIdx,
98 const SummaryState& summaryState);
101 static std::pair<std::optional<std::string>, Scalar>
103 const Schedule& schedule,
104 const int reportStepIdx,
105 const Group::ProductionCMode& offendedControl,
106 const Parallel::Communication& comm,
107 const WellStateType& wellState,
110 static Scalar sumWellResRates(
const Group& group,
111 const Schedule& schedule,
112 const WellStateType& wellState,
113 const int reportStepIdx,
116 const SummaryState& summaryState);
118 static Scalar sumSolventRates(
const Group& group,
119 const Schedule& schedule,
120 const WellStateType& wellState,
121 const int reportStepIdx,
122 const bool injector);
124 static void updateGroupTargetReduction(
const Group& group,
125 const Schedule& schedule,
126 const int reportStepIdx,
127 const bool isInjector,
128 const GuideRate& guide_rate,
129 const WellStateType& wellState,
130 const SummaryState& summaryState,
132 std::vector<Scalar>& groupTargetReduction);
134 static void updateVREPForGroups(
const Group& group,
135 const Schedule& schedule,
136 const int reportStepIdx,
137 const WellStateType& wellState,
139 const SummaryState& summaryState);
141 template <
class RegionalValues>
142 static void updateGpMaintTargetForGroups(
const Group& group,
143 const Schedule& schedule,
144 const RegionalValues& regional_values,
145 const int reportStepIdx,
147 const WellStateType& well_state,
150 static void updateReservoirRatesInjectionGroups(
const Group& group,
151 const Schedule& schedule,
152 const int reportStepIdx,
153 const WellStateType& wellState,
155 const SummaryState& summaryState);
157 static void updateSurfaceRatesInjectionGroups(
const Group& group,
158 const Schedule& schedule,
159 const int reportStepIdx,
160 const WellStateType& wellState,
162 const SummaryState& summaryState);
164 static void updateWellRates(
const Group& group,
165 const Schedule& schedule,
166 const int reportStepIdx,
167 const WellStateType& wellStateNupcol,
168 WellStateType& wellState);
170 static void updateGroupProductionRates(
const Group& group,
171 const Schedule& schedule,
172 const int reportStepIdx,
173 const WellStateType& wellState,
175 const SummaryState& summaryState);
177 static void updateNetworkLeafNodeProductionRates(
const Schedule& schedule,
178 const int reportStepIdx,
179 const WellStateType& wellState,
181 const SummaryState& summaryState);
184 static void updateWellRatesFromGroupTargetScale(
const Scalar scale,
186 const Schedule& schedule,
187 const int reportStepIdx,
190 WellStateType& wellState);
192 static void updateREINForGroups(
const Group& group,
193 const Schedule& schedule,
194 const int reportStepIdx,
195 const SummaryState& st,
196 const WellStateType& wellState,
201 static std::map<std::string, Scalar>
202 computeNetworkPressures(
const Network::ExtNetwork& network,
203 const WellStateType& well_state,
206 const Schedule& schedule,
207 const Parallel::Communication& comm,
208 const int report_time_step);
210 static GuideRate::RateVector
211 getWellRateVector(
const WellStateType& well_state,
212 const std::string& name);
214 static GuideRate::RateVector
217 const std::string& group_name);
219 static Scalar getGuideRate(
const std::string& name,
220 const Schedule& schedule,
221 const WellStateType& wellState,
223 const int reportStepIdx,
224 const GuideRate* guideRate,
225 const GuideRateModel::Target target);
227 static Scalar getGuideRateInj(
const std::string& name,
228 const Schedule& schedule,
229 const WellStateType& wellState,
231 const int reportStepIdx,
232 const GuideRate* guideRate,
233 const GuideRateModel::Target target,
234 const Phase& injectionPhase);
239 const WellStateType& well_state,
241 const SummaryState& summary_state,
242 const GuideRate* guideRate,
243 const int report_step,
244 const std::string& group_name,
245 const bool is_production_group,
246 const Phase injection_phase);
250 const WellStateType& well_state,
252 const int report_step,
253 const std::string& group_name,
254 const std::string& always_included_child,
255 const bool is_production_group,
256 const Phase injection_phase);
258 static std::pair<bool, Scalar>
259 checkGroupConstraintsInj(
const std::string& name,
260 const std::string& parent,
262 const WellStateType& wellState,
264 const int reportStepIdx,
265 const GuideRate* guideRate,
267 Phase injectionPhase,
268 const Scalar efficiencyFactor,
269 const Schedule& schedule,
270 const SummaryState& summaryState,
271 const std::vector<Scalar>& resv_coeff,
272 const bool check_guide_rate,
276 getWellGroupTargetInjector(
const std::string& name,
277 const std::string& parent,
279 const WellStateType& wellState,
281 const int reportStepIdx,
282 const GuideRate* guideRate,
284 Phase injectionPhase,
285 const Scalar efficiencyFactor,
286 const Schedule& schedule,
287 const SummaryState& summaryState,
288 const std::vector<Scalar>& resv_coeff,
291 static std::vector<std::string>
292 groupChainTopBot(
const std::string& bottom,
293 const std::string& top,
294 const Schedule& schedule,
295 const int report_step);
300 isInGroupChainTopBot(
const std::string& bottom,
301 const std::string& top,
302 const Schedule& schedule,
303 const int report_step);
306 control_group(
const Group& group,
308 const int reportStepIdx,
309 const Schedule& schedule);
311 static std::pair<bool, Scalar>
312 checkGroupConstraintsProd(
const std::string& name,
313 const std::string& parent,
315 const WellStateType& wellState,
317 const int reportStepIdx,
318 const GuideRate* guideRate,
320 const Scalar efficiencyFactor,
321 const Schedule& schedule,
322 const SummaryState& summaryState,
323 const std::vector<Scalar>& resv_coeff,
324 const bool check_guide_rate,
327 getWellGroupTargetProducer(
const std::string& name,
328 const std::string& parent,
330 const WellStateType& wellState,
332 const int reportStepIdx,
333 const GuideRate* guideRate,
335 const Scalar efficiencyFactor,
336 const Schedule& schedule,
337 const SummaryState& summaryState,
338 const std::vector<Scalar>& resv_coeff,
341 template <
class AverageRegionalPressureType>
342 static void setRegionAveragePressureCalculator(
const Group& group,
343 const Schedule& schedule,
344 const int reportStepIdx,
345 const FieldPropsManager& fp,
346 std::map<std::string, std::unique_ptr<AverageRegionalPressureType>>& regionalAveragePressureCalculator);