🌊 EM Wave Simulator — 2D FDTD
Maxwell's curl equations solved on a 2D Yee grid using the Finite Difference Time Domain (FDTD) method. The TMz mode evolves Ez, Hx, Hy by leapfrog integration. Click the canvas to paint reflectors; use presets to see interference and diffraction.
Source
Draw Tool
Presets
Display
Simulation
What this demonstrates
The FDTD method (Yee, 1966) solves Maxwell's curl equations on a staggered spatial grid with a leapfrog time-stepping scheme. In the TMz mode the relevant fields are Ez, Hx and Hy. The stability condition (Courant–Friedrichs–Lewy) requires c·Δt / Δx ≤ 1/√2. Absorbing boundary conditions prevent artificial reflections at the edges. Painting cells as perfect electric conductors (PEC) allows you to create waveguides, cavities, slits and lenses.
How to use
- Point source: single oscillating dipole at grid centre
- Plane wave: coherent wave injected from the left edge
- Click/drag the canvas to paint reflectors; switch to Erase mode to remove them
- Use Presets for instant single-slit, double-slit, mirror and lens setups
- Increase Frequency to see shorter wavelengths and sharper diffraction
Did you know?
FDTD is used in real-world engineering to design antennas, photonic crystals, and integrated circuits at optical frequencies. The same Yee algorithm running here at 120×90 cells scales up to billion-cell 3D grids on supercomputers to simulate how radar waves diffract around aircraft or how light propagates through nanophotonic chips.