3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
regularizedvangenuchtenparams.hh
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 * See the file COPYING for full copying permissions. *
5 * *
6 * This program 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 * This program 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 this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
25#ifndef REGULARIZED_VAN_GENUCHTEN_PARAMS_HH
26#define REGULARIZED_VAN_GENUCHTEN_PARAMS_HH
27
28#include <dune/common/float_cmp.hh>
29
30#include "vangenuchtenparams.hh"
31
32namespace Dumux {
33
39template<class ScalarT>
41{
42public:
43 using Scalar = ScalarT;
45
47 {
48 initialize();
49 }
50
52 : Parent(vgAlpha, vgN)
53 {
54 initialize();
55 }
56
60 template<class OtherParams>
61 bool operator== (const OtherParams& otherParams) const
62 {
63 return Dune::FloatCmp::eq(pcLowSw_, otherParams.pcLowSw(), /*eps*/1e-6*pcLowSw_)
64 && Dune::FloatCmp::eq(pcHighSw_, otherParams.pcHighSw(), /*eps*/1e-6*pcHighSw_)
65 && Dune::FloatCmp::eq(krnLowSw_, otherParams.krnLowSw(), /*eps*/1e-6*krnLowSw_)
66 && Dune::FloatCmp::eq(krwHighSw_, otherParams.krwHighSw(), /*eps*/1e-6*krwHighSw_)
67 && Parent::operator==(otherParams);
68 }
69
74 {
75 setPcLowSw(0.01);
76 setPcHighSw(0.99);
77 setKrnLowSw(0.1);
78 setKrwHighSw(0.9);
79 }
80
88 {
89 pcLowSw_ = pcLowSw;
90 }
91
96 {
97 return pcLowSw_;
98 }
99
104 {
105 pcHighSw_ = pcHighSw;
106 }
107
115 {
116 return pcHighSw_;
117 }
118
124 {
125 krnLowSw_ = krnLowSw;
126 }
127
133 {
134 return krnLowSw_;
135 }
136
142 {
143 krwHighSw_ = krwHighSw;
144 }
145
151 {
152 return krwHighSw_;
153 }
154
155private:
156 Scalar pcLowSw_;
157 Scalar pcHighSw_;
158 Scalar krnLowSw_;
159 Scalar krwHighSw_;
160};
161} // namespace Dumux
162
163#endif
Specification of the material parameters for the van Genuchten-Mualem constitutive relations.
Definition: adapt.hh:29
Parameters that are necessary for the regularization of VanGenuchten "material law".
Definition: regularizedvangenuchtenparams.hh:41
void setPcLowSw(Scalar pcLowSw)
Set the threshold saturation below which the capillary pressure is regularized.
Definition: regularizedvangenuchtenparams.hh:87
Scalar pcLowSw() const
Threshold saturation below which the capillary pressure is regularized.
Definition: regularizedvangenuchtenparams.hh:95
bool operator==(const OtherParams &otherParams) const
Equality comparison with another set of params.
Definition: regularizedvangenuchtenparams.hh:61
void initialize()
Sets some default regularization thresholds.
Definition: regularizedvangenuchtenparams.hh:73
void setPcHighSw(Scalar pcHighSw)
Set the threshold saturation above which the capillary pressure is regularized.
Definition: regularizedvangenuchtenparams.hh:103
RegularizedVanGenuchtenParams()
Definition: regularizedvangenuchtenparams.hh:46
Scalar krnLowSw() const
Threshold saturation below which the relative permeability of the non-wetting phase gets regularized.
Definition: regularizedvangenuchtenparams.hh:132
ScalarT Scalar
Definition: regularizedvangenuchtenparams.hh:43
void setKrwHighSw(Scalar krwHighSw)
Set the threshold saturation above which the relative permeability of the wetting phase gets regulari...
Definition: regularizedvangenuchtenparams.hh:141
void setKrnLowSw(Scalar krnLowSw)
Set the threshold saturation below which the relative permeability of the non-wetting phase gets regu...
Definition: regularizedvangenuchtenparams.hh:123
Scalar pcHighSw() const
Threshold saturation above which the capillary pressure is regularized.
Definition: regularizedvangenuchtenparams.hh:114
Scalar krwHighSw() const
Threshold saturation above which the relative permeability of the wetting phase gets regularized.
Definition: regularizedvangenuchtenparams.hh:150
RegularizedVanGenuchtenParams(Scalar vgAlpha, Scalar vgN)
Definition: regularizedvangenuchtenparams.hh:51
Specification of the material parameters for the van Genuchten-Mualem constitutive relations.
Definition: vangenuchtenparams.hh:42
Scalar vgAlpha() const
Return the shape parameter of van Genuchten's curve.
Definition: vangenuchtenparams.hh:71
bool operator==(const OtherParams &otherParams) const
Equality comparison with another set of params.
Definition: vangenuchtenparams.hh:60