My Project
Loading...
Searching...
No Matches
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
32
33#include <cassert>
34
35namespace Opm {
46template<class TraitsT>
48{
49public:
51
52 typedef TraitsT Traits;
53 typedef typename Traits::Scalar Scalar;
54
56 {
57 betaNW_ = 1.0;
58 betaGN_ = 1.0;
59 }
60
65 Scalar vgAlpha() const
66 { EnsureFinalized::check(); return vgAlpha_; }
67
72 void setVgAlpha(Scalar v)
73 { vgAlpha_ = v; }
74
79 Scalar vgM() const
80 { EnsureFinalized::check(); return vgM_; }
81
88 void setVgM(Scalar m)
89 { vgM_ = m; vgN_ = 1/(1 - vgM_); }
90
95 Scalar vgN() const
96 { EnsureFinalized::check(); return vgN_; }
97
104 void setVgN(Scalar n)
105 { vgN_ = n; vgM_ = 1 - 1/vgN_; }
106
110 Scalar Swr() const
111 { EnsureFinalized::check(); return Swr_; }
112
116 void setSwr(Scalar input)
117 { Swr_ = input; }
118
122 Scalar Snr() const
123 { EnsureFinalized::check(); return Snr_; }
124
128 void setSnr(Scalar input)
129 { Snr_ = input; }
130
134 Scalar Sgr() const
135 { EnsureFinalized::check(); return Sgr_; }
136
140 void setSgr(Scalar input)
141 { Sgr_ = input; }
142
143 Scalar Swrx() const
144 { EnsureFinalized::check(); return Swrx_; }
145
149 void setSwrx(Scalar input)
150 { Swrx_ = input; }
151
155 void setBetaNW(Scalar input)
156 { betaNW_ = input; }
157
158 void setBetaGN(Scalar input)
159 { betaGN_ = input; }
160
164 Scalar betaNW() const
165 { EnsureFinalized::check(); return betaNW_; }
166
167 Scalar betaGN() const
168 { EnsureFinalized::check(); return betaGN_; }
169
173 void setkrRegardsSnr(bool input)
174 { krRegardsSnr_ = input; }
178 bool krRegardsSnr() const
179 { EnsureFinalized::check(); return krRegardsSnr_; }
180
181 void checkDefined() const
182 {
183 Valgrind::CheckDefined(vgAlpha_);
184 Valgrind::CheckDefined(vgM_);
185 Valgrind::CheckDefined(vgN_);
186 Valgrind::CheckDefined(Swr_);
187 Valgrind::CheckDefined(Snr_);
188 Valgrind::CheckDefined(Sgr_);
189 Valgrind::CheckDefined(Swrx_);
190 Valgrind::CheckDefined(betaNW_);
191 Valgrind::CheckDefined(betaGN_);
192 Valgrind::CheckDefined(krRegardsSnr_);
193 }
194
195private:
196 Scalar vgAlpha_;
197 Scalar vgM_;
198 Scalar vgN_;
199 Scalar Swr_;
200 Scalar Snr_;
201 Scalar Sgr_;
202 Scalar Swrx_; // Swr + Snr
203
204 Scalar betaNW_;
205 Scalar betaGN_;
206
207 bool krRegardsSnr_ ;
208};
209} // namespace Opm
210
211#endif
Default implementation for asserting finalization of parameter objects.
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
Specification of the material params for the three-phase van Genuchten capillary pressure model.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:48
void setVgN(Scalar n)
Set the shape parameter of van Genuchten's curve.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:104
void setVgM(Scalar m)
Set the shape parameter of van Genuchten's curve.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:88
Scalar Snr() const
Return the residual non-wetting saturation.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:122
Scalar vgAlpha() const
Return the shape parameter of van Genuchten's curve.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:65
void setSwrx(Scalar input)
Set the residual gas saturation.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:149
void setkrRegardsSnr(bool input)
defines if residual n-phase saturation should be regarded in its relative permeability.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:173
Scalar Sgr() const
Return the residual gas saturation.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:134
Scalar Swr() const
Return the residual wetting saturation.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:110
void setSnr(Scalar input)
Set the residual non-wetting saturation.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:128
Scalar vgM() const
Return the shape parameter of van Genuchten's curve.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:79
Scalar vgN() const
Return the shape parameter of van Genuchten's curve.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:95
void setBetaNW(Scalar input)
defines the scaling parameters of capillary pressure between the phases (=1 for Gas-Water)
Definition ThreePhaseParkerVanGenuchtenParams.hpp:155
void setSgr(Scalar input)
Set the residual gas saturation.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:140
void setVgAlpha(Scalar v)
Set the shape parameter of van Genuchten's curve.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:72
bool krRegardsSnr() const
Calls if residual n-phase saturation should be regarded in its relative permeability.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:178
void setSwr(Scalar input)
Set the residual wetting saturation.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:116
Scalar betaNW() const
Return the values for the beta scaling parameters of capillary pressure between the phases.
Definition ThreePhaseParkerVanGenuchtenParams.hpp:164
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30