Topics related to Lumerical and more

LumOpt inverse design – angled linear monitor setup

    • Ciel16


      I'm applying LumOpt on a structure with angled input and output waveguides. I realized I couldn't set up the linear monitor with an angle; thus I had to extend my output waveguide with a large bend long distance to obtain a horizontal waveguide for the adjoint simulation. I'm wondering if there is a way to rotate my monitor (or angled monitor) so that I could dramatically reduce the simulation time.

      Thank you so much for your time!





    • Guilin Sun
      Ansys Employee

      Usually you do not need to rotate the monitor, as it records power flow which automatically counts for the angle by Poynting vector and surface normal. Only when you decompose the fields into different modes, expansion monitor or port can can be used,where you can set the rotation angle of the expansion monitor, or better the port. Port is much easier to use and set, and to get the desired results. However VarFDTD does not use port.

      • Ciel16

        Hi Guilin,

        Thank you for your reply. I would like to use the expansion monitors to try the angled monitor. I feel it is a little bit challenging for me. In order to describe my question more visually, I have attached an example. 

        According to the LumOpt tutorial page (, the basic setup for the output waveguide is horizontal.

        In this case, I want to set up the output waveguides with a certain angle so that they can split as early as possible. When I have angled output waveguides, the regular frequency & power monitors cannot work as an input source in the adjoint simulation with a minimum simulation time. Therefore, the frequency & power monitor might not work without a rotation for this inverse design. 

        I have attached the files through a Dropbox link and hope you could check them if possible.


        Thanks again for your time.

    • Ciel16

      Under the condition of regular horizontal waveguide, the simulation can be processed properly:

    • Taylor Robertson
      Ansys Employee

      Hello Ciel16,

      I haven't tested this, but it should be possible in principle. When the mode expansion monitor MEM is not angled this leads to imprecision in the calculated modes and mode expansion calculations. For examnple the corss section is different and the phase of the fields will be slightly off.

      At least for the mode source you can easily angle it to be normal to the waveguide, which you should do if it is relevant to your set-up.

      Injecting modes at an angle with the mode source

      The real challenge I think comes with setting up your FOM monitors. By default you simply specify a frequency monitor. These cannot be angled and must align with the principle FDTD planes. All rotation calculations will be done in the mode source or MEM. Since you do not define an angle in the lumopt set-up script it is undetermined in the algorithm, which adds the MEM and adjoint sources automatically. 

      If the FOM ports are on angled waveguides you may have some numerical issues, but it may be worth experimenting with anyway. Even though it isn't exact the trend should be consistent which is enough for optimization. That being said these gradient based optimization methods can be quite sensitrive to numerical issues, so I cannot guarntee anything. To do this rigorously you would need to add a rotation argument to the modematch python class in lumopt, which rotates the MEM correctly. All that python code is editable, so you are free to make updates if you like, but we can't really support such efforts.

      Alternatively you could add this as a feature request through.

      Best Regards,

Viewing 3 reply threads
  • You must be logged in to reply to this topic.