trixi-framework / Trixi.jl

Trixi.jl: Adaptive high-order numerical simulations of conservation laws in Julia
https://trixi-framework.github.io/Trixi.jl
MIT License
536 stars 109 forks source link

Syntax on BC #2096

Open erny123 opened 3 weeks ago

erny123 commented 3 weeks ago

I'm looking into the NS convergence test: https://github.com/trixi-framework/Trixi.jl/blob/main/examples/dgmulti_2d/elixir_navierstokes_convergence.jl

For the Euler hyperbolic system ya'll implement the Slip-Wall BC.

However, I'm not understanding this syntax in line 189:

# define inviscid boundary conditions boundary_conditions_hyperbolic = (; :top_bottom => boundary_condition_slip_wall)

In lines 22-23 the top_bottom() function is defined along with the Dict().

If I want the BC to be a Slip-Wall but with a velocity using u_inner defined here:

https://trixi-framework.github.io/Trixi.jl/stable/reference-trixi/#Trixi.boundary_condition_slip_wall-Tuple{Any,%20AbstractVector,%20Any,%20Any,%20Any,%20CompressibleEulerEquations2D}

How would I go about doing that with the syntax given in this elixer example?

DanielDoehring commented 2 weeks ago

I am not sure if I understand your question correctly. Do you want a moving wall? The function you are referencing is indeed the BC invoked by the solver, with u_inner being internally assigned (i.e., from the fluid cell next to the wall).

ranocha commented 2 weeks ago

The code

https://github.com/trixi-framework/Trixi.jl/blob/fa43fb232b7a5d16125d638a2d356e6f27564cd4/examples/dgmulti_2d/elixir_navierstokes_convergence.jl#L188-L189

sets the boundary condition at the boundary named :top_bottom to boundary_condition_slip_wall. The boundary name :top_bottom is defined in

https://github.com/trixi-framework/Trixi.jl/blob/fa43fb232b7a5d16125d638a2d356e6f27564cd4/examples/dgmulti_2d/elixir_navierstokes_convergence.jl#L22-L26