Running MEEP Simulations¶
MEEP is an open-source FDTD electromagnetic simulator. This notebook demonstrates using the gsim.meep API to run an S-parameter simulation on a photonic Y-branch.
Requirements:
- UBC PDK:
uv pip install ubcpdk - GDSFactory+ account for cloud simulation
Load a pcell from UBC PDK¶

Configure and run simulation¶
from gsim import meep
from gsim.meep.models.api import Material
sim = meep.Simulation()
sim.geometry(component=c)
sim.materials = {
"si": Material(refractive_index=3.47),
"SiO2": Material(refractive_index=1.44),
}
sim.source(port="o1", wavelength=1.55, wavelength_span=0.01)
sim.num_freqs = 21
sim.monitors = ["o1", "o2"]
sim.domain(pml=1.0, margin_x=0.5, margin_y=0.5, z_ref="stack")
sim.solver(resolution=20, save_animation=True, verbose_interval=5.0)
sim.solver.stop_after_sources(time=100)
print(sim.validate_config())
Stack validation: PASSED
Warnings:
- No stack configured. Will use active PDK with defaults.
- Stopping: fixed (time=100.0)

Run simulation on cloud¶
meep-7f5ba74e completed 6m 36s
Extracting results.tar.gz...
Downloaded 362 files to /home/runner/work/simulation-templates/simulation-templates/docs/notebooks/sim-data-meep-7f5ba74e
