Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax on BC #2096

Open
erny123 opened this issue Oct 4, 2024 · 2 comments
Open

Syntax on BC #2096

erny123 opened this issue Oct 4, 2024 · 2 comments

Comments

@erny123
Copy link

erny123 commented Oct 4, 2024

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
Copy link
Contributor

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
Copy link
Member

ranocha commented Oct 6, 2024

The code

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

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

top_bottom(x, tol = 50 * eps()) = abs(abs(x[2]) - 1) < tol
is_on_boundary = Dict(:top_bottom => top_bottom)
cells_per_dimension = (16, 16)
mesh = DGMultiMesh(dg, cells_per_dimension; periodicity = (true, false), is_on_boundary)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants