May 29, 2023 at 9:49 pm
Ansys Employee
Hello,
Your script is written in LSF, I would try and debug this in Lumerical before trying to call the script from python. Pay attention to the fsp file that this will run in, because many of these commands refer to objects in the fsp tree. If you are using lumopt it will likely start with a blank file, which is why this is called the set-up script. One thing I notice is that it is importing files which may be in a different directory then where python is running.
To use initial conditions in toplogy optimization I would direct you to the initialization section of this article.
https://optics.ansys.com/hc/en-us/articles/360052044913-Optimizable-Geometry-Python-API