Boundary Conditions - CFD#
This subsection defines the boundary conditions associated with fluid dynamics physics. Lethe supports the following boundary conditions:
none
boundary condition (default).noslip
boundary conditions strongly impose the velocity on a boundary to be \(\mathbf{u}=[0,0]^T\) and \(\mathbf{u}=[0,0,0]^T\) in 2D and 3D respectively.slip
boundary conditions impose \(\mathbf{u} \cdot \mathbf{n}=0\), with \(\mathbf{n}\) the normal vector of the boundary. Imposing slip boundary conditions strongly is not trivial in FEM. We refer the reader to the deal.II documentation for explanations on how this is achieved.partial slip
boundary condition simulates an intermediary betweenslip
andnoslip
boundary conditions, in which the fluid feels an attenuated stress due to the walls. The attenuation is controlled by the boundary layer thickness (m). Thepartial slip
boundary condition introduces the “penalization factor”beta
to the \(\mathbf{n}\) normal vector of the boundary, and theboundary layer thickness
(m) as a parameter to calculate the shear stress at the boundaries.periodic
boundary conditions, in which fluid exiting the domain will reenter on the opposite side.function
where a Dirichlet boundary condition is set from an arbitrary function. These functions can be used to define all sorts of steady-state and transient velocity boundary conditions such as rotating walls. It is also possible to weakly impose a Dirichlet boundary condition. In this case, the type should be set tofunction weak
. This will result in Nitsche method being used to weakly impose the boundary condition instead of it being strongly imposed by overwriting the values of the degrees of freedom. Thefunction weak
boundary type should only be used in very specific cases where the problem is very stiff, for example when it is fully enclosed and a non-trivial velocity profile is imposed. It can also be used to impose an outbound dirichlet boundary condition.outlet
where a do nothing boundary condition, which is a zero traction, is imposed when the fluid is leaving the domain (\(\mathbf{u} \cdot \mathbf{n}>0\)) and a penalization is imposed when the fluid is inbound. This is useful when turbulent structures or vortices are leaving the domain since it prevents the re-entry of the fluid. The boundary condition imposed is thus:
or in Einstein notation:
where \(\beta\) is a constant and \((\mathbf{u}\cdot \mathbf{n})_{-}\) is \(\min (0,\mathbf{u}\cdot \mathbf{n})\). We refer the reader to the work of Arndt et al 2015 for more detail.
Finally, Lethe also supports not imposing a boundary condition on an ID. Not imposing a boundary condition is equivalent to the do nothing boundary condition (
none
), which results in a zero net traction on a boundary. This, in fact, imposes \(\int_{\Gamma}(-p\mathcal{I} + \mathbf{\tau}) \cdot \mathbf{n}=0\) where \(p\) is the pressure, \(\mathcal{I}\) is the identity tensor, \(\mathbf{\tau}\) is the deviatoric stress tensor and \(\Gamma\) is the boundary.
subsection boundary conditions
set number = 2
set time dependent = false
set fix pressure constant = false
subsection bc 0
set id = 0
set type = function
subsection u
set Function expression = -y
end
subsection v
set Function expression = x
end
subsection w
set Function expression = 0
end
# Center of rotation used for torque calculation
subsection center of rotation
set x = 0
set y = 0
set z = 0
end
set periodic_id = 1
set periodic_direction = 0
set beta = 0
end
subsection bc 1
set type = noslip
end
end
number
specifies the number of boundary conditions of the problem. Periodicity between 2 boundaries counts as 1 condition even if it requires two distinct boundary ids.
Warning
The number
of boundary conditions must be specified explicitly. This is often a source of error.
Note
The index in subsection bc ..
must be coherent with the number
of boundary conditions set: if number = 2
, bc 0
and bc 1
are created but bc 2
does not exist.
Likewise, if number = 2
and there is no subsection bc 0
explicitly stated, the boundary is still created, with none
by default.
time dependent
specifies if a boundary condition is time-dependent (true
) or steady (false
). By default, this parameter is set tofalse
. This is here to improve the computational efficiency for transient cases in which the boundary conditions do not change.fix pressure constant
specifies if a zero pressure constraint should be applied on a single node of the coarse grid solver when using geometric multigrid preconditioning combined with the lethe-fluid-matrix-free solver. Essentially, this condition should be set to true whenever a user is using the lethe-fluid-matrix-free solver and simulating the flow within a closed domain (that is a domain on which all boundaries are either periodic or Dirichlet boundary conditions).- Each fluid dynamics boundary condition is stored in a
bc #
subsection : id
is the number associated with the boundary condition. By default, Lethe assumes that the id is equivalent to the number#
of the bc.type
is the type of the boundary condition.The subsections
u
,v
andw
are used to specify the individual components of the velocity at the boundary using function expressions. These functions can depend on position (\(x,y,z\)) and on time (\(t\)).The
center of rotation
subsection is only necessary when calculating the torque applied on a boundary. See See Force and Torque Calculation for more information.periodic id
andperiodic_direction
specify the id and direction of the matching periodic boundary condition. For example, if boundary id 0 (located at xmin) is matched with boundary id 1 (located at xmax), we would setid = 0
,periodic_id = 1
andperiodic_direction = 0
.beta
is a penalization parameter used for both theoutlet
,partial slip
, andfunction weak
boundary conditions. For the outlet boundary conditionsbeta
should be close to unity, whereasbeta
of 10 or a 100 can be appropriate for thefunction weak
boundary condition. For thepartial slip
condition, use high values ofbeta
(i.e. > 50).boundary layer thickness
(\(d_w\)) is the parameter applied to thepartial slip
boundary condition. It is used to estimate the tangential shear stress \(\tau_t = -\mu \frac{u}{d_w}\). For very highboundary layer thicknes
, the boundary layer should behave exactly like theslip
condition.
- Each fluid dynamics boundary condition is stored in a
Caution
While using the lethe-fluid-sharp
solver, it is wise to assign a weak type of boundary (outlet
, partial slip
, or function weak
) to at least one boundary. The presence of particle(s) has a non-null contribution to the divergence of the problem, making it much harder for the linear solver to converge unless it is given some flexibility through of boundaries.
Caution
The lethe-fluid-matrix-free
application does not support the pressure
and partial slip
boundary conditions.