GasLiftSingleWell.hpp
Go to the documentation of this file.
1/*
2 Copyright 2020 Equinor ASA.
3
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef OPM_GASLIFT_SINGLE_WELL_HEADER_INCLUDED
21#define OPM_GASLIFT_SINGLE_WELL_HEADER_INCLUDED
22
23#include <opm/models/utils/propertysystem.hh>
24#include <opm/models/utils/parametersystem.hh>
25#include <opm/models/discretization/common/fvbaseproperties.hh>
29
30#include <optional>
31#include <vector>
32#include <utility>
33
34namespace Opm
35{
36 template<class TypeTag>
38 {
39 using Scalar = GetPropType<TypeTag, Properties::Scalar>;
40 using Simulator = GetPropType<TypeTag, Properties::Simulator>;
41 using GLiftSyncGroups = typename GasLiftSingleWellGeneric::GLiftSyncGroups;
42
43 public:
45 const WellInterface<TypeTag> &well,
46 const Simulator& simulator,
47 const SummaryState &summary_state,
48 DeferredLogger &deferred_logger,
49 WellState<Scalar>& well_state,
50 const GroupState<Scalar>& group_state,
51 GasLiftGroupInfo &group_info,
52 GLiftSyncGroups &sync_groups,
53 const Parallel::Communication& comm,
54 bool glift_debug
55 );
56 const WellInterfaceGeneric &getWell() const override { return well_; }
57
58 private:
59 std::optional<double> computeBhpAtThpLimit_(double alq, bool debug_ouput=true) const override;
60 BasicRates computeWellRates_(
61 double bhp, bool bhp_is_limited, bool debug_output=true) const override;
62 void setAlqMaxRate_(const GasLiftWell& well);
63 void setupPhaseVariables_();
64 bool checkThpControl_() const override;
65
66
67 const Simulator& simulator_;
68 const WellInterface<TypeTag> &well_;
69 };
70
71} // namespace Opm
72
73#ifndef OPM_GASLIFT_SINGLE_WELL_IMPL_HEADER_INCLUDED
75#endif
76
77#endif // OPM_GASLIFT_SINGLE_WELL_HEADER_INCLUDED
Definition: DeferredLogger.hpp:57
Definition: GasLiftGroupInfo.hpp:45
Definition: GasLiftSingleWellGeneric.hpp:49
std::set< int > GLiftSyncGroups
Definition: GasLiftSingleWellGeneric.hpp:58
Definition: GasLiftSingleWell.hpp:38
GasLiftSingleWell(const WellInterface< TypeTag > &well, const Simulator &simulator, const SummaryState &summary_state, DeferredLogger &deferred_logger, WellState< Scalar > &well_state, const GroupState< Scalar > &group_state, GasLiftGroupInfo &group_info, GLiftSyncGroups &sync_groups, const Parallel::Communication &comm, bool glift_debug)
Definition: GasLiftSingleWell_impl.hpp:34
const WellInterfaceGeneric & getWell() const override
Definition: GasLiftSingleWell.hpp:56
Definition: GroupState.hpp:35
Definition: WellInterfaceGeneric.hpp:50
Definition: WellInterface.hpp:75
Definition: WellState.hpp:62
Dune::Communication< MPIComm > Communication
Definition: ParallelCommunication.hpp:30
VFPEvaluation bhp(const VFPProdTable &table, const double aqua, const double liquid, const double vapour, const double thp, const double alq, const double explicit_wfr, const double explicit_gfr, const bool use_vfpexplicit)
Definition: BlackoilPhases.hpp:27