Ansys Learning Forum › Forums › Discuss Simulation › Photonics › Help on running inverse design CWDM 3D topology optmization › Reply To: Help on running inverse design CWDM 3D topology optmization
Hi Wangning,
Unfortunately, it is beyond our support scope for me to deeply investigate your files. However, I can recommend a general troubleshooting process.
If you navigate to your Lumerical installation folder (usually C:/Program Files/Lumerical) , you should be able to locate the lumapi python files. From there, you can locate the line of code producing the error and try to trace it back to the source.
Since your 2D optimization completed successfully but the 3D optimization is producing an error, I would suspect the issue may be due to a class or function related to the 3D topology geometries. If you are not using the most recent version of Lumerical, it is recommended that you update. A ‘failed to evaluate code’ error can indicate an issue with the API connection – it is also worth checking that all files your optimization may need (helper functions and py files, for example) are accessible from the working directory. Please check to see if you have an environment variable "LUMERICAL_HOME" defined in your bashrc file (Linux) or system environment variables (Windows). It is recommended that you delete this environment variable. Please see this page on command line warnings for CML compiler, which also utilizes the Python API so the warning is relevant: Command Line Errors and Warnings – Ansys Optics
I also recommend visiting this page Optimizable Geometry - Python API – Ansys Optics for more information about topology optimization.
Best,
Anna