FdtdSession#
- class lumopt2.core.fdtd_session.FdtdSession(show_fdtd_cad: bool = False)#
A class to manage the FDTD simulation session.
- Parameters:
- show_fdtd_cadbool,
optional Whether to display the FDTD CAD interface (default: False).
- show_fdtd_cadbool,
Methods
Add DFT field monitors to the FDTD simulation.
Add index monitors to the FDTD simulation.
FdtdSession.add_nk_import_object(box, ...)Add an nk import object to the FDTD simulation.
FdtdSession.check_object_for_source(idx[, ...])Check whether the object at index idx contains an active source.
Check if the simulation completed successfully.
Close the underlying Lumerical FDTD session.
Get a list of all active sources in the simulation.
Extract several values from one
getresultcall, sliced per wavelength.FdtdSession.get_fields_at_wavelengths(sim_result)Extract monitor values from a simulation at each requested wavelength.
FdtdSession.get_result(monitor_name, key_name)Get results from a monitor in the FDTD simulation.
Get the status of the most recent FDTD simulation.
Mark the in-memory FDTD state as no longer matching any file.
FdtdSession.load_base_simulation(setup, ...)Setup base simulation from file, function, or script.
FdtdSession.load_if_needed(filename)Load
filenameonly if it isn't already the active project.Lock the FDTD grid to prevent changes to the grid size and ensure consistency across simulations.
FdtdSession.mark_as_loaded(filename)Record
filenameas the file that matches the in-memory state.FdtdSession.remove_objects_by_name(object_names)Remove objects from FDTD simulation by name.
FdtdSession.set_mesh_refinement_region(box, ...)Add a mesh refinement region to the FDTD simulation.
FdtdSession.set_working_directory(workingDir)Set the working directory for the FDTD session.
FdtdSession.update_polygon(structure[, ...])Create or update the optimization polygon in the FDTD CAD.
FdtdSession.update_polygon_vertices(vertices)Update the optimization polygon object in the FDTD CAD with new vertices.
FdtdSession.update_properties_in_cad(properties)Update object properties in the FDTD CAD.
Verify simulation setup: - Should contain an FDTD structure.
Verify that the mesh size within the optimization region is uniform.