Line | Branch | Exec | Source |
---|---|---|---|
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 | // SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder | ||
5 | // SPDX-License-Identifier: GPL-3.0-or-later | ||
6 | // | ||
7 | /*! | ||
8 | * \file | ||
9 | * \ingroup Fluidmatrixinteractions | ||
10 | * \copydoc Dumux::FrictionLawViscousNoSlip | ||
11 | */ | ||
12 | #ifndef DUMUX_MATERIAL_FLUIDMATRIX_FRICTIONLAW_VISCOUS_NOSLIP_HH | ||
13 | #define DUMUX_MATERIAL_FLUIDMATRIX_FRICTIONLAW_VISCOUS_NOSLIP_HH | ||
14 | |||
15 | #include <algorithm> | ||
16 | #include <cmath> | ||
17 | #include <dune/common/math.hh> | ||
18 | |||
19 | #include <dumux/material/fluidmatrixinteractions/frictionlaws/frictionlaw.hh> | ||
20 | |||
21 | namespace Dumux { | ||
22 | |||
23 | /*! | ||
24 | * \ingroup Fluidmatrixinteractions | ||
25 | * \brief Implementation of a viscous no-slip bottom friction law | ||
26 | * | ||
27 | * This assumes thin film flow with a parabolic velocity profile in depth | ||
28 | * (for the depth-averaged shallow water equations). The velocity profile | ||
29 | * and associated bottom shear stress can be derived from plane Poiseuille flow | ||
30 | * with a free surface boundary condition on top and a no-slip boundary condition | ||
31 | * on the bottom. | ||
32 | */ | ||
33 | |||
34 | template <typename VolumeVariables> | ||
35 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
|
1 | class FrictionLawViscousNoSlip : public FrictionLaw<VolumeVariables> |
36 | { | ||
37 | using Scalar = typename VolumeVariables::PrimaryVariables::value_type; | ||
38 | public: | ||
39 | /*! | ||
40 | * \brief Compute the bottom shear stress. | ||
41 | * | ||
42 | * Compute the bottom shear stress due to bottom friction. | ||
43 | * The bottom shear stress is a projection of the shear stress tensor onto the bottom plane. | ||
44 | * It can therefore be represented by a (tangent) vector with two entries. | ||
45 | * | ||
46 | * \return shear stress in N/m^2. First entry is the x-component, the second the y-component. | ||
47 | */ | ||
48 | 320 | Dune::FieldVector<Scalar, 2> bottomShearStress(const VolumeVariables& volVars) const final | |
49 | { | ||
50 | // assume a parabolic velocity profile with no-slip BC on the bottom | ||
51 | // and zero stress condition on the free surface | ||
52 | // note that the velocity corresponds to the height-averaged velocity | ||
53 | 320 | Dune::FieldVector<Scalar, 2> shearStress(0.0); | |
54 | 1600 | shearStress[0] = volVars.viscosity()*volVars.velocity(0) * 3.0 / volVars.waterDepth(); | |
55 | 1600 | shearStress[1] = volVars.viscosity()*volVars.velocity(1) * 3.0 / volVars.waterDepth(); | |
56 | 320 | return shearStress; | |
57 | } | ||
58 | }; | ||
59 | |||
60 | } // end namespace Dumux | ||
61 | |||
62 | #endif | ||
63 |