Skip to content

CLI Usage

The cfd-io command-line tool provides two subcommands:

Command Description
info Inspect file metadata without loading data
convert Convert CFD data between file formats

Note

Options can be placed before or after positional arguments.

info

Show metadata summary for a data file.

cfd-io info [OPTIONS] PATH
Argument Description
PATH Path to a data file (.h5, .x, .dat, .plt)

Examples

cfd-io info sample_flow.h5
1
2
3
4
5
6
format:    hdf5
grid:      51 x 900 x 1
variables: 8
  names:   ['pres', 'temp', 'uvel', 'vvel', 'wvel', 'dens', 'mach', 'mu']
timesteps: 1
precision: float64
cfd-io info sample_grid.x
1
2
3
4
5
6
format:    plot3d_grid
grid:      51 x 900 x 1
variables: 3
  names:   ['x', 'y', 'z']
timesteps: 1
precision: float64
cfd-io info sample_flow.dat
1
2
3
4
5
6
format:    tecplot_ascii
grid:      51 x 900 x 1
variables: 8
  names:   ['x', 'y', 'pres', 'temp', 'uvel', 'vvel', 'wvel', 'dens']
timesteps: 1
precision: float64

convert

Convert CFD data between formats. Format is auto-detected from file extensions.

cfd-io convert [OPTIONS] INPUT_PATH
Argument / Option Short Description
INPUT_PATH Input file path
--output PATH -o Output file path (default: output.h5)
--grid PATH -g Input grid file (required for split formats)
--output-grid PATH Output grid file (required when writing split formats)
--debug Enable debug logging
--mach FLOAT Store Mach number as metadata
--re FLOAT Store unit Reynolds number as metadata
--temp-inf FLOAT Store freestream temperature as metadata

Split formats

Formats like .s8 / .s4 store grid and flow in separate files. Use --grid to provide the input grid file, and --output-grid when writing to a split format.

Examples

cfd-io convert sample_flow.h5 -o output.dat
cfd-io convert sample_flow.dat -o output.h5
cfd-io convert sample_grid.x -o output.h5 --mach 6.0
cfd-io convert flow.s8 -g grid.s8 -o output.h5