From 7b86c799bd1a62a2df5e988a209623a5e684e998 Mon Sep 17 00:00:00 2001 From: Jesse Chan <1156048+jlchan@users.noreply.github.com> Date: Sat, 11 Nov 2023 09:57:19 -0600 Subject: [PATCH] fix failing `DGMultiMesh` and Compressible Navier-Stokes convergence tests (#1728) * fix failing test * more fixes * formatting * fix dropped part of source terms * fix p4est parabolic --- .../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 7aa14e25750..54ec09d2be8 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 57558224854..b0c8678baad 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 22a5a8b4e31..152ca52a6ca 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 4f42414ccbf..85671002ba6 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,