-
-
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 EmployeeÂ
Please 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.
-
- The topic ‘Lumopt topology superoptimization not starting binarization phase’ is closed to new replies.
-
3492
-
1057
-
1051
-
965
-
942
© 2025 Copyright ANSYS, Inc. All rights reserved.