Mean & Convergence¶
Open from ‘3. Analysis Mean & Convergence‘.
The Mean & Convergence module is the recommended first stop for any new dataset. It serves two purposes: plotting mean velocity profiles along arbitrary lines (similar to the Reynolds stress line-profile mode but for first-order statistics), and quantitatively verifying that the dataset has enough snapshots for the higher-order statistics computed by other modules to be trustworthy.
The module has two tabs: ‘Mean Velocity‘ (line profiles) and ‘Convergence‘ (cumulative statistics at a picked point).
Mean Velocity tab¶
This tab plots , , and (for stereo data) along a user-drawn line, in the same style as Reynolds stress line profiles.

Figure 1:Mean & Convergence module, Mean Velocity tab. Left: field with a free line drawn (cyan). Right: , profiles along the line as a function of arc length. Stereo data adds .
Normalization by ¶
A checkbox labeled ‘Normalize by ‘ and a paired spinbox let you divide the plotted velocity components by a user-supplied bulk or reference velocity. When checked, the y-axis labels switch to U/U_m [-], V/U_m [-], etc. The arc-length axis is not normalized, matching the convention used elsewhere in uPrime.
Multi-case comparison¶
uPrime can overlay imported cases (CSV files exported from previous uPrime sessions or other tools that follow the same column layout) on top of the current profile. This is useful for comparing experimental runs, conditions, or numerical-versus-experimental data.
The same multi-case workflow is available in Reynolds Stress, TKE Budget, Spectra, Correlation, and Anisotropy windows (see Chapter ??).
Exporting¶
Click ‘Export Profile…‘ to save the current profile as a CSV file. The header records the line geometry (endpoints), the value (or N/A if normalization is off), and the column layout. Multi-case overlays can be exported together using ‘Export All Cases…‘.
Convergence tab¶
The Convergence tab quantifies whether the dataset has enough snapshots for the first three moments of the velocity fluctuations to be statistically converged. This serves as a numerical check on the assumptions made by every other turbulence-statistics module.
Background¶
Given a sequence of snapshots, the cumulative running statistics are
where is the mean computed over all loaded snapshots. With this definition, the curves approach a non-zero asymptote as grows, which is what allows convergence to be visually inspected.
The cumulative moments are computed using Welford’s online algorithm extended to the third central moment. This is a single-pass computation, numerically stable, and avoids storing per-snapshot residuals.
A trailing-window stability criterion is used to find the convergence point :
where and is component-aware: for first moments, for second, and for third (and similarly per-component for and ). The criterion further requires the inequality to hold continuously across the next samples (sustained crossing), which prevents spurious early matches when the trailing-window range happens to be small by chance.
Reference: Welford, B.P. (1962). Note on a method for calculating corrected sums of squares and products. Technometrics, 4(3), 419–420.
Using the tab¶

Figure 2:Convergence tab, point picker. The field is shown in viridis. The boundary margin (grey overlay) is determined by the kernel size and clicks inside it are rejected. The picked point and kernel footprint are shown as a red marker.
Grid layout (raw values)¶
In grid mode, , , and are plotted in physical units, one subplot per component (rows: , , optionally ) and per moment order (columns: 1, 2, 3). A pair of dashed horizontal lines marks the threshold band around the asymptote, and a vertical line at shows the sustained-crossing convergence point. Curves that never satisfy the criterion are labeled ‘Not converged‘.

Figure 3:Convergence tab, grid layout (planar 2D2C: subplots). Each panel shows a cumulative moment in physical units, the dashed threshold band around its final-value asymptote, and the vertical line where the sustained-crossing criterion is first met. Third moments typically require many more snapshots than first or second moments to converge.
Single plot (normalized)¶
In single-plot mode, every selected curve is normalized by its own scale so they share a common dimensionless y-axis. Curves are color-coded by component (, , ) and styled by moment order (solid for first, dashed for second, dotted for third). Per-component dashed threshold bands are drawn around each curve’s asymptote .

Figure 4:Convergence tab, single normalized layout. All selected curves are overlaid on one axes and approach their respective non-zero asymptotes (one per curve). Per-component dashed threshold bands flank each asymptote.
Exporting¶
Click ‘Export CSV…‘ to save the cumulative moments. The header block records the picked point indices and physical coordinates, the kernel size, the three thresholds, the dataset , and the value computed for each quantity. The columns are , , , , , ..., adding components for stereo data.
Inline non-convergence notice¶
The Reynolds Stress, TKE Budget, and Spectral Analysis windows display a persistent amber top-bar label when the loaded dataset has fewer than 500 snapshots:
⚠ Only N=234 snapshots loaded. Statistics may not be converged. Use the Mean & Convergence module to verify.
The label is hidden automatically when the dataset has 500 or more snapshots. Other modules (Correlation, Anisotropy, POD, DMD, Vortex Identification) are silent. The 500 threshold is hardcoded in core/constants.py as CONVERGENCE_WARNING_N and can be changed in source builds.

Figure 5:Top-bar non-convergence label as it appears in the Reynolds Stress window with snapshots. The label is hidden automatically once .