My Project
Loading...
Searching...
No Matches
WellConstraints.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_CONSTRAINTS_HEADER_INCLUDED
25#define OPM_WELL_CONSTRAINTS_HEADER_INCLUDED
26
27#include <functional>
28#include <utility>
29#include <vector>
30
31namespace Opm
32{
33
34class DeferredLogger;
35using RegionId = int;
36class Rates;
37class SingleWellState;
38class SummaryState;
39class WellInterfaceGeneric;
40enum class WellInjectorCMode;
41enum class WellProducerCMode;
42
45public:
47 WellConstraints(const WellInterfaceGeneric& well) : well_(well) {}
48
49 using RateConvFunc = std::function<void(const RegionId, const int,
50 const std::vector<double>&,
51 std::vector<double>&)>;
52
53 bool
54 checkIndividualConstraints(SingleWellState& ws,
55 const SummaryState& summaryState,
56 const RateConvFunc& calcReservoirVoidageRates,
57 bool& thp_limit_violated_but_not_switched,
59
60private:
62 activeInjectionConstraint(const SingleWellState& ws,
63 const SummaryState& summaryState,
64 bool& thp_limit_violated_but_not_switched,
66
68 activeProductionConstraint(const SingleWellState& ws,
69 const SummaryState& summaryState,
70 const RateConvFunc& calcReservoirVoidageRates,
71 bool& thp_limit_violated_but_not_switched,
73
74 const WellInterfaceGeneric& well_;
75};
76
77}
78
79#endif // OPM_WELL_CONSTRAINTS_HEADER_INCLUDED
Definition AquiferInterface.hpp:35
Definition DeferredLogger.hpp:57
Definition SingleWellState.hpp:40
Class for computing well group constraints.
Definition WellConstraints.hpp:44
WellConstraints(const WellInterfaceGeneric &well)
Constructor sets reference to well.
Definition WellConstraints.hpp:47
Definition WellInterfaceGeneric.hpp:51
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition BlackoilPhases.hpp:27