The (n,k) attribute is used to import spatially varying refractive index profiles. This feature is typically used for simulating material index perturbations due to variations in charge density, temperature or applied electric or magnetic fields.
Another common use case is the simulation of structures fabricated with a spatially-dependent index profile, such as graded-index optical fibers. In the following unit, we show how to use the (n,k) material attribute for a graded-index fiber where the refractive index is described by an analytical function, as shown below. We will study the modes at a wavelength of 1 um.
In the following video lesson, you will learn how to use the (n,k) material attributes object. The script file used in the following video and the final project file created in it can be downloaded below: