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,
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);
94 void updateGuideRates(
const Group& group,
95 const Schedule& schedule,
96 const SummaryState& summary_state,
100 WellState& well_state,
101 const GroupState& group_state,
103 GuideRate* guide_rate,
104 std::vector<double>& pot,
107 template <
class Comm>
108 void updateGuideRateForProductionGroups(
const Group& group,
109 const Schedule& schedule,
110 const PhaseUsage& pu,
111 const int reportStepIdx,
112 const double& simTime,
113 WellState& wellState,
114 const GroupState& group_state,
116 GuideRate* guideRate,
117 std::vector<double>& pot);
119 template <
class Comm>
120 void updateGuideRatesForWells(
const Schedule& schedule,
121 const PhaseUsage& pu,
122 const int reportStepIdx,
123 const double& simTime,
124 const WellState& wellState,
126 GuideRate* guideRate);
128 void updateGuideRatesForInjectionGroups(
const Group& group,
129 const Schedule& schedule,
130 const SummaryState& summaryState,
132 const int reportStepIdx,
133 const WellState& wellState,
134 const GroupState& group_state,
135 GuideRate* guideRate,
138 void updateVREPForGroups(
const Group& group,
139 const Schedule& schedule,
140 const int reportStepIdx,
141 const WellState& wellState,
142 GroupState& group_state);
144 void updateReservoirRatesInjectionGroups(
const Group& group,
145 const Schedule& schedule,
146 const int reportStepIdx,
147 const WellState& wellState,
148 GroupState& group_state);
150 void updateSurfaceRatesInjectionGroups(
const Group& group,
151 const Schedule& schedule,
152 const int reportStepIdx,
153 const WellState& wellState,
154 GroupState& group_state);
156 void updateWellRates(
const Group& group,
157 const Schedule& schedule,
158 const int reportStepIdx,
159 const WellState& wellStateNupcol,
160 WellState& wellState);
162 void updateGroupProductionRates(
const Group& group,
163 const Schedule& schedule,
164 const int reportStepIdx,
165 const WellState& wellState,
166 GroupState& group_state);
168 void updateWellRatesFromGroupTargetScale(
const double scale,
170 const Schedule& schedule,
171 const int reportStepIdx,
173 const GroupState& group_state,
174 WellState& wellState);
176 void updateREINForGroups(
const Group& group,
177 const Schedule& schedule,
178 const int reportStepIdx,
179 const PhaseUsage& pu,
180 const SummaryState& st,
181 const WellState& wellState,
182 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,
246 const GuideRateModel::Target
target,
254 std::string parent(
const std::string& name);
258 GuideRate::RateVector getGroupRateVector(
const std::string&
group_name);
264 GuideRateModel::Target target_;
267 Phase injection_phase_;
271 std::pair<bool, double> checkGroupConstraintsInj(
const std::string& name,
272 const std::string& parent,
292 std::vector<std::string> groupChainTopBot(
const std::string&
bottom,
293 const std::string&
top,
295 const int report_step);
300 std::pair<bool, double> checkGroupConstraintsProd(
const std::string& name,
301 const std::string& parent,
315 template <
class AverageRegionalPressureType>
316 void setRegionAveragePressureCalculator(
const Group& group,
319 const FieldPropsManager&
fp,
Definition AquiferInterface.hpp:35
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