Skip to Content
Back

2D sweep: radius x epsilon

Parameter Sweeps

A 2D sweep multiplies the cost: 33 radii times 33 permittivities is 99 full band calculations. The result is a flat list ordered the same way nested sweeps are (last-declared parameter varies fastest), which is the natural layout for reshaping into an (nr,nε)(n_r, n_\varepsilon) grid for contour plots of band-edge frequencies or bandgap widths.

Explorer
two-dimensional-sweep/
grid_sweep.py
1import blaze
2
3# Sweep both radius and atom permittivity → a grid of jobs.
4results = blaze.solve(
5    lattice_type="square",
6    epsilon_background=1.0,
7    epsilon_atoms=[6.0, 10.0, 2.0],
8    radius_atom=[0.2, 0.3, 0.05],
9    polarization="TM",
10    n_bands=6,
11)
12
13print(f"{len(results)} configurations computed")

Band diagram

Run the example to see the band diagram.

Result · list[BandResult] (0)

Result
results:list[BandResult] (0)