Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify default wavespeed estimate for flux_lax_friedrichs and StepsizeCallback #2273

Open
Tracked by #2265
DanielDoehring opened this issue Feb 9, 2025 · 0 comments
Labels
breaking consistency Make Michael happy

Comments

@DanielDoehring
Copy link
Contributor

As mentioned in #2233 , we are currently not consistent how the default wave speed of the (by far most commonly used) numerical flux flux_lax_friedrichs

function FluxLaxFriedrichs(max_abs_speed = max_abs_speed_naive)
FluxPlusDissipation(flux_central, DissipationLocalLaxFriedrichs(max_abs_speed))
end
function Base.show(io::IO, f::FluxLaxFriedrichs)
print(io, "FluxLaxFriedrichs(", f.dissipation.max_abs_speed, ")")
end
"""
flux_lax_friedrichs
See [`FluxLaxFriedrichs`](@ref).
"""
const flux_lax_friedrichs = FluxLaxFriedrichs()

is computed

λ_max = max(abs(v_ll), abs(v_rr)) + max(c_ll, c_rr)

compared to the way employed in the StepsizeCallback:

lambda1, lambda2 = max_abs_speeds(u_node, equations)

which uses the actual (sharp) true eigenvalues of the flux Jacobian:

@inline function max_abs_speeds(u, equations::CompressibleEulerEquations2D)
rho, v1, v2, p = cons2prim(u, equations)
c = sqrt(equations.gamma * p / rho)
return abs(v1) + c, abs(v2) + c
end

@DanielDoehring DanielDoehring added breaking consistency Make Michael happy labels Feb 9, 2025
@DanielDoehring DanielDoehring mentioned this issue Feb 9, 2025
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking consistency Make Michael happy
Projects
None yet
Development

No branches or pull requests

1 participant