3.2-git
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#include <dune/common/float_cmp.hh>
29
30namespace Dumux {
31
40template<class ScalarT>
42{
43public:
44 using Scalar = ScalarT;
45
47 {}
48
50 {
52 setVgn(vgn);
53 setVgl(vgl);
54 }
55
59 template<class OtherParams>
60 bool operator== (const OtherParams& otherParams) const
61 {
62 return Dune::FloatCmp::eq(vgAlpha_, otherParams.vgAlpha(), /*eps*/1e-6*vgAlpha_)
63 && Dune::FloatCmp::eq(vgn_, otherParams.vgn(), /*eps*/1e-6*vgn_)
64 && Dune::FloatCmp::eq(vgl_, otherParams.vgl(), /*eps*/1e-6*vgl_);
65 }
66
72 { return vgAlpha_; }
73
79 { vgAlpha_ = v; }
80
85 Scalar vgm() const
86 { return vgm_; }
87
94 void setVgm(Scalar m)
95 { vgm_ = m; vgn_ = 1/(1 - vgm_); }
96
101 Scalar vgn() const
102 { return vgn_; }
103
111 { vgn_ = n; vgm_ = 1 - 1/vgn_; }
112
117 Scalar vgl() const
118 { return vgl_; }
119
126 { vgl_ = l; }
127
128private:
129 Scalar vgAlpha_;
130 Scalar vgm_;
131 Scalar vgn_;
132 Scalar vgl_ = 0.5;
133};
134} // namespace Dumux
135
136#endif
Definition: adapt.hh:29
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
VanGenuchtenParams()
Definition: vangenuchtenparams.hh:46
VanGenuchtenParams(Scalar vgAlpha, Scalar vgn, Scalar vgl=0.5)
Definition: vangenuchtenparams.hh:49
void setVgAlpha(Scalar v)
Set the shape parameter of van Genuchten's curve.
Definition: vangenuchtenparams.hh:78
Scalar vgl() const
Return the shape parameter of van Genuchten's curve.
Definition: vangenuchtenparams.hh:117
void setVgl(Scalar l)
Set the pore-connectivity parameter ( ) of Mualem's relative permeability curve.
Definition: vangenuchtenparams.hh:125
bool operator==(const OtherParams &otherParams) const
Equality comparison with another set of params.
Definition: vangenuchtenparams.hh:60
void setVgm(Scalar m)
Set the shape parameter of van Genuchten's curve.
Definition: vangenuchtenparams.hh:94
Scalar vgn() const
Return the shape parameter of van Genuchten's curve.
Definition: vangenuchtenparams.hh:101
Scalar vgm() const
Return the shape parameter of van Genuchten's curve.
Definition: vangenuchtenparams.hh:85
void setVgn(Scalar n)
Set the shape parameter of van Genuchten's curve.
Definition: vangenuchtenparams.hh:110
ScalarT Scalar
Definition: vangenuchtenparams.hh:44