StandardWellsSolvent.hpp
1 /*
2  Copyright 2016 SINTEF ICT, Applied Mathematics.
3  Copyright 2016 Statoil ASA.
4 
5  This file is part of the Open Porous Media project (OPM).
6 
7  OPM is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  OPM is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with OPM. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 
22 #ifndef OPM_STANDARDWELLSSOLVENT_HEADER_INCLUDED
23 #define OPM_STANDARDWELLSSOLVENT_HEADER_INCLUDED
24 
25 #include <opm/autodiff/StandardWells.hpp>
26 #include <opm/autodiff/SolventPropsAdFromDeck.hpp>
27 
28 namespace Opm {
29 
30 
33  {
34  public:
35 
36  using Base = StandardWells;
37  using Base::computeWellConnectionDensitesPressures;
38 
39  // --------- Public methods ---------
40  StandardWellsSolvent(const Wells* wells_arg, WellCollection* well_collection);
41 
42  // added the Solvent related
43  void initSolvent(const SolventPropsAdFromDeck* solvent_props,
44  const int solvent_pos,
45  const bool has_solvent);
46 
47  template <class SolutionState>
48  void computeWellFlux(const SolutionState& state,
49  const std::vector<ADB>& mob_perfcells,
50  const std::vector<ADB>& b_perfcells,
51  Vector& aliveWells,
52  std::vector<ADB>& cq_s) const;
53 
54  template <class SolutionState, class WellState>
55  void computePropertiesForWellConnectionPressures(const SolutionState& state,
56  const WellState& xw,
57  std::vector<double>& b_perf,
58  std::vector<double>& rsmax_perf,
59  std::vector<double>& rvmax_perf,
60  std::vector<double>& surf_dens_perf);
61 
62  // TODO: fluid and active may be can put in the member list
63  template <class ReservoirResidualQuant, class SolutionState>
64  void extractWellPerfProperties(const SolutionState& state,
65  const std::vector<ReservoirResidualQuant>& rq,
66  std::vector<ADB>& mob_perfcells,
67  std::vector<ADB>& b_perfcells) const;
68 
69  template <class SolutionState, class WellState>
70  void computeWellConnectionPressures(const SolutionState& state,
71  const WellState& xw);
72 
73  protected:
74  const SolventPropsAdFromDeck* solvent_props_;
75  int solvent_pos_;
76  bool has_solvent_;
77 
78  using Base::phase_condition_;
79 
80  };
81 
82 
83 } // namespace Opm
84 
85 #include "StandardWellsSolvent_impl.hpp"
86 
87 #endif
Class for handling the standard well model for solvent model.
Definition: StandardWellsSolvent.hpp:32
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: AdditionalObjectDeleter.hpp:22
Class for handling the standard well model.
Definition: StandardWells.hpp:51
Definition: SolventPropsAdFromDeck.hpp:37