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 to calculate modal overlap coefficient during the second harmonic generation Reply To: How to calculate modal overlap coefficient during the second harmonic generation

211123090062
Subscriber

Hello, I'm sorry for replying so late. The following is a screenshot of the code line that caused the error:

Where E11=getresult("mode1","E"),E1=sqrt((abs(Ex1))^2+(abs(Ex1))^2+(abs(Ex1))^2);

I entered the code based on the overlap coefficient calculation formula,and used the "size" you provided to check the size, but I don't know how to adjust it to avoid errors. If you could tell me the method, I would greatly appreciate it!