camfr_compute_stack_neff

ipkiss3.all.device_sim.camfr_compute_stack_neff(material_stack, environment=None, mode='TE0')

Computes the effective index of mode in the material stack at the given wavelength.

Warning

Calling this method will alter any camfr settings previously done by the user. Please ensure to apply any camfr settings (e.g. camfr.set_N()) for subsequent simulations in camfr after calling this function.

Parameters:
material_stackMaterialStack

A material stack that is used in the virtual fabrication.

environmentEnvironment

Environment object, used to specify the wavelength.

modestr

Chosen mode for computing the n_eff.

Returns:
float

Mode effective index at a given wavelength.

Examples

import ipkiss3.all as i3

from pysics.electromagnetics.material import Material
from pysics.basics.material.material import MaterialFactory
from pysics.basics.material.material_stack import MaterialStack, MaterialStackFactory
from ipkiss.visualisation.display_style import DisplayStyle
from ipkiss.visualisation.color import COLOR_SANGRIA, COLOR_BLUE_CRAYOLA
from pysics.electromagnetics.environment import Environment

layer_wg = i3.Layer(0)
layer_rib = i3.Layer(1)
layer_clad = i3.Layer(2)

process_wg = i3.ProcessLayer(name="wg", extension="wg")
process_rib = i3.ProcessLayer(name="rib", extension="rib")

si = Material(name="silicon", display_style=DisplayStyle(color=COLOR_SANGRIA), epsilon=3.45 ** 2)
ox = Material(name="oxide", display_style=DisplayStyle(color=COLOR_BLUE_CRAYOLA), epsilon=1.45 ** 2)
mat_fact = MaterialFactory()
mat_fact.si = si
mat_fact.ox = ox

soi = MaterialStack(name="soi",
                    materials_heights=[(ox, 2.0), (si, 0.22), (ox, 2.0)],
                    display_style=DisplayStyle(color=COLOR_SANGRIA))
soi_etched = MaterialStack(name="soi_etched",
                           materials_heights=[(ox, 2.0), (si, 0.15), (ox, 0.07), (ox, 2.0)],
                           display_style=DisplayStyle(color=COLOR_SANGRIA))
allox = MaterialStack(name="all oxide",
                      materials_heights=[(ox, 2.0), (ox, 0.22), (ox, 2.0)],
                      display_style=DisplayStyle(color=COLOR_BLUE_CRAYOLA))

matstack_fact = MaterialStackFactory()
matstack_fact.soi = soi
matstack_fact.soi_etched = soi_etched
matstack_fact.allox = allox

To compute the effective index we call camfr_compute_stack_neff for each MaterialStack at the desired wavelength, and for the mode of choice. In this case it will be TE0.

effective_indices = dict()
# TE0 mode and the 1550 nm wavelength
wavelength = 1.55
effective_indices[soi] = i3.device_sim.camfr_compute_stack_neff(material_stack=soi,
                                                                environment=Environment(wavelength=wavelength),
                                                                mode='TE0')

# change the desired mode
effective_indices[allox] = i3.device_sim.camfr_compute_stack_neff(material_stack=allox,
                                                                  environment=Environment(wavelength=wavelength),
                                                                  mode='TM0')

We can limit the stack to only take into account a certain portion when computing the effective index.

soi_etched.visualize()
../../../../_images/ipkiss3-all-device_sim-camfr_compute_stack_neff-3.png
clipped_soi_etched = soi_etched.clip_copy(z_min=1.65, z_max=2.5)
clipped_soi_etched.visualize()
../../../../_images/ipkiss3-all-device_sim-camfr_compute_stack_neff-4.png
effective_indices[soi_etched] = i3.device_sim.camfr_compute_stack_neff(material_stack=clipped_soi_etched,
                                                                       environment=Environment(wavelength=wavelength),
                                                                       mode='TE0')