API Design#

Meshing#

Meshing

get_layer_overlaps_z(layer_stack[, include_zmax])

Maps layers to unique LayerStack z coordinates.

get_layers_at_z(layer_stack, z)

Returns layers present at a given z-position.

list_unique_layer_stack_z(layer_stack)

List all unique LayerStack z coordinates.

map_unique_layer_stack_z(layer_stack[, ...])

Map unique LayerStack z coordinates to various layers.

order_layer_stack(layer_stack)

Orders layer_stack according to mesh_order.

get_u_bounds_layers(layer_polygons_dict, ...)

Given a layer_polygons_dict and two coordinates (x1,y1), (x2,y2), computes the bounding box(es) of each layer in the xsection coordinate system (u).

get_u_bounds_polygons(polygons, xsection_bounds)

Performs the bound extraction given a (Multi)Polygon or [Polygon] and cross-sectional line coordinates.

get_uz_bounds_layers(layer_polygons_dict, ...)

Given a component and layer stack, computes the bounding box(es) of each layer in the xsection coordinate system (u,z).

uz_xsection_mesh(component, xsection_bounds, ...)

Mesh uz cross-section of component along line u = [[x1,y1] , [x2,y2]].

xy_xsection_mesh(component, z, layer_stack, ...)

Mesh xy cross-section of component at height z.

Mode solvers#

Mode solver tidy3d

Waveguide(*[, wavelength, box_material, ...])

Waveguide Model.

WaveguideCoupler(*[, wavelength, ...])

Waveguide coupler Model.

sweep_n_eff(waveguide, **sweep_kwargs)

Return the effective index for a range of waveguide geometries.

sweep_n_group(waveguide, **sweep_kwargs)

Return the group index for a range of waveguide geometries.

sweep_bend_mismatch(waveguide, bend_radii)

Overlap integral squared for the bend mode mismatch loss.

sweep_coupling_length(coupler, gaps[, ...])

Calculate coupling length for a series of gap sizes.

Mode solver Femwell

compute_cross_section_modes(cross_section, ...)

Calculate effective index of a cross-section.

Mode solver MPB

find_modes_waveguide([tol, wavelength, ...])

Computes mode effective and group index for a rectangular waveguide.

find_modes_coupler([tol, wavelength, ...])

Computes mode effective and group index for a rectangular waveguide.

find_neff_vs_width([width1, width2, steps, ...])

Sweep waveguide width and compute effective index.

find_mode_dispersion([wavelength, ...])

Returns Mode with correct dispersion (ng).

find_coupling_vs_gap([gap1, gap2, steps, ...])

Returns coupling vs gap pandas DataFrame.

find_neff_ng_dw_dh([width, thickness, ...])

Computes group and effective index for different widths and heights.

plot_neff_ng_dw_dh([width, thickness, ...])

Plot neff and group index versus width (dw) and height (dh) variations.

plot_neff_vs_width(df, **kwargs)

Plots effective index versus waveguide width.

plot_coupling_vs_gap(df, **kwargs)

EME (Eigen Mode Expansion)

MEOW(component, layer_stack[, wavelength, ...])

FDTD Simulation#

Sparameter utils

plot_sparameters(sp[, logscale, plot_phase, ...])

Plots Sparameters from a dict of np.ndarrays.

plot_imbalance2x2(sp, *[, ports, ax])

Plots imbalance in dB for coupler.

plot_loss2x2(sp, *[, ports, ax])

Plots loss dB for coupler.

common FDTD functions

get_effective_indices(core_material, ...)

Returns the effective refractive indices for a 1D mode.

pandas_to_float64(df[, magnitude_suffix, ...])

Converts a pandas CSV sparameters from complex128 format to 2x float64 format.

pandas_to_numpy(df[, port_map])

Converts a pandas CSV sparameters into a numpy array.

csv_to_npz(filepath)

Convert CSV files into numpy.

convert_directory_csv_to_npz(dirpath)

Convert CSV files from directory dirpath into numpy.

FDTD meep

write_sparameters_meep(component[, ...])

Returns Sparameters and writes them to npz filepath.

write_sparameters_meep_mpi(component[, ...])

Write Sparameters using multiple cores and MPI and returns Sparameters filepath.

write_sparameters_meep_batch(jobs[, ...])

Write Sparameters for a batch of jobs using MPI and returns results filepaths.

write_sparameters_grating([plot, ...])

Write grating coupler with fiber Sparameters.

write_sparameters_grating_mpi(instance[, ...])

Write grating coupler Sparameters using multiple cores.

write_sparameters_grating_batch(instances[, ...])

Write grating coupler Sparameters using multiple cores in batches of simulations.

FDTD tidy3d

write_sparameters(component[, layer_stack, ...])

Writes the S-parameters for a component.

write_sparameters_grating_coupler(component)

Get sparameter matrix from a gdsfactory grating coupler.

write_sparameters_grating_coupler_batch(...)

Returns Sparameters for a list of write_sparameters.

FDTD lumerical

write_sparameters_lumerical(component[, ...])

Returns and writes component Sparameters using Lumerical FDTD.

Circuit solver#

SAX

read.model_from_csv(filepath[, xkey, ...])

Returns a SAX Sparameters Model from a CSV file.

read.model_from_component(component, ...)

Returns SAX model from lumerical FDTD simulations.

plot_model(model[, port1, ports2, logscale, ...])

Plot Model Sparameters Magnitude.

models

Lumerical interconnect

install_design_kit(session[, install_dir, ...])

add_interconnect_element(session, label, model)

Add an element to the Interconnect session.

get_interconnect_settings(instance)

send_to_interconnect(component, session[, ...])

Send netlist components to Interconnect and connect them according to netlist.

run_wavelength_sweep(component[, session, ...])

Args are the following.

plot_wavelength_sweep(ports_out, results[, ...])

Electrostatics#

Elmer

run_capacitive_simulation_elmer(component[, ...])

Run electrostatic finite element method simulations using `Elmer`_.

Palace

run_capacitive_simulation_palace(component)

Run electrostatic finite element method simulations using `Palace`_.

Full-wave RF#

Palace

run_scattering_simulation_palace(component)

Run full-wave finite element method simulations using Palace.