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: Daniel Doehring <[email protected]>
  • Loading branch information
SimonCan and DanielDoehring authored Jan 31, 2024
1 parent a168e88 commit e0fd66e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/equations/polytropic_euler_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -330,14 +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 e0fd66e

Please sign in to comment.