ExamplesMeep Examples
MPB Square Rods
Compute photonic band structure for a square lattice of dielectric rods
MPB Square Lattice Band Structure
This example computes the photonic band structure for a square lattice of dielectric (GaAs) rods in air using MPB (MIT Photonic Bands).
Overview
Photonic crystals with square lattices are fundamental structures for:
- Band gap engineering: Designing photonic band gaps
- Waveguide modes: Defect-based waveguides
- Slow light: Group velocity reduction
- Filters: Wavelength-selective devices
Parameters
| Parameter | Value | Description |
|---|---|---|
r | 0.2 | Rod radius (in lattice units) |
eps | 11.56 | Dielectric constant (GaAs) |
resolution | 32 | Grid resolution |
num_bands | 8 | Number of bands to compute |
k_interp | 4 | K-point interpolation |
K-Point Path
The simulation follows the standard Brillouin zone path:
- Γ (0, 0) → X (0.5, 0) → M (0.5, 0.5) → Γ (0, 0)
Code Structure
from meep import mpb
# Square lattice
geometry_lattice = mp.Lattice(size=mp.Vector3(1, 1))
# GaAs rod
GaAs = mp.Medium(epsilon=11.56)
geometry = [mp.Cylinder(r=0.2, material=GaAs)]
# K-point path: Γ → X → M → Γ
k_points = mp.interpolate(k_interp, [Gamma, X, M, Gamma])
ms = mpb.ModeSolver(
geometry_lattice=geometry_lattice,
geometry=geometry,
k_points=k_points,
resolution=32,
num_bands=8,
)
# Compute TE and TM bands
ms.run_te()
ms.run_tm()Results
The simulation produces:
- TE band structure: Electric field in-plane
- TM band structure: Magnetic field in-plane
- Band gaps: Frequency ranges with no propagating modes
Related Examples
- MPB Triangular Holes - Complete band gap
- MPB Tutorial - Basic MPB usage
- Holey Waveguide Bands - Photonic crystal waveguides