Skip to content

Commit

Permalink
Fixed equation renderung for documenter and removed max_abs_speed_nai…
Browse files Browse the repository at this point in the history
…ve for Cartesian solvers (not used)
  • Loading branch information
amrueda committed Sep 17, 2024
1 parent a6cd055 commit 111fa45
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions src/equations/shallow_water_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The equations are given by
\frac{\partial}{\partial t}(h v_2) + \frac{\partial}{\partial x}(h v_1 v_2)
+ \frac{\partial}{\partial y}\left(h v_2^2 + \frac{g}{2}h^2\right) + \frac{\partial}{\partial z}(h v_2 v_3) &= 0 \\
\frac{\partial}{\partial t}(h v_3) + \frac{\partial}{\partial x}(h v_1 v_3)
+ \frac{\partial}{\partial y}(h v_2 v_3) + \frac{\partial}{\partial z}\left(h v_3^2 + \frac{g}{2}h^2) &= 0.
+ \frac{\partial}{\partial y}(h v_2 v_3) + \frac{\partial}{\partial z}\left(h v_3^2 + \frac{g}{2}h^2\right) &= 0.
\end{aligned}
```
The unknown quantities of the SWE are the water height ``h`` and the velocities ``\mathbf{v} = (v_1, v_2, v_3)^T``.
Expand Down Expand Up @@ -201,31 +201,6 @@ Details are available in Eq. (4.1) in the paper:
return SVector(f1, f2, f3, f4, zero(eltype(u_ll)))
end

# Calculate maximum wave speed for local Lax-Friedrichs-type dissipation as the
# maximum velocity magnitude plus the maximum speed of sound
@inline function Trixi.max_abs_speed_naive(u_ll, u_rr, orientation::Integer,
equations::ShallowWaterEquations3D)
# Get the velocity quantities in the appropriate direction
if orientation == 1
v_ll, _, _ = velocity(u_ll, equations)
v_rr, _, _ = velocity(u_rr, equations)
elseif orientation == 2
_, v_ll, _ = velocity(u_ll, equations)
_, v_rr, _ = velocity(u_rr, equations)
else #if orientation == 3
_, _, v_ll = velocity(u_ll, equations)
_, _, v_rr = velocity(u_rr, equations)
end

# Calculate the wave celerity on the left and right
h_ll = waterheight(u_ll, equations)
h_rr = waterheight(u_rr, equations)
c_ll = sqrt(equations.gravity * h_ll)
c_rr = sqrt(equations.gravity * h_rr)

return max(abs(v_ll), abs(v_rr)) + max(c_ll, c_rr)
end

@inline function Trixi.max_abs_speed_naive(u_ll, u_rr, normal_direction::AbstractVector,
equations::ShallowWaterEquations3D)
# Extract and compute the velocities in the normal direction
Expand Down

0 comments on commit 111fa45

Please sign in to comment.