opm-common
Toggle main menu visibility
Loading...
Searching...
No Matches
VanGenuchtenParams.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 VAN_GENUCHTEN_PARAMS_HPP
28
#define VAN_GENUCHTEN_PARAMS_HPP
29
30
#include <
opm/material/common/EnsureFinalized.hpp
>
31
32
namespace
Opm
{
43
template
<
class
TraitsT>
44
class
VanGenuchtenParams :
public
EnsureFinalized
45
{
46
typedef
typename
TraitsT::Scalar Scalar;
47
48
public
:
49
using
EnsureFinalized
:: finalize
;
50
51
typedef
TraitsT Traits;
52
53
VanGenuchtenParams()
54
{
55
}
56
57
VanGenuchtenParams(Scalar alphaParam, Scalar nParam)
58
{
59
setVgAlpha
(alphaParam);
60
setVgN
(nParam);
61
finalize
();
62
}
63
68
Scalar
vgAlpha
()
const
69
{ EnsureFinalized::check();
return
vgAlpha_; }
70
75
void
setVgAlpha
(Scalar v)
76
{ vgAlpha_ = v; }
77
82
Scalar
vgM
()
const
83
{ EnsureFinalized::check();
return
vgM_; }
84
91
void
setVgM
(Scalar m)
92
{ vgM_ = m; vgN_ = 1/(1 - vgM_); }
93
98
Scalar
vgN
()
const
99
{ EnsureFinalized::check();
return
vgN_; }
100
107
void
setVgN
(Scalar n)
108
{ vgN_ = n; vgM_ = 1 - 1/vgN_; }
109
110
private
:
111
Scalar vgAlpha_;
112
Scalar vgM_;
113
Scalar vgN_;
114
};
115
}
// namespace Opm
116
117
#endif
EnsureFinalized.hpp
Default implementation for asserting finalization of parameter objects.
Opm::EnsureFinalized::EnsureFinalized
OPM_HOST_DEVICE EnsureFinalized()
The default constructor.
Definition
EnsureFinalized.hpp:58
Opm::EnsureFinalized::finalize
OPM_HOST_DEVICE void finalize()
Mark the object as finalized.
Definition
EnsureFinalized.hpp:82
Opm::VanGenuchtenParams::setVgN
void setVgN(Scalar n)
Set the shape parameter of van Genuchten's curve.
Definition
VanGenuchtenParams.hpp:107
Opm::VanGenuchtenParams::vgM
Scalar vgM() const
Return the shape parameter of van Genuchten's curve.
Definition
VanGenuchtenParams.hpp:82
Opm::VanGenuchtenParams::vgN
Scalar vgN() const
Return the shape parameter of van Genuchten's curve.
Definition
VanGenuchtenParams.hpp:98
Opm::VanGenuchtenParams::vgAlpha
Scalar vgAlpha() const
Return the shape parameter of van Genuchten's curve.
Definition
VanGenuchtenParams.hpp:68
Opm::VanGenuchtenParams::setVgM
void setVgM(Scalar m)
Set the shape parameter of van Genuchten's curve.
Definition
VanGenuchtenParams.hpp:91
Opm::VanGenuchtenParams::setVgAlpha
void setVgAlpha(Scalar v)
Set the shape parameter of van Genuchten's curve.
Definition
VanGenuchtenParams.hpp:75
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition
Exceptions.hpp:30
opm
material
fluidmatrixinteractions
VanGenuchtenParams.hpp
Generated by
1.17.0