Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielDoehring committed Dec 28, 2024
1 parent 28b6e2f commit 438d9d2
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions examples/structured_2d_dgsem/elixir_euler_vortex_perk4.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,38 @@ The classical isentropic vortex test case as presented in Section 5.1 of
"""
function initial_condition_isentropic_vortex(x, t, equations::CompressibleEulerEquations2D)
# Evaluate error after full domain traversion
if t == T_end
if t == t_end
t = 0
end

# initial center of the vortex
# Initial center of the vortex
inicenter = SVector(0.0, 0.0)
# strength of the vortex
# Strength of the vortex
S = 13.5
# Radius of vortex
R = 1.5
# Free-stream Mach
M = 0.4
# base flow
# Base flow
v1 = 1.0
v2 = 1.0
vel = SVector(v1, v2)

center = inicenter + vel * t # advection of center
center = x - center # distance to centerpoint
center = inicenter + vel * t # Advection of center
center = x - center # Distance to centerpoint
center = SVector(center[2], -center[1])
r2 = center[1]^2 + center[2]^2

f = (1 - r2) / (2 * R^2)

rho = (1 - (S * M / pi)^2 * (gamma - 1) * exp(2 * f) / 8)^(1 / (gamma - 1))

du = S / (2 * π * R) * exp(f) # vel. perturbation
du = S / (2 * π * R) * exp(f) # Vel. perturbation
vel = vel + du * center
v1, v2 = vel

p = rho^gamma / (gamma * M^2)

prim = SVector(rho, v1, v2, p)
return prim2cons(prim, equations)
end
Expand All @@ -59,8 +60,8 @@ initial_condition = initial_condition_isentropic_vortex
edge_length = 20.0

N_passes = 1
T_end = edge_length * N_passes
tspan = (0.0, T_end)
t_end = edge_length * N_passes
tspan = (0.0, t_end)

coordinates_min = (-edge_length / 2, -edge_length / 2)
coordinates_max = (edge_length / 2, edge_length / 2)
Expand Down

0 comments on commit 438d9d2

Please sign in to comment.