-
-
March 17, 2023 at 3:30 pm
sagar
Subscriberm="monitor1"; res = 201; E2 = farfield3d(m,1,res,res); ux = farfieldux(m,1,res,res); uy = farfielduy(m,1,res,res); halfangle=30; theta0=0; phi0=0; cone_30 = farfield3dintegrate(E2, ux, uy, halfangle, theta0, phi0); # integrate over 30 degree cone total = farfield3dintegrate(E2, ux, uy); # integrate over entire hemisphere T = transmission(m); # fraction of source power transmitted into far field ?cone_30/total; # fraction of far field power within a 30 degree cone ?cone_30/total*T; # fraction of source power transmitted into the far field within a 30 degree cone
Can you explain this code. I want to calculate the collection efficiency from my structures. I am getting error
in line 9, "farfield3dintegrate(A,ux,uy), A muat be an NxM or NxMxP matrix, with length length(ux)=N,length(uy(=N, N>2and M>=2".
I thing they are matrix and could not figure out the meaning of this error msg. -
March 17, 2023 at 5:38 pm
Guilin Sun
Ansys EmployeeI tested your script and did not find anything wrong:
Please make sure that your file is 3D and no ay error massage shows before line 9.
The error message showig from above means the matrix has something wrong. Please check the dimension of E2.
You may also need to reboot your computer, modify the simulation settings if necessay, redo the simulation and run the script.
-
March 19, 2023 at 7:48 pm
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- “Import optical generation” or “delta generation rate”?
- Why am I getting “process exited without calling finalize”, and how do I fix it?
- Error: addfdtd is not a valid function or a variable name
- Error on Lumerical device
- Using a license file on a new license server
- Ansys Insight: Transmission results greater than one
- Ansys Insight: Diverging Simulations
- Ansys Insight: About override mesh in FDTD: its use and settings
- Is there a Lumerical script command to output the Simulation and Memory requirements?
- Ansys Insight: Convergence issues in CHARGE
-
3612
-
2502
-
1729
-
1222
-
578
© 2023 Copyright ANSYS, Inc. All rights reserved.