Skip to content
Open
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5d00548
Added n::AbstractVector version of max_abs_speed_naive for Compressib…
SimonCan Oct 16, 2025
913558e
Renamed normal vector to be more consistent with the rest of the code.
SimonCan Oct 17, 2025
e7391f2
Merge branch 'main' into sc/multi-euler-with-AbstractVector
SimonCan Oct 17, 2025
0695cdb
Added test for this PR.
SimonCan Oct 20, 2025
b4afe48
Added elixir for 2d multicomponent Euler using p4est meshes.
SimonCan Oct 20, 2025
b993bab
Update examples/p4est_2d_dgsem/elixir_eulermulti_convergence_ec.jl
SimonCan Oct 20, 2025
36e35d3
Merge branch 'main' into sc/multi-euler-with-AbstractVector
SimonCan Oct 21, 2025
60d7a8c
Changed the surface flux to flux_lax_friedrichs.
SimonCan Oct 22, 2025
c3c91a4
Merge branch 'main' into sc/multi-euler-with-AbstractVector
SimonCan Oct 23, 2025
7da3ce3
Merge branch 'main' into sc/multi-euler-with-AbstractVector
SimonCan Oct 23, 2025
a76b0e9
Replaced example elixir with shock.
SimonCan Oct 23, 2025
730956a
Replaced test for p4est euler multi.
SimonCan Oct 23, 2025
e606496
Update src/equations/compressible_euler_multicomponent_2d.jl
DanielDoehring Oct 25, 2025
8e22d6b
Apply suggestions from code review
DanielDoehring Oct 25, 2025
1793743
Update src/equations/compressible_euler_multicomponent_2d.jl
DanielDoehring Oct 25, 2025
9b5a2e0
Apply suggestions from code review
DanielDoehring Oct 25, 2025
756b340
Update src/equations/compressible_euler_multicomponent_2d.jl
DanielDoehring Oct 25, 2025
86193b6
Update examples/p4est_2d_dgsem/elixir_eulermulti_shock.jl
SimonCan Oct 27, 2025
932b393
Update examples/p4est_2d_dgsem/elixir_eulermulti_shock.jl
SimonCan Oct 27, 2025
73973ec
Update examples/p4est_2d_dgsem/elixir_eulermulti_shock.jl
SimonCan Oct 27, 2025
64715ff
Update examples/p4est_2d_dgsem/elixir_eulermulti_shock.jl
SimonCan Oct 27, 2025
f2316cf
Update examples/p4est_2d_dgsem/elixir_eulermulti_shock.jl
SimonCan Oct 27, 2025
5a04141
Update examples/p4est_2d_dgsem/elixir_eulermulti_shock.jl
SimonCan Oct 27, 2025
08ed1ae
Update examples/p4est_2d_dgsem/elixir_eulermulti_shock.jl
SimonCan Oct 27, 2025
f38d70d
Update examples/p4est_2d_dgsem/elixir_eulermulti_shock.jl
SimonCan Oct 27, 2025
2e70745
Merge branch 'main' into sc/multi-euler-with-AbstractVector
SimonCan Oct 27, 2025
1a1d7bc
More explicit types to avoid tpye instabilities.
SimonCan Oct 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions src/equations/compressible_euler_multicomponent_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,41 @@ end
return max(abs(v_ll), abs(v_rr)) + max(c_ll, c_rr)
end

# Calculate maximum wave speed for local Lax-Friedrichs-type dissipation
@inline function max_abs_speed_naive(u_ll, u_rr, n::AbstractVector,
equations::CompressibleEulerMulticomponentEquations2D)
# Unpack conservative variables
rho_v1_ll, rho_v2_ll, rho_e_ll = u_ll
rho_v1_rr, rho_v2_rr, rho_e_rr = u_rr

# Get densities and gammas
rho_ll = density(u_ll, equations)
rho_rr = density(u_rr, equations)
gamma_ll = totalgamma(u_ll, equations)
gamma_rr = totalgamma(u_rr, equations)

# Normalize the direction vector
n = n / norm(n)

# Velocity components
v_ll_vec = SVector(rho_v1_ll, rho_v2_ll) / rho_ll
v_rr_vec = SVector(rho_v1_rr, rho_v2_rr) / rho_rr

# Project velocities onto the direction n.
v_ll = dot(v_ll_vec, n)
v_rr = dot(v_rr_vec, n)

# Compute pressures
p_ll = (gamma_ll - 1) * (rho_e_ll - 0.5f0 * dot(v_ll_vec, v_ll_vec) * rho_ll)
p_rr = (gamma_rr - 1) * (rho_e_rr - 0.5f0 * dot(v_rr_vec, v_rr_vec) * rho_rr)

# Sound speeds
c_ll = sqrt(gamma_ll * p_ll / rho_ll)
c_rr = sqrt(gamma_rr * p_rr / rho_rr)

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

# Less "cautious", i.e., less overestimating `λ_max` compared to `max_abs_speed_naive`
@inline function max_abs_speed(u_ll, u_rr, orientation::Integer,
equations::CompressibleEulerMulticomponentEquations2D)
Expand Down
Loading