rcwa API¶
There are four main user-facing classes: Solver
, Layer
, LayerStack
, Source
, Material
, Crystal
, and Plotter
. The Layer
class is used to set up the individual simulation layers and define their properties, including thickness, material properties, and crystal structures (if applicable). The Material
class can be passed into the Layer
class to define a layer whose material properties are dependent on refractive index. The Crystal
class is used to define layers which are periodic in x and y, and is also passed into the Layer
class. Once all individual layers are constructed, they are used to create a LayerStack
, which contains information about which region is considered the “incident” region and which is the “transmission” region (both are semi-infinite).
The Source
class is used to define the excitation source - the wavelength, polarization, and incident angle.
Once the user has created a Source
and LayerStack
class, these are passed into the Solver
class, which then runs the simulation, and makes the results available as a dictionary Solver.results
.