API Reference¶
This page documents the public Python surface of cfdmod. Every symbol
listed in cfdmod.__all__ is reachable via from cfdmod import X;
deeper module paths are also stable.
Top-level entry points¶
The pipeline is driven through four functions, one per coefficient. They accept either a YAML config path or an in-memory case-config instance, and the geometry is read from the source H5 by default.
Configuration models¶
All configuration types are plain Pydantic v2 BaseModel subclasses
(BasePressureConfig for the pressure coefficient configs, which itself
extends BaseModel). Each *CaseConfig exposes a from_file(path)
classmethod for loading from YAML; model_dump() / model_dump_json()
give back dict / JSON. There is no project-specific base class.
Pressure coefficient (Cp)¶
Force coefficient (Cf)¶
Moment coefficient (Cm)¶
The Cm body config is the place to configure the moment center per region. Three strategies are supported:
lever_strategy="fixed"– singlelever_originfor the body (default).lever_strategy="region_base"– each region uses(mean_x, mean_y, min_z)of its triangle vertices, i.e. the footprint centroid at the lowest z. Useful for overturning moments about the base of each container.lever_strategy="region_bbox_corners_xy"– expand the body into four independent runs (xmin_ymin,xmin_ymax,xmax_ymin,xmax_ymax); each run produces its own timeseries file and stats group. Useful for a worst-case overturning-moment scan around the footprint.
Per-region overrides via region_lever_origins (single run) or
lever_origin_cases (multi-run scan) take precedence over the
strategy.
Shape coefficient (Ce)¶
Geometry / zoning¶
I/O helpers¶
Mesh resolver¶
Embedded post-processing metadata¶
Every pipeline output H5 carries a processing_metadata group with the
config used to produce it. The two helpers below let external pipelines
write or read that block without depending on the layout details.
Timeseries access¶
Pull a coefficient timeseries out of any output H5 into a wide-form
pandas.DataFrame, save it as CSV for spreadsheet ingest, or plot
it with one matplotlib call.
Geometry I/O (STL)¶
Migration (legacy formats)¶
The migration helpers convert legacy pandas-HDFStore body / probe files into the v2 XDMF+H5 layout.