band structure script for 1D photonic crystal in lumerical
- User
band structure script for 1D photonic crystal in lumerical
- Assistant
The following is a basic script for creating and analyzing the band structure of a 1D photonic crystal using Lumerical's FDTD Solutions software:
# Define simulation parameters dx = 10e-9 # lattice constant n_period = 10 # number of periods n_points = 200 # number of k-points # Create structure addrect(); # Add rectangle primitive set("name", "waveguide"); # Set rectangle name set("x", 0); # Set x position set("y", 0); # Set y position set("z", 0); # Set z position set("x span", dx); # Set x span set("y span", 100e-9); # Set y span (thickness) set("material", "silicon"); # Set material properties # Create lattice of waveguides for i in range(n_period): duplicate("waveguide"); # Duplicate waveguide set("x", i*dx); # Set x position # Set simulation options set("boundary conditions", ["Bloch", "Bloch", "PML"]); # Set boundary conditions set("number of bands", 3); # Set number of bands to calculate # Perform band structure simulation run; # Plot band structure switchtolayout; # Switch to layout mode select("mode source"); # Select mode source set("number of k points", n_points); # Set number of k-points set("k span", [0, 2*pi/dx]); # Set k-vector range set("k vector", [0, 0]); # Set initial k-vector addband("bandstructure"); # Add band structure monitor set("x", 0); # Set x position set("y", 0); # Set y position set("z", 0); # Set z position set("x span", dx*n_period); # Set x span set("y span", 100e-9); # Set y span (thickness) set("mode selection", "fundamental TE"); # Set mode selection run; # Display band structure plotbandstructure; # Plot band structure