21#ifndef OPM_WELLGROUPHELPERS_HEADER_INCLUDED
22#define OPM_WELLGROUPHELPERS_HEADER_INCLUDED
24#include <opm/input/eclipse/Schedule/Group/GuideRate.hpp>
25#include <opm/input/eclipse/EclipseState/Grid/FieldPropsManager.hpp>
38namespace Network {
class ExtNetwork; }
41class VFPProdProperties;
43class FieldPropsManager;
45namespace Network {
class ExtNetwork; }
47namespace WellGroupHelpers
52 void setCmodeGroup(
const Group& group,
53 const Schedule& schedule,
54 const SummaryState& summaryState,
55 const int reportStepIdx,
57 GroupState& group_state);
59 void accumulateGroupEfficiencyFactor(
const Group& group,
60 const Schedule& schedule,
61 const int reportStepIdx,
64 double sumWellSurfaceRates(
const Group& group,
65 const Schedule& schedule,
66 const WellState& wellState,
67 const int reportStepIdx,
71 double sumWellResRates(
const Group& group,
72 const Schedule& schedule,
73 const WellState& wellState,
74 const int reportStepIdx,
78 double sumSolventRates(
const Group& group,
79 const Schedule& schedule,
80 const WellState& wellState,
81 const int reportStepIdx,
84 void updateGroupTargetReduction(
const Group& group,
85 const Schedule& schedule,
86 const int reportStepIdx,
87 const bool isInjector,
89 const GuideRate& guide_rate,
90 const WellState& wellState,
91 GroupState& group_state,
92 std::vector<double>& groupTargetReduction);
95 void updateGuideRates(
const Group& group,
96 const Schedule& schedule,
97 const SummaryState& summary_state,
101 WellState& well_state,
102 const GroupState& group_state,
104 GuideRate* guide_rate,
105 std::vector<double>& pot,
108 template <
class Comm>
109 void updateGuideRateForProductionGroups(
const Group& group,
110 const Schedule& schedule,
111 const PhaseUsage& pu,
112 const int reportStepIdx,
113 const double& simTime,
114 WellState& wellState,
115 const GroupState& group_state,
117 GuideRate* guideRate,
118 std::vector<double>& pot);
120 template <
class Comm>
121 void updateGuideRatesForWells(
const Schedule& schedule,
122 const PhaseUsage& pu,
123 const int reportStepIdx,
124 const double& simTime,
125 const WellState& wellState,
127 GuideRate* guideRate);
129 void updateGuideRatesForInjectionGroups(
const Group& group,
130 const Schedule& schedule,
131 const SummaryState& summaryState,
133 const int reportStepIdx,
134 const WellState& wellState,
135 const GroupState& group_state,
136 GuideRate* guideRate,
139 void updateVREPForGroups(
const Group& group,
140 const Schedule& schedule,
141 const int reportStepIdx,
142 const WellState& wellState,
143 GroupState& group_state);
145 void updateReservoirRatesInjectionGroups(
const Group& group,
146 const Schedule& schedule,
147 const int reportStepIdx,
148 const WellState& wellState,
149 GroupState& group_state);
151 void updateSurfaceRatesInjectionGroups(
const Group& group,
152 const Schedule& schedule,
153 const int reportStepIdx,
154 const WellState& wellState,
155 GroupState& group_state);
157 void updateWellRates(
const Group& group,
158 const Schedule& schedule,
159 const int reportStepIdx,
160 const WellState& wellStateNupcol,
161 WellState& wellState);
163 void updateGroupProductionRates(
const Group& group,
164 const Schedule& schedule,
165 const int reportStepIdx,
166 const WellState& wellState,
167 GroupState& group_state);
169 void updateWellRatesFromGroupTargetScale(
const double scale,
171 const Schedule& schedule,
172 const int reportStepIdx,
174 const GroupState& group_state,
175 WellState& wellState);
177 void updateREINForGroups(
const Group& group,
178 const Schedule& schedule,
179 const int reportStepIdx,
180 const PhaseUsage& pu,
181 const SummaryState& st,
182 const WellState& wellState,
183 GroupState& group_state);
185 template <
class RegionalValues>
186 void updateGpMaintTargetForGroups(
const Group& group,
187 const Schedule& schedule,
188 const RegionalValues& regional_values,
189 const int reportStepIdx,
191 const WellState& well_state,
192 GroupState& group_state);
194 std::map<std::string, double>
195 computeNetworkPressures(
const Opm::Network::ExtNetwork& network,
196 const WellState& well_state,
197 const GroupState& group_state,
198 const VFPProdProperties& vfp_prod_props,
199 const Schedule& schedule,
200 const int report_time_step);
202 GuideRate::RateVector
203 getWellRateVector(
const WellState& well_state,
const PhaseUsage& pu,
const std::string& name);
205 GuideRate::RateVector
206 getProductionGroupRateVector(
const GroupState& group_state,
const PhaseUsage& pu,
const std::string& group_name);
208 double getGuideRate(
const std::string& name,
209 const Schedule& schedule,
210 const WellState& wellState,
211 const GroupState& group_state,
212 const int reportStepIdx,
213 const GuideRate* guideRate,
214 const GuideRateModel::Target target,
215 const PhaseUsage& pu);
218 double getGuideRateInj(
const std::string& name,
219 const Schedule& schedule,
220 const WellState& wellState,
221 const GroupState& group_state,
222 const int reportStepIdx,
223 const GuideRate* guideRate,
224 const GuideRateModel::Target target,
225 const Phase& injectionPhase,
226 const PhaseUsage& pu);
228 int groupControlledWells(
const Schedule& schedule,
229 const WellState& well_state,
230 const GroupState& group_state,
231 const int report_step,
232 const std::string& group_name,
233 const std::string& always_included_child,
234 const bool is_production_group,
235 const Phase injection_phase);
244 const int report_step,
245 const GuideRate* guide_rate,
246 const GuideRateModel::Target target,
248 const bool is_producer,
249 const Phase injection_phase);
250 double fraction(
const std::string& name,
const std::string& control_group_name,
const bool always_include_this);
251 double localFraction(
const std::string& name,
const std::string& always_included_child);
254 std::string parent(
const std::string& name);
255 double guideRateSum(
const Group& group,
const std::string& always_included_child);
256 double guideRate(
const std::string& name,
const std::string& always_included_child);
257 int groupControlledWells(
const std::string& group_name,
const std::string& always_included_child);
258 GuideRate::RateVector getGroupRateVector(
const std::string& group_name);
259 const Schedule& schedule_;
263 const GuideRate* guide_rate_;
264 GuideRateModel::Target target_;
267 Phase injection_phase_;
271 std::pair<bool, double> checkGroupConstraintsInj(
const std::string& name,
272 const std::string& parent,
276 const int reportStepIdx,
277 const GuideRate* guideRate,
279 Phase injectionPhase,
281 const double efficiencyFactor,
282 const Schedule& schedule,
283 const SummaryState& summaryState,
284 const std::vector<double>& resv_coeff,
292 std::vector<std::string> groupChainTopBot(
const std::string& bottom,
293 const std::string& top,
294 const Schedule& schedule,
295 const int report_step);
300 std::pair<bool, double> checkGroupConstraintsProd(
const std::string& name,
301 const std::string& parent,
305 const int reportStepIdx,
306 const GuideRate* guideRate,
309 const double efficiencyFactor,
310 const Schedule& schedule,
311 const SummaryState& summaryState,
312 const std::vector<double>& resv_coeff,
315 template <
class AverageRegionalPressureType>
316 void setRegionAveragePressureCalculator(
const Group& group,
317 const Schedule& schedule,
318 const int reportStepIdx,
319 const FieldPropsManager& fp,
321 std::map<std::string, std::unique_ptr<AverageRegionalPressureType>>& regionalAveragePressureCalculator);
Definition: DeferredLogger.hpp:57
Definition: GroupState.hpp:34
Definition: WellGroupHelpers.hpp:239
The state of a set of wells, tailored for use by the fully implicit blackoil simulator.
Definition: WellState.hpp:60
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: BlackoilPhases.hpp:27
Definition: BlackoilPhases.hpp:46