Ansys Learning Forum Forums Discuss Simulation Photonics 2D inverse design grating coupler Reply To: 2D inverse design grating coupler

anna.wirth-singh
Ansys Employee

Hi Rahul,

Thanks for your question. In this example, the initial design is provided by parameters in a .json file (see these lines in pid_gc_3d_optimization.py) : 

One option is to create a .json file corresponding to your desired initial parameters, and specify that file as the initial file here. 

Alternatively, some of our other lumopt examples load the initial conditions from an existing .fsp or setup script. For example, in Inverse design of waveguide crossing – Ansys Optics, crossing_opt_3D.py loads the initial simulation from lsf script:

I think that you could similarly load a base simulation for the grating coupler. I will note, however, that the optimizable geometry typically needs to be defined separately as a FunctionDefinedPolygon with parameters that are optimized. So the base simulation setup is only for the input/output waveguides, mesh override region, and FOM monitors, while the optimizable geometry is constructed from a Python script using supplied initial parameters. So in either case, the optimizable geometry needs to be defined by parameters (numbers) that are optimized. 

I hope this helps. 

 

Best,

Anna