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>
26#include <opm/simulators/utils/ParallelCommunication.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,
56 GroupState& group_state);
58 void accumulateGroupEfficiencyFactor(
const Group& group,
59 const Schedule& schedule,
60 const int reportStepIdx,
63 double sumWellSurfaceRates(
const Group& group,
64 const Schedule& schedule,
65 const WellState& wellState,
66 const int reportStepIdx,
70 double sumWellResRates(
const Group& group,
71 const Schedule& schedule,
72 const WellState& wellState,
73 const int reportStepIdx,
77 double sumSolventRates(
const Group& group,
78 const Schedule& schedule,
79 const WellState& wellState,
80 const int reportStepIdx,
83 void updateGroupTargetReduction(
const Group& group,
84 const Schedule& schedule,
85 const int reportStepIdx,
86 const bool isInjector,
88 const GuideRate& guide_rate,
89 const WellState& wellState,
90 GroupState& group_state,
91 std::vector<double>& groupTargetReduction);
93 void updateGuideRates(
const Group& group,
94 const Schedule& schedule,
95 const SummaryState& summary_state,
99 WellState& well_state,
100 const GroupState& group_state,
101 const Parallel::Communication& comm,
102 GuideRate* guide_rate,
103 std::vector<double>& pot,
106 void updateGuideRateForProductionGroups(
const Group& group,
107 const Schedule& schedule,
108 const PhaseUsage& pu,
109 const int reportStepIdx,
110 const double& simTime,
111 WellState& wellState,
112 const GroupState& group_state,
113 const Parallel::Communication& comm,
114 GuideRate* guideRate,
115 std::vector<double>& pot);
117 void updateGuideRatesForWells(
const Schedule& schedule,
118 const PhaseUsage& pu,
119 const int reportStepIdx,
120 const double& simTime,
121 const WellState& wellState,
122 const Parallel::Communication& comm,
123 GuideRate* guideRate);
125 void updateGuideRatesForInjectionGroups(
const Group& group,
126 const Schedule& schedule,
127 const SummaryState& summaryState,
129 const int reportStepIdx,
130 const WellState& wellState,
131 const GroupState& group_state,
132 GuideRate* guideRate,
135 void updateVREPForGroups(
const Group& group,
136 const Schedule& schedule,
137 const int reportStepIdx,
138 const WellState& wellState,
139 GroupState& group_state);
141 void updateReservoirRatesInjectionGroups(
const Group& group,
142 const Schedule& schedule,
143 const int reportStepIdx,
144 const WellState& wellState,
145 GroupState& group_state);
147 void updateSurfaceRatesInjectionGroups(
const Group& group,
148 const Schedule& schedule,
149 const int reportStepIdx,
150 const WellState& wellState,
151 GroupState& group_state);
153 void updateWellRates(
const Group& group,
154 const Schedule& schedule,
155 const int reportStepIdx,
156 const WellState& wellStateNupcol,
157 WellState& wellState);
159 void updateGroupProductionRates(
const Group& group,
160 const Schedule& schedule,
161 const int reportStepIdx,
162 const WellState& wellState,
163 GroupState& group_state);
165 void updateWellRatesFromGroupTargetScale(
const double scale,
167 const Schedule& schedule,
168 const int reportStepIdx,
170 const GroupState& group_state,
171 WellState& wellState);
173 void updateREINForGroups(
const Group& group,
174 const Schedule& schedule,
175 const int reportStepIdx,
176 const PhaseUsage& pu,
177 const SummaryState& st,
178 const WellState& wellState,
179 GroupState& group_state,
184 std::pair<std::optional<std::string>,
double> worstOffendingWell(
const Group& group,
185 const Schedule& schedule,
186 const int reportStepIdx,
187 const Group::ProductionCMode& offendedControl,
188 const PhaseUsage& pu,
189 const Parallel::Communication& comm,
190 const WellState& wellState,
191 DeferredLogger& deferred_logger);
194 template <
class RegionalValues>
195 void updateGpMaintTargetForGroups(
const Group& group,
196 const Schedule& schedule,
197 const RegionalValues& regional_values,
198 const int reportStepIdx,
200 const WellState& well_state,
201 GroupState& group_state);
203 std::map<std::string, double>
204 computeNetworkPressures(
const Opm::Network::ExtNetwork& network,
205 const WellState& well_state,
206 const GroupState& group_state,
207 const VFPProdProperties& vfp_prod_props,
208 const Schedule& schedule,
209 const int report_time_step);
211 GuideRate::RateVector
212 getWellRateVector(
const WellState& well_state,
const PhaseUsage& pu,
const std::string& name);
214 GuideRate::RateVector
215 getProductionGroupRateVector(
const GroupState& group_state,
const PhaseUsage& pu,
const std::string& group_name);
217 double getGuideRate(
const std::string& name,
218 const Schedule& schedule,
219 const WellState& wellState,
220 const GroupState& group_state,
221 const int reportStepIdx,
222 const GuideRate* guideRate,
223 const GuideRateModel::Target target,
224 const PhaseUsage& pu);
227 double getGuideRateInj(
const std::string& name,
228 const Schedule& schedule,
229 const WellState& wellState,
230 const GroupState& group_state,
231 const int reportStepIdx,
232 const GuideRate* guideRate,
233 const GuideRateModel::Target target,
234 const Phase& injectionPhase,
235 const PhaseUsage& pu);
237 int groupControlledWells(
const Schedule& schedule,
238 const WellState& well_state,
239 const GroupState& group_state,
240 const int report_step,
241 const std::string& group_name,
242 const std::string& always_included_child,
243 const bool is_production_group,
244 const Phase injection_phase);
247 std::pair<bool, double> checkGroupConstraintsInj(
const std::string& name,
248 const std::string& parent,
250 const WellState& wellState,
251 const GroupState& group_state,
252 const int reportStepIdx,
253 const GuideRate* guideRate,
255 Phase injectionPhase,
256 const PhaseUsage& pu,
257 const double efficiencyFactor,
258 const Schedule& schedule,
259 const SummaryState& summaryState,
260 const std::vector<double>& resv_coeff,
261 DeferredLogger& deferred_logger);
268 std::vector<std::string> groupChainTopBot(
const std::string& bottom,
269 const std::string& top,
270 const Schedule& schedule,
271 const int report_step);
276 std::pair<bool, double> checkGroupConstraintsProd(
const std::string& name,
277 const std::string& parent,
279 const WellState& wellState,
280 const GroupState& group_state,
281 const int reportStepIdx,
282 const GuideRate* guideRate,
284 const PhaseUsage& pu,
285 const double efficiencyFactor,
286 const Schedule& schedule,
287 const SummaryState& summaryState,
288 const std::vector<double>& resv_coeff,
289 DeferredLogger& deferred_logger);
291 template <
class AverageRegionalPressureType>
292 void setRegionAveragePressureCalculator(
const Group& group,
293 const Schedule& schedule,
294 const int reportStepIdx,
295 const FieldPropsManager& fp,
296 const PhaseUsage& pu,
297 std::map<std::string, std::unique_ptr<AverageRegionalPressureType>>& regionalAveragePressureCalculator);
Definition DeferredLogger.hpp:57
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition BlackoilPhases.hpp:27
Definition BlackoilPhases.hpp:46