Skip to content

Live demo: charts on a travelling wave

A travelling wave is the clearest case for quantization. The wave is one pattern that translates across the domain, so a single global basis has to represent every shifted copy of that pattern, which takes many modes. A chart sees only a short arc of the orbit, over which the pattern moves little, so a few local modes represent it. This page lets you move the number of charts, \(K\), and the number of modes per chart, \(r\), and shows what each choice changes, exactly as the 1-D Kuramoto–Sivashinsky demo does for a chaotic attractor.

The test case is the 2-D Kuramoto–Sivashinsky equation in its travelling-wave regime, which is the case qlroms.intrusive_qlroms.ks2d registers as "travelling". The models are intrusive: every chart carries the Kuramoto–Sivashinsky equation projected onto its own basis, and the reduced coordinates are handed from chart to chart by the transition maps.

How to read the panels

The panels are those of the 1-D demo, with one exception. Because the field is two-dimensional, the space-time image is replaced by snapshots of the forecast: the field \(u(x, y)\) of the full-order model, of the selected reduced model and of the single-chart model at the same number of modes, at the instant that the slider below them sets. Press Play to watch the wave travel. A reduced model that holds the forecast moves its pattern with the full-order one; a reduced model that fails either lags behind the wave or loses its shape.

Time is reported in the time units of the equation, and not in Lyapunov times, because a travelling wave has no positive Lyapunov exponent. A cell marked "all" in the predictability map is a forecast that holds over the whole test window of 200 time units.

The model behind the sliders

The full-order model is the anisotropic 2-D Kuramoto–Sivashinsky equation

\[ \frac{\partial u}{\partial t} + \left(\frac{\partial^2 u}{\partial x^2} + \alpha\,\frac{\partial^2 u}{\partial y^2}\right) + \nu_1\left(\frac{\partial^2}{\partial x^2} + \alpha\,\frac{\partial^2}{\partial y^2}\right)^2 u + \frac{1}{2}\left[\left(\frac{\partial u}{\partial x}\right)^2 + \alpha\left(\frac{\partial u}{\partial y}\right)^2\right] = 0, \tag{1} \]

where \(u(x, y, t)\) is the scalar field; \(\nu_1\) is the viscosity; and \(\alpha = \nu_2/\nu_1\) is the anisotropy ratio. The domain is doubly periodic, \((x, y) \in [0, 2\pi)^2\). The demo runs the travelling-wave regime \(\nu_1 = 0.5\) and \(\nu_2 = 0.35\), on \(32 \times 32\) grid points, advanced pseudo-spectrally with a fourth-order exponential time-differencing Runge–Kutta scheme with a time step \(\Delta t = 0.1\) (Kassam and Trefethen, 2005). The mean of \(u\) is projected out at every step, because equation (1) defines \(u\) only up to a constant. In this regime the pattern travels diagonally across the box, and the leading global POD coefficient repeats about every 33 time units.

The charts, the local Galerkin systems, the transition maps and the two errors are those of the 1-D demo, equations (2) to (5), with the state \(\bm{u} \in \mathbb{R}^{1024}\) of grid values and the inner product weighted by the quadrature weights of the grid. The predictability time, \(T_\mathrm{ph}\), is the first time at which the forecast error exceeds 0.5.

What the sweep shows

One global basis needs many modes to hold a travelling wave. The two leading global modes carry 54% of the energy of the training window, four modes carry 90% and sixteen carry 99.7%, and yet the single-chart model of sixteen modes holds the forecast for only 1.2 time units. With 30 modes, the upper end of the sweep, the single-chart model holds it for 16.8 time units.

Charts trade modes for local bases. At sixteen modes, eight charts represent the test window with an error of 0.0023, which is 4% of the error of one chart at the same number of modes, 0.056, and their forecast holds over the whole window of 200 time units. The number of modes that holds the whole window falls as charts are added: 25 modes with three charts, 20 with five and 16 with eight. In contrast to the chaotic 1-D case, in which the charts buy accuracy of representation rather than length of forecast, here the charts lengthen the forecast by two orders of magnitude at equal \(r\).

The gain has a geometric reason. The orbit of a travelling wave is a closed curve in state space, and each chart owns one arc of it. Within one arc the pattern is shifted by a fraction of its wavelength, so the local basis needs to represent only small translations, whereas the global basis needs to represent every translation at once.

How the data are produced

The page is static: every number it shows is precomputed by one script, and the browser only selects between stored states. To regenerate the sweep, run

python scripts/ks/build_web_demo_data.py --module ks2d --out docs/demo/data-ks2d

The script generates the trajectory of the full-order model, splits it into a training window of 20 000 snapshots and a test window of 2 000 snapshots (200 time units), fits the charts once per \(K\) with build_local_model, truncates that model to each \(r\), and forecasts in closed loop from the first test snapshot. It writes one JSON file per \((K, r)\) pair, plus an index. The sweep covers \(K = 1\) to 10 charts and \(r = 4\) to 30 modes. The snapshots are stored as 100 frames of 8 bits each, one every two time units.

Each cell of the sweep is a single forecast from a single initial condition. A forecast that holds over the whole window is reported as "all", and its predictability time is a lower bound, not a measurement.

References

  • Kassam, A.-K., & Trefethen, L. N. (2005). Fourth-order time-stepping for stiff PDEs. SIAM Journal on Scientific Computing, 26(4), 1214–1233.
  • Colanera, A., & Magri, L. (2025). Quantized local reduced-order modeling in time (ql-ROM). Computer Methods in Applied Mechanics and Engineering, 447, 118393.