The Ansys Innovation Space website recently experienced a database corruption issue. While service has been restored there appears to have been some data loss from November 13. We are still investigating and apologize for any issues our users may have as a result.
Photonics

Photonics

Topics related to Lumerical and more.

There are some difficulties when I customizing the fom function in lumopt code.

    • Coulson Jiang
      Subscriber

      Hi, I'm trying to change the way "fom" is calculated by using overlap integral between desired field and "fom" monitor's recorded field,  my target is to get a specified electric field, when i have done this and modify the corresponding code, it does run ten times or more, but its fom's order fluctuates around  e-6, the optimization report just has one record, which maybe means it can't find a good result, finally python warns me that maybe my fom function or gradient function goes wrong. How can i correct my code or which part should i pay attention?

      Any suggestions would be greatly appreciated!

    • Taylor Robertson
      Ansys Employee

      Hello Coulson,

      It sounds like you are trying to 'hack' the lumopt module to match a specified E field? This is not exactly what the overlap FOM calculations are doing - Understanding the mode overlap calculation. In the modematch case it is measuring power carried in the specified mode. Although this seems similar to what you are doing you will need to reformulate the gradient calculations for this type of merit function. To get this to work I think that focusing on the modematch class and also how the adjoint simulation is set-up. The other modules you should be able to port most of their functionality, but I cannot say for sure. 

      It sounds like the optimizer cannot calculate the gradient correctly, which is not surprising given that the adjoint calculation is not set-up properly.  Basically it calculates something checks to see if this is better, and finds that it is not. If you are not using the merit functions as inteneded, this is not surprisng.

      I would recommend looking into to the literature to see if you can find any similar examples. This may be a good place to start.

      Inverse Design of Plasmonic Structures with FDTD

    • Coulson Jiang
      Subscriber

      Thank you, Taylor! I will try again according to your suggestion.

Viewing 2 reply threads
  • The topic ‘There are some difficulties when I customizing the fom function in lumopt code.’ is closed to new replies.