diff --git a/examples/p4est_2d_dgsem/elixir_euler_NACA0012airfoil_mach08.jl b/examples/p4est_2d_dgsem/elixir_euler_NACA0012airfoil_mach085.jl similarity index 95% rename from examples/p4est_2d_dgsem/elixir_euler_NACA0012airfoil_mach08.jl rename to examples/p4est_2d_dgsem/elixir_euler_NACA0012airfoil_mach085.jl index accd79d1187..b7568296602 100644 --- a/examples/p4est_2d_dgsem/elixir_euler_NACA0012airfoil_mach08.jl +++ b/examples/p4est_2d_dgsem/elixir_euler_NACA0012airfoil_mach085.jl @@ -18,9 +18,6 @@ U_inf(equations) = mach_inf() * c_inf(equations) @inline function initial_condition_mach085_flow(x, t, equations::CompressibleEulerEquations2D) - # set the freestream flow parameters - gasGam = equations.gamma - v1 = U_inf(equations) * cos(aoa()) v2 = U_inf(equations) * sin(aoa()) @@ -46,15 +43,12 @@ volume_integral = VolumeIntegralShockCapturingHG(shock_indicator; solver = DGSEM(polydeg = polydeg, surface_flux = surface_flux, volume_integral = volume_integral) -#= -mesh_file = Trixi.download("", +mesh_file = Trixi.download("https://gist.githubusercontent.com/Arpit-Babbar/339662b4b46164a016e35c81c66383bb/raw/8bf94f5b426ba907ace87405cfcc1dcc2ef7cbda/NACA0012.inp", joinpath(@__DIR__, "NACA0012.inp")) -=# -mesh_file = "NACA0012.inp" mesh = P4estMesh{2}(mesh_file) -# The boundary of the outer cylinder is constant but subsonic, so we cannot compute the +# The outer boundary is constant but subsonic, so we cannot compute the # boundary flux for the external information alone. Thus, we use the numerical flux to distinguish # between inflow and outflow characteristics @inline function boundary_condition_subsonic_constant(u_inner, diff --git a/examples/p4est_2d_dgsem/elixir_navierstokes_NACA0012airfoil_mach08.jl b/examples/p4est_2d_dgsem/elixir_navierstokes_NACA0012airfoil_mach08.jl index 178effb2db4..c15133de4e0 100644 --- a/examples/p4est_2d_dgsem/elixir_navierstokes_NACA0012airfoil_mach08.jl +++ b/examples/p4est_2d_dgsem/elixir_navierstokes_NACA0012airfoil_mach08.jl @@ -44,11 +44,8 @@ polydeg = 3 basis = LobattoLegendreBasis(polydeg) solver = DGSEM(polydeg = polydeg, surface_flux = surface_flux) -#= -mesh_file = Trixi.download("", +mesh_file = Trixi.download("https://gist.githubusercontent.com/Arpit-Babbar/339662b4b46164a016e35c81c66383bb/raw/8bf94f5b426ba907ace87405cfcc1dcc2ef7cbda/NACA0012.inp", joinpath(@__DIR__, "NACA0012.inp")) -=# -mesh_file = "NACA0012.inp" mesh = P4estMesh{2}(mesh_file, initial_refinement_level = 1) diff --git a/test/test_p4est_2d.jl b/test/test_p4est_2d.jl index 6bdffc276cd..576120f4d3e 100644 --- a/test/test_p4est_2d.jl +++ b/test/test_p4est_2d.jl @@ -499,6 +499,19 @@ end @test isapprox(lift, -6.501138753497174e-15, atol = 1e-13) @test isapprox(drag, 2.588589856781827, atol = 1e-13) end + +@trixi_testset "elixir_euler_NACA0012airfoil_mach085.jl" begin + @test_trixi_include(joinpath(EXAMPLES_DIR, + "elixir_euler_NACA0012airfoil_mach085.jl"), + l2=[6.054106141023162e-7, + 7.4947583731596855e-6, + 1.1682455936043817e-5, + 0.0007173721760332341], + linf=[0.002472349864955632, + 0.043496823453937614, + 0.043648671347888836, + 3.046213202855595], tspan=(0.0, 0.0001)) +end end # Clean up afterwards: delete Trixi.jl output directory diff --git a/test/test_parabolic_2d.jl b/test/test_parabolic_2d.jl index 6d104026049..af89becce59 100644 --- a/test/test_parabolic_2d.jl +++ b/test/test_parabolic_2d.jl @@ -633,6 +633,20 @@ end @test (@allocated Trixi.rhs!(du_ode, u_ode, semi, t)) < 1000 end end + +@trixi_testset "elixir_navierstokes_NACA0012airfoil_mach08.jl" begin + @test_trixi_include(joinpath(EXAMPLES_DIR, + "elixir_navierstokes_NACA0012airfoil_mach08.jl"), + l2=[0.00018648657393597384, + 0.0005076712152849281, + 0.00038074587715240566, + 0.0021281773710793315], + linf=[0.5153387749819276, + 1.1993620992082363, + 0.9077214408394708, + 5.666071686983816], tspan=(0.0, 0.001), + initial_refinement_level=0) +end end # Clean up afterwards: delete Trixi.jl output directory