Skip to content

Commit

Permalink
Merge branch 'main' into ap/p4est_mesh_ns
Browse files Browse the repository at this point in the history
  • Loading branch information
apey236 authored Aug 8, 2023
2 parents 6e66597 + ddf0892 commit 931630b
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/SpellCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
- name: Checkout Actions Repository
uses: actions/checkout@v3
- name: Check spelling
uses: crate-ci/[email protected].1
uses: crate-ci/[email protected].2
6 changes: 3 additions & 3 deletions docs/literate/src/files/DGSEM_FluxDiff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@
# \begin{align*}
# J \underline{\dot{u}}(t) &= - M^{-1} B (\underline{f}^* - \underline{f}) - 2D \underline{f}_{vol}(u^-, u^+)\\[5pt]
# &= - M^{-1} B (\underline{f}^* - \underline{f}_{vol}(\underline{u}, \underline{u})) - 2D \underline{f}_{vol}(u^-, u^+)\\[5pt]
# &= - M^{-1} B \underline{f}_{sur}^* - (2D - M^{-1} B) \underline{f}_{vol}\\[5pt]
# &= - M^{-1} B \underline{f}_{sur}^* - D_{split} \underline{f}_{vol}
# &= - M^{-1} B \underline{f}_{surface}^* - (2D - M^{-1} B) \underline{f}_{vol}\\[5pt]
# &= - M^{-1} B \underline{f}_{surface}^* - D_{split} \underline{f}_{vol}
# \end{align*}
# ```
# This formulation is in a weak form type formulation and can be implemented by using the derivative
# split matrix $D_{split}=(2D-M^{-1}B)$ and two different fluxes. We divide between the surface
# flux $f=f_{sur}$ used for the numerical flux $f_{sur}^*$ and the already mentioned volume
# flux $f=f_{surface}$ used for the numerical flux $f_{surface}^*$ and the already mentioned volume
# flux $f_{vol}$ especially for this formulation.


Expand Down
5 changes: 4 additions & 1 deletion examples/tree_2d_dgsem/elixir_navierstokes_convergence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ end
initial_condition = initial_condition_navier_stokes_convergence_test

# BC types
velocity_bc_top_bottom = NoSlip((x, t, equations) -> initial_condition_navier_stokes_convergence_test(x, t, equations)[2:3])
velocity_bc_top_bottom = NoSlip() do x, t, equations
u = initial_condition_navier_stokes_convergence_test(x, t, equations)
return SVector(u[2], u[3])
end
heat_bc_top_bottom = Adiabatic((x, t, equations) -> 0.0)
boundary_condition_top_bottom = BoundaryConditionNavierStokesWall(velocity_bc_top_bottom, heat_bc_top_bottom)

Expand Down
6 changes: 4 additions & 2 deletions examples/tree_2d_dgsem/elixir_navierstokes_shear_layer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ equations_parabolic = CompressibleNavierStokesDiffusion2D(equations, mu=mu(),
Prandtl=prandtl_number())

function initial_condition_shear_layer(x, t, equations::CompressibleEulerEquations2D)
# Shear layer parameters
k = 80
delta = 0.05
u0 = 1.0

Ms = 0.1 # maximum Mach number

rho = 1.0
v1 = x[2] <= 0.5 ? u0*tanh(k*(x[2]*0.5 - 0.25)) : tanh(k*(0.75 -x[2]*0.5))
v2 = u0*delta * sin(2*pi*(x[1]*0.5 + 0.25))
v1 = x[2] <= 0.5 ? u0 * tanh(k*(x[2]*0.5 - 0.25)) : u0 * tanh(k*(0.75 -x[2]*0.5))
v2 = u0 * delta * sin(2*pi*(x[1]*0.5 + 0.25))
p = (u0 / Ms)^2 * rho / equations.gamma # scaling to get Ms

return prim2cons(SVector(rho, v1, v2, p), equations)
Expand Down
5 changes: 4 additions & 1 deletion examples/tree_3d_dgsem/elixir_navierstokes_convergence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@ end
initial_condition = initial_condition_navier_stokes_convergence_test

# BC types
velocity_bc_top_bottom = NoSlip((x, t, equations) -> initial_condition_navier_stokes_convergence_test(x, t, equations)[2:4])
velocity_bc_top_bottom = NoSlip() do x, t, equations
u = initial_condition_navier_stokes_convergence_test(x, t, equations)
return SVector(u[2], u[3], u[4])
end
heat_bc_top_bottom = Adiabatic((x, t, equations) -> 0.0)
boundary_condition_top_bottom = BoundaryConditionNavierStokesWall(velocity_bc_top_bottom, heat_bc_top_bottom)

Expand Down
6 changes: 3 additions & 3 deletions src/solvers/dgsem_tree/containers_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -764,10 +764,10 @@ end

# Container data structure (structure-of-arrays style) for DG MPI interfaces
mutable struct MPIInterfaceContainer2D{uEltype <: Real} <: AbstractContainer
u::Array{uEltype, 4} # [leftright, variables, i, interfaces]
u::Array{uEltype, 4} # [leftright, variables, i, interfaces]
local_neighbor_ids::Vector{Int} # [interfaces]
orientations::Vector{Int} # [interfaces]
remote_sides::Vector{Int} # [interfaces]
orientations::Vector{Int} # [interfaces]
remote_sides::Vector{Int} # [interfaces]
# internal `resize!`able storage
_u::Vector{uEltype}
end
Expand Down
8 changes: 4 additions & 4 deletions src/solvers/dgsem_tree/containers_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -520,14 +520,14 @@ end
# Left and right are used *both* for the numbering of the mortar faces *and* for the position of the
# elements with respect to the axis orthogonal to the mortar.
mutable struct L2MortarContainer3D{uEltype <: Real} <: AbstractContainer
u_upper_left::Array{uEltype, 5} # [leftright, variables, i, j, mortars]
u_upper_left::Array{uEltype, 5} # [leftright, variables, i, j, mortars]
u_upper_right::Array{uEltype, 5} # [leftright, variables, i, j, mortars]
u_lower_left::Array{uEltype, 5} # [leftright, variables, i, j, mortars]
u_lower_left::Array{uEltype, 5} # [leftright, variables, i, j, mortars]
u_lower_right::Array{uEltype, 5} # [leftright, variables, i, j, mortars]
neighbor_ids::Array{Int, 2} # [position, mortars]
neighbor_ids::Array{Int, 2} # [position, mortars]
# Large sides: left -> 1, right -> 2
large_sides::Vector{Int} # [mortars]
orientations::Vector{Int} # [mortars]
orientations::Vector{Int} # [mortars]
# internal `resize!`able storage
_u_upper_left::Vector{uEltype}
_u_upper_right::Vector{uEltype}
Expand Down

0 comments on commit 931630b

Please sign in to comment.