@@ -14,13 +14,13 @@ Shallow water moment equations in one spatial dimensions. The equations are give
1414\b egin{cases}
1515\p artial_t h + \p artial_x hv = 0, \\
1616\p artial_t hv + \p artial_x (hv^2 + h\s um\l imits_{i=1}^N \f rac{\a lpha_i^2}{2i+1}) = -gh\p artial(h+b)_x,\\
17- \p artial_t h\a lpha_i + \p artial_x \l eft(2hv\a lpha_i + h\s um\l imits_{j,k=1}^N A_{ijk}\a lpha_j \a lpha_k \r ight) =
17+ \p artial_t h\a lpha_i + \p artial_x \l eft(2hv\a lpha_i + h\s um\l imits_{j,k=1}^N A_{ijk}\a lpha_j \a lpha_k \r ight) =
1818 v\p artial_x h\a lpha_i - h\s um\l imits_{j,k=1}^N B_{ijk} \a lpha_k \p artial_x h\a lpha_j,
1919\e nd{cases}
2020```
2121
2222The unknown quantities are the water and sediment height ``h``, the velocity ``v`` and the moments
23- ``\a lpha_i`` for ``i = 1, ..., n_moments``. The terms ``A_{ijk}`` and ``B_{ijk}`` are moment tensors that
23+ ``\a lpha_i`` for ``i = 1, ..., n_moments``. The terms ``A_{ijk}`` and ``B_{ijk}`` are moment tensors that
2424are precomputed using shifted Legendre polynomials and ``g`` is the gravitational acceleration.
2525
2626The conservative variable water height ``h`` is measured from the bottom topography ``b``, therefore
8585
8686# Allow for flexibility to set the gravitational acceleration and number of moments within an elixir
8787# depending on the application. Here `gravity=1.0` or `gravity=9.81` are common values for the
88- # gravitational acceleration. The reference total water height H0 defaults to 0.0 but is used for
88+ # gravitational acceleration. The reference total water height H0 defaults to 0.0 but is used for
8989# the "lake-at-rest" well-balancedness test cases.
9090function ShallowWaterMomentEquations1D (; gravity, H0 = zero (gravity), n_moments,
9191 nu = 0.1 , lambda = 0.1 , rho = 1000.0 ,
149149"""
150150 source_term_newtonian_slip_friction(u, x, t, equations::Union{ShallowWaterMomentEquations1D,
151151 ShallowWaterLinearizedMomentEquations1D})
152-
153- Bottom friction source term using a Newtonian slip friction model.
152+
153+ Bottom friction source term using a Newtonian slip friction model.
154154 The parameters slip length `lambda` and kinematic viscosity `nu` are set in the equation struct.
155155
156156 For details see the paper:
275275@inline function Trixi. flux (u,
276276 orientation:: Integer ,
277277 equations:: ShallowWaterMomentEquations1D )
278- # Extract conservative variables
278+ # Extract conservative variables
279279 h = waterheight (u, equations)
280280 hv = u[2 ]
281281 ha = moments (u, equations)
309309 equations::ShallowWaterMomentEquations1D)
310310
311311Total energy conservative split form, without the hydrostatic pressure.
312- When the bottom topography is nonzero this scheme will be well-balanced when used with the
312+ When the bottom topography is nonzero this scheme will be well-balanced when used with the
313313nonconservative flux [`flux_nonconservative_careaga_etal`](@ref).
314314
315315To obtain an entropy stable and well-balanced formulation the `surface_flux` can be set as
369369 equations::ShallowWaterMomentEquations1D)
370370
371371Non-symmetric path-conservative two-point flux discretizing the nonconservative term
372- that contains the gradients of the bottom topography, the nonconservative pressure formulation and
372+ that contains the gradients of the bottom topography, the nonconservative pressure formulation and
373373the moment tensor contributions.
374374When the bottom topography is nonzero this scheme will be well-balanced when used with [`flux_careaga_etal`](@ref).
375375
@@ -436,11 +436,11 @@ end
436436
437437# Provably entropy stable and well-balanced local Lax-Friedrichs dissipation for the SWME that avoids
438438# spurious dissipation in the bottom topography.
439- #
439+ #
440440# For details see the paper:
441441# - Julio Careaga, Patrick Ersing, Julian Koellermeier, Andrew R. Winters (2026)
442442# Entropy analysis and entropy stable DG methods for the shallow water moment equations
443- # [DOI: 10.48550/arXiv.2602.06513](https://doi.org/10.48550/arXiv.2602.06513)
443+ # [DOI: 10.48550/arXiv.2602.06513](https://doi.org/10.48550/arXiv.2602.06513)
444444@inline function (dissipation:: DissipationLaxFriedrichsEntropyVariables )(u_ll,
445445 u_rr,
446446 orientation_or_normal_direction,
464464 moments (u_rr, equations) / u_rr[1 ]))
465465 g = equations. gravity
466466
467- # Construct the H matrix from H = yy ' + Iz
467+ # Construct the H matrix from H = y y ' + I z
468468 y = SVector {nmoments(equations) + 2, real(equations)} (1 , v_avg, a_avg... )
469469 z = zero (MVector{nmoments (equations) + 2 , real (equations)})
470470 for i in 0 : nmoments (equations)
540540
541541# Convert primitive to conservative variables
542542@inline function Trixi. prim2cons (prim, equations:: ShallowWaterMomentEquations1D )
543- # To extract the total layer height and velocity we reuse the water height and momentum functions
543+ # To extract the total layer height and velocity we reuse the water height and momentum functions
544544 # from the conservative variables.
545545 H = waterheight (prim, equations)
546546 v = prim[2 ]
618618end
619619
620620# Calculate the error for the "lake-at-rest" test case where H = h + b should
621- # be a constant value over time.
621+ # be a constant value over time.
622622# Note, assumes there is a single reference water height `H0` with which to compare.
623623@inline function Trixi. lake_at_rest_error (u, equations:: ShallowWaterMomentEquations1D )
624624 h = waterheight (u, equations)
0 commit comments