Skip to content

YAML basics

.msp files are YAML. The constructs used in hippoLBM decks are:

# a comment
global:                          # a map (block)
  simulation_end_iteration: 3000 # scalar
  output_directory: "MySimDir"   # string

do_domain:                       # a list (batch of operators)
  - domain:                      # operator with parameters, block style
     bounds:    [ [0,0,0], [0.1,0.1,0.1] ]   # a list of vectors
     cell_dims: [ 30, 30, 30 ]               # a vector
     periodic:  [ true, true, false ]

set_distributions:
  - set_distribution: { value: 1.0 }         # flow style

collision: mrt                   # a hook calling another operator

onika extensions

Syntax Meaning
includes: [ file.msp ] read other configuration files first (searched in ONIKA_CONFIG_PATH)
+key: [ ... ] append to the batch key instead of replacing it
name: other_block the hook name runs the batch or operator other_block
rebind: { slot: other } inside a batch, read/write the slot slot under the name other
loop: true, condition: slot repeat the batch while the boolean slot is true
condition: slot (without loop) run the batch only if the slot is true
configuration: runtime options (threads, GPU, logging, profiling, debug)
0.1 m, 50 kg/m/s^2 value with a unit, converted to the internal SI units

Debugging a deck

--debug-graph true prints the operator graph actually executed, and --debug-config true the final merged configuration.

Pressure units

The onika unit table knows the base SI units but no Pa, kPa, MPa or bar symbol. Express a pressure as kg/m/s^2 (1 Pa = 1 kg.m⁻¹.s⁻²), scaling the value for other units:

Unit Value in kg/m/s^2
1 Pa 1
1 kPa 1e3
1 bar 1e5
1 MPa 1e6
1 kbar 1e8