version 3.8
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-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
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
20
21namespace Dumux {
22
34template <typename VolumeVariables>
35class FrictionLawViscousNoSlip : public FrictionLaw<VolumeVariables>
36{
37 using Scalar = typename VolumeVariables::PrimaryVariables::value_type;
38public:
48 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 Dune::FieldVector<Scalar, 2> shearStress(0.0);
54 shearStress[0] = volVars.viscosity()*volVars.velocity(0) * 3.0 / volVars.waterDepth();
55 shearStress[1] = volVars.viscosity()*volVars.velocity(1) * 3.0 / volVars.waterDepth();
56 return shearStress;
57 }
58};
59
60} // end namespace Dumux
61
62#endif
Implementation of the abstract base class for friction laws.
Definition: frictionlaw.hh:31
Implementation of a viscous no-slip bottom friction law.
Definition: viscousnoslip.hh:36
Dune::FieldVector< Scalar, 2 > bottomShearStress(const VolumeVariables &volVars) const final
Compute the bottom shear stress.
Definition: viscousnoslip.hh:48
Definition: adapt.hh:17