-
-
April 4, 2023 at 6:48 pm
Aaron Adkins
SubscriberI am trying to use the superoptimization feature to create a 1x2 splitter using topology optimization, but when I run the optimization it reaches the max iterations for greyscale but does not enter the binarization phase. I have tried with separately defined geometries, FOMs, optimizers etc. This does not happen when there is just a single optimization. I get this message and then the program ends:
STOP: TOTAL NO. of ITERATIONS REACHED LIMIT
FINAL FOM = 0.44252052955475274
FINAL PARAMETERS = [4.30539533e-05 4.43574223e-05 4.37587580e-05 ... 0.00000000e+00
0.00000000e+00 0.00000000e+00] -
April 5, 2023 at 10:11 pm
Guilin Sun
Ansys EmployeeThis is a little strange for me. How does the FOM behave? according to the example, it needs to reach optimum in greyscal phase then begins the binarization. Maybe this is the cause? how many iterations you used? Please double this initial grescale interation number and see if it works.
-
April 6, 2023 at 3:14 pm
Aaron Adkins
SubscriberThe FOM behaves differently, it increases and converges to 0.5 (unlike the example with one FOM). I have tried increasing the number of iterations to a high number but the optimization always ends with the message
CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH
Also, if I can ask another question, I am unable to run an optimization for an area larger than 5x5 um. I have tried many different mesh sizes but for any area larger than 5x5 it is unable to calculate the gradient. Do you have any suggestions for this?
Thank you
-
April 6, 2023 at 10:10 pm
Guilin Sun
Ansys EmployeePlease check the forward/adjoint simulation files and see if they are normal.
-
April 6, 2023 at 10:16 pm
Aaron Adkins
SubscriberThank you, I believe I have enough memory. When I try 2D topology optimization with 5.5 x 5.5 um, I get this trace:
opt.run()
File "c:\users\zlab\desktop\inverse design\lumopt\lumopt\optimization.py", line 145, in run
self.initialize()
File "c:\users\zlab\desktop\inverse design\lumopt\lumopt\optimization.py", line 216, in initialize
self.optimizer.initialize(start_params = start_params, callable_fom = callable_fom, callable_jac = callable_jac, bounds = bounds, plotting_function = plotting_function)
File "c:\users\zlab\desktop\inverse design\lumopt\lumopt\optimizers\optimizer.py", line 45, in initialize
self.reset_start_params(start_params, self.scale_initial_gradient_to)
File "c:\users\zlab\desktop\inverse design\lumopt\lumopt\optimizers\optimizer.py", line 51, in reset_start_params
self.auto_detect_scaling(min_required_rel_change)
File "c:\users\zlab\desktop\inverse design\lumopt\lumopt\optimizers\optimizer.py", line 72, in auto_detect_scaling
gradients = self.callable_jac(params)
File "c:\users\zlab\desktop\inverse design\lumopt\lumopt\optimizers\generic_optimizers.py", line 57, in callable_jac_local
gradients= -callable_jac(params / self.scaling_factor) / self.scaling_factor
File "c:\users\zlab\desktop\inverse design\lumopt\lumopt\optimization.py", line 309, in callable_jac
return self.calculate_gradients()
File "c:\users\zlab\desktop\inverse design\lumopt\lumopt\optimization.py", line 329, in calculate_gradients
fom_partial_derivs_vs_wl = self.geometry.calculate_gradients_on_cad(self.sim, 'forward_fields', 'adjoint_fields', self.adjoint_fields.scaling_factor)
File "c:\users\zlab\desktop\inverse design\lumopt\lumopt\geometries\topology.py", line 171, in calculate_gradients_on_cad
sim.fdtd.eval(('params = struct;'
File "C:\Program Files/Lumerical/v222/api/python\lumapi.py", line 1283, in eval
evalScript(self.handle, code, True)
File "C:\Program Files/Lumerical/v222/api/python\lumapi.py", line 261, in evalScript
raise LumApiError("Failed to evaluate code")
lumapi.LumApiError: 'Failed to evaluate code' -
April 7, 2023 at 10:49 pm
Aaron Adkins
SubscriberOk I have resolved the size issue, but I still cannot get the optimization to run binarization phase when there are two FOMs. I have tried many different number of iterations, and it always stops at the max iterations and never continues.
-
-
April 10, 2023 at 4:50 pm
Guilin Sun
Ansys EmployeeThe example is for one FOM. When you have two FOMs you will need to further develop the optimization or refer some publications. You can also visit the original GItHub and see if they support the two FOMs.
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Why am I getting “process exited without calling finalize”, and how do I fix it?
- “Import optical generation” or “delta generation rate”?
- Error: addfdtd is not a valid function or a variable name
- Error on Lumerical device
- Using a license file on a new license server
- Ansys Insight: Transmission results greater than one
- Finding your Ansys (or Lumerical) account number
- Ansys Insight: Diverging Simulations
- Ansys Insight: Why my simulation result is different from published paper or experiment?
- Is there a Lumerical script command to output the Simulation and Memory requirements?
-
5454
-
3403
-
2473
-
1310
-
1022
© 2023 Copyright ANSYS, Inc. All rights reserved.