25#ifndef DUMUX_FLUX_SHALLOW_WATER_RIEMANN_PROBLEM_HH
26#define DUMUX_FLUX_SHALLOW_WATER_RIEMANN_PROBLEM_HH
33namespace ShallowWater {
70template<
class Scalar,
class GlobalPosition>
72 const Scalar waterDepthRight,
74 Scalar velocityXRight,
76 Scalar velocityYRight,
77 const Scalar bedSurfaceLeft,
78 const Scalar bedSurfaceRight,
80 const GlobalPosition& nxy)
85 const Scalar dzl = max(0.0, bedSurfaceRight - bedSurfaceLeft);
86 const Scalar waterDepthLeftReconstructed = max(0.0, waterDepthLeft - dzl);
87 const Scalar dzr = max(0.0, bedSurfaceLeft - bedSurfaceRight);
88 const Scalar waterDepthRightReconstructed = max(0.0, waterDepthRight - dzr);
91 Scalar tempFlux = velocityXLeft;
92 velocityXLeft = nxy[0] * tempFlux + nxy[1] * velocityYLeft;
93 velocityYLeft = -nxy[1] * tempFlux + nxy[0] * velocityYLeft;
95 tempFlux = velocityXRight;
96 velocityXRight = nxy[0] * tempFlux + nxy[1] * velocityYRight;
97 velocityYRight = -nxy[1] * tempFlux + nxy[0] * velocityYRight;
100 waterDepthRightReconstructed,
108 tempFlux = riemannResult.flux[1];
109 riemannResult.flux[1] = nxy[0] * tempFlux - nxy[1] * riemannResult.flux[2];
110 riemannResult.flux[2] = nxy[1] * tempFlux + nxy[0] * riemannResult.flux[2];
113 const Scalar hgzl = 0.5 * (waterDepthLeftReconstructed + waterDepthLeft) * (waterDepthLeftReconstructed - waterDepthLeft);
114 const Scalar hdxzl = gravity * nxy[0] * hgzl;
115 const Scalar hdyzl = gravity * nxy[1] * hgzl;
126 static const Scalar upperWaterDepthFluxLimiting = getParam<Scalar>(
"FluxLimiterLET.UpperWaterDepth", 1e-3);
127 static const Scalar lowerWaterDepthFluxLimiting = getParam<Scalar>(
"FluxLimiterLET.LowerWaterDepth", 1e-5);
128 static const bool upwindWaterDepthFluxLimiting = getParam<bool>(
"FluxLimiterLET.UpwindFluxLimiting",
false);
130 Scalar limitingDepth = (waterDepthLeftReconstructed + waterDepthRightReconstructed) * 0.5;
133 if (upwindWaterDepthFluxLimiting)
135 if (riemannResult.flux[0] < 0)
137 limitingDepth = waterDepthRightReconstructed;
140 limitingDepth = waterDepthLeftReconstructed;
146 upperWaterDepthFluxLimiting,
147 lowerWaterDepthFluxLimiting);
148 std::array<Scalar, 3> localFlux;
149 localFlux[0] = riemannResult.flux[0] *
mobility;
150 localFlux[1] = (riemannResult.flux[1] - hdxzl);
151 localFlux[2] = (riemannResult.flux[2] - hdyzl);
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
Function to limit the fluxes.
Function to compute the Riemann flux at the interface.
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.
Definition: exactriemann.hh:66
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.
Definition: fluxlimiterlet.hh:52
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
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
std::string mobility(int phaseIdx) noexcept
I/O name of mobility for multiphase systems.
Definition: name.hh:101