tud_lbm.io.plotting.analysis
Analysis plot operators for saved simulation history.
Classes
Plot maximum velocity magnitude over time. |
|
Plot max/min density ratio over time. |
|
Plot average density over time. |
|
Plot left contact angle over time. |
|
Plot right contact angle over time. |
|
Plot left contact-line speed over time. |
|
Plot right contact-line speed over time. |
|
Render paired left/right contact-angle history. |
|
Render paired left/right contact-line speed history. |
|
Export per-timestep droplet metrics to |
Functions
|
Compute per-timestep metrics and write |
|
Generate 8 comparison scatter plots across all processed runs. |
|
Discover runs, export per-run CSVs, and generate comparison plots. |
|
Script entry point for batch CSV export and run comparison plots. |
Module Contents
- class tud_lbm.io.plotting.analysis.MaxVelocityPlot(config: tud_lbm.config.SimulationConfig | None = None)[source]
Bases:
_BaseAnalysisPlotPlot maximum velocity magnitude over time.
- class tud_lbm.io.plotting.analysis.DensityRatioPlot(config: tud_lbm.config.SimulationConfig | None = None)[source]
Bases:
_BaseAnalysisPlotPlot max/min density ratio over time.
- class tud_lbm.io.plotting.analysis.AvgDensityPlot(config: tud_lbm.config.SimulationConfig | None = None)[source]
Bases:
_BaseAnalysisPlotPlot average density over time.
- class tud_lbm.io.plotting.analysis.ContactAngleLeftPlot(config: tud_lbm.config.SimulationConfig | None = None)[source]
Bases:
_BaseAnalysisPlotPlot left contact angle over time.
- class tud_lbm.io.plotting.analysis.ContactAngleRightPlot(config: tud_lbm.config.SimulationConfig | None = None)[source]
Bases:
_BaseAnalysisPlotPlot right contact angle over time.
- class tud_lbm.io.plotting.analysis.ContactLineSpeedLeftPlot(config: tud_lbm.config.SimulationConfig | None = None)[source]
Bases:
_ContactLineSpeedBasePlot left contact-line speed over time.
- class tud_lbm.io.plotting.analysis.ContactLineSpeedRightPlot(config: tud_lbm.config.SimulationConfig | None = None)[source]
Bases:
_ContactLineSpeedBasePlot right contact-line speed over time.
- class tud_lbm.io.plotting.analysis.ContactAnglesPairPlot(config: tud_lbm.config.SimulationConfig | None = None)[source]
Bases:
tud_lbm.io.plotting.base.AnalysisPlotRender paired left/right contact-angle history.
- class tud_lbm.io.plotting.analysis.ContactLineSpeedsPairPlot(config: tud_lbm.config.SimulationConfig | None = None)[source]
Bases:
tud_lbm.io.plotting.base.AnalysisPlotRender paired left/right contact-line speed history.
- class tud_lbm.io.plotting.analysis.SimulationCsvExport(config: tud_lbm.config.SimulationConfig | None = None)[source]
Bases:
tud_lbm.io.plotting.base.AnalysisPlotExport per-timestep droplet metrics to
simulation_data.csv.- compute(files: list[pathlib.Path]) dict[str, numpy.ndarray][source]
Return an empty payload because this operator is export-only.
- render(ax: matplotlib.axes.Axes, precomputed: dict[str, numpy.ndarray]) None[source]
Render a placeholder panel when this operator is selected for plotting.
- export(run_dir: pathlib.Path) pathlib.Path | None[source]
Write
simulation_data.csvfor the configured run directory.
- tud_lbm.io.plotting.analysis.build_simulation_csv(run_dir: str | pathlib.Path, config: tud_lbm.config.SimulationConfig) pathlib.Path | None[source]
Compute per-timestep metrics and write
simulation_data.csv.Skips silently (returns
None) when config.sim_type is not a supported wetting variant. Saves the CSV directly to run_dir.- Parameters:
run_dir – Run directory (contains
data/timestep_*.npz).config –
SimulationConfig.
- Returns:
Path to the written CSV, or
Nonewhen skipped.
- tud_lbm.io.plotting.analysis.compare_runs(parent_dir: str | pathlib.Path) None[source]
Generate 8 comparison scatter plots across all processed runs.
Reads
simulation_data.csvfiles produced bybuild_simulation_csv()from every run directory under parent_dir and writes 8 plots to<parent_dir>/comparison_analysis/.- Parameters:
parent_dir – Parent directory that contains the individual run directories.
- tud_lbm.io.plotting.analysis.process_parent_dir(parent_dir: str | pathlib.Path) tuple[int, int][source]
Discover runs, export per-run CSVs, and generate comparison plots.
Discovers runs by searching for
config.tomlfiles recursively. Skips directories whose path contains"init"or"comparison_analysis". Writessimulation_data.csvper run, then generates 8 comparison plots when at least one run produced CSV data.- Parameters:
parent_dir – Absolute or relative path to the parent directory.
- Returns:
A tuple
(n_runs_found, n_runs_with_csv).