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
47template<class Scalar>
49public:
52
53 using RateConvFunc = std::function<void(const RegionId,
54 const int,
55 const std::optional<std::string>&,
56 std::vector<Scalar>&)>;
57
59 const GroupState<Scalar>& group_state,
60 const Schedule& schedule,
61 const SummaryState& summaryState,
62 const RateConvFunc& rateConverter,
63 DeferredLogger& deferred_logger) const;
64
65private:
66 std::pair<bool, Scalar>
67 checkGroupConstraintsInj(const Group& group,
68 const WellState<Scalar>& well_state,
69 const GroupState<Scalar>& group_state,
70 const Scalar efficiencyFactor,
71 const Schedule& schedule,
72 const SummaryState& summaryState,
73 const RateConvFunc& rateConverter,
74 DeferredLogger& deferred_logger) const;
75
76 std::pair<bool, Scalar>
77 checkGroupConstraintsProd(const Group& group,
78 const WellState<Scalar>& well_state,
79 const GroupState<Scalar>& group_state,
80 const Scalar efficiencyFactor,
81 const Schedule& schedule,
82 const SummaryState& summaryState,
83 const RateConvFunc& rateConverter,
84 DeferredLogger& deferred_logger) const;
85
86 const WellInterfaceGeneric<Scalar>& well_;
87};
88
89}
90
91#endif // OPM_WELL_GROUP_CONSTRAINTS_HEADER_INCLUDED
Definition: DeferredLogger.hpp:57
Definition: GroupState.hpp:38
Class for computing well group constraints.
Definition: WellGroupConstraints.hpp:48
bool checkGroupConstraints(WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, const Schedule &schedule, const SummaryState &summaryState, const RateConvFunc &rateConverter, DeferredLogger &deferred_logger) const
std::function< void(const RegionId, const int, const std::optional< std::string > &, std::vector< Scalar > &)> RateConvFunc
Definition: WellGroupConstraints.hpp:56
WellGroupConstraints(const WellInterfaceGeneric< Scalar > &well)
Constructor sets reference to well.
Definition: WellGroupConstraints.hpp:51
Definition: WellInterfaceGeneric.hpp:51
Definition: WellState.hpp:62
Definition: blackoilboundaryratevector.hh:37
int RegionId
Definition: WellConstraints.hpp:37