Expand description
1D electromagnetics by the Yee FDTD scheme (the canonical, validatable Maxwell solver).
E_y and H_z are staggered in space and leap-frogged in time:
Hz[i] += (Δt/μΔx)·(Ey[i+1] − Ey[i])
Ey[i] += (Δt/εΔx)·(Hz[i] − Hz[i-1]) − (Δt·σ/ε)·Ey[i]with the Courant number c·Δt/Δx ≤ 1. Fields are stored in the 3-vector
layout E = (0, Ey, 0), H = (0, 0, Hz) (electric_out / magnetic_out).
Validation: an impedance-matched pulse (Hz = Ey/η) is a pure right-moving
wave; the test checks it travels the analytic distance c·Δt·N/Δx and that
the lossless field energy stays bounded.
Functions§
- solve
- Solves.