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 <dune/common/fvector.hh>
31
34
35#include <cassert>
36
37namespace Opm {
48template<class TraitsT>
50{
51public:
53
54 typedef TraitsT Traits;
55 typedef typename Traits::Scalar Scalar;
56
58 {
59 betaNW_ = 1.0;
60 betaGN_ = 1.0;
61 }
62
68 { EnsureFinalized::check(); return vgAlpha_; }
69
75 { vgAlpha_ = v; }
76
81 Scalar vgM() const
82 { EnsureFinalized::check(); return vgM_; }
83
90 void setVgM(Scalar m)
91 { vgM_ = m; vgN_ = 1/(1 - vgM_); }
92
97 Scalar vgN() const
98 { EnsureFinalized::check(); return vgN_; }
99
107 { vgN_ = n; vgM_ = 1 - 1/vgN_; }
108
112 Scalar Swr() const
113 { EnsureFinalized::check(); return Swr_; }
114
118 void setSwr(Scalar input)
119 { Swr_ = input; }
120
124 Scalar Snr() const
125 { EnsureFinalized::check(); return Snr_; }
126
130 void setSnr(Scalar input)
131 { Snr_ = input; }
132
136 Scalar Sgr() const
137 { EnsureFinalized::check(); return Sgr_; }
138
142 void setSgr(Scalar input)
143 { Sgr_ = input; }
144
145 Scalar Swrx() const
146 { EnsureFinalized::check(); return Swrx_; }
147
151 void setSwrx(Scalar input)
152 { Swrx_ = input; }
153
157 void setBetaNW(Scalar input)
158 { betaNW_ = input; }
159
160 void setBetaGN(Scalar input)
161 { betaGN_ = input; }
162
167 { EnsureFinalized::check(); return betaNW_; }
168
170 { EnsureFinalized::check(); return betaGN_; }
171
175 void setkrRegardsSnr(bool input)
176 { krRegardsSnr_ = input; }
180 bool krRegardsSnr() const
181 { EnsureFinalized::check(); return krRegardsSnr_; }
182
183 void checkDefined() const
184 {
185 Valgrind::CheckDefined(vgAlpha_);
192 Valgrind::CheckDefined(betaNW_);
193 Valgrind::CheckDefined(betaGN_);
194 Valgrind::CheckDefined(krRegardsSnr_);
195 }
196
197private:
198 Scalar vgAlpha_;
199 Scalar vgM_;
200 Scalar vgN_;
201 Scalar Swr_;
202 Scalar Snr_;
203 Scalar Sgr_;
204 Scalar Swrx_; // Swr + Snr
205
206 Scalar betaNW_;
207 Scalar betaGN_;
208
209 bool krRegardsSnr_ ;
210};
211} // namespace Opm
212
213#endif
Some templates to wrap the valgrind client request macros.
Default implementation for asserting finalization of parameter objects.
Definition: EnsureFinalized.hpp:47
void finalize()
Mark the object as finalized.
Definition: EnsureFinalized.hpp:75
void check() const
Definition: EnsureFinalized.hpp:63
Specification of the material params for the three-phase van Genuchten capillary pressure model.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:50
Scalar Swrx() const
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:145
void setVgN(Scalar n)
Set the shape parameter of van Genuchten's curve.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:106
Scalar betaGN() const
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:169
void setVgM(Scalar m)
Set the shape parameter of van Genuchten's curve.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:90
TraitsT Traits
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:54
Scalar Snr() const
Return the residual non-wetting saturation.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:124
Scalar vgAlpha() const
Return the shape parameter of van Genuchten's curve.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:67
void setBetaGN(Scalar input)
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:160
void setSwrx(Scalar input)
Set the residual gas saturation.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:151
void setkrRegardsSnr(bool input)
defines if residual n-phase saturation should be regarded in its relative permeability.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:175
Scalar Sgr() const
Return the residual gas saturation.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:136
Traits::Scalar Scalar
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:55
Scalar Swr() const
Return the residual wetting saturation.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:112
void setSnr(Scalar input)
Set the residual non-wetting saturation.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:130
Scalar vgM() const
Return the shape parameter of van Genuchten's curve.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:81
Scalar vgN() const
Return the shape parameter of van Genuchten's curve.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:97
void setBetaNW(Scalar input)
defines the scaling parameters of capillary pressure between the phases (=1 for Gas-Water)
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:157
void setSgr(Scalar input)
Set the residual gas saturation.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:142
ThreePhaseParkerVanGenuchtenParams()
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:57
void setVgAlpha(Scalar v)
Set the shape parameter of van Genuchten's curve.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:74
bool krRegardsSnr() const
Calls if residual n-phase saturation should be regarded in its relative permeability.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:180
void setSwr(Scalar input)
Set the residual wetting saturation.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:118
Scalar betaNW() const
Return the values for the beta scaling parameters of capillary pressure between the phases.
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:166
void checkDefined() const
Definition: ThreePhaseParkerVanGenuchtenParams.hpp:183
bool CheckDefined(const T &value)
Make valgrind complain if any of the memory occupied by an object is undefined.
Definition: Valgrind.hpp:74
Definition: Air_Mesitylene.hpp:34