version 3.11-dev
Loading...
Searching...
No Matches
Dumux::ShallowWater Namespace Reference

Classes

struct  RiemannSolution

Functions

template<class Scalar>
RiemannSolution< Scalar > exactRiemann (const Scalar dl, const Scalar dr, const Scalar ul, const Scalar ur, const Scalar vl, const Scalar vr, const Scalar grav, const Scalar s=0.0)
 Exact Riemann solver for the shallow water equations.
template<class Scalar>
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.
template<class Scalar, class GlobalPosition>
std::array< Scalar, 3 > riemannProblem (const Scalar waterDepthLeft, const Scalar waterDepthRight, Scalar velocityXLeft, Scalar velocityXRight, Scalar velocityYLeft, Scalar velocityYRight, const Scalar bedSurfaceLeft, const Scalar bedSurfaceRight, const Scalar gravity, const GlobalPosition &nxy)
 Construct a Riemann problem and solve it.
template<class Scalar, class GlobalPosition>
std::array< Scalar, 3 > wallBoundary (const Scalar waterDepthInside, const Scalar velocityXInside, const Scalar velocityYInside, const GlobalPosition &nxy)
 Compute the outer cell state for a slip wall.
template<class Scalar, class GlobalPosition>
std::array< Scalar, 3 > inflowBoundary (const Scalar waterDepthBoundary, const Scalar speedBoundary, const GlobalPosition &nxy)
 Compute the outer cell state for an inflow with prescribed depth and speed.
template<class Scalar, class GlobalPosition>
std::array< Scalar, 3 > criticalDepthOutflowBoundary (const Scalar waterDepthInside, const Scalar velocityXInside, const Scalar velocityYInside, const Scalar gravity, const GlobalPosition &nxy)
 Compute the outer cell state for a free overfall (open outflow).
template<class Scalar, class GlobalPosition>
std::array< Scalar, 3 > fixedWaterDepthBoundary (const Scalar waterDepthBoundary, const Scalar waterDepthInside, const Scalar velocityXInside, const Scalar velocityYInside, const Scalar gravity, const GlobalPosition &nxy)
 Compute the outer cell state for fixed water depth boundary.
template<class Scalar, class GlobalPosition>
std::array< Scalar, 3 > fixedDischargeBoundary (const Scalar dischargeBoundary, const Scalar waterDepthInside, const Scalar velocityXInside, const Scalar velocityYInside, const Scalar gravity, const GlobalPosition &nxy)
 Compute the outer cell state for a fixed discharge boundary.
template<class PrimaryVariables, class Scalar, class GlobalPosition>
std::array< Scalar, 3 > noslipWallBoundary (const Scalar alphaWall, const Scalar turbulentViscosity, const PrimaryVariables &state, const GlobalPosition &cellCenterToBoundaryFaceCenter, const GlobalPosition &unitNormal)
 Compute the viscosity/diffusive flux at a rough wall boundary using no-slip formulation.
template<class PrimaryVariables, class Scalar, class GlobalPosition>
std::array< Scalar, 3 > nikuradseWallBoundary (const Scalar ksWall, const PrimaryVariables &state, const GlobalPosition &cellCenterToBoundaryFaceCenter, const GlobalPosition &unitNormal)
 Compute the viscosity/diffusive flux at a rough wall boundary using Nikuradse formulation.

Function Documentation

◆ criticalDepthOutflowBoundary()

template<class Scalar, class GlobalPosition>
std::array< Scalar, 3 > Dumux::ShallowWater::criticalDepthOutflowBoundary ( const Scalar waterDepthInside,
const Scalar velocityXInside,
const Scalar velocityYInside,
const Scalar gravity,
const GlobalPosition & nxy )

The boundary characteristics travel with the normal velocity plus or minus the wave celerity. Supercritical outflow carries no characteristic back into the domain, so the outer state is the inner one. Subcritical outflow does carry one; reusing the inner state then imposes a zero gradient, which under-drains and piles water up in the boundary cell, whereas the brink of a free overfall sits at critical depth for the arriving normal discharge. The tangential velocity is kept. Water cannot flow up the brink, so a non-positive normal velocity gives the wall state.

Parameters
waterDepthInsideWater depth in the inner cell [m]
velocityXInsideVelocity in x-direction in the inner cell [m/s]
velocityYInsideVelocity in y-direction in the inner cell [m/s]
gravityGravity constant [m/s^2]
nxyNormal vector of the boundary face
Returns
cellStateOutside The outer cell state

◆ fixedDischargeBoundary()

template<class Scalar, class GlobalPosition>
std::array< Scalar, 3 > Dumux::ShallowWater::fixedDischargeBoundary ( const Scalar dischargeBoundary,
const Scalar waterDepthInside,
const Scalar velocityXInside,
const Scalar velocityYInside,
const Scalar gravity,
const GlobalPosition & nxy )
Parameters
dischargeBoundaryDischarge per meter at the boundary face [m^2/s]
waterDepthInsideWater depth in the inner cell [m]
velocityXInsideVelocity in x-direction in the inner cell [m/s]
velocityYInsideVelocity in y-direction in the inner cell [m/s]
gravityGravity constant [m/s^2]
nxyNormal vector of the boundary face
Returns
cellStateOutside The outer cell state

◆ fixedWaterDepthBoundary()

template<class Scalar, class GlobalPosition>
std::array< Scalar, 3 > Dumux::ShallowWater::fixedWaterDepthBoundary ( const Scalar waterDepthBoundary,
const Scalar waterDepthInside,
const Scalar velocityXInside,
const Scalar velocityYInside,
const Scalar gravity,
const GlobalPosition & nxy )
Parameters
waterDepthBoundaryWater depth at the boundary face [m^2/s]
waterDepthInsideWater depth in the inner cell [m]
velocityXInsideVelocity in x-direction in the inner cell [m/s]
velocityYInsideVelocity in y-direction in the inner cell [m/s]
gravityGravity constant [m/s^2]
nxyNormal vector of the boundary face
Returns
cellStateOutside The outer cell state

◆ inflowBoundary()

template<class Scalar, class GlobalPosition>
std::array< Scalar, 3 > Dumux::ShallowWater::inflowBoundary ( const Scalar waterDepthBoundary,
const Scalar speedBoundary,
const GlobalPosition & nxy )

Both characteristics enter the domain when the inflow is supercritical, so depth and velocity have to be imposed together. For subcritical inflow one of them is determined by the interior, see fixedDischargeBoundary and fixedWaterDepthBoundary.

Parameters
waterDepthBoundaryWater depth at the boundary face [m]
speedBoundarySpeed of the inflowing water, positive into the domain [m/s]
nxyNormal vector of the boundary face
Returns
cellStateOutside The outer cell state

◆ nikuradseWallBoundary()

template<class PrimaryVariables, class Scalar, class GlobalPosition>
std::array< Scalar, 3 > Dumux::ShallowWater::nikuradseWallBoundary ( const Scalar ksWall,
const PrimaryVariables & state,
const GlobalPosition & cellCenterToBoundaryFaceCenter,
const GlobalPosition & unitNormal )
Parameters
ksWallNikuradse roughness height for the wall [m]
statethe primary variable state (water depth, velocities)
cellCenterToBoundaryFaceCenterCell-center to boundary distance
unitNormalNormal vector of the boundary face

◆ noslipWallBoundary()

template<class PrimaryVariables, class Scalar, class GlobalPosition>
std::array< Scalar, 3 > Dumux::ShallowWater::noslipWallBoundary ( const Scalar alphaWall,
const Scalar turbulentViscosity,
const PrimaryVariables & state,
const GlobalPosition & cellCenterToBoundaryFaceCenter,
const GlobalPosition & unitNormal )
Parameters
alphaWallRoughness parameter: alphaWall=0.0 means full slip, alphaWall=1.0 means no slip, \(0.0<\text{alphaWall}<1.0\) means partial slip [-]
turbulentViscosityTurbulent viscosity [m^2/s]
statePrimary variables (water depth, velocities)
cellCenterToBoundaryFaceCenterCell-center to boundary distance
unitNormalNormal vector of the boundary face

◆ wallBoundary()

template<class Scalar, class GlobalPosition>
std::array< Scalar, 3 > Dumux::ShallowWater::wallBoundary ( const Scalar waterDepthInside,
const Scalar velocityXInside,
const Scalar velocityYInside,
const GlobalPosition & nxy )

The normal velocity is mirrored and the tangential velocity kept, so the Riemann problem across the face carries no mass flux and the hydrostatic pressure force.

Parameters
waterDepthInsideWater depth in the inner cell [m]
velocityXInsideVelocity in x-direction in the inner cell [m/s]
velocityYInsideVelocity in y-direction in the inner cell [m/s]
nxyNormal vector of the boundary face
Returns
cellStateOutside The outer cell state