3.3.0
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
regularizedlinearmaterial.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_LINEAR_MATERIAL_HH
26#define DUMUX_REGULARIZED_LINEAR_MATERIAL_HH
27
28#warning "This header is deprecated. Removal after 3.3"
29
30#include "linearmaterial.hh"
32
34
35namespace Dumux {
36
58template <class ScalarT, class ParamsT = RegularizedLinearMaterialParams<ScalarT> >
60{
62
63public:
64 using Params = ParamsT;
65 using Scalar = typename Params::Scalar;
66
80 static Scalar pc(const Params &params, Scalar swe)
81 {
82 return LinearMaterial::pc(params, swe);
83 }
84
99 static Scalar sw(const Params &params, Scalar pc)
100 {
101 return LinearMaterial::sw(params, pc);
102 }
103
111 static Scalar endPointPc(const Params &params)
112 { return params.entryPc(); }
113
128 static Scalar dpc_dswe(const Params &params, Scalar swe)
129 {
130 return LinearMaterial::dpc_dswe(params, swe);
131 }
132
142 static Scalar dswe_dpc(const Params &params, Scalar pc)
143 {
144 return LinearMaterial::dswe_dpc(params, pc);
145 }
146
155 static Scalar krw(const Params &params, Scalar swe)
156 {
157 return relperm_(params, swe);
158 }
159
168 static Scalar krn(const Params &params, Scalar swe)
169 {
170 Scalar sne = 1 - swe;
171 return relperm_(params, sne);
172 }
173
174private:
175 static Scalar relperm_(const Params &params, Scalar S)
176 {
177 const Scalar lowS = params.krLowS();
178 const Scalar highS = params.krHighS();
179
180
181 const Scalar m = (1 - ((1 - highS) + lowS)/2 ) / (1 - (1 - highS) - lowS);
182
183 // check whether the saturation is unpyhsical
184 if (S >= 1.0)
185 return 1.0;
186 else if (S <= 0.0)
187 return 0;
188 // check wether the permeability needs to be regularized
189 else if (S < lowS) {
191 Spline sp(0, lowS,
192 0, lowS/2,
193 0, m);
194 return sp.eval(S);
195 }
196 else if (S > highS) {
197 using Spline = Dumux::Spline<Scalar>;
198 Spline sp(highS, 1,
199 1 - (1 - highS)/2, 1,
200 m, 0);
201 return sp.eval(S);
202 }
203
204 // straight line for S \in [lowS, highS]
205 return lowS/2 + m*(S - lowS);
206 }
207};
208} // end namespace Dumux
209
210#endif
Provides 3rd order polynomial splines.
Linear capillary pressure and relative permeability <-> saturation relations.
Parameters that are necessary for the regularization of the linear constitutive relations.
Definition: adapt.hh:29
A 3rd order polynomial spline.
Definition: spline.hh:55
Linear capillary pressure and relative permeability <-> saturation relations.
Definition: linearmaterial.hh:49
static Scalar sw(const Params &params, Scalar pc)
The saturation-capillary pressure curve.
Definition: linearmaterial.hh:87
static Scalar dpc_dswe(const Params &params, Scalar swe)
Returns the partial derivative of the capillary pressure w.r.t. the effective saturation.
Definition: linearmaterial.hh:117
static Scalar pc(const Params &params, Scalar swe)
The linear capillary pressure-saturation curve.
Definition: linearmaterial.hh:68
Implements a linear saturation-capillary pressure relation.
Definition: regularizedlinearmaterial.hh:60
static Scalar endPointPc(const Params &params)
The capillary pressure at Swe = 1.0 also called end point capillary pressure.
Definition: regularizedlinearmaterial.hh:111
ParamsT Params
Definition: regularizedlinearmaterial.hh:64
static Scalar dswe_dpc(const Params &params, Scalar pc)
Returns the partial derivative of the effective saturation to the capillary pressure.
Definition: regularizedlinearmaterial.hh:142
static Scalar sw(const Params &params, Scalar pc)
The saturation-capillary pressure curve.
Definition: regularizedlinearmaterial.hh:99
static Scalar dpc_dswe(const Params &params, Scalar swe)
Returns the partial derivative of the capillary pressure to the effective saturation.
Definition: regularizedlinearmaterial.hh:128
static Scalar pc(const Params &params, Scalar swe)
The linear capillary pressure-saturation curve.
Definition: regularizedlinearmaterial.hh:80
static Scalar krn(const Params &params, Scalar swe)
The relative permeability for the nonwetting phase.
Definition: regularizedlinearmaterial.hh:168
typename Params::Scalar Scalar
Definition: regularizedlinearmaterial.hh:65
static Scalar krw(const Params &params, Scalar swe)
The relative permeability for the wetting phase.
Definition: regularizedlinearmaterial.hh:155