My Project
WellGroupControls.hpp
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;
37class GroupState;
38enum class InjectorType;
39using RegionId = int;
40class Schedule;
41class SummaryState;
42class WellInterfaceGeneric;
43class 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& well_state,
56 const GroupState& 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& well_state,
70 const GroupState& 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& well_state,
81 const GroupState& 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& well_state,
93 const GroupState& 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
Definition: GroupState.hpp:34
Class for computing well group controls.
Definition: WellGroupControls.hpp:46
WellGroupControls(const WellInterfaceGeneric &well)
Constructor sets reference to well.
Definition: WellGroupControls.hpp:49
Definition: WellInterfaceGeneric.hpp:51
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