opm-simulators
Toggle main menu visibility
Loading...
Searching...
No Matches
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 <opm/input/eclipse/Schedule/Group/GuideRate.hpp>
28
#include <string>
29
#include <functional>
30
#include <optional>
31
#include <vector>
32
33
namespace
Opm
34
{
35
36
class
DeferredLogger
;
37
class
Group;
38
template
<
class
Scalar>
class
GroupState
;
39
enum class
InjectorType;
40
using
RegionId = int;
41
class
Schedule;
42
class
SummaryState;
43
template
<
typename
Scalar,
typename
IndexTraits>
class
WellInterfaceGeneric
;
44
template
<
typename
Scalar,
typename
IndexTraits>
class
WellState
;
45
47
template
<
typename
Scalar,
typename
IndexTraits>
48
class
WellGroupControls
{
49
public
:
51
explicit
WellGroupControls
(
const
WellInterfaceGeneric<Scalar, IndexTraits>
& well) : well_(well) {}
52
53
using
RateConvFunc = std::function<void(
const
RegionId,
const
int
,
54
const
std::optional<std::string>&, std::vector<Scalar>&)>;
55
56
template
<
class
EvalWell>
57
void
getGroupInjectionControl(
const
Group& group,
58
const
WellState<Scalar, IndexTraits>
& well_state,
59
const
GroupState<Scalar>
& group_state,
60
const
Schedule& schedule,
61
const
SummaryState& summaryState,
62
const
InjectorType& injectorType,
63
const
EvalWell& bhp,
64
const
EvalWell& injection_rate,
65
const
RateConvFunc& rateConverter,
66
Scalar efficiencyFactor,
67
EvalWell& control_eq,
68
DeferredLogger
& deferred_logger)
const
;
69
70
std::optional<Scalar>
71
getGroupInjectionTargetRate(
const
Group& group,
72
const
WellState<Scalar, IndexTraits>
& well_state,
73
const
GroupState<Scalar>
& group_state,
74
const
Schedule& schedule,
75
const
SummaryState& summaryState,
76
const
InjectorType& injectorType,
77
const
RateConvFunc& rateConverter,
78
Scalar efficiencyFactor,
79
DeferredLogger
& deferred_logger)
const
;
80
81
template
<
class
EvalWell>
82
void
getGroupProductionControl(
const
Group& group,
83
const
WellState<Scalar, IndexTraits>
& well_state,
84
const
GroupState<Scalar>
& group_state,
85
const
Schedule& schedule,
86
const
SummaryState& summaryState,
87
const
EvalWell& bhp,
88
const
std::vector<EvalWell>& rates,
89
const
RateConvFunc& rateConverter,
90
Scalar efficiencyFactor,
91
EvalWell& control_eq,
92
DeferredLogger
& deferred_logger)
const
;
93
94
Scalar getGroupProductionTargetRate(
const
Group& group,
95
const
WellState<Scalar, IndexTraits>
& well_state,
96
const
GroupState<Scalar>
& group_state,
97
const
Schedule& schedule,
98
const
SummaryState& summaryState,
99
const
RateConvFunc& rateConverter,
100
Scalar efficiencyFactor,
101
DeferredLogger
& deferred_logger)
const
;
102
103
static
std::pair<Scalar, Group::ProductionCMode> getAutoChokeGroupProductionTargetRate(
const
std::string& name,
104
const
Group& parent,
105
const
WellState<Scalar, IndexTraits>
& well_state,
106
const
GroupState<Scalar>
& group_state,
107
const
Schedule& schedule,
108
const
SummaryState& summaryState,
109
const
std::vector<Scalar>& resv_coeff,
110
Scalar efficiencyFactor,
111
const
int
reportStepIdx,
112
const
GuideRate* guideRate,
113
DeferredLogger
& deferred_logger);
114
115
private
:
116
const
WellInterfaceGeneric<Scalar, IndexTraits>
& well_;
117
};
118
119
}
120
121
#endif
// OPM_WELL_GROUP_CONTROLS_HEADER_INCLUDED
Opm::DeferredLogger
Definition
DeferredLogger.hpp:57
Opm::GroupState
Definition
GroupState.hpp:41
Opm::WellGroupControls::WellGroupControls
WellGroupControls(const WellInterfaceGeneric< Scalar, IndexTraits > &well)
Constructor sets reference to well.
Definition
WellGroupControls.hpp:51
Opm::WellInterfaceGeneric
Definition
WellInterfaceGeneric.hpp:53
Opm::WellState
The state of a set of wells, tailored for use by the fully implicit blackoil simulator.
Definition
WellState.hpp:66
Opm
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition
blackoilbioeffectsmodules.hh:43
opm
simulators
wells
WellGroupControls.hpp
Generated by
1.17.0