Burgers-equation experiment: 25-case S contingency
Overview
The system is a 1D viscous Burgers finite-difference simulation, \(u_t + u u_x = \nu u_{xx}\), run 25 times with varied initial data and viscosity. It is a scalar model equation whose steep gradients are shocks; it is not the 3D Navier–Stokes system. Each run is classified by whether the gradient norm stays below a fixed excursion threshold within the window, and by the minimum value of the convergence score \(S\) attained; the run then sweeps a tolerance \(\epsilon\) in the classifier \(S \geq -\epsilon\) and records precision and recall. The classification, the tolerance and the lead times are properties of this grid, window and threshold.
Method
- Run 25 simulations of the viscous Burgers equation with varied initial conditions and viscosity values spanning diffusion-dominated to advection-dominated regimes.
- Classify each simulation as below threshold (gradient bounded throughout the window) or crossed threshold (gradient exceeds the excursion threshold).
- Record the minimum \(S\) value attained during each simulation. Classify as \(S \geq 0\) or \(S < 0\).
- Build the \(2 \times 2\) contingency table. Sweep the tolerance \(\epsilon\) from 0 to 1 and compute precision/recall at each.
- For threshold-crossing cases, record the time between the first \(S < 0\) and the crossing.
Results
Contingency Table (tolerance \(S = 0\))
| Below threshold | Crossed threshold | Total | |
|---|---|---|---|
| \(S \geq 0\) throughout | 5 | 0 | 5 |
| \(S < 0\) at some step | 14 | 6 | 20 |
| Total | 19 | 6 | 25 |
At \(S = 0\): precision = 6/20 = 0.30, recall = 6/6 = 1.00. Zero false negatives, 14 false positives.
Shifted Tolerance: \(S \geq -0.2\)
| Below threshold | Crossed threshold | Total | |
|---|---|---|---|
| \(S \geq -0.2\) throughout | 19 | 0 | 19 |
| \(S < -0.2\) at some step | 0 | 6 | 6 |
| Total | 19 | 6 | 25 |
At \(S = -0.2\): precision = 6/6 = 1.00, recall = 6/6 = 1.00 on these 25 cases.
Temporal Lead
| Case | \(S < 0\) time | Threshold-crossing time | Lead (time units) |
|---|---|---|---|
| 1 | 0.41 | 1.23 | 0.82 |
| 2 | 0.38 | 1.05 | 0.67 |
| 3 | 0.52 | 1.18 | 0.66 |
| 4 | 0.29 | 0.98 | 0.69 |
| 5 | 0.44 | 1.10 | 0.66 |
| 6 | 0.35 | 1.07 | 0.72 |
Average lead: 0.70 time units. In all six cases \(S\) is negative before the crossing, never at or after it.
Notes
- \(S = 0\) catches every crossing but is noisy. At tolerance 0, recall is 1.00 and precision 0.30 (70% false-positive rate): many below-threshold runs have transient negative excursions of \(S\).
- \(S = -0.2\) separates the 25 cases. Shifting the tolerance to \(-0.2\) removes all false positives while keeping recall at 1.00. The 14 below-threshold runs with \(S < 0\) all have \(\min(S) > -0.2\).
- Temporal ordering. In all 6 crossing cases \(S\) goes negative first, with an average lead of 0.70 time units.
- Reading of the tolerance. Small negative excursions of \(S\) recover within the window; \(S < -0.2\) in this data set coincides with runs whose gradient continues to steepen.
Summary
On 25 runs of 1D viscous Burgers, \(S \geq 0\) throughout gives zero false negatives for gradient-threshold crossing (recall 1.00, precision 0.30); shifting the tolerance to \(S \geq -0.2\) gives precision and recall of 1.00 on this data set. In every crossing case \(S\) goes negative first, with a lead of about 0.70 time units.
Reproducibility
../simplex/build/sxc exp_ns_smoothness.sx -o build/exp_ns_smoothness.ll
OPENSSL_PREFIX=$(brew --prefix openssl)
clang -O2 build/exp_ns_smoothness.ll \
../simplex/runtime/standalone_runtime.c \
-o build/exp_ns_smoothness \
-lm -lssl -lcrypto -L${OPENSSL_PREFIX}/lib
./build/exp_ns_smoothness
Related
- Burgers-equation experiment: S score as an early-warning signal — the 100-trial run
- Four-mode 2D experiment — critical Re of the four-mode ODE via an \(S = 0\) binary search
- Burgers-equation experiment: I-ratio across a viscosity sweep — the viscosity-sweep run
- Conjectures — the S score as a flow diagnostic is listed there as open
- I-Ratio Identity — \(\|\sum g_i\|^2 = D(1 + 2I)\)