Ansys Learning Forum › Forums › Discuss Simulation › Photonics › Automatically press ‘OK’ in the frequency selection window for far field profile › Reply To: Automatically press ‘OK’ in the frequency selection window for far field profile
July 11, 2024 at 8:41 am
Amrita Pati
Ansys Employee
Hi Guan,
Instead of using getresult, you can use the standard farfield commands similar to what we do in FDTD. Here is a sample code:
mode_number=1; #The mode number
mon_name="FDE::data::mode"+num2str(mode_number);
res = 151;#resolution of farfield data
E2=farfield3d(mon_name,1,res,res);
ux=farfieldux(mon_name,1,res,res);
uy=farfieldux(mon_name,1,res,res);
image(ux,uy,E2,"","","|E|^2 at 1 m","polar");
Let me know in case you have questions.
Regards,
Amrita