## Photonics

Topics related to Lumerical and more

#### refractive index matrix is ​​a function of position

TAGGED:

• Jingchao Fang
Subscriber

I want to simulate a waveguide device with EO modulation, and the electric field intensity at different locations is different. I want to simulate it by a waveguide where the refractive index matrix (3*3) is a function of position. How to create a waveguide where the refractive index matrix is ​​a function of position?

• Amrita Pati
Ansys Employee

Hi Jingchao,

The spatially varying index data can be imported using the Spatial (n,k) data - Simulation object. However, since the index is a 3x3 matrix I am assuming that the index matrix has some off-diagonal elements. In that case, you will first have to diagonalize the tensor and use Matrix Transform to represent the full tensor.

We have an App Gallery example that can guide you through the process, but it is a bit complicated and will have some extra details that might not be relevant for your case.

Ferroelectric Modulator

In this example, the electric fields are taken from a CHARGE simulation. And then the (3x3) index perturbation due to the electric field is calculated using the EO equation. As the index also has non-diagonal elements (as in your case), the diagonalized permittivity tensor and the Matrix transformation are used to represent the full tensor. Then (n,k) simulation object is used to set the diagonalized index (as a function of position) and Matrix transform grid attribute is used to apply the matrix transform.

On the example, Ferroelectric Modulator, you can open the FDE simulation (ferroelectric_modulator.lms), and look at the setup script of the BTO analysis group to see how the (3x3) index has been setup.

Let me know if you have any questions.

Regards,
Amrita

• Jingchao Fang
Subscriber

If I want to build a diagonal index (only 3 diagonal terms) but is a function of position, do you have a simpler example? Thanks!

• Amrita Pati
Ansys Employee

You can refer to this article and the associated example script and data files:Spatial (n,k) data - Simulation object.

Regards,
Amrita

• Jingchao Fang
Subscriber

Hi Amrita,

I read this document, and I found that you use the box waveguide. But my waveguide is a trapezoid in xy plane, which extends in z direction. The index is a const in xy plane, but changes in z direction. Do you have any idea how to model it?

• Amrita Pati
Ansys Employee

Hi Jingchao,

Are you defining the spatially varying index using an equation?

Regards,
Amrita

• Jingchao Fang
Subscriber

I am using txt files. So can I set the index to a waveguide with this structure by txt? Or I have to use another way?

• Amrita Pati
Ansys Employee

Hi Jingchao,

The data that you import from text file the has to be defined over a rectangular volume. If you have a trapezoidal cross-section, you still have to define the data such that the index in this trapezium is n(x,y,z) but the index in the rest of the region is 1 (or any other index depending upon the background material being used). Schematic shown below:

Regards,
Amrita