frictionlaw.hh 4.21 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
 *   See the file COPYING for full copying permissions.                      *
 *                                                                           *
 *   This program is free software: you can redistribute it and/or modify    *
 *   it under the terms of the GNU General Public License as published by    *
 *   the Free Software Foundation, either version 3 of the License, or       *
 *   (at your option) any later version.                                     *
 *                                                                           *
 *   This program is distributed in the hope that it will be useful,         *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of          *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the            *
 *   GNU General Public License for more details.                            *
 *                                                                           *
 *   You should have received a copy of the GNU General Public License       *
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.   *
 *****************************************************************************/
/*!
 * \file
 * \ingroup Fluidmatrixinteractions
 * \copydoc Dumux::FrictionLaw
 */
24
25
#ifndef DUMUX_MATERIAL_FLUIDMATRIX_FRICTIONLAW_HH
#define DUMUX_MATERIAL_FLUIDMATRIX_FRICTIONLAW_HH
26
27
28
29

#include <algorithm>
#include <cmath>

30
31
#include <dune/common/fvector.hh>

32
33
34
35
36
37
38
39
namespace Dumux {
/*!
 * \ingroup Fluidmatrixinteractions
 * \brief Implementation of the abstract base class for friction laws.
 *
 * The LET mobility model is used to limit the friction for small water depths.
 */

40
template <typename VolumeVariables >
41
42
class FrictionLaw
{
43
    using Scalar = typename VolumeVariables::PrimaryVariables::value_type;
44
45
public:
    /*!
46
     * \brief Compute the shear stress.
47
     *
48
49
     * \param volVar Volume Variables.
     *
50
51
52
     * Compute the shear stress due to friction. The shear stress is not a tensor as know
     * from contiuums mechanics, but a force projected on an area. Therefore it is a
     * vector with two entries.
53
     *
Martin Utz's avatar
Martin Utz committed
54
     * \return shear stress [N/m^2]. First entry is the x-component, the second the y-component.
55
56
     */

57
    virtual Dune::FieldVector<Scalar, 2> shearStress(const VolumeVariables& volVar) const = 0;
58
59
60
61
62
63
64
65
66

    /*!
     * \brief Limit the friction for small water depth.
     *
     * We define a water depth minUpperH. If the water depth is
     * smaller, we start to limit the friciton.
     * So the friciton term get's not extreme large for small water
     * depths.
     *
67
     * ------------------------- minUpperH -----------
68
69
70
     *
     *
     *
71
     * ------------------------roughnessHeight ---------------
72
73
74
75
76
77
     *    /\  /\   roughness                  /grain\
     * -------------------------------bottom ------------------
     * /////////////////////////////////////////////////
     *
     * For the limiting the LET model is used, which is usually applied in the
     * porous media flow to limit the permeability due to the saturation. It employs
78
     * the three empirical paramaters L, E and T, which describe the limiting curve (mobility).
79
     *
80
81
82
83
84
85
     * auto mobility = (mobility_max * pow(sw,L))/(pow(sw,L) + E * pow(1.0-sw,T));
     *
     * For the limitation of the roughness height L = 0.0, T = 2.0 and E = 1.0 are choosen.
     * Therefore the calculation of the mobility is simplified significantly.
     *
     * \param roughnessHeight roughness height of the representive structure (e.g. largest grain size).
86
87
     * \param waterDepth water depth.
     */
88
    Scalar limitRoughH(const Scalar roughnessHeight, const Scalar waterDepth) const
89
90
91
92
    {
        using std::min;
        using std::max;

93
        Scalar mobilityMax = 1.0; //!< maximal mobility
94

95
96
        Scalar minUpperH = roughnessHeight * 2.0;
        Scalar sw = min(waterDepth * (1.0/minUpperH),1.0);
97
        sw = max(0.0,sw);
98
        auto mobility = mobilityMax /(1 + (1.0-sw)*(1.0-sw));
99
        return roughnessHeight * (1.0 - mobility);
100
    }
101

102
    virtual ~FrictionLaw() = default;
103
104
105
106
};

} // end namespace Dumux

107
#endif