ThreePhaseParkerVanGenuchtenParams.hpp
Go to the documentation of this file.
1 // -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 // vi: set et ts=4 sw=4 sts=4:
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 2 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  Consult the COPYING file in the top-level source directory of this
20  module for the precise wording of the license and the list of
21  copyright holders.
22 */
27 #ifndef OPM_THREE_PHASE_PARKER_VAN_GENUCHTEN_PARAMS_HPP
28 #define OPM_THREE_PHASE_PARKER_VAN_GENUCHTEN_PARAMS_HPP
29 
30 #include <opm/common/utility/platform_dependent/disable_warnings.h>
31 #include <dune/common/fvector.hh>
32 #include <opm/common/utility/platform_dependent/reenable_warnings.h>
33 
34 #include <opm/common/Valgrind.hpp>
35 
36 #include <opm/common/ErrorMacros.hpp>
37 #include <opm/common/Exceptions.hpp>
38 
40 
41 #include <cassert>
42 
43 namespace Opm {
54 template<class TraitsT>
56 {
57 public:
59 
60  typedef TraitsT Traits;
61  typedef typename Traits::Scalar Scalar;
62 
64  {
65  betaNW_ = 1.0;
66  betaGN_ = 1.0;
67  }
68 
73  Scalar vgAlpha() const
74  { EnsureFinalized::check(); return vgAlpha_; }
75 
80  void setVgAlpha(Scalar v)
81  { vgAlpha_ = v; }
82 
87  Scalar vgM() const
88  { EnsureFinalized::check(); return vgM_; }
89 
96  void setVgM(Scalar m)
97  { vgM_ = m; vgN_ = 1/(1 - vgM_); }
98 
103  Scalar vgN() const
104  { EnsureFinalized::check(); return vgN_; }
105 
112  void setVgN(Scalar n)
113  { vgN_ = n; vgM_ = 1 - 1/vgN_; }
114 
118  Scalar Swr() const
119  { EnsureFinalized::check(); return Swr_; }
120 
124  void setSwr(Scalar input)
125  { Swr_ = input; }
126 
130  Scalar Snr() const
131  { EnsureFinalized::check(); return Snr_; }
132 
136  void setSnr(Scalar input)
137  { Snr_ = input; }
138 
142  Scalar Sgr() const
143  { EnsureFinalized::check(); return Sgr_; }
144 
148  void setSgr(Scalar input)
149  { Sgr_ = input; }
150 
151  Scalar Swrx() const
152  { EnsureFinalized::check(); return Swrx_; }
153 
157  void setSwrx(Scalar input)
158  { Swrx_ = input; }
159 
163  void setBetaNW(Scalar input)
164  { betaNW_ = input; }
165 
166  void setBetaGN(Scalar input)
167  { betaGN_ = input; }
168 
172  Scalar betaNW() const
173  { EnsureFinalized::check(); return betaNW_; }
174 
175  Scalar betaGN() const
176  { EnsureFinalized::check(); return betaGN_; }
177 
181  void setkrRegardsSnr(bool input)
182  { krRegardsSnr_ = input; }
186  bool krRegardsSnr() const
187  { EnsureFinalized::check(); return krRegardsSnr_; }
188 
189  void checkDefined() const
190  {
191  Valgrind::CheckDefined(vgAlpha_);
192  Valgrind::CheckDefined(vgM_);
193  Valgrind::CheckDefined(vgN_);
194  Valgrind::CheckDefined(Swr_);
195  Valgrind::CheckDefined(Snr_);
196  Valgrind::CheckDefined(Sgr_);
197  Valgrind::CheckDefined(Swrx_);
198  Valgrind::CheckDefined(betaNW_);
199  Valgrind::CheckDefined(betaGN_);
200  Valgrind::CheckDefined(krRegardsSnr_);
201  }
202 
203 private:
204  Scalar vgAlpha_;
205  Scalar vgM_;
206  Scalar vgN_;
207  Scalar Swr_;
208  Scalar Snr_;
209  Scalar Sgr_;
210  Scalar Swrx_; // Swr + Snr
211 
212  Scalar betaNW_;
213  Scalar betaGN_;
214 
215  bool krRegardsSnr_ ;
216 };
217 } // namespace Opm
218 
219 #endif
void setVgM(Scalar m)
Set the shape parameter of van Genuchten&#39;s curve.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:96
Scalar Sgr() const
Return the residual gas saturation.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:142
Specification of the material params for the three-phase van Genuchten capillary pressure model...
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:55
Scalar betaNW() const
Return the values for the beta scaling parameters of capillary pressure between the phases...
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:172
Scalar vgAlpha() const
Return the shape parameter of van Genuchten&#39;s curve.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:73
void setVgN(Scalar n)
Set the shape parameter of van Genuchten&#39;s curve.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:112
void setSwrx(Scalar input)
Set the residual gas saturation.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:157
void setSnr(Scalar input)
Set the residual non-wetting saturation.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:136
Definition: Air_Mesitylene.hpp:33
Scalar Swr() const
Return the residual wetting saturation.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:118
void setSgr(Scalar input)
Set the residual gas saturation.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:148
Default implementation for asserting finalization of parameter objects.
Scalar vgN() const
Return the shape parameter of van Genuchten&#39;s curve.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:103
bool krRegardsSnr() const
Calls if residual n-phase saturation should be regarded in its relative permeability.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:186
void setVgAlpha(Scalar v)
Set the shape parameter of van Genuchten&#39;s curve.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:80
void setkrRegardsSnr(bool input)
defines if residual n-phase saturation should be regarded in its relative permeability.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:181
Scalar Snr() const
Return the residual non-wetting saturation.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:130
void finalize()
Mark the object as finalized.
Definition: EnsureFinalized.hpp:77
Scalar vgM() const
Return the shape parameter of van Genuchten&#39;s curve.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:87
Default implementation for asserting finalization of parameter objects.
Definition: EnsureFinalized.hpp:46
void setBetaNW(Scalar input)
defines the scaling parameters of capillary pressure between the phases (=1 for Gas-Water) ...
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:163
void setSwr(Scalar input)
Set the residual wetting saturation.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:124