# Device simulation reference¶

All functions and classes related to device simulation are namespaced under i3.device_sim.

For a tutorial running device simulations with IPKISS, please check the running device simulations tutorial.

## IPKISS¶

 device_sim.SimulationGeometry Defines the geometry of the electromagnetic simulation. device_sim.SMatrixOutput Output an SMatrix device_sim.Port A combined monitor and source, for use in a physical solver device_sim.Macro Defines a tool-specific macro which will be executed at a specified stage device_sim.MacroFile Defines a macro to be loaded from file
 device_sim.camfr_guided_modes Calculates the neff for guided modes for a material stack using the camfr mode solver. device_sim.camfr_mode_fields Calculates the fields for the modes for a material stack using the camfr mode solver. device_sim.camfr_compute_stack_neff Computes the effective index of mode in the material stack at the given wavelength. device_sim.camfr_stack_expr_for_structure For a given layout, call virtual fabrication and return a camfr.Expression that can be used to run a simulation. device_sim.get_material_stacks Convenience function that returns material stacks used to fabricate the structure.

## CST studio suite ®¶

 device_sim.CSTTDSimulation Define a simulation for use with CST Studio Suite ® (Time Domain solver).

### Macros¶

Found under i3.device_sim.cst_macros.

 field_monitor Macro to create a field monitor that covers the full simulation window.

## Ansys Lumerical¶

 device_sim.LumericalFDTDSimulation Define a simulation for use with Lumerical’s FDTD Solutions. device_sim.LumericalEMESimulation Class to setup Lumerical EME Simulation jobs using the MODE engine.

### Macros¶

Found under i3.device_sim.lumerical_macros.

 fdtd_profile_xy Macro to create an FDTD frequency domain Z-normal field profile monitor that covers the full simulation window, at a certain height. fdtd_mesh_accuracy Macro to set the mesh accuracy of the FDTD solver. export_port_neff Macro to export the effective index as a function of wavelength from the specified port to a file. eme_setup Macro to set up the spatial discretization of a simulation job in Lumerical MODE (using the EME solver). eme_profile_xy Macro to create an EME Z-normal field profile monitor that covers the full simulation window, at a certain height. eme_transverse_mesh Macro to set the transverse mesh in EME. eme_wavelength Macro to set the wavelength on the EME solver and the EME Analysis