Introduction

Blaze2D computes photonic bands and projected Maxwell operators for two-dimensional periodic dielectric structures. It is written in Rust and available through Python, TOML files, a native command, and the browser Workbench.

This page builds the physical picture those calculations rest on: what makes a crystal photonic, how a repeating structure is described, and what a band structure actually reports.

What makes a crystal photonic?

A photonic crystal is a material whose dielectric permittivity repeats in space. Alternating glass and air layers are a simple example. Light scattered by the repeated interfaces interferes, allowing some waves to travel through the structure while excluding others. The pattern and dielectric contrast determine that response.

Three blocks showing dielectric patterns that repeat in one, two, or three directions: layers, an extruded two-dimensional pattern, and a three-dimensional pattern.Open full size in a new tab
Periodicity in one, two, and three dimensions. In the 2D model used by Blaze, the cross-section repeats in the plane and is unchanged along the third direction.

To describe a repeating pattern, separate its lattice from its basis. The lattice specifies the translations: integer steps along two primitive vectors, a1\mathbf{a}_1 and a2\mathbf{a}_2. The basis is the arrangement of objects repeated at each lattice point. There are five Bravais lattice types in two dimensions.

The five two-dimensional Bravais latticesFive columns show square, rectangular, centered rectangular, hexagonal or triangular, and oblique lattices. The first row shows a primitive cell with vectors a1 in blue and a2 in orange. The second row repeats each lattice as a five by five patch of points. A dashed rectangle identifies a conventional centered rectangular cell.Squarea1a2Rectangulara1a2Centered rectangulara1a2Hexagonal(triangular)a1a2Obliquea1a2
Primitive cells and their translation vectors above; 5 × 5 lattice patches below. The shaded cell repeats to fill the plane. The dashed rectangle marks a conventional centered cell. Scroll sideways to compare all five lattices.

Place a dielectric rod at every point, or an air hole in a uniform dielectric, and the lattice becomes a photonic crystal. A basis can also contain several objects. For example, a honeycomb pattern uses a triangular lattice with two sites per cell. The lattice sets the translations; the basis, object sizes, and materials set the permittivity within each cell.

Why does light form bands?

The geometry enters Maxwell's equations through the relative permittivity ε(x)\varepsilon(\mathbf{x}). For a lossless, nonmagnetic material without frequency dispersion, the magnetic field obeys the photonic master equation:

∇×(1ε(x)∇×H)=ω2c2H.\nabla \times \left(\frac{1}{\varepsilon(\mathbf{x})}\nabla \times \mathbf{H}\right) = \frac{\omega^2}{c^2}\mathbf{H}.

Here H\mathbf{H} is a mode's magnetic field, ω\omega its angular frequency, and cc the speed of light in vacuum. This is an eigenvalue problem: find the field patterns whose shape is unchanged by the operator on the left. The scale factor is the eigenvalue ω2/c2\omega^2/c^2.

If you know electronic band theory, the connection is direct. A periodic potential acts on an electron's wavefunction in the Schrödinger equation. A periodic permittivity acts on an electromagnetic field in Maxwell's equations. Both admit Bloch waves and bands, although the fields, operators, and physical observables differ.

Comparison slide: graphene with two carbon sites per cell and the Schrödinger equation on the left; a honeycomb arrangement of air holes in dielectric and the photonic master equation on the right.Open full size in a new tab
The same lattice language describes both systems. The electronic model resolves a wavefunction in an atomic potential; the photonic model describes the material through its macroscopic permittivity.

Periodicity lets us write each mode as a plane wave multiplied by a function that repeats in every cell:

Hnk(x)=eik⋅xunk(x).\mathbf{H}_{n\mathbf{k}}(\mathbf{x}) = e^{i\mathbf{k}\cdot\mathbf{x}}\mathbf{u}_{n\mathbf{k}}(\mathbf{x}).

The Bloch wavevector k\mathbf{k} sets the phase change from cell to cell. For each k\mathbf{k}, the master equation gives a sequence of allowed frequencies. Following the nnth frequency as k\mathbf{k} changes gives a band, ωn(k)\omega_n(\mathbf{k}).

How do I read a band diagram?

A band diagram plots those frequencies along a path through the Brillouin zone, the region of distinct Bloch wavevectors. Labels such as Γ\Gamma, XX, MM, and KK mark points of lattice symmetry. The horizontal axis is a path in wavevector space, not a position inside the crystal.

Photonic bands for square dielectric rods on the left and triangular air holes on the right. Blue curves are TM and orange curves are TE. Shading marks a TM gap on the left and a shared TE and TM gap on the right.Open full size in a new tab
Square rods in air (left) and a triangular lattice of air holes (right). Insets show the structures and the paths through their Brillouin zones.

Each curve is one allowed mode frequency. The vertical axis uses ωa/(2πc)=a/λ0\omega a/(2\pi c)=a/\lambda_0, where aa is the lattice constant and λ0\lambda_0 the vacuum wavelength. This normalization makes the diagram independent of the overall scale of a nondispersive crystal.

The blue curves are TM modes, with the electric field along the invariant direction. Orange curves are TE modes, with the magnetic field in that direction. On the left, the shaded interval excludes TM modes but still contains TE modes. On the right, the shaded interval is shared by both polarizations. A complete band gap requires an absence of modes throughout the Brillouin zone, so checking only the plotted path is not sufficient to establish it.

Band slopes also carry information: ∇kωn\nabla_{\mathbf{k}}\omega_n gives the group velocity. A flatter band means slower propagation in the corresponding direction. These frequencies and field patterns are the basic results returned by a band solver.

How does Blaze solve the equation?

MPB and Blaze use a plane-wave expansion (PWE). Once the Bloch phase is separated out, the remaining field is periodic. It can therefore be represented by a finite set of Fourier components, labelled by reciprocal lattice vectors G\mathbf{G}:

unk(x)≈∑GcnG(k) eiG⋅x,A(k) cn=ωn2(k)c2 B cn.\begin{aligned} u_{n\mathbf{k}}(\mathbf{x}) &\approx \sum_{\mathbf{G}} c_{n\mathbf{G}}(\mathbf{k})\,e^{i\mathbf{G}\cdot\mathbf{x}},\\[0.6em] A(\mathbf{k})\,\mathbf{c}_n &= \frac{\omega_n^2(\mathbf{k})}{c^2}\,B\,\mathbf{c}_n. \end{aligned}

For Blaze's 2D scalar problems, uu is the periodic part of HzH_z for TE or EzE_z for TM. The coefficients cn\mathbf{c}_n are the unknowns. AA represents the differential operator; BB is the identity for TE and the dielectric weight for TM. An iterative eigensolver finds the requested bands at each wavevector. Increasing the grid resolution adds Fourier components, and convergence checks show whether the chosen resolution is sufficient.

  1. 01Define the cellLattice, objects, permittivity
  2. 02Solve at each kPeriodic fields and frequencies
  3. 03Trace the bandsDispersion, gaps, mode profiles

Blaze currently supports two-dimensional circles and positive scalar dielectric materials. This covers rods, holes, and multi-object bases on any 2D Bravais lattice. Its rods and holes extend uniformly along the third direction.

Why calculate many different crystals?

One band diagram answers a question about one configuration. Designing a crystal or building a model often requires a parameter study: repeat the calculation while changing the geometry or material.

Rod or hole radiusWhere does a gap open or close?
Positions in the basisHow do alignment and symmetry change the bands?
Dielectric constantHow does material contrast shift the frequencies?

In many short solves, geometry setup can become a substantial repeated cost. MPB's geometry initialization samples and averages the dielectric near interfaces. Blaze targets this overhead with specialized circle geometry and analytic boundary area fractions, and schedules independent configurations across CPU cores. Its ordered sweeps retain the parameter values alongside each result.

The technical report compares complete calculation times against MPB under stated settings. Those timings include both setup and solving; the benefit depends on the geometry, resolution, and number of requested bands.

What can operator data tell us?

A band diagram shows where the modes lie. It does not, by itself, tell us how two modes couple when a structure changes. That requires matrix elements of the operator and its derivatives between the computed fields.

MPB already exposes frequencies, electromagnetic fields, raw eigenvectors, and group velocities through its Python interface. It does not provide Blaze's prepared collection of projected derivative matrices and associated coordinate and phase-convention metadata. Deriving these from MPB output requires an additional extraction workflow.

Both solvers use matrix-free operator application: they evaluate AvA\mathbf{v} for a trial field without storing the full matrix AA. Fourier transforms connect spatial derivatives to material multiplication. This saves memory, and it still allows small projected matrices to be computed by applying an operator to selected fields and taking their inner products.

For example, let LL be the periodic TE operator. A parameter pp such as a wavevector component or an object's displacement gives the derivative matrix

Dmn(p)=⟨um,∂L∂p un⟩,Lun=λnun,λn=ωn2c2.\begin{aligned} D^{(p)}_{mn} &= \left\langle u_m,\frac{\partial L}{\partial p}\,u_n\right\rangle,\\[0.6em] L u_n&=\lambda_n u_n,\qquad \lambda_n=\frac{\omega_n^2}{c^2}. \end{aligned}

Here the fields are normalized within the unit cell. Away from degeneracies, diagonal entries describe the first-order change in an eigenvalue; off-diagonal entries describe mixing between different modes. Near a degeneracy, the coupled bands must be treated together.

Data available in BlazePhysical use
Wavevector derivatives and curvature matricesPropagation, coupling between bands, and effective masses understood as band curvature
Derivatives with respect to object displacementPerturbations caused by changing the relative alignment of objects in a cell
Cross-band matrix elements and overlaps between sampled statesReduced models that retain selected bands and track changes in their basis

For TM, the dielectric weight and its derivatives must also be included; Blaze records those separately. The operator reference specifies the available quantities and conventions.

This is the connection to the master's thesis. A twisted photonic crystal can be described through many locally periodic crystals whose alignment changes slowly in space. Their bands supply the local frequencies. Their projected operator data supply coefficients for an effective model of the slow variation. Blaze was built to make both parts of that calculation practical.

To calculate a first band diagram, open an example or follow the installation guide.

Blaze2D

Loading search…

Tab to move through results · Escape to close