My Project
GasLiftSingleWell.hpp
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>
26 #include <opm/simulators/wells/GasLiftSingleWellGeneric.hpp>
27 #include <opm/simulators/wells/GasLiftGroupInfo.hpp>
28 #include <opm/simulators/wells/WellInterface.hpp>
29 
30 #include <optional>
31 #include <vector>
32 #include <utility>
33 #include <fmt/format.h>
34 
35 namespace Opm
36 {
37  template<class TypeTag>
39  {
40  using Simulator = GetPropType<TypeTag, Properties::Simulator>;
41  using GLiftSyncGroups = typename GasLiftSingleWellGeneric::GLiftSyncGroups;
42 
43  public:
45  const WellInterface<TypeTag> &well,
46  const Simulator &ebos_simulator,
47  const SummaryState &summary_state,
48  DeferredLogger &deferred_logger,
49  WellState &well_state,
50  const GroupState& 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) const override;
60  BasicRates computeWellRates_(
61  double bhp, bool bhp_is_limited, bool debug_output=true) const override;
62  void setAlqMaxRate_(const GasLiftOpt::Well& well);
63  void setupPhaseVariables_();
64 
65  const Simulator &ebos_simulator_;
66  const WellInterface<TypeTag> &well_;
67  };
68 
69 } // namespace Opm
70 
71 #include "GasLiftSingleWell_impl.hpp"
72 
73 #endif // OPM_GASLIFT_SINGLE_WELL_HEADER_INCLUDED
Definition: DeferredLogger.hpp:57
Definition: GasLiftGroupInfo.hpp:47
Definition: GasLiftSingleWellGeneric.hpp:52
Definition: GasLiftSingleWell.hpp:39
Definition: GroupState.hpp:34
Definition: WellInterfaceGeneric.hpp:51
Definition: WellInterface.hpp:72
The state of a set of wells, tailored for use by the fully implicit blackoil simulator.
Definition: WellState.hpp:56
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: BlackoilPhases.hpp:27
Definition: GasLiftSingleWellGeneric.hpp:120