Architecture
flow_props follows a narrow pipeline:
cfd-ioreads a CFD datasetflow_props.profiles.extract_profilesslices wall-normal profiles at chosen stations- reduction modules compute derived quantities from those profiles
Module Layout
profiles/: wall-normal profile extraction (along grid lines or interpolated normals)bl.py: boundary-layer edge detection and integral thicknessesentropy_layer.py: entropy-layer thicknessshock.py: shock point per grid line and the shock curvewall.py: wall shear and thermal quantitiesoutput.py: Tecplot ASCII writerscalculators/: one module per CLI calculation (bl,entropy_layer,profiles,shock) with its pydantic config model, itsinittemplate and itsrun_case;common.pyholds the shared parts (input files,[stations],[gas]), and__init__.pythe registry the CLI is built fromcli/: Typer app (app.py), callbacks (--version,--verbose), the command-group factory (cmd_calculator.py) and theexamplescommandexamples/<calculation>/<name>/: bundled cases; the folders are the registry
Adding a Calculation
Write calculators/<name>.py with a config model, a TEMPLATE and
run_case(config, config_dir) -> list[str], and add one entry to CALCULATORS in
calculators/__init__.py. The CLI then has flow-props <name> init and run.
Design Intent
The package is deliberately lightweight.
- it does not own CFD file I/O
- it assumes
cfd-iohas already constructed a dataset - it focuses on profile-based property extraction rather than general field operations
That separation keeps flow_props easy to reason about and consistent with the rest of the workspace.