Skip to content

Commit

Permalink
fix failing DGMultiMesh and Compressible Navier-Stokes convergence …
Browse files Browse the repository at this point in the history
…tests (#1728) (#1732)

* fix failing test

* more fixes

* formatting

* fix dropped part of source terms

* fix p4est parabolic

Co-authored-by: Jesse Chan <[email protected]>
  • Loading branch information
ranocha and jlchan authored Nov 11, 2023
1 parent cb8181f commit 6158ba4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions examples/p4est_2d_dgsem/elixir_navierstokes_convergence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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_ +
Expand Down
11 changes: 6 additions & 5 deletions examples/tree_2d_dgsem/elixir_navierstokes_convergence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion test/test_parabolic_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions test/test_special_elixirs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 6158ba4

Please sign in to comment.