bloc.cfd_pathlines.particles#
Particle post-processing using CRECK Nobili 2024 mechanism.
Converts Cantera replay results (mole fractions) to number concentrations
[#/cm³] and delegates to bloc.chem.nobili for particle size distribution,
average primary particle diameter, and number of primary particles per aggregate.
Functions#
|
Post-process a Nobili mechanism replay to produce particle figures. |
Module Contents#
- bloc.cfd_pathlines.particles.plot_particles(replay, nobili_diameters_csv, residence_times_s=None, path_ids=None)#
Post-process a Nobili mechanism replay to produce particle figures.
Converts mole fractions from replay to number concentrations [#/cm³] using the ideal gas law, then calls
bloc.chem.nobilifunctions to compute particle size distributions and aggregate statistics.Three figures are returned:
"avg_diameter": number-weighted average primary particle diameter vs. time for each path."psd_aggregate": aggregate particle size distribution dN/dlogD at each requested residence time."npp_per_aggregate": average number of primary particles per aggregate vs. time.
- Parameters:
replay – A completed
ChemistryReplay(run()must have been called). The mechanism must be a Nobili-compatible one (BIN species present).nobili_diameters_csv – Path to
Nobili2024_particle_diameters.csv, which contains thebin,Dpp_m,npp,dcollision_m, andmass_kgcolumns used bybloc.chem.nobili.residence_times_s – Specific residence times [s] at which to evaluate the aggregate particle size distribution. Defaults to the median exit time.
path_ids – Subset of path ids to include. Defaults to all paths in the replay.
- Returns:
Keyed by
"avg_diameter","psd_aggregate","npp_per_aggregate".- Return type:
dict[str,plt.Figure]- Raises:
RuntimeError – If
replay.run()has not been called.FileNotFoundError – If nobili_diameters_csv does not exist.