Skip to content

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,

\[ f_{\bar{i}}(\mathbf{x}, t + \Delta t) = f_i^*(\mathbf{x}, t), \]

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, by pre_bounce_back (in pre_stream_bcs) and post_bounce_back (in post_stream_bcs), only when at least one plane is declared (has_bounce_back);
  • on the obstacle surfaces, by wall_bounce_back (in pre_stream_bcs), see Obstacles.

No operator has to be added by the user.

YAML syntax

Declare the planes in the domain operator:

1
2
3
4
5
6
do_domain:
  - domain:
     bounds:    [[0,0,0],[0.1,0.1,0.1]]
     cell_dims: [100, 100, 100]
     periodic:  [false, false, false]
     bounce_back_planes: [plan_xy_0, plan_xy_l, plan_yz_0, plan_yz_l, plan_xz_0, plan_xz_l]

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:

1
2
3
4
5
6
7
do_domain:
  - read_dump:
     filename: "MySimDir/CheckPointRestart/hippoLBM_0000003000.dump"

+setup_obstacles:
  - add_bounce_back_bcs:
     bounce_back_planes: [plan_xy_0, plan_xy_l]

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:

- pre_bounce_back:
   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.