3.3.0
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
vangenuchtenparams.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 DUMUX_VAN_GENUCHTEN_PARAMS_HH
26#define DUMUX_VAN_GENUCHTEN_PARAMS_HH
27
28// TODO Deprecated. Remove after 3.3
29
30#include <dune/common/float_cmp.hh>
31
32namespace Dumux {
33
42template<class ScalarT>
44{
45public:
46 using Scalar = ScalarT;
47
49 {}
50
52 {
54 setVgn(vgn);
55 setVgl(vgl);
56 }
57
61 template<class OtherParams>
62 bool operator== (const OtherParams& otherParams) const
63 {
64 return Dune::FloatCmp::eq(vgAlpha_, otherParams.vgAlpha(), /*eps*/1e-6*vgAlpha_)
65 && Dune::FloatCmp::eq(vgn_, otherParams.vgn(), /*eps*/1e-6*vgn_)
66 && Dune::FloatCmp::eq(vgl_, otherParams.vgl(), /*eps*/1e-6*vgl_);
67 }
68
74 { return vgAlpha_; }
75
81 { vgAlpha_ = v; }
82
87 Scalar vgm() const
88 { return vgm_; }
89
96 void setVgm(Scalar m)
97 { vgm_ = m; vgn_ = 1/(1 - vgm_); }
98
103 Scalar vgn() const
104 { return vgn_; }
105
113 { vgn_ = n; vgm_ = 1 - 1/vgn_; }
114
119 Scalar vgl() const
120 { return vgl_; }
121
128 { vgl_ = l; }
129
130private:
131 Scalar vgAlpha_;
132 Scalar vgm_;
133 Scalar vgn_;
134 Scalar vgl_ = 0.5;
135};
136} // namespace Dumux
137
138#endif
Definition: adapt.hh:29
Specification of the material parameters for the van Genuchten-Mualem constitutive relations.
Definition: vangenuchtenparams.hh:44
Scalar vgAlpha() const
Return the shape parameter of van Genuchten's curve.
Definition: vangenuchtenparams.hh:73
VanGenuchtenParams()
Definition: vangenuchtenparams.hh:48
VanGenuchtenParams(Scalar vgAlpha, Scalar vgn, Scalar vgl=0.5)
Definition: vangenuchtenparams.hh:51
void setVgAlpha(Scalar v)
Set the shape parameter of van Genuchten's curve.
Definition: vangenuchtenparams.hh:80
Scalar vgl() const
Return the shape parameter of van Genuchten's curve.
Definition: vangenuchtenparams.hh:119
void setVgl(Scalar l)
Set the pore-connectivity parameter ( ) of Mualem's relative permeability curve.
Definition: vangenuchtenparams.hh:127
bool operator==(const OtherParams &otherParams) const
Equality comparison with another set of params.
Definition: vangenuchtenparams.hh:62
void setVgm(Scalar m)
Set the shape parameter of van Genuchten's curve.
Definition: vangenuchtenparams.hh:96
Scalar vgn() const
Return the shape parameter of van Genuchten's curve.
Definition: vangenuchtenparams.hh:103
Scalar vgm() const
Return the shape parameter of van Genuchten's curve.
Definition: vangenuchtenparams.hh:87
void setVgn(Scalar n)
Set the shape parameter of van Genuchten's curve.
Definition: vangenuchtenparams.hh:112
ScalarT Scalar
Definition: vangenuchtenparams.hh:46