tud_lbm.io.plotting.scalar_history_plot

Scalar-history analysis plots: a single value vs. timestep.

Classes

MaxVelocityPlot

Plot maximum velocity magnitude over time.

DensityRatioPlot

Plot max/min density ratio over time.

AvgDensityPlot

Plot average density over time.

TotalMassPlot

Plot total domain mass (sum of rho) over time.

Module Contents

class tud_lbm.io.plotting.scalar_history_plot.MaxVelocityPlot(config: tud_lbm.config.SimulationConfig | None = None)[source]

Bases: tud_lbm.io.plotting._analysis_common._BaseAnalysisPlot

Plot maximum velocity magnitude over time.

name = 'max_velocity'[source]
title = 'Maximum velocity vs timestep'[source]
ylabel = 'max(|u|)'[source]
color = 'tab:blue'[source]
required_keys = ('u',)[source]
compute(files: list[pathlib.Path]) dict[str, numpy.ndarray][source]

Compute maximum velocity values for each timestep file.

class tud_lbm.io.plotting.scalar_history_plot.DensityRatioPlot(config: tud_lbm.config.SimulationConfig | None = None)[source]

Bases: tud_lbm.io.plotting._analysis_common._BaseAnalysisPlot

Plot max/min density ratio over time.

name = 'density_ratio'[source]
title = 'Density ratio vs timestep'[source]
ylabel = 'max(rho) / min(rho)'[source]
color = 'tab:orange'[source]
ylog = True[source]
required_keys = ('rho',)[source]
compute(files: list[pathlib.Path]) dict[str, numpy.ndarray][source]

Compute density ratio values for each timestep file.

class tud_lbm.io.plotting.scalar_history_plot.AvgDensityPlot(config: tud_lbm.config.SimulationConfig | None = None)[source]

Bases: tud_lbm.io.plotting._analysis_common._BaseAnalysisPlot

Plot average density over time.

name = 'avg_density'[source]
title = 'Average density vs timestep'[source]
ylabel = 'mean(rho)'[source]
color = 'tab:green'[source]
required_keys = ('rho',)[source]
compute(files: list[pathlib.Path]) dict[str, numpy.ndarray][source]

Compute average density values for each timestep file.

class tud_lbm.io.plotting.scalar_history_plot.TotalMassPlot(config: tud_lbm.config.SimulationConfig | None = None)[source]

Bases: tud_lbm.io.plotting._analysis_common._BaseAnalysisPlot

Plot total domain mass (sum of rho) over time.

name = 'total_mass'[source]
title = 'Total mass vs timestep'[source]
ylabel = 'sum(rho)'[source]
color = 'tab:olive'[source]
required_keys = ('rho',)[source]
compute(files: list[pathlib.Path]) dict[str, numpy.ndarray][source]

Compute total mass values for each timestep file.