5. 1D Lamellar Diffraction Grating: Bloch Modes and Polarization

Physical Motivation & Learning Objectives

Periodic nanostructures diffract incident plane waves into discrete Bloch modes. In 1D lamellar gratings:

  1. Electric fields polarized along grating grooves (TE polarization) obey scalar Dirichlet/Neumann conditions.

  2. Fields with magnetic fields parallel to grooves (TM polarization) feature discontinuous normal electric fields at material interfaces.

  3. We compute 1D Bloch modes and compare TE and TM spectra.

Legacy example. This notebook reproduces simo_030-1D_grating.py from the original EMUstack. The LEGACY_PARAMS switch in the next cell selects the inputs:

  • LEGACY_PARAMS = True (default): the legacy inputs, unchanged. T, R and A then agree with legacy EMUstack to 1e-9 (checked in benchmarks/parity/, examples/ version)

  • LEGACY_PARAMS = False: 41 wavelengths instead of 2. The legacy example computes only TE; this notebook adds TM.

[ ]:
# True: the inputs of the original EMUstack example, unchanged.
# False: same structure, 41 wavelengths instead of 2.
LEGACY_PARAMS = True
[1]:
import numpy as np
import matplotlib.pyplot as plt
import concurrent.futures

from EMUstack.backend import materials, objects, plotting
from EMUstack.backend.stack import Stack


##################################################################
EMUstack is brought to you by Bjorn Sturmberg, Kokou Dossou,
Felix Lawrence & Lindsay Botton, with support from CUDOS & ARENA
Starting EMUstack calculation ...
##################################################################

Grating Setup: \(\Lambda = 300\) nm, Height \(= 2900\) nm, Fill Factor \(= 0.75\)

The inclusion (\(n = 5.0\)) sits in a background of \(n = 1.46\), with air above and below.

[2]:
wavelengths = np.linspace(400, 800, 2 if LEGACY_PARAMS else 41)
period = 300.0  # nm
grating_w = int(round(0.75 * period))

light_list = [objects.Light(wl, max_order_PWs=5, theta=0.0, phi=0.0) for wl in wavelengths]

superstrate = objects.ThinFilm(period, height_nm='semi_inf', material=materials.Air, world_1d=True, loss=False)
substrate   = objects.ThinFilm(period, height_nm='semi_inf', material=materials.Air, world_1d=True, loss=False)

grating = objects.NanoStruct(
    '1D_array', period, grating_w, height_nm=2900.0,
    background=materials.Material(1.46),
    inclusion_a=materials.Material(5.0),
    loss=True, lc_bkg=0.0051, plt_msh=False
)

def simulate_te(light):
    sim_sup = superstrate.calc_modes(light)
    sim_sub = substrate.calc_modes(light)
    sim_grt = grating.calc_modes(light)
    stk = Stack((sim_sub, sim_grt, sim_sup))
    stk.calc_scat(pol='TE')
    return stk

def simulate_tm(light):
    sim_sup = superstrate.calc_modes(light)
    sim_sub = substrate.calc_modes(light)
    sim_grt = grating.calc_modes(light)
    stk = Stack((sim_sub, sim_grt, sim_sup))
    stk.calc_scat(pol='TM')
    return stk

with concurrent.futures.ThreadPoolExecutor(max_workers=24) as executor:
    stacks_te = list(executor.map(simulate_te, light_list))
    stacks_tm = list(executor.map(simulate_tm, light_list))

Comparing TE vs TM Polarized Spectra

[3]:
t_te = [float(s.t_list[-1]) for s in stacks_te]
r_te = [float(s.r_list[-1]) for s in stacks_te]
t_tm = [float(s.t_list[-1]) for s in stacks_tm]
r_tm = [float(s.r_list[-1]) for s in stacks_tm]

fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 4.5), dpi=100)
ax1.plot(wavelengths, t_te, 'b-', lw=2, label='TE Transmission')
ax1.plot(wavelengths, r_te, 'r--', lw=2, label='TE Reflection')
ax1.set_title('TE Polarization (E $\parallel$ grooves)', fontsize=12)
ax1.set_xlabel('Wavelength (nm)', fontsize=11)
ax1.set_ylabel('Efficiency', fontsize=11)
ax1.grid(True, alpha=0.3)
ax1.legend()

ax2.plot(wavelengths, t_tm, 'g-', lw=2, label='TM Transmission')
ax2.plot(wavelengths, r_tm, 'm--', lw=2, label='TM Reflection')
ax2.set_title('TM Polarization (H $\parallel$ grooves)', fontsize=12)
ax2.set_xlabel('Wavelength (nm)', fontsize=11)
ax2.set_ylabel('Efficiency', fontsize=11)
ax2.grid(True, alpha=0.3)
ax2.legend()

plt.tight_layout()
plt.show()

<>:9: SyntaxWarning: "\p" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\p"? A raw string is also an option.
<>:17: SyntaxWarning: "\p" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\p"? A raw string is also an option.
<>:9: SyntaxWarning: "\p" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\p"? A raw string is also an option.
<>:17: SyntaxWarning: "\p" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\p"? A raw string is also an option.
/tmp/ipykernel_824758/3382283649.py:9: SyntaxWarning: "\p" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\p"? A raw string is also an option.
  ax1.set_title('TE Polarization (E $\parallel$ grooves)', fontsize=12)
/tmp/ipykernel_824758/3382283649.py:17: SyntaxWarning: "\p" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\p"? A raw string is also an option.
  ax2.set_title('TM Polarization (H $\parallel$ grooves)', fontsize=12)
../_images/examples_netgen_simo_030-1D_grating_7_1.png

Physical Interpretation

  • The structure is lossless, so \(T + R = 1\) for both polarizations.

  • The 2.9 µm-thick, high-index grating carries many propagating Bloch modes. Their interference makes \(T\) swing between almost 0 and almost 1 within a few nanometres, faster than the 10 nm sampling can follow: the curves are undersampled.

  • With \(\Lambda = 300\) nm, the first diffraction orders in air appear only below \(\lambda = 300\) nm. Between 400 and 800 nm only the zeroth order leaves the grating, so there are no Rayleigh (Wood) anomalies in this range.

  • TE and TM differ because the boundary conditions at the vertical interfaces depend on polarization.