24#ifndef DUMUX_FLUX_SHALLOW_WATER_FLUX_HH
25#define DUMUX_FLUX_SHALLOW_WATER_FLUX_HH
36template<
class NumEqVector>
54 template<
class Problem,
class FVElementGeometry,
class ElementVolumeVariables>
55 static NumEqVector
flux(
const Problem& problem,
56 const typename FVElementGeometry::GridGeometry::GridView::template Codim<0>::Entity& element,
57 const FVElementGeometry& fvGeometry,
58 const ElementVolumeVariables& elemVolVars,
59 const typename FVElementGeometry::SubControlVolumeFace& scvf)
63 const auto& insideVolVars = elemVolVars[scvf.insideScvIdx()];
64 const auto& outsideVolVars = elemVolVars[scvf.outsideScvIdx()];
65 const auto& nxy = scvf.unitOuterNormal();
66 const auto gravity = problem.spatialParams().gravity(scvf.center());
69 outsideVolVars.waterDepth(),
70 insideVolVars.velocity(0),
71 outsideVolVars.velocity(0),
72 insideVolVars.velocity(1),
73 outsideVolVars.velocity(1),
74 insideVolVars.bedSurface(),
75 outsideVolVars.bedSurface(),
79 NumEqVector localFlux(0.0);
80 localFlux[0] = riemannFlux[0] * scvf.area();
81 localFlux[1] = riemannFlux[1] * scvf.area();
82 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 shallow water model. The actual model use...
Definition: shallowwaterflux.hh:55
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 Riemann Problem and solve it.
Definition: riemannproblem.hh:67
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:63
Computes the shallow water flux by solving a riemann problem.
Definition: shallowwaterflux.hh:38