3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
fluxlimiterlet.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 2 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_FLUX_SHALLOW_WATER_FLUX_LIMITER_LET_HH
26#define DUMUX_FLUX_SHALLOW_WATER_FLUX_LIMITER_LET_HH
27
28#include <algorithm>
29#include <cmath>
30
31namespace Dumux {
32namespace ShallowWater {
33
51template<class Scalar>
52static Scalar fluxLimiterLET(const Scalar valueLeft,
53 const Scalar valueRight,
54 const Scalar upperH,
55 const Scalar lowerH)
56{
57 using std::pow;
58 using std::min;
59 using std::max;
60
61 const auto h = (valueLeft + valueRight)*0.5;
62
63 Scalar mobility = 1.0;
64 if (h < upperH)
65 {
66 const auto sw = max(min(h*(1.0/upperH) - lowerH, 1.0), 0.0);
67
68 // LET-model for mobility
69 // constexpr Scalar krw = 1.0;
70 // constexpr Scalar letL = 2.0;
71 // constexpr Scalar letT = 2.0;
72 // constexpr Scalar letE = 1.0;
73 // mobility = (krw * pow(sw, letL))/(pow(sw, letL) + letE * pow(1.0 - sw, letT));
74
75 mobility = (sw*sw)/(sw*sw + (1-sw)*(1-sw));
76 }
77
78 return mobility;
79}
80
81} // end namespace ShallowWater
82} // end namespace Dumux
83
84#endif
static Scalar fluxLimiterLET(const Scalar valueLeft, const Scalar valueRight, const Scalar upperH, const Scalar lowerH)
Flux limiter function to scale fluxes for small water depths.
Definition: fluxlimiterlet.hh:52
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
std::string mobility(int phaseIdx) noexcept
I/O name of mobility for multiphase systems.
Definition: name.hh:101