Skip to content

Obstacles

Obstacles are solid bodies placed inside the simulation domain. They are registered in the set_obstacles hook, called by setup_obstacles during the initialization. Each operator adds one obstacle to the list and requires a unique integer id.

1
2
3
4
5
6
7
8
set_obstacles:
  - register_solid_wall:
     id: 0
     bounds: [[0.048, 0, 0], [0.052, 0.1, 0.08]]
  - register_solid_ball:
     id: 1
     center: [0.1, 0.05, 0.1]
     radius: 0.013

Then update_obstacles marks the nodes inside the obstacles as solid (OBST = -2 in the ParaView files), and wall_bounce_back, part of the default pre_stream_bcs, applies a no-slip (bounce-back) condition at every fluid/solid interface:

\[ f_{\bar{i}}(\mathbf{x}, t + \Delta t) = f_i^*(\mathbf{x}, t), \qquad \mathbf{x} + \mathbf{e}_i \text{ solid}. \]
Operator Shape
register_solid_wall axis-aligned box
register_solid_ball sphere
register_quadrics quadric surface: sphere / ellipsoid, cylinders, cone
register_rshape STL mesh, with Minkowski rounding

Warning

Do not replace pre_stream_bcs without keeping wall_bounce_back in it: use +pre_stream_bcs: to add a condition. Some example decks without bounce-back planes set pre_stream_bcs: [ wall_bounce_back ] explicitly, which keeps the obstacle bounce-back.

Obstacles are static: they are registered once, before the first time step.