CFD Mod docs

CFD Mod is a Python library for post-processing and geometry preparation of CFD wind-tunnel simulations. It covers pressure (Cp), force (Cf), moment (Cm) and shape (Ce) coefficients; terrain loft and roughness elements; inflow / climate / Lawson statistics; and ParaView snapshot automation.

Note

v3 reorganizes post-processing around a single data structure – the DataSource – and composable ops driven by YAML pipeline templates. The legacy per-coefficient functions (run_cp / run_cf / run_cm / run_ce) and their *CaseConfig models are removed; every flow now runs through cfdmod run <template>. See Migrating to the v3 paradigm for the mapping and Release Notes for the full changeset.

Quickstart

Post-processing is a pipeline template: a YAML document declaring inputs, a sequence of ops, and outputs. Run it from the command line:

cfdmod run path/to/cp.yaml

or in Python, over any storage backend:

from cfdmod import load_template, run_template, XdmfH5Storage

template = load_template("path/to/cp.yaml")
bindings = run_template(template, storage=XdmfH5Storage(root="."))

Note

cfdmod run <template> is the Python snippet above wrapped for convenience: it loads the template and runs it over an XdmfH5Storage rooted at the template’s directory (exposed in the library as cfdmod.recipes.run_yaml). Call load_template + run_template directly when you need a different storage backend – for example MemoryStorage in tests.

Example Cp / Cf / Cm / Ce templates ship under fixtures/tests/pressure/templates/. The full worked example lives at examples/container_pack/process_container_pack.ipynb in the repository; the Data sources, ops, and pipelines (v3 paradigm) page explains the paradigm end-to-end.

New here? Start with Getting Started – install, the files you need on disk, a first Cp run, and how to read the outputs back into ParaView or pandas.