We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.

Ansys Learning Forum Forums Discuss Simulation Photonics How can I modify FDTD variable with script while program running? Reply To: How can I modify FDTD variable with script while program running?

Afroditi Petropoulou
Ansys Employee

Dear Jordi,

You will not be able to see the changes using the index monitor. If your material’s permittivity tensor is diagonal, you can try to use a chi2 material with and without Permittivity Rotation - Simulation object – Ansys Optics.

If you inject x-polarized light and your chi2 material is not rotated, using a monitor on the material you will see that the light will remain x-polarized (if you check the E field x, y and z components). If you rotate the material using the Permittivity Rotation - Simulation object – Ansys Optics, and check the y and z components of the E field, they should now be non-zero.

Furthermore, for changing the index while the simulation is running, you could also check the material plugin used in the step index example in Advanced and custom optical material models in FDTD and MODE – Ansys Optics. I am not sure if this is suitable for your case though.

Best regards,

Afroditi