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 
27 // NOTE: StandardWell.hpp includes ourself (GasLiftSingleWell.hpp), so we need
28 // to forward declare StandardWell for it to be defined in this file.
29 namespace Opm {
30  template<typename TypeTag> class StandardWell;
31 }
32 #include <opm/simulators/wells/StandardWell.hpp>
33 #include <opm/simulators/wells/GasLiftSingleWellGeneric.hpp>
34 #include <opm/simulators/wells/GasLiftGroupInfo.hpp>
35 
36 
37 #include <optional>
38 #include <vector>
39 #include <utility>
40 #include <fmt/format.h>
41 
42 namespace Opm
43 {
44  template<class TypeTag>
46  {
47  using Simulator = GetPropType<TypeTag, Properties::Simulator>;
49  using GLiftSyncGroups = typename GasLiftSingleWellGeneric::GLiftSyncGroups;
50 
51  public:
53  const StdWell &std_well,
54  const Simulator &ebos_simulator,
55  const SummaryState &summary_state,
56  DeferredLogger &deferred_logger,
57  WellState &well_state,
58  const GroupState& group_state,
59  GasLiftGroupInfo &group_info,
60  GLiftSyncGroups &sync_groups
61  );
62  const WellInterfaceGeneric &getStdWell() const override { return std_well_; }
63 
64  private:
65  std::optional<double> computeBhpAtThpLimit_(double alq) const override;
66  void computeWellRates_(
67  double bhp, std::vector<double> &potentials, bool debug_output=true) const override;
68 
69  void setAlqMaxRate_(const GasLiftOpt::Well& well);
70 
71  const Simulator &ebos_simulator_;
72  const StdWell &std_well_;
73  };
74 
75 } // namespace Opm
76 
77 #include "GasLiftSingleWell_impl.hpp"
78 
79 #endif // OPM_GASLIFT_SINGLE_WELL_HEADER_INCLUDED
Definition: DeferredLogger.hpp:57
Definition: GasLiftGroupInfo.hpp:46
Definition: GasLiftSingleWellGeneric.hpp:51
Definition: GasLiftSingleWell.hpp:46
Definition: GroupState.hpp:34
Definition: StandardWell.hpp:65
Definition: WellInterfaceGeneric.hpp:51
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:26