SolventPropsAdFromDeck.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2015 IRIS
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 SOLVENTPROPSADFROMDECK_HPP
21 #define SOLVENTPROPSADFROMDECK_HPP
22 
25 
26 #include <opm/core/props/pvt/PvtDead.hpp>
27 #include <opm/core/props/pvt/PvtInterface.hpp>
28 
29 #include <opm/parser/eclipse/Deck/Deck.hpp>
30 #include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
31 
32 #include <cmath>
33 #include <vector>
34 #include <opm/common/ErrorMacros.hpp>
35 
36 namespace Opm
37 {
39 {
40 public:
41  SolventPropsAdFromDeck(DeckConstPtr deck,
42  EclipseStateConstPtr eclipseState,
43  const int number_of_cells,
44  const int* global_cell);
45 
47  // Fluid interface //
49 
51  typedef ADB::V V;
52  typedef std::vector<int> Cells;
53 
58  ADB bSolvent(const ADB& pg,
59  const Cells& cells) const;
60 
65  ADB muSolvent(const ADB& pg,
66  const Cells& cells) const;
67 
72  ADB gasRelPermMultiplier(const ADB& solventFraction,
73  const Cells& cells) const;
74 
79  ADB solventRelPermMultiplier(const ADB& solventFraction,
80  const Cells& cells) const;
81 
85  V solventSurfaceDensity(const Cells& cells) const;
86 
87 private:
88  // The PVT region which is to be used for each cell
89  std::vector<int> cellPvtRegionIdx_;
90  std::vector<NonuniformTableLinear<double> > b_;
91  std::vector<NonuniformTableLinear<double> > viscosity_;
92  std::vector<NonuniformTableLinear<double> > inverseBmu_;
93  std::vector<double> solvent_surface_densities_;
94  std::vector<NonuniformTableLinear<double> > krg_;
95  std::vector<NonuniformTableLinear<double> > krs_;
96 };
97 
98 } // namespace OPM
99 
100 #endif // SOLVENTPROPSADFROMDECK_HPP
SolventPropsAdFromDeck(DeckConstPtr deck, EclipseStateConstPtr eclipseState, const int number_of_cells, const int *global_cell)
ADB muSolvent(const ADB &pg, const Cells &cells) const
ADB gasRelPermMultiplier(const ADB &solventFraction, const Cells &cells) const
Eigen::Array< double, Eigen::Dynamic, 1 > V
Underlying type for values.
Definition: AutoDiffBlock.hpp:98
V solventSurfaceDensity(const Cells &cells) const
Definition: AdditionalObjectDeleter.hpp:22
std::vector< int > Cells
Definition: SolventPropsAdFromDeck.hpp:52
ADB::V V
Definition: SolventPropsAdFromDeck.hpp:51
AutoDiffBlock< double > ADB
Definition: SolventPropsAdFromDeck.hpp:50
ADB solventRelPermMultiplier(const ADB &solventFraction, const Cells &cells) const
Definition: SolventPropsAdFromDeck.hpp:38
ADB bSolvent(const ADB &pg, const Cells &cells) const