bloc.cfd_pathlines.loader#
Load CFD pathline CSV files into a structured dataset.
Classes#
CFD pathline dataset loaded from a comment-annotated CSV file. |
Module Contents#
- class bloc.cfd_pathlines.loader.PathlineDataset(path)#
CFD pathline dataset loaded from a comment-annotated CSV file.
The CSV header contains
# key: valuelines that carry simulation metadata (solver, pressure, mechanism, …). The body holds one row per (path_id, step) with columns:time_s,T_K,r_mm, velocity components, andX_<species>mole fractions.- Parameters:
path – Path to the pathline CSV file.
- Raises:
ValueError – If required metadata fields are missing or
n_pathsin the header does not match the number of unique path ids in the data.
- property metadata: dict[str, str]#
Raw metadata parsed from the
# key: valueheader lines.
- property cfd_mechanism: str#
Mechanism name reported by the CFD simulation.
- property pressure_Pa: float#
Operating pressure [Pa].
- property uniform_distribution: bool#
Whether pathlines represent a statistically uniform inlet sample.
- property n_paths: int#
Number of particle paths.
- property species_names: list[str]#
Species names extracted from
X_*columns (Cantera-compatible).
- property paths: dict[int, pandas.DataFrame]#
Per-path DataFrames, keyed by
path_id.
- get_path(path_id)#
Return the DataFrame for a single path.
- Parameters:
path_id – Integer path identifier.
- Raises:
KeyError – If
path_iddoes not exist in the dataset.
- exit_times()#
Return the exit times for each path.