3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Loading...
Searching...
No Matches
regularizedbrookscoreyparams.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_REGULARIZED_BROOKS_COREY_PARAMS_HH
26#define DUMUX_REGULARIZED_BROOKS_COREY_PARAMS_HH
27
28#include <dune/common/float_cmp.hh>
29
30#include "brookscoreyparams.hh"
31
32namespace Dumux {
33
39template <class ScalarT>
40class RegularizedBrooksCoreyParams : public BrooksCoreyParams<ScalarT>
41{
42 using BrooksCoreyParams = Dumux::BrooksCoreyParams<ScalarT>;
43
44public:
45 using Scalar = ScalarT;
46
48 : BrooksCoreyParams()
49 {
50 setThresholdSw(0.01);
51 }
52
54 : BrooksCoreyParams(pe, lambda)
55 {
56 setThresholdSw(0.01);
57 }
58
62 template<class OtherParams>
63 bool operator== (const OtherParams& otherParams) const
64 {
65 return Dune::FloatCmp::eq(thresholdSw_, otherParams.thresholdSw(), /*eps*/1e-6*thresholdSw_)
66 && BrooksCoreyParams::operator==(otherParams);
67 }
68
77 {
78 thresholdSw_ = thresholdSw;
79 }
80
86 {
87 return thresholdSw_;
88 }
89
90private:
91 Scalar thresholdSw_;
92};
93} // namespace Dumux
94
95#endif
Specification of the material parameters for the Brooks Corey constitutive relations.
Definition adapt.hh:29
Specification of the material parameters for the Brooks Corey constitutive relations.
Definition brookscoreyparams.hh:43
Scalar pe() const
Returns the entry pressure in .
Definition brookscoreyparams.hh:70
bool operator==(const OtherParams &otherParams) const
Equality comparison with another set of params.
Definition brookscoreyparams.hh:61
Scalar lambda() const
Returns the lambda shape parameter .
Definition brookscoreyparams.hh:83
bool operator==(const OtherParams &otherParams) const
Equality comparison with another set of params.
Definition regularizedbrookscoreyparams.hh:63
Scalar thresholdSw() const
Threshold saturation below which the capillary pressure is regularized.
Definition regularizedbrookscoreyparams.hh:85
void setThresholdSw(Scalar thresholdSw)
Set the threshold saturation below which the capillary pressure is regularized.
Definition regularizedbrookscoreyparams.hh:76
RegularizedBrooksCoreyParams(Scalar pe, Scalar lambda)
Definition regularizedbrookscoreyparams.hh:53
ScalarT Scalar
Definition regularizedbrookscoreyparams.hh:45
RegularizedBrooksCoreyParams()
Definition regularizedbrookscoreyparams.hh:47