My Project
Loading...
Searching...
No Matches
BlackoilWellModelConstraints.hpp
1/*
2 Copyright 2016 SINTEF ICT, Applied Mathematics.
3 Copyright 2016 - 2017 Statoil ASA.
4 Copyright 2017 Dr. Blatt - HPC-Simulation-Software & Services
5 Copyright 2016 - 2018 IRIS AS
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#ifndef OPM_BLACKOILWELLMODEL_CONSTRAINTS_HEADER_INCLUDED
24#define OPM_BLACKOILWELLMODEL_CONSTRAINTS_HEADER_INCLUDED
25
26#include <opm/input/eclipse/Schedule/Group/Group.hpp>
27
28#include <utility>
29
30namespace Opm {
31
32class BlackoilWellModelGeneric;
33class DeferredLogger;
34class GroupState;
35class SummaryState;
36class WellState;
37
40{
41public:
44 : wellModel_(wellModel)
45 {}
46
48 bool hasTHPConstraints() const;
49
51 bool checkGroupConstraints(const Group& group,
52 const int reportStepIdx,
54
56 void actionOnBrokenConstraints(const Group& group,
57 const Group::InjectionCMode& newControl,
58 const Phase& controlPhase,
59 GroupState& group_state,
61
63 void actionOnBrokenConstraints(const Group& group,
64 const Group::GroupLimitAction group_limit_action,
65 const Group::ProductionCMode& newControl,
66 GroupState& group_state,
68
70 bool updateGroupIndividualControl(const Group& group,
71 const int reportStepIdx,
72 std::map<std::pair<std::string,Opm::Phase>,std::string>& switched_inj,
73 std::map<std::string, std::string>& switched_prod,
74 GroupState& group_state,
75 WellState& well_state,
77
78private:
80 std::pair<Group::InjectionCMode, double>
81 checkGroupInjectionConstraints(const Group& group,
82 const int reportStepIdx,
83 const Phase& phase) const;
84
86 std::pair<Group::ProductionCMode, double>
87 checkGroupProductionConstraints(const Group& group,
88 const int reportStepIdx,
90
91 const BlackoilWellModelGeneric& wellModel_;
92};
93
94} // namespace Opm
95
96#endif
Definition AquiferInterface.hpp:35
Class for handling constraints for the blackoil well model.
Definition BlackoilWellModelConstraints.hpp:40
bool updateGroupIndividualControl(const Group &group, const int reportStepIdx, std::map< std::pair< std::string, Opm::Phase >, std::string > &switched_inj, std::map< std::string, std::string > &switched_prod, GroupState &group_state, WellState &well_state, DeferredLogger &deferred_logger) const
Update the individual controls for wells in a group.
Definition BlackoilWellModelConstraints.cpp:468
void actionOnBrokenConstraints(const Group &group, const Group::InjectionCMode &newControl, const Phase &controlPhase, GroupState &group_state, DeferredLogger &deferred_logger) const
Execute action for broken constraint for an injection well group.
Definition BlackoilWellModelConstraints.cpp:382
BlackoilWellModelConstraints(const BlackoilWellModelGeneric &wellModel)
Constructor initializes reference to the well model.
Definition BlackoilWellModelConstraints.hpp:43
bool checkGroupConstraints(const Group &group, const int reportStepIdx, DeferredLogger &deferred_logger) const
Check the constraints of a well group.
Definition BlackoilWellModelConstraints.cpp:345
bool hasTHPConstraints() const
Return true if any well has a THP constraint.
Definition BlackoilWellModelConstraints.cpp:41
Class for handling the blackoil well model.
Definition BlackoilWellModelGeneric.hpp:82
Definition DeferredLogger.hpp:57
Definition GroupState.hpp:34
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