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;
42template<class Scalar> class WellInterfaceGeneric;
43template<class Scalar> class WellState;
44
46template<class Scalar>
48public:
50 WellGroupControls(const WellInterfaceGeneric<Scalar>& well) : well_(well) {}
51
52 using RateConvFunc = std::function<void(const RegionId, const int,
53 const std::optional<std::string>&, std::vector<Scalar>&)>;
54
55 template<class EvalWell>
56 void getGroupInjectionControl(const Group& group,
57 const WellState<Scalar>& well_state,
58 const GroupState<Scalar>& group_state,
59 const Schedule& schedule,
60 const SummaryState& summaryState,
61 const InjectorType& injectorType,
62 const EvalWell& bhp,
63 const EvalWell& injection_rate,
64 const RateConvFunc& rateConverter,
65 Scalar efficiencyFactor,
66 EvalWell& control_eq,
67 DeferredLogger& deferred_logger) const;
68
69 std::optional<Scalar>
70 getGroupInjectionTargetRate(const Group& group,
71 const WellState<Scalar>& well_state,
72 const GroupState<Scalar>& group_state,
73 const Schedule& schedule,
74 const SummaryState& summaryState,
75 const InjectorType& injectorType,
76 const RateConvFunc& rateConverter,
77 Scalar efficiencyFactor,
78 DeferredLogger& deferred_logger) const;
79
80 template<class EvalWell>
81 void getGroupProductionControl(const Group& group,
82 const WellState<Scalar>& well_state,
83 const GroupState<Scalar>& group_state,
84 const Schedule& schedule,
85 const SummaryState& summaryState,
86 const EvalWell& bhp,
87 const std::vector<EvalWell>& rates,
88 const RateConvFunc& rateConverter,
89 Scalar efficiencyFactor,
90 EvalWell& control_eq,
91 DeferredLogger& deferred_logger) const;
92
93 Scalar getGroupProductionTargetRate(const Group& group,
94 const WellState<Scalar>& well_state,
95 const GroupState<Scalar>& group_state,
96 const Schedule& schedule,
97 const SummaryState& summaryState,
98 const RateConvFunc& rateConverter,
99 Scalar efficiencyFactor,
100 DeferredLogger& deferred_logger) const;
101
102private:
103 const WellInterfaceGeneric<Scalar>& well_;
104};
105
106}
107
108#endif // OPM_WELL_GROUP_CONTROLS_HEADER_INCLUDED
Definition: DeferredLogger.hpp:57
Definition: GroupState.hpp:38
Class for computing well group controls.
Definition: WellGroupControls.hpp:47
WellGroupControls(const WellInterfaceGeneric< Scalar > &well)
Constructor sets reference to well.
Definition: WellGroupControls.hpp:50
void getGroupInjectionControl(const Group &group, const WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, const Schedule &schedule, const SummaryState &summaryState, const InjectorType &injectorType, const EvalWell &bhp, const EvalWell &injection_rate, const RateConvFunc &rateConverter, Scalar efficiencyFactor, EvalWell &control_eq, DeferredLogger &deferred_logger) const
std::function< void(const RegionId, const int, const std::optional< std::string > &, std::vector< Scalar > &)> RateConvFunc
Definition: WellGroupControls.hpp:53
void getGroupProductionControl(const Group &group, const WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, const Schedule &schedule, const SummaryState &summaryState, const EvalWell &bhp, const std::vector< EvalWell > &rates, const RateConvFunc &rateConverter, Scalar efficiencyFactor, EvalWell &control_eq, DeferredLogger &deferred_logger) const
std::optional< Scalar > getGroupInjectionTargetRate(const Group &group, const WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, const Schedule &schedule, const SummaryState &summaryState, const InjectorType &injectorType, const RateConvFunc &rateConverter, Scalar efficiencyFactor, DeferredLogger &deferred_logger) const
Scalar getGroupProductionTargetRate(const Group &group, const WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, const Schedule &schedule, const SummaryState &summaryState, const RateConvFunc &rateConverter, Scalar efficiencyFactor, DeferredLogger &deferred_logger) const
Definition: WellInterfaceGeneric.hpp:51
Definition: WellState.hpp:62
Definition: blackoilboundaryratevector.hh:37
int RegionId
Definition: WellConstraints.hpp:37