Examples#

You can use the examples below to get started with PyLumerical and learn its basic functionalities.

For in-depth discussion of PyLumerical concepts, see the User guide.

Session management

This example demonstrates how to initialize a local Lumerical session using PyLumerical.

Basic Session Management
Basic FDTD simulation - Lumerical style commands

This example demonstrates how to set up a basic FDTD simulation with a Gaussian source and frequency-domain monitor. The example uses PyLumerical with workflows and syntax similar to the Lumerical Scripting Language.

Basic FDTD Simulation - Lumerical style commands
Basic FDTD simulation - Python style commands

This example demonstrates how to set up a basic FDTD simulation with a Gaussian source and frequency-domain monitor. This example uses PyLumerical with workflows and syntax that is more native to Python.

Basic FDTD Simulation - Python style commands
Basic MODE simulation - FDE Waveguide

This example demonstrates how to set up a basic MODE simulation to calculate the supported modes of a waveguide.

Simple Waveguide (MODE FDE)
Using Structure and Analysis Groups - Photonic Crystal Bandstructure

This example uses built-in Lumerical Structure and Analysis Groups to calculate the resonant frequencies of photonic crystals using FDTD. Lumerical’s built-in sweep tool is used to calculate the full bandstructure.

Photonic Crystal Bandstructure (FDTD)
Metalens (RCWA / FDTD)

This example runs RCWA simulations to create a unit cell library and constructs a full metalens in FDTD. The full metalens is simulated using symmetric boundary conditions in FDTD. A top-down monitor collects the fields after the structures and far-field calculations are used to plot the focusing behavior.

PyLumerical Metalens (FDTD)
Basic INTERCONNECT simulation - Ring Resonator

This example demonstrates how to set up a basic INTERCONNECT simulation to calculate the transmission spectrum of a ring resonator.

Simple Ring Resonator (INTERCONNECT)