Ansys Learning Forum › Forums › Discuss Simulation › Photonics › lumopt errors › Reply To: lumopt errors
Hi Ashish,
Thank you for providing your code. From my understanding, lumopt was built to work with FDTD (a time-domain algorithm) and I am not sure it will work for RCWA (a frequency-domain algorithm) without substantial modifications.Â
Have you considered using the built-in optimization utility? Please see: Optimization utility – Ansys Optics. This utility can be called from the script as shown in this example: Creating optimization tasks using a script – Ansys Optics. I think this would be more straightforward to set up than lumopt.
I think you could define a Structure Group to build your structure from script: Structure Groups - Simulation object – Ansys Optics. Defining an Analysis group would be the best way to define a custom figure of merit. In the Analysis group script, you can perform calculations and if you specify those variable to be results, then they can be used as FoM for optimization. Could you tell me a bit more about the figure of merit you want to optimize? In your script, it looks like you are using the ModeMatch FoM, which is mostly applied to waveguides. Do you want to optimize the transmission through the structure?
While this example is not for RCWA, this example has both an analysis group and an optimization that uses the result from that analysis so it will be useful to have a look:Â
Plasmonic gap waveguide – Ansys Optics
Â
Best,
Anna