Skip to content
BeamZ BeamZ

Rasterization

Rasterization converts continuous shapes and materials into coefficients integrated over the supports of the Yee fields.

From geometry to coefficients

A typical pipeline is:

  1. Define the background material and geometric objects, including their overlap priority.
  2. Choose the grid edges and the physical extent of the simulation.
  3. Resolve material ownership wherever objects overlap.
  4. Integrate material properties over cells and component-specific Yee supports.
  5. Form the constitutive coefficients used by the field updates.

BeamZ accepts analytic geometry, imported layouts, and closed triangle meshes. It produces cell-centered material information and tensors integrated separately over electric and magnetic supports.

Why interfaces are difficult

Point sampling makes curved boundaries into staircases: a small translation can change a whole row of cells, and a coarse grid can miss thin features.

For a support volume VV containing material 1 over V1V_1, define its filling fraction

f=V1V,0≤f≤1.f=\frac{V_1}{V},\qquad 0\le f\le1.

Simple volume averaging gives

εvol=fε1+(1−f)ε2.\varepsilon_{\mathrm{vol}}=f\varepsilon_1+(1-f)\varepsilon_2.

This varies continuously with the occupied volume, but it treats all field directions alike. Maxwell’s interface conditions show why that is not generally sufficient.

Tangential and normal averaging

For a locally planar dielectric interface with no free surface charge or current, tangential E\mathbf E and normal D\mathbf D are continuous. For two isotropic materials, those conditions lead to different effective permittivities:

ε∥=fε1+(1−f)ε2,ε⊥=(fε1+1−fε2)−1.\varepsilon_{\parallel}=f\varepsilon_1+(1-f)\varepsilon_2, \qquad \varepsilon_{\perp}=\left(\frac{f}{\varepsilon_1} +\frac{1-f}{\varepsilon_2}\right)^{-1}.

Tangential averaging is arithmetic because the tangential electric field is shared. Normal averaging is harmonic because the normal displacement is shared, while E⊥=D⊥/εE_{\perp}=D_{\perp}/\varepsilon changes between materials.

With interface unit normal n^\hat{\mathbf n}, the corresponding effective tensor is

εeff=ε∥(I−n^n^T)+ε⊥n^n^T.\boldsymbol\varepsilon_{\mathrm{eff}} =\varepsilon_{\parallel}(\mathbf I-\hat{\mathbf n}\hat{\mathbf n}^{\mathsf T}) +\varepsilon_{\perp}\hat{\mathbf n}\hat{\mathbf n}^{\mathsf T}.

Even two isotropic materials therefore produce an anisotropic effective interface cell. For a 50/50 mixture of relative permittivities 12 and 1, the tangential value is 6.5 while the normal value is approximately 1.846. Choosing one scalar for both directions can noticeably change the interface response.

This planar-interface argument motivates subpixel smoothing; it does not make a corner or several crossing interfaces equivalent to a single plane. Meep’s subpixel smoothing documentation explains the relationship between interface averaging, staircasing, and convergence.

How this maps to BeamZ

BeamZ defaults to diagonal Farjadpour-style smoothing. Volume averaging and farjadpour_full are also available. Full smoothing retains cross-component coupling, which a tilted interface can generate even from isotropic materials.

Where a reliable local interface orientation is unavailable, smoothing can fall back to volume averaging. Conductivity is volume averaged.

FDTD currently requires unit relative permeability (μr=1\mu_r=1); full tensor coupling additionally requires zero electric conductivity. Full-tensor conductivity is unsupported. Use CPML rather than a conductive sponge absorber with full coupling. The scalar Yee equations do not describe its coupled update. Standalone rasterization accepts a wider range of material tensors than FDTD can propagate; see the BeamZ raster documentation.

Inspect the rasterized coefficients, not just the original shapes.

Checking a rasterized design

Confirm material assignment and overlap priority, inspect narrow gaps and thin layers, then refine the grid.

Translate the geometry by a fraction of a cell. Large changes in transmission or resonance position suggest sampling sensitivity. Smoothing can reduce this sensitivity but cannot recover unresolved features.

Change resolution and smoothing separately to identify what improves the result.

Continue to CPML.