Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
Photonics

Photonics

Topics related to Lumerical and more.

Sweep Parameter tool with complex Figure of Merit

    • eugenio.digaetano
      Subscriber

      Hello,

      I am currently sweeping and optimizing parameters of my design using FDE, more specifically I want to find modal overlap between two single-mode waveguides. My current method is to run one of the mode, save it as D-deck card, run the second mode and use Overlap analysis tab for power overlap, this can be automated by script using Optimizeposition and Overlap script commands.
      However, I would like to use the Sweep and/or Optimization Parameters tools as they can bring several advantages in terms of efficiency and simulation in parallel. My challenge is to build the figure of merit of the coupling as it is obtained by calculation.

      I tried to employ the script into an Analysis Group object to output a single figure of merit to useas result into the Sweep and/or Optimization Parameters tools. The problem I encontered is that Analysis Group script doesn't have access to anything in the D-card and in the Workspace so basically there is no way to employ any result from a previous FDE simulation. 

      Could you please suggest a way to circumvent this issue and be able to optimise the FDE waveguide coupling using Sweep and Optimization Parameters tools?

      Thanks in advance for your help!

       

      Regards

      Eugenio

    • George Patsamanis
      Ansys Employee

       

       

      Hello Eugenio,

      thank you for the question.

         The approach with the sweep is more straightforward and you can automate the process with a proper .lsf script. In this case, scripting is more convinent than using the sweep tab (the sweep tab would still require an analysis script). You can sweep your geometry over the parametrized values using a loop in the script file editor, and in every iteration copy the d-card of the mode to the deck. When the sweep loop ends, save all the d-cards of the deck in an .ldf file (to also make sure you don’t lose them). Then, using a loop, overlap the mode of the other waveguide with every mode of the deck. Alternatively, you can overlap the the sweeped mode at every iteration.
      copydcard – Script command – Ansys Optics
      savedcard – Script command – Ansys Optics
      overlap – Script command – Ansys Optics
      loaddata – Script command – Ansys Optics
      cleardcard – Script command – Ansys Optics

      You can make use of the optimizeposition script before the overlap calculation.
      optimizeposition – Script command – Ansys Optics

         To perform an optimization, you need to define the figure of merit using a custom script from the Advanced tab. The figure of merit is going to be the overlap (e.g. out(2) of overlap) between the varying waveguide and the other waveguide. To calculate the overlap inside the custom fom script, you would need to have the d-card of the waveguide of compariston inside the deck as well. The name of the figure of merit needs to be “fom”, it will be maximized, and must be selected as the optimized Figure of Merit from the Setup panel. Add the parameters of your model that you want to vary, and run the optimization.
      Optimization utility – Ansys Optics

      Keep in mind that the above solutions are for the scenario where one waveguide varies at a time. You would need to perform a nested loop or a nested optimization in FDE to vary both waveguides at the same time, while also enabling and disabling the geometries in a proper way per simulation.

      Kind regards,
      George

       

       

    • George Patsamanis
      Ansys Employee

       

       

      In addition, to make use of the sweep, you first need to create a variable from the model’s Analysis tab that will be the overlap, and define it in the analysis script. In the analysis script you can use the same script commands as mentioned above to calculate the overlap. The variable that is linked to the overlap can be selected as a result from the parameter sweep.

      Finally, you can also use the addjob and runjobs commands to run multiple jobs based on the capacity from your Resource Configuration.
      addjob - Script command – Ansys Optics
      runjobs - Script command – Ansys Optics
      listjobs - Script command – Ansys Optics

      Regards,
      George

       

       

Viewing 2 reply threads
  • You must be logged in to reply to this topic.
[bingo_chatbox]