Skip to content

cfd_gui.snapshot_monitor

This page is generated from src/cfd_gui/snapshot_monitor.py. For narrative architecture context, start with the developer guide.

snapshot_monitor

Monitor the solver's snapshot file for live-update plotting.

The Fortran solver optionally writes snapshot.dat every N iterations (controlled by snapshot_freq). This module polls the file on a QTimer and emits a signal when new data is available.

The snapshot format is identical to result.dat: # iter=NNN t=T x rho u p (4 columns, ES20.12)

SnapshotData(iteration, time, x, rho, u, p)

Parsed content of a single snapshot file.

SnapshotMonitor(path, interval_ms=250, parent=None)

Bases: QObject

Poll a snapshot file and emit parsed data on change.

Signals

new_snapshot(SnapshotData) Emitted whenever the file has been updated with new data.

load_result_file(path)

Load a result.dat or snapshot.dat file.

Returns (x, rho, u, p) arrays.