## Photonics

#### How to use Naive splitter as an initial guess in 2D and 3D topology optimization

• mo_911
Subscriber

Hello,

I just wanted to use the sample for "Inverse Design of a Splitter Using Topology Optimization" (https://optics.ansys.com/hc/en-us/articles/1500007182141).

According to the Lumerical's presentation file that I have attached below, the optimization depends on the initial conditions. So, I would like to change the initial condition as shown in the slide.

The initial conditions for "Filled", "Empty", and "Average" are available in the python script as I have attached the screenshot below. However, the initial condition for "Naive Splitter" is not available. How could I use "Naive Splitter" as an initial condition for both 2.5D and 3D optimizations? Sometimes this condition had the best solution.

• Taylor Robertson
Ansys Employee

Hello,

I believe that by the naive splitter you mean this sort of structure?

You can see that this structure, is actually part of a structure group with the name initial_guess. To define your own initial guess in a structure group of the exact same name. Then to use this as your starting point you set initial_cond = None in the python script. This is a special value that tells Python to mesh this structure and use this as a starting point, this is noted in the comments. You could also do this using an np array, but that would be a bit more challenging, because you need to match the simulation grid exactly.

Alternatively if you want to restart from a previous solution you could use the method outlined in optimization continuation.

Best Regards,

• mo_911
Subscriber

Hello,

Yes, this is what I wanted to do. Sorry, I overlooked the comments. In the python script "splitter_opt_2D_TE_topology_minfeaturesize.py", I set initial_cond = None. Then I was able to use the initial_guss structure as an initial guess for 2.5D topology optimization. Thank you for your help!

However, this method did not work for 3D optimization. In the python script "splitter_opt_3D_TE_topology_minfeaturesize.py", I set startingParams = None and set start_from_2d_result = False not to use the 2d result as shown below.

After running the python script, I got errors on the python terminal window as shown below. It looks like the FDTD grid and the initial_guess pixel size do not match. How can I resolve this mismatch?

• mo_911
Subscriber

I am still wondering how to use a naive splitter as an initial guess for 3D topology optimization. As I told you, your sample python script is not working with this option.

I tried to use polygons defined by lsf script as an initial guess for 3D topology optimization, but I got an error as well.