Skip to content

Configuration File

Dominykas edited this page Sep 16, 2026 · 3 revisions

Configuration File Reference

This page documents the YAML configuration file used to set up a simulation run. Each section below corresponds to a top-level key in the file, with a description and a standalone example.

simulation.domain

Defines the simulation domain size in voxels.

Field Description
Nx Number of voxels in the x direction
Ny Number of voxels in the y direction
Nz Number of voxels in the z direction. Must be set to 1 — the 3D solver is not available in the current version.
simulation:
  domain:
    Nx: 4000
    Ny: 2000
    Nz: 1

physics

Defines the reference state used by the solver.

Field Description
temperature Reference temperature (K)
GasConstant Specific gas constant
pressure Reference pressure (Pa)
density Reference density (kg/m³)
gamma Ratio of specific heats
viscosity Dynamic viscosity
cv Specific heat capacity
physics:
  temperature: 300.0 #K
  GasConstant: 287.058
  pressure: 100000 # Pa
  density: 1.0 #kg/m^3
  gamma: 1.0
  viscosity: 0.0001886109
  cv: 1.4

domain

Defines the physical size of the domain, in millimeters.

Field Description
mx Minimum x extent (mm)
px Maximum x extent (mm)
domain:
  mx: -1500 #mm
  px: 1500 #mm

general_boundaries

Field Description
boundary_enable Enables/disables boundary handling
default_boundary Enables the built-in default boundary (see wedge)
nozzle_flow Enables the nozzle flow boundary. In the dev build, nozzle flow is defined as a separate boundary from the default boundary.
general_boundaries:
  boundary_enable: true
  default_boundary: true
  nozzle_flow: false

wall_boundaries

Defines the boundary condition type applied in the x and y directions.

id Meaning
0 Periodic boundary
1 Dirichlet BC
2–4 Experimental BCs (e.g. pressure outlets)

Recommended: use only 0 or 1. IDs 2–4 are experimental and not yet validated.

wall_boundaries:
  x: 1 # Dirichlet BC in x
  y: 0 # periodic BC in y

boundary_files

Paths to precomputed boundary data.

Field Description
boundary Path to the boundary geometry file (.bin)
normals Path to the boundary normals file (.bin)
boundary_files:
  boundary: "/home/dominykas/CLionProjects/CELBM/rec1t11.bin"
  normals: "/home/dominykas/CLionProjects/CELBM/rec1tn11.bin"

Top-level flow parameters

Field Description
v_inf_x Freestream velocity in x, in lattice units. Note: the speed of sound at the default reference temperature is 1.0 in lattice units (T_MAX = 0.698).
T_MAX Reference temperature in lattice units, corresponding to physics.temperature.
riemann Set to true to run a generic Riemann problem instead of a standard simulation.
v_inf_x: 2.2
T_MAX: .698
riemann: false

shock

Defines a shock/discontinuity along the x-axis.

Field Description
P_ratio Pressure ratio across the shock
T_ratio Temperature ratio across the shock
location Shock location (voxels)
trigger Trigger threshold
trigger2 Secondary trigger threshold
trigger3 Tertiary trigger threshold
shock:
  P_ratio: 4.004380704339224
  T_ratio: 1.9186224580039488
  location: 100
  trigger: 1e-0
  trigger2: 2
  trigger3: 10.001

render_window

Dimensions (in voxels) of the rendering window used when exporting field visualizations to MP4.

Field Description
x Render window width
y Render window height
render_window:
  x: 3000
  y: 1500

events

EXT is a mandatory event. It ends the simulation at a given physical simulation time (µs), measured from the start of the run.

events:
  EXT:
    time: 5

capture_events

Defines events at which field data is exported to HDF5.

  • The EXT capture event behaves like the regular EXT event, except its time is measured from the moment a shock/density discontinuity impacts the point defined by the default boundary's noseX/noseY position, not from the start of the simulation.
  • You can define as many additional capture events as needed (event1, event2, ...). Each is measured in µs.
  • Output files are saved as <event_time>.hdf5.
capture_events:
  event1:
    time: 151
  event2:
    time: 151
  EXT:
    time: 5

output

Field Description
path Output directory for rendered videos. Do not modify.
output:
  path: "../Results/Videos/"

runtime.solver

Debugging/runtime configuration for the CUDA kernels. Do not modify.

Field Description
alphaMode —
kernel_debug —
Dynamic_weights —
runtime:
  solver:
    alphaMode: False
    kernel_debug: false
    Dynamic_weights: False

wedge

Configuration for the default boundary, a wedge shape. Only used if general_boundaries.default_boundary is true.

Field Description
width Wedge width, in voxels
height Wedge height, in voxels
char_height Characteristic height, in mm
noseX Position of the wedge nose along x, as a percentage (0–1) of the domain
noseY Position of the wedge nose along y, as a percentage (0–1) of the domain
wedge:
  width: 500
  height: 500
  char_height: 20
  noseX: 0.2
  noseY: 0.5

bc_scale

Scaling factor applied to boundary conditions.

bc_scale: 1

colormap

A colormap to be used for the output video.

Available colormaps:

An optional argument to set the colormap. Defaults to viridis.

colormap
viridis
viridis_reversed
turbo
turbo_reversed
plasma
plasma_reversed
grayscale
colormap: turbo

fields_to_rasterize

A list of fields to rasterize into video files using ffmpeg. Each entry (field1, field2, ...) defines one output video.

Field IDs

id Field
0 Density gradient
1 Density
2 Pressure
3 Temperature
4 Mach number
5 u (x-velocity)
6 v (y-velocity)

By default, results are output in lattice units.

Entry fields

Field Description
id Field ID to rasterize (see table above)
min Minimum value for the color scale
max Maximum value for the color scale
autoset If true, automatically determines min/max instead of using the specified values
output Output filename for the rendered video
fields_to_rasterize:
  field1:
    id: 0
    min: 0.05
    max: 0.00
    autoset: false
    output: "density_grad.mp4"
  field2:
    id: 2
    min: 3
    max: 0.02
    autoset: true
    output: "pressure.mp4"

Full Example Configuration File

#the simulation domain in voxels.
#For the current version, 3D solver is N/A therefore Nz must be set to 1.
simulation:
  domain:
    Nx: 4000
    Ny: 2000
    Nz: 1
 
#define the reference state
physics:
  temperature: 300.0 #K
  GasConstant: 287.058
  pressure: 100000 # Pa
  density: 1.0 #kg/m^3
  gamma: 1.0
  viscosity: 0.0001886109
  cv: 1.4
 
#define the physical domain length
domain:
  mx: -1500 #mm
  px: 1500 #mm
 
#define the boundaries. For the dev build, nozzle flow is defined as a separate boundary
general_boundaries:
  boundary_enable: true
  default_boundary: true
  nozzle_flow: false
 
#defines the boundaries in x and y direction.
# id = 0 => periodic boundary
# id  = 1 => dirichlet BCs
# id  = 2 - 4 => experimental BCs (pressure outlets etc).
# recommended to use id 0 through 1 as the others are not yet validated.
wall_boundaries:
  x: 1
  y: 0
 
boundary_files:
  boundary: "/home/dominykas/CLionProjects/CELBM/rec1t11.bin"
  normals: "/home/dominykas/CLionProjects/CELBM/rec1tn11.bin"
 
#define the v_inf. Lattice units. Speed of sound for the default temperature (0.698) = 1.0
v_inf_x: 2.2
T_MAX: .698
#set to true if you want to run a generic riemann problem
riemann: false
 
#if you define a shock in the x axis, set up the properties here:
shock:
  P_ratio: 1
  T_ratio: 1
  location: 4000
  trigger: 1e-0
  trigger2: 2
  trigger3: 10.001
 
# dimensions of the rendering window for field visualizations in mp4 format
render_window:
  x: 3000
  y: 1500
 
# EXT is a mandatory event that ends the simulation at a given *physical* simulation time (us) as measured from the start
events:
  EXT:
    time: 5
 
#define events that are to be recorded (exporting fields in hdf5 format at that instance). EXT event is similar to regular EXT in events, but the time is measured
#from the time a shock / discontinuity in density impacts a point defined by the default boundary positions NoseX and NoseY
#you can specify as many capture events as you'd like. The output files are saved as <event_time>.hdf5. All events are measured in us
capture_events:
  EXT:
    time: 5
 
#do not modify
output:
  path: "../Results/Videos/"
 
#debugging data for the CUDA kernels, do not modify
runtime:
  solver:
    alphaMode: False
    kernel_debug: false
    Dynamic_weights: False
 
#this is the configuration for the default boundary (a wedge). characteristic height is in mm -> width and height in voxels, noseX and noseY define the position
# for the start of the wedge (% of the domain in x and y directions). Default boundary is used if default boundary is set to TRUE
wedge:
  width: 500
  height: 500
  char_height: 20
  noseX: 0.2
  noseY: 0.5
 
bc_scale: 1
 
# a list of fields which are to be rasterized into a video with ffmpeg.
#field ids follow the listing:
# id 0 => density grad
# id 1 => density
# id 2 => pressure
# id 3 => temperature
# id 4 => Mach Number
# id 5 => u
# id 6 => v
#by default, the results are in lattice units.
fields_to_rasterize:
  field1:
    id: 0
    min: 0.05
    max: 0.00
    autoset: false
    output: "density_grad.mp4"
  field2:
    id: 2
    min: 3
    max: 0.02
    autoset: true
    output: "pressure.mp4"
  field3:
    id: 4
    min: 3
    max: 0.02
    autoset: true
    output: "mach.mp4"
  field4:
    id: 3
    min: 0
    max: 1
    autoset: true
    output: "temperature.mp4"

shockFLOW Wiki

Home


Getting Started

Simulation Setup

Exporting Results

Logging & Troubleshooting


Links

Clone this wiki locally