Amrita Pati
Ansys Employee

I shared the code for the phi = 0 plane (the first code snippet you had shared), therefore, you can modify to include the entire theta-phi plane:

theta = linspace(-90,90,201);#Choose the range of theta interested in 
phi = linspace(0,45,201);#Choose the range of phi interested in
Theta = meshgridx(theta,phi);
Phi = meshgridy(theta,phi);

XY_halfspace = getresult("scat_ff","XY_halfspace"); #getting the result from the analysis group combining farfield from 5 monitors
ux = XY_halfspace.ux;
uy = XY_halfspace.uy;
E2_upper = XY_halfspace.E2_upper; #E2 is intensity
E2_angle = farfieldspherical(E2_upper,ux,uy,Theta,Phi)

image(theta, phi, E2_angle);

Edit: Changed E2 to E2_upper in the highlighted text.


Regards,
Amrita

Â