version 3.10.0
Loading...
Searching...
No Matches
viscousnoslip.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// SPDX-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12
13#ifndef DUMUX_MATERIAL_FLUIDMATRIX_FRICTIONLAW_VISCOUS_NOSLIP_HH
14#define DUMUX_MATERIAL_FLUIDMATRIX_FRICTIONLAW_VISCOUS_NOSLIP_HH
15
16#include <algorithm>
17#include <cmath>
18#include <dune/common/math.hh>
19
21
22namespace Dumux {
27
40
41template <typename VolumeVariables>
42class FrictionLawViscousNoSlip : public FrictionLaw<VolumeVariables>
43{
44 using Scalar = typename VolumeVariables::PrimaryVariables::value_type;
45public:
55 Dune::FieldVector<Scalar, 2> bottomShearStress(const VolumeVariables& volVars) const final
56 {
57 // assume a parabolic velocity profile with no-slip BC on the bottom
58 // and zero stress condition on the free surface
59 // note that the velocity corresponds to the height-averaged velocity
60 Dune::FieldVector<Scalar, 2> shearStress(0.0);
61 shearStress[0] = volVars.viscosity()*volVars.velocity(0) * 3.0 / volVars.waterDepth();
62 shearStress[1] = volVars.viscosity()*volVars.velocity(1) * 3.0 / volVars.waterDepth();
63 return shearStress;
64 }
65};
66
67} // end namespace Dumux
68
69#endif
Implementation of the abstract base class for friction laws.
Definition frictionlaw.hh:37
Implementation of a viscous no-slip bottom friction law.
Definition viscousnoslip.hh:43
Dune::FieldVector< Scalar, 2 > bottomShearStress(const VolumeVariables &volVars) const final
Compute the bottom shear stress.
Definition viscousnoslip.hh:55
Implementation of the abstract base class for friction laws.
Definition adapt.hh:17