Component FDTD simulations#
Thanks to the GDSFactory plugin you can directly run simulations in different FDTD solvers.
See tutorial
Meep is open source and does not require a license. However, both tidy3d and Lumerical require licenses to use.
Tidy3d#
tidy3D is a fast GPU based FDTD tool developed by flexcompute.
To run, you need to create an account and add credits. The number of credits that each simulation takes depends on the simulation size and computation time.
import gplugins as sim
import gplugins.tidy3d as gt
import ubcpdk.components as pdk
from ubcpdk.config import PATH
c = pdk.ebeam_y_1550()
c.plot()
sp = gt.write_sparameters(c, filepath=PATH.sparameters / "ebeam_y_1550_20634f71.npz")
17:36:53 UTC WARNING: 'simulation.structures[0]' is outside of the simulation domain.
WARNING: 'simulation.structures[0]' is outside of the simulation domain.
Simulation loaded from PosixPath('/__w/ubc/ubc/sparameters/ebeam_y_1550_20634f71.npz')
sp.keys()
dict_keys(['o1@0,o1@0', 'o2@0,o1@0', 'o3@0,o1@0', 'o1@0,o2@0', 'o2@0,o2@0', 'o3@0,o2@0', 'o1@0,o3@0', 'o2@0,o3@0', 'o3@0,o3@0', 'wavelengths'])
sim.plot.plot_sparameters(sp)
sim.plot.plot_loss1x2(sp)
sim.plot.plot_imbalance1x2(sp)
Lumerical FDTD#
You can write the Sparameters for all components in the UBC ubcpdk.components
PDK using lumerical FDTD plugin in gplugins
To run simulations uncomment the following lines
import gplugins as sim
import ubcpdk.components as pdk
for f in [
pdk.bend,
pdk.coupler,
pdk.coupler_ring,
pdk.ebeam_y_1550,
pdk.ebeam_crossing4,
]:
component = f()
component.plot()
# ls.write_sparameters_lumerical(component=component)
# sp = ls.read.read_sparameters_lumerical(component=ubcpdk.components.straight())
# sim.plot_sparameters(sp)