From ca83847aa8e4aa1b663d1291d9521ee4ed4e62d0 Mon Sep 17 00:00:00 2001 From: Albert de Montserrat Date: Wed, 3 Jul 2024 15:42:31 +0200 Subject: [PATCH] docs --- docs/make.jl | 1 + docs/src/man/boundary_conditions.md | 36 +++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 docs/src/man/boundary_conditions.md diff --git a/docs/make.jl b/docs/make.jl index e34f462f..0824923f 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -16,6 +16,7 @@ makedocs(; "Installation" => "man/installation.md", "Backend" => "man/backend.md", "Equations" => "man/equations.md", + "Boundary conditions" => "man/boundary_conditions.md", "Advection" => "man/advection.md", ], "Examples" => Any[ diff --git a/docs/src/man/boundary_conditions.md b/docs/src/man/boundary_conditions.md new file mode 100644 index 00000000..98665708 --- /dev/null +++ b/docs/src/man/boundary_conditions.md @@ -0,0 +1,36 @@ +# Flow boundary conditions + +Supported boundary conditions: + +1. Free slip + + $\frac{\partial u_i}{\partial x_i} = 0$ at the boundary $\Gamma$ + +2. No slip + + $u_i = 0$ at the boundary $\Gamma$ + +3. Free surface + + $\sigma_z = 0 \rightarrow \tau_z = P$ at the top boundary + +## Defining the boundary contions +Information regarding flow boundary conditions is defined in the `FlowBoundaryConditions` object. They can be switched on and off by setting them as `true` or `false` at the appropriate boundaries. Valid boundary names are `left` and `right`, `top` and `bot`, and for the 3D case, `front` and `back`. + +For example, if we want to have free free-slip in every single boundary in a 2D simulation, we need to instantiate `FlowBoundaryConditions` as: +```julia +bcs = FlowBoundaryConditions(; + no_slip = (left=false, right=false, top=false, bot=false), + free_slip = (left=true, right=true, top=true, bot=true), + free_surface = false +) +``` + +The equivalent for the 3D case would be: +```julia +bcs = FlowBoundaryConditions(; + no_slip = (left=false, right=false, top=false, bot=false, front=false, back=false), + free_slip = (left=true, right=true, top=true, bot=true, front=true, back=true), + free_surface = false +) +``` \ No newline at end of file