From 6158ba4cc319d7715d1b9419043c7ba55f15c473 Mon Sep 17 00:00:00 2001 From: Hendrik Ranocha Date: Sat, 11 Nov 2023 19:15:16 +0100 Subject: [PATCH] fix failing `DGMultiMesh` and Compressible Navier-Stokes convergence tests (#1728) (#1732) * fix failing test * more fixes * formatting * fix dropped part of source terms * fix p4est parabolic Co-authored-by: Jesse Chan <1156048+jlchan@users.noreply.github.com> --- .../p4est_2d_dgsem/elixir_navierstokes_convergence.jl | 1 + .../tree_2d_dgsem/elixir_navierstokes_convergence.jl | 11 ++++++----- test/test_parabolic_2d.jl | 3 ++- test/test_special_elixirs.jl | 6 ++++-- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/examples/p4est_2d_dgsem/elixir_navierstokes_convergence.jl b/examples/p4est_2d_dgsem/elixir_navierstokes_convergence.jl index 7aa14e2575..54ec09d2be 100644 --- a/examples/p4est_2d_dgsem/elixir_navierstokes_convergence.jl +++ b/examples/p4est_2d_dgsem/elixir_navierstokes_convergence.jl @@ -161,6 +161,7 @@ end v1_yy * v1 * mu_ - v2_xy * v1 * mu_ - v1_y * v1_y * mu_ - + v2_x * v1_y * mu_ - 4.0 / 3.0 * v2_yy * v2 * mu_ + 2.0 / 3.0 * v1_xy * v2 * mu_ - 4.0 / 3.0 * v2_y * v2_y * mu_ + diff --git a/examples/tree_2d_dgsem/elixir_navierstokes_convergence.jl b/examples/tree_2d_dgsem/elixir_navierstokes_convergence.jl index 5755822485..b0c8678baa 100644 --- a/examples/tree_2d_dgsem/elixir_navierstokes_convergence.jl +++ b/examples/tree_2d_dgsem/elixir_navierstokes_convergence.jl @@ -160,15 +160,16 @@ end # stress tensor and temperature gradient terms from y-direction v1_yy * v1 * mu_ - v2_xy * v1 * mu_ - + v1_y * v1_y * mu_ - v2_x * v1_y * mu_ - 4.0 / 3.0 * v2_yy * v2 * mu_ + - 2.0 / 3.0 * v1_xy - + 2.0 / 3.0 * v1_xy * v2 * mu_ - 4.0 / 3.0 * v2_y * v2_y * mu_ + - 2.0 / 3.0 * v1_x * v2_y * mu_ - - - - + 2.0 / 3.0 * v1_x * v2_y * mu_ - + T_const * inv_rho_cubed * (p_yy * rho * rho - - 2.0 * p_y * rho * rho_y + - - + 2.0 * p_y * rho * rho_y + + 2.0 * p * rho_y * rho_y - p * rho * rho_yy) * mu_) return SVector(du1, du2, du3, du4) diff --git a/test/test_parabolic_2d.jl b/test/test_parabolic_2d.jl index 22a5a8b4e3..152ca52a6c 100644 --- a/test/test_parabolic_2d.jl +++ b/test/test_parabolic_2d.jl @@ -16,7 +16,8 @@ isdir(outdir) && rm(outdir, recursive = true) dg = DGMulti(polydeg = 2, element_type = Quad(), approximation_type = Polynomial(), surface_integral = SurfaceIntegralWeakForm(flux_central), volume_integral = VolumeIntegralWeakForm()) - mesh = DGMultiMesh(dg, cells_per_dimension = (2, 2)) + cells_per_dimension = (2, 2) + mesh = DGMultiMesh(dg, cells_per_dimension) # test with polynomial initial condition x^2 * y # test if we recover the exact second derivative diff --git a/test/test_special_elixirs.jl b/test/test_special_elixirs.jl index 4f42414ccb..85671002ba 100644 --- a/test/test_special_elixirs.jl +++ b/test/test_special_elixirs.jl @@ -203,7 +203,8 @@ end volume_integral = VolumeIntegralWeakForm()) # DGMultiMesh is on [-1, 1]^ndims by default - mesh = DGMultiMesh(solver, cells_per_dimension = (2, 2), + cells_per_dimension = (2, 2) + mesh = DGMultiMesh(solver, cells_per_dimension, periodicity = (true, true)) semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, @@ -225,7 +226,8 @@ end volume_integral = VolumeIntegralFluxDifferencing(flux_central)) # DGMultiMesh is on [-1, 1]^ndims by default - mesh = DGMultiMesh(solver, cells_per_dimension = (2, 2), + cells_per_dimension = (2, 2) + mesh = DGMultiMesh(solver, cells_per_dimension, periodicity = (true, true)) semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition,