Bounce-back (no-slip walls)¶
Description¶
The bounce-back condition enforces a no-slip wall: each distribution function leaving the fluid towards the wall is reflected back in the opposite direction,
where \(\bar{i}\) is the direction opposite to \(i\) (iopp in the D3Q19 table).
It is applied in two places:
- on the domain planes declared in
bounce_back_planes, bypre_bounce_back(inpre_stream_bcs) andpost_bounce_back(inpost_stream_bcs), only when at least one plane is declared (has_bounce_back); - on the obstacle surfaces, by
wall_bounce_back(inpre_stream_bcs), see Obstacles.
No operator has to be added by the user.
YAML syntax¶
Declare the planes in the domain operator:
Allowed plane names are plan_xy_0, plan_xy_l, plan_xz_0, plan_xz_l, plan_yz_0, plan_yz_l.
Warning
A plane's dimension must not be periodic: domain aborts otherwise.
Warning
The automatic steps live in the default pre_stream_bcs / post_stream_bcs batches. To add a condition such
as cavity_z_l, use +pre_stream_bcs:. Writing pre_stream_bcs: replaces the batch and removes the
bounce-back.
Restart¶
The bounce-back planes are not stored in the checkpoint files: after a restart with read_dump (which replaces
domain), declare them again with the add_bounce_back_bcs operator, appended to the setup_obstacles block:
add_bounce_back_bcs takes the same bounce_back_planes list as domain and sets has_bounce_back.
Internal check of pre_bounce_back
pre_bounce_back aborts if it runs on a rank touching the domain boundary while no bounce-back plane has any
node to process: this means it was called although no plane was declared. If this is intentional (the boundary
is handled by another condition), set by_pass_check: true:
Usage example¶
Closed box with a moving lid (lbm_cavity)
do_domain:
- domain:
bounds: [ [0 m, 0 m, 0 m],[0.1 m, 0.1 m, 0.1 m] ]
cell_dims: [ 100 , 100 , 100 ]
periodic: [ false, false, false ]
bounce_back_planes: [plan_yz_0, plan_yz_l, plan_xz_0, plan_xz_l, plan_xy_0, plan_xy_l]
+pre_stream_bcs:
- cavity_z_l:
U: [0.0, 0.1, 0]
See the cavity flow tutorial.