Maxwell TEz double‑slit demo

Maxwell (TEz Yee) Double‑Slit in CBF

A 2‑D TEz FDTD solver drives a plane wave into a bright metal wall with two slits. The right side shows interference and a commit detector. Everything is phrased in CBF terms: translation flux Π is T, stored field energy density u is M, loss σ drains M, and the detector commits events with weights proportional to Π⋅n (or selectable alternatives).

How this maps to CBF

Π (Poynting) is the per‑cell translation budget T. The field energy density u is the maintenance budget M. The absorber implements M drain via σE². The NodeGraph on the right approximates the Event Ledger, selecting commits along the screen with probability ∝ weight (default Π⋅n). Slit edges act as geometry that diversifies directions, enabling phase alignment on the detector, where commit frequency appears as bright rows.

CBF ↔ Maxwell Mapping

Cheat Sheet
  • T (translation) = Poynting flux Π = E×H → arrays Pix,Piy
  • M (maintenance) = energy density u = ½(εE² + μH²) → array uArr
  • M drain = σE² (absorber)
  • Ledger commits = stochastic hits ∝ chosen weight (default |Π⋅n|)

60‑Second Tour

  • Left of slits: plane source + reflection → standing pattern (budget parked in M).
  • At slits: edges diversify directions, enabling phase match downstream.
  • Right of slits: interference fans; commits cluster where phases align (bright yellow rows).
  • Brightness = visual gain only.
  • Switch commit weight: Π⋅n≈screen flux, |Π|≈total flow, u≈stored energy.

What to expect

  • Before the slits: cavity interference from the plane source reflecting on the wall, a budget build‑up zone (more M).
  • After the slits: two secondary lobes that interfere; detector commits cluster where phases beat‑match.
  • Brightness slider: multiplies post‑normalization amplitude so high‑frequency runs stay visible without clipping low‑freq runs.

Settings

ParameterDefaultNotes
Frequency30Wavelength ≈ Nx / f.
Loss σ0.8Absorbing boundary strength (M drain).
Commit probability0.5Throttle for NodeGraph commits.
Commit weight|Π⋅n|Detector weighting mode (u, |Π|, |Π⋅n|, |Ez|²).
Brightness1.5Gain after auto‑scaling, keeps high‑f runs visible.
SlitsOnBright, thick wall with two clear openings by default.
Tip: On mobile, drag the table horizontally to view all columns.

Key Code

1) TEz Yee update (fields and PEC wall)

Standard TEz Yee with PEC mask for the bright wall and slits.

CBF Representation

Π emerges from fields as translation, u as maintenance. The PEC mask is a hard constraint that redirects T, creating the direction diversification needed for interference.

2) Bright wall, clear slits, and user brightness gain

Wall width increased, cyan guides added, and a post‑normalize brightness control keeps high‑frequency runs visible.

CBF Representation

The wall is a geometric constraint, not a source. The gain knob is purely visual, it does not change Π or u, only how we render accepted information.

3) CBF budget check and detector commits (Π·n by default)

Π is translation, u is maintenance. The detector picks commits stochastically with weight ∝ selected metric.

CBF Representation

The residual tracks local conservation between T outflow, M change, and σ drain. Commits are outcomes, not field accumulation.

4) Optional anti‑reflection buffer behind the source

Quiet the pre‑slit cavity by adding a thin σ strip behind the source line.

Run the Demo

Launch