Skip to content

Commit

Permalink
Update src/equations/polytropic_euler_2d.jl
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Winters <[email protected]>
  • Loading branch information
SimonCan and andrewwinters5000 authored Feb 15, 2024
1 parent cf3320d commit 4f5cc57
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/equations/polytropic_euler_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,12 @@ end

# Calculate normal velocities and sound speed (we have p = kappa * rho^gamma)
# left
v_ll = v1_ll * normal_direction[1] +
v2_ll * normal_direction[2]
v_ll = (v1_ll * normal_direction[1] +
v2_ll * normal_direction[2])
c_ll = sqrt(equations.gamma * equations.kappa * rho_ll^(equations.gamma - 1))
# right
v_rr = v1_rr * normal_direction[1] +
v2_rr * normal_direction[2]
v_rr = (v1_rr * normal_direction[1] +
v2_rr * normal_direction[2])
c_rr = sqrt(equations.gamma * equations.kappa * rho_rr^(equations.gamma - 1))

return max(abs(v_ll), abs(v_rr)) + max(c_ll, c_rr) * norm(normal_direction)
Expand Down

0 comments on commit 4f5cc57

Please sign in to comment.