A Browser-Native Reformulation of Dynamical EBSD Simulation
A browser-native reformulation of dynamical EBSD
For dynamical EBSD simulation, the usual path has been local native software (for example EMsoftOO workflows) or vendor-provided machines. This project takes a different route: a browser-native implementation of the low-rank Lyapunov reformulation from my manuscript, designed to make large master-pattern calculations practical without a desktop install.
What is new here
The core numerical change is in depth integration. Instead of solving a dense Bloch-wave eigendecomposition (the classical ZGEEV-style path) for each direction and energy, the same dynamical quantity is computed through a Lyapunov equation with a rank-one right-hand side from single-channel incidence.
To my knowledge, this is the first application of that Lyapunov reformulation strategy to electron diffraction simulation.
Why GPU is required here
This implementation is intentionally WebGPU-only. There is no CPU-mode fallback in the app.
The purpose of GPU acceleration is not UI polish; it is computational tractability. Reformulating the solver turns repeated eigendecomposition work into a pattern that maps well to GPU batching:
- Instead of repeated eigendecompositions, each direction uses one LU factorization and then repeated triangular solves (Smith / single-shift ADI form).
- Those solve steps are straightforward to execute in large batches.
- The total runtime is governed by low-rank convergence behavior rather than full dense eigenvector machinery.
In short, the reformulation and the GPU execution model are tightly coupled.
What the web app exposes
- CIF parsing with editable site-level thermal terms.
- Beam and truncation controls (voltage, sigma, dmin, Lambert half-width, Bethe thresholds, chunk size, and energy-bin width).
- Symmetry-aware north/south hemisphere viewing.
- NPZ export of integrated outputs (with optional extra saved arrays).
The compute path, CIF handling, and NPZ packaging all run locally in the browser session.
Current limitations and next steps
This is an active research implementation. Two caveats matter right now:
- More benchmarking is still needed for both speed and numerical accuracy across materials and parameter ranges.
- The surrogate ML model used to replace Monte Carlo depth profiling has known errors. For example, Forsterite currently shows an incorrect marginal, and the surrogate needs improved retraining.
Try it
Open the app, pick a preset (for example Ni), keep defaults, and press Run. Then adjust dmin and Bethe cutoffs to see how the pattern detail and runtime change.