WellGroupControls.hpp
Go to the documentation of this file.
1/*
2 Copyright 2017 SINTEF Digital, Mathematics and Cybernetics.
3 Copyright 2017 Statoil ASA.
4 Copyright 2017 IRIS
5 Copyright 2019 Norce
6
7 This file is part of the Open Porous Media project (OPM).
8
9 OPM is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 OPM is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with OPM. If not, see <http://www.gnu.org/licenses/>.
21*/
22
23
24#ifndef OPM_WELL_GROUP_CONTROLS_HEADER_INCLUDED
25#define OPM_WELL_GROUP_CONTROLS_HEADER_INCLUDED
26
27#include <string>
28#include <functional>
29#include <optional>
30#include <vector>
31
32namespace Opm
33{
34
35class DeferredLogger;
36class Group;
37template<class Scalar> class GroupState;
38enum class InjectorType;
39using RegionId = int;
40class Schedule;
41class SummaryState;
42class WellInterfaceGeneric;
43template<class Scalar> class WellState;
44
47public:
49 WellGroupControls(const WellInterfaceGeneric& well) : well_(well) {}
50
51 using RateConvFunc = std::function<void(const RegionId, const int, const std::optional<std::string>&, std::vector<double>&)>;
52
53 template<class EvalWell>
54 void getGroupInjectionControl(const Group& group,
55 const WellState<double>& well_state,
56 const GroupState<double>& group_state,
57 const Schedule& schedule,
58 const SummaryState& summaryState,
59 const InjectorType& injectorType,
60 const EvalWell& bhp,
61 const EvalWell& injection_rate,
62 const RateConvFunc& rateConverter,
63 double efficiencyFactor,
64 EvalWell& control_eq,
65 DeferredLogger& deferred_logger) const;
66
67 std::optional<double>
68 getGroupInjectionTargetRate(const Group& group,
69 const WellState<double>& well_state,
70 const GroupState<double>& group_state,
71 const Schedule& schedule,
72 const SummaryState& summaryState,
73 const InjectorType& injectorType,
74 const RateConvFunc& rateConverter,
75 double efficiencyFactor,
76 DeferredLogger& deferred_logger) const;
77
78 template<class EvalWell>
79 void getGroupProductionControl(const Group& group,
80 const WellState<double>& well_state,
81 const GroupState<double>& group_state,
82 const Schedule& schedule,
83 const SummaryState& summaryState,
84 const EvalWell& bhp,
85 const std::vector<EvalWell>& rates,
86 const RateConvFunc& rateConverter,
87 double efficiencyFactor,
88 EvalWell& control_eq,
89 DeferredLogger& deferred_logger) const;
90
91 double getGroupProductionTargetRate(const Group& group,
92 const WellState<double>& well_state,
93 const GroupState<double>& group_state,
94 const Schedule& schedule,
95 const SummaryState& summaryState,
96 const RateConvFunc& rateConverter,
97 double efficiencyFactor,
98 DeferredLogger& deferred_logger) const;
99
100private:
101 const WellInterfaceGeneric& well_;
102};
103
104}
105
106#endif // OPM_WELL_GROUP_CONTROLS_HEADER_INCLUDED
Definition: DeferredLogger.hpp:57
Class for computing well group controls.
Definition: WellGroupControls.hpp:46
WellGroupControls(const WellInterfaceGeneric &well)
Constructor sets reference to well.
Definition: WellGroupControls.hpp:49
void getGroupInjectionControl(const Group &group, const WellState< double > &well_state, const GroupState< double > &group_state, const Schedule &schedule, const SummaryState &summaryState, const InjectorType &injectorType, const EvalWell &bhp, const EvalWell &injection_rate, const RateConvFunc &rateConverter, double efficiencyFactor, EvalWell &control_eq, DeferredLogger &deferred_logger) const
std::function< void(const RegionId, const int, const std::optional< std::string > &, std::vector< double > &)> RateConvFunc
Definition: WellGroupControls.hpp:51
double getGroupProductionTargetRate(const Group &group, const WellState< double > &well_state, const GroupState< double > &group_state, const Schedule &schedule, const SummaryState &summaryState, const RateConvFunc &rateConverter, double efficiencyFactor, DeferredLogger &deferred_logger) const
void getGroupProductionControl(const Group &group, const WellState< double > &well_state, const GroupState< double > &group_state, const Schedule &schedule, const SummaryState &summaryState, const EvalWell &bhp, const std::vector< EvalWell > &rates, const RateConvFunc &rateConverter, double efficiencyFactor, EvalWell &control_eq, DeferredLogger &deferred_logger) const
std::optional< double > getGroupInjectionTargetRate(const Group &group, const WellState< double > &well_state, const GroupState< double > &group_state, const Schedule &schedule, const SummaryState &summaryState, const InjectorType &injectorType, const RateConvFunc &rateConverter, double efficiencyFactor, DeferredLogger &deferred_logger) const
Definition: WellInterfaceGeneric.hpp:50
VFPEvaluation bhp(const VFPProdTable &table, const double aqua, const double liquid, const double vapour, const double thp, const double alq, const double explicit_wfr, const double explicit_gfr, const bool use_vfpexplicit)
Definition: BlackoilPhases.hpp:27
int RegionId
Definition: WellConstraints.hpp:38