WellGroupConstraints.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_CONSTRAINTS_HEADER_INCLUDED
25#define OPM_WELL_GROUP_CONSTRAINTS_HEADER_INCLUDED
26
27#include <functional>
28#include <utility>
29#include <vector>
30#include <string>
31#include <optional>
32
33namespace Opm
34{
35
36class DeferredLogger;
37class Group;
38template<class Scalar> class GroupState;
39enum class InjectorType;
40using RegionId = int;
41class Schedule;
42class SummaryState;
43template<class Scalar> class WellInterfaceGeneric;
44template<class Scalar> class WellState;
45
48public:
51
52 using RateConvFunc = std::function<void(const RegionId,
53 const int,
54 const std::optional<std::string>&,
55 std::vector<double>&)>;
56
58 const GroupState<double>& group_state,
59 const Schedule& schedule,
60 const SummaryState& summaryState,
61 const RateConvFunc& rateConverter,
62 DeferredLogger& deferred_logger) const;
63
64private:
65 std::pair<bool, double>
66 checkGroupConstraintsInj(const Group& group,
67 const WellState<double>& well_state,
68 const GroupState<double>& group_state,
69 const double efficiencyFactor,
70 const Schedule& schedule,
71 const SummaryState& summaryState,
72 const RateConvFunc& rateConverter,
73 DeferredLogger& deferred_logger) const;
74
75 std::pair<bool, double>
76 checkGroupConstraintsProd(const Group& group,
77 const WellState<double>& well_state,
78 const GroupState<double>& group_state,
79 const double efficiencyFactor,
80 const Schedule& schedule,
81 const SummaryState& summaryState,
82 const RateConvFunc& rateConverter,
83 DeferredLogger& deferred_logger) const;
84
85 const WellInterfaceGeneric<double>& well_;
86};
87
88}
89
90#endif // OPM_WELL_GROUP_CONSTRAINTS_HEADER_INCLUDED
Definition: DeferredLogger.hpp:57
Class for computing well group constraints.
Definition: WellGroupConstraints.hpp:47
WellGroupConstraints(const WellInterfaceGeneric< double > &well)
Constructor sets reference to well.
Definition: WellGroupConstraints.hpp:50
std::function< void(const RegionId, const int, const std::optional< std::string > &, std::vector< double > &)> RateConvFunc
Definition: WellGroupConstraints.hpp:55
bool checkGroupConstraints(WellState< double > &well_state, const GroupState< double > &group_state, const Schedule &schedule, const SummaryState &summaryState, const RateConvFunc &rateConverter, DeferredLogger &deferred_logger) const
Definition: BlackoilPhases.hpp:27
int RegionId
Definition: WellConstraints.hpp:38