Rigorous Coupled Wave Analysis (Fourier modal method) for 1D binary
gratings. Compute reflection R(λ) and transmission T(λ). Runs in-browser
via Pyodide + inkstone.
First load downloads ~35 MB (Pyodide + numpy + scipy + inkstone) — cached after.
v0.1.0·Updated 2026-06-10
Model & Assumptions
Experimental
Model
Rigorous Coupled Wave Analysis (Fourier modal method). Fields are expanded in plane-wave harmonics of the grating period; an eigenvalue problem is solved in each layer. Powered by inkstone via Pyodide.
Assumptions
1D periodicity, infinite lateral extent, plane-wave illumination, isotropic materials in each layer.
Validity
Exact in the limit of sufficient Fourier orders. Convergence should be checked by increasing the truncation order — especially for metallic gratings where convergence can be slow.
Limitations
1D gratings only (no 2D periodicity). Browser memory limits the practical number of Fourier orders. First load downloads ~35 MB (Pyodide + numpy + scipy + inkstone).
References
M. G. Moharam & T. K. Gaylord, J. Opt. Soc. Am. 71, 811 (1981); L. Li, J. Opt. Soc. Am. A 14, 2758 (1997).
Module
Parameters
Grating
Number of Fourier orders used in the RCWA expansion. Higher values improve convergence for sharp or high-contrast gratings, but make the calculation slower.
Materials ε = n²
Top+ i
Ridge+ i
Groove+ i
Substrate+ i
Incidence
Wavelength sweep
RCWA (Fourier modal method).
Expands fields in plane-wave harmonics of the grating period and
solves the eigenvalue problem in each layer. Diffraction orders
couple through the Fourier decomposition of ε(x).
Reflection / Transmission spectrumInitializing…
Geometry and solver conventions1D periodic, φ = 0
x is periodic with period Λ; y is invariant along the ridge direction.
z follows the layer stack from top/superstrate to substrate.
The incident plane wave enters from the top region; θ is measured from the surface normal in the x-z plane.
s/TE means E along y; p/TM means E lies in the x-z incidence plane.
Parameters
Grating
Illumination
Blazed (echelette) grating.
Analytic grating equation d(sin θi + sin θm) = mλ,
Littrow blaze, and derived dispersion. Facets tilted by γ steer
power into the order whose angle matches the facet reflection.