Ansys Learning Forum › Forums › Discuss Simulation › Photonics › Metalens-Optical Power › Reply To: Metalens-Optical Power
April 29, 2024 at 7:50 pm
Guilin Sun
Ansys Employee
Sorry to reply you late. Somehow your reply is passed without notification.
First, you need to get H field from farfieldexact https://optics.ansys.com/hc/en-us/articles/360034930733-farfieldexact3d-Script-command by following the example. Once you have the field components, the integration is relatively easy. When it is in the xy plane:
Poyn=Ex*conj(Hy)-Ey*conj(Hx);
Pf=0.5*real(integrate(Poyn,[1:2],x,y);
You may need to pinch some singuletones:Â pinch - Script commandÂ
Please try and let me know if you have questions in scripting.