Interactive visualization: requirements
Status: requirements draft. No frontend code before a design is approved (global ui-design rule); M10a produces that design from this document, in parallel with M1 and M2; views then ship with their milestones.
1. Purpose
A browser tool in which every layer of the model can be inspected, every component toggled, and every integrator and estimator compared side by side. Two uses: (1) our own research instrument while developing M2 to M9; (2) a demonstration for Dullemond and the group, and possibly figures for talks. It is public at https://coag.mader.xyz from the first view on, so it can be checked live and shared early.
2. Views
| View | Shows | Controls | Live in wasm? |
|---|---|---|---|
| Disk | Σ_g, T, c_s, H_p, ρ_g(r, z), λ_mfp, ν_mol vs ν_t, Re, u_g, u_n over r; marker at r₀ | star, disk mass, profile exponent, flaring angle, α, viscosity choice, r₀ | yes |
| Particles | a(m), St(m), regime boundaries (Epstein/Stokes), for p = 2 a(m, φ) | ρ_s, grid range, resolution | yes |
| Relative velocities | Δv_ij heat maps per component and total; slices; dominant-component map | each component on/off, turbulence model, combination rule | yes |
| Collisions | σ_ij, C_ij, P^coag, P^bounce, P^frag maps; outcome regime map | outcome model, v_frag, v_bounce | yes |
| Kernel | K_kij slices by k (gain, loss, total, per outcome), recipe inspector for a clicked pair (i, j), ΔX^rel map, sparsity | fragment model, slope, cratering, boundary policy, cancellation handling | yes (N_m ≤ 100) |
| Integration | m²f(m) or ρ_k vs time (animated and as a heat map), δ_M(t), RMS dN/dt, step sizes, rejected steps | integrator, tolerances, Jacobian strategy, time range | yes for small runs; loaded results otherwise |
| Sampling | p_ij maps, drawn pairs per step, estimator bias/variance on a snapshot, noise floor | estimator, proposal, S, hold policy, seed, replicas | snapshot yes; full runs loaded |
| Compare | Two or more runs overlaid; difference maps; e_acc(t); work-precision diagrams | select runs from manifest list | loaded results |
| Run browser | All experiment outputs with manifests, configs, figures | filter by experiment, date, config | loaded |
3. Interaction principles
- Every toggle maps 1:1 to a config key; the current UI state can be exported as a
config.tomland imported again, so anything seen in the browser can be rerun withcoag-cli. - Linked views: clicking a pair (i, j) in any matrix highlights the same pair in Δv, C_ij, P, kernel, and sampling views.
- Long computations run in a Web Worker; the UI never blocks.
- Every plot can be exported as SVG/PNG plus the data array.
4. Technical constraints
- Stack: Leptos SPA, core crates compiled to wasm (ADR 0012); plotting library chosen per the
data-visualizationskill in M10a (heat maps and animated lines with 10⁴ points must stay smooth). - Deterministic results identical to the CLI for the same config and seed (same RNG, ADR 0009).
- Hosting: static files on mk11 behind the shared Caddy (site file in
vps-infra/mk11/caddy/sites/), deployed by GitHub Actions (hetzner-deploy); no backend. DNS for coag.mader.xyz is set up. - Public and English only (documented exception to the German/English default: the audience is physicists). No analytics, no cookies, all assets bundled, so the privacy policy stays minimal; shared Impressum and privacy pages for the mader.xyz family are linked from the app.
5. Acceptance
- All toggles from M2 to M8 reachable.
- Kernel recomputation at N_m = 100 below 1 s in the browser on the M1 Pro.
- Screenshot review per
ui-designpassed (symmetric spacing, consistent typography, readable color scales in light and dark mode).