SaturationPropsBasic.hpp
1 /*
2  Copyright 2012 SINTEF ICT, Applied Mathematics.
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_SATURATIONPROPSBASIC_HEADER_INCLUDED
21 #define OPM_SATURATIONPROPSBASIC_HEADER_INCLUDED
22 
23 #include <opm/core/utility/parameters/ParameterGroup.hpp>
24 
25 namespace Opm
26 {
27 
28 
37  {
38  public:
41 
46  void init(const ParameterGroup& param);
47 
48  enum RelPermFunc { Constant, Linear, Quadratic };
49 
51  void init(const int num_phases,
52  const RelPermFunc& relperm_func)
53  {
54  num_phases_ = num_phases;
55  relperm_func_ = relperm_func;
56  }
57 
59  int numPhases() const;
60 
70  void relperm(const int n,
71  const double* s,
72  double* kr,
73  double* dkrds) const;
74 
84  void capPress(const int n,
85  const double* s,
86  double* pc,
87  double* dpcds) const;
88 
93  void satRange(const int n,
94  double* smin,
95  double* smax) const;
96 
97 
98  private:
99  int num_phases_;
100  RelPermFunc relperm_func_;
101  };
102 
103 
104 
105 } // namespace Opm
106 
107 
108 
109 
110 #endif // OPM_SATURATIONPROPSBASIC_HEADER_INCLUDED
Class encapsulating basic saturation function behaviour, by which we mean constant, linear or quadratic relative permeability functions for a maximum of two phases, and zero capillary pressure.
Definition: SaturationPropsBasic.hpp:36
void satRange(const int n, double *smin, double *smax) const
Obtain the range of allowable saturation values.
Definition: SaturationPropsBasic.cpp:210
void relperm(const int n, const double *s, double *kr, double *dkrds) const
Relative permeability.
Definition: SaturationPropsBasic.cpp:155
void capPress(const int n, const double *s, double *pc, double *dpcds) const
Capillary pressure.
Definition: SaturationPropsBasic.cpp:193
Definition: AnisotropicEikonal.cpp:446
SaturationPropsBasic()
Default constructor.
Definition: SaturationPropsBasic.cpp:102
void init(const ParameterGroup &param)
Initialize from parameters.
Definition: SaturationPropsBasic.cpp:111
ParameterGroup is a class that is used to provide run-time parameters.
Definition: ParameterGroup.hpp:81
int numPhases() const
Definition: SaturationPropsBasic.cpp:138
void init(const int num_phases, const RelPermFunc &relperm_func)
Initialize from arguments a basic Saturation property.
Definition: SaturationPropsBasic.hpp:51