24#ifndef DUMUX_FLUX_SHALLOW_WATER_FLUX_HH
25#define DUMUX_FLUX_SHALLOW_WATER_FLUX_HH
36template<
class NumEqVector>
59 template<
class Problem,
class FVElementGeometry,
class ElementVolumeVariables>
61 const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
62 const FVElementGeometry& fvGeometry,
63 const ElementVolumeVariables& elemVolVars,
64 const typename FVElementGeometry::SubControlVolumeFace& scvf)
68 const auto& insideVolVars = elemVolVars[scvf.insideScvIdx()];
69 const auto& outsideVolVars = elemVolVars[scvf.outsideScvIdx()];
70 const auto& nxy = scvf.unitOuterNormal();
71 const auto gravity = problem.spatialParams().gravity(scvf.center());
74 outsideVolVars.waterDepth(),
75 insideVolVars.velocity(0),
76 outsideVolVars.velocity(0),
77 insideVolVars.velocity(1),
78 outsideVolVars.velocity(1),
79 insideVolVars.bedSurface(),
80 outsideVolVars.bedSurface(),
85 localFlux[0] = riemannFlux[0] * scvf.area();
86 localFlux[1] = riemannFlux[1] * scvf.area();
87 localFlux[2] = riemannFlux[2] * scvf.area();
This file includes a function to construct the Riemann problem.
Classes related to flux variables caching.
static NumEqVector flux(const Problem &problem, const typename FVElementGeometry::GridGeometry::GridView::template Codim< 0 >::Entity &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const typename FVElementGeometry::SubControlVolumeFace &scvf)
Prepares the Riemann problem for the advective flux for the 2D shallow water model....
Definition: shallowwaterflux.hh:60
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.
Definition: riemannproblem.hh:71
typename NumEqVectorTraits< PrimaryVariables >::type NumEqVector
A vector with the same size as numbers of equations This is the default implementation and has to be ...
Definition: numeqvector.hh:46
The empty filler class corresponding to EmptyCache.
Definition: fluxvariablescaching.hh:32
Empty caches to use in a constitutive flux law/process, e.g. Darcy's law.
Definition: fluxvariablescaching.hh:66
Computes the shallow water flux by solving a riemann problem.
Definition: shallowwaterflux.hh:38