-
-
February 16, 2022 at 1:19 pm
Ahmed.Bayoumi
SubscriberHi,
I would like to ask if it's possible to use inverse design with devices with multiple input arms (i.e. directional coupler). I would like to have two basis files (a basis file where the source is inputted at each arm) being optimized simultaneously, in order to ensure identical response whether the source is at the top or bottom arm, but this results in some errors.
Another way I thought about it is to enforce topology optimization to search through the symmetric design space only, but I am not sure how I can adjust the code to do so, any suggestions would be appreciated.
Thanks,
Ahmed
February 23, 2022 at 1:41 amKyle
Ansys Employee
I haven't tried using multiple sources myself, but I believe this should be possible using super-optimization. You will need to define two different lumopt Optimization objects with different base simulation files, one for each source. Then you can combine them together into one optimization (see the Superoptimization section of this page). Is this what you're trying? What kind of errors are you seeing?
February 23, 2022 at 12:55 pmAhmed.Bayoumi
Subscriber
When I use SuperOptimization to optimize for two monitors (through and cross ports), and use the "+" operator to add two base files (one where the source is in the upper arm, and one where the source is in the lower arm), I get this error:
Initializing super optimization
Checking for one forward simulation : One forward simulation is in progress
Traceback (most recent call last):
File "/../TopOpt_2D_2FOM.py", line 102, in
runSim(initial_cond, eps_min, eps_max, x_pos, y_pos, filter_R*1e-9)
File "/../TopOpt_2D_2FOM.py", line 74, in runSim
opt_total.run(working_dir = cur_path)
File "/../../lumericl/releases/R2021_1.4/api/python/lumopt/optimization.py", line 460, in run
self.initialize(working_dir=working_dir)
File "/../../lumericl/releases/R2021_1.4/api/python/lumopt/optimization.py", line 119, in initialize
self.one_forward = check_one_forward_sim(self.optimizations[0])
File "/../../lumericl/releases/R2021_1.4/api/python/lumopt/optimization.py", line 99, in check_one_forward_sim
if np.any(self.optimizations[k].wavelengths.asarray() != wavelengths_ref.asarray()):
AttributeError: 'SuperOptimization' object has no attribute 'wavelengths'
This is how I did it:
opt_up_1 = Optimization(base_script=base_script_top , wavelengths = wavelengths, fom=fom1 geometry=geometry, optimizer=optimizer, use_deps=False, hide_fdtd_cad=True plot_history=False, store_all_simulations=False)
opt_up_2 = Optimization(base_script=base_script_top , wavelengths = wavelengths, fom=fom2 geometry=geometry, optimizer=optimizer, use_deps=False, hide_fdtd_cad=True plot_history=False, store_all_simulations=False)
opt_bot_1 = Optimization(base_script=base_script_bot ,wavelengths = wavelengths, fom=fom1 geometry=geometry, optimizer=optimizer, use_deps=False, hide_fdtd_cad=True plot_history=False, store_all_simulations=False)
opt_bot_2 = Optimization(base_script=base_script_bot , wavelengths = wavelengths, fom=fom2 geometry=geometry, optimizer=optimizer, use_deps=False, hide_fdtd_cad=True plot_history=False, store_all_simulations=False)
opt_up_T=[opt_up_1,opt_up_2]
opt_bot_T = [opt_bot_1, opt_bot_2]
weights=[1,1]
super_opt_up = SuperOptimization(optimizations = opt_up_T, weights = weights)
super_opt_bot = SuperOptimization(optimizations = opt_bot_T, weights = weights)
opt_total = super_opt_up + super_opt_bot
######## RUN THE OPTIMIZER ########
opt_total.run
Thanks
Ahmed
February 24, 2022 at 7:38 pmKyle
Ansys Employee
I'm not sure if you can add SuperOptimizations like this. I would try adding the optimizations together all at once without the weights:
opt_total = opt_up_1 + opt_up_2 + opt_bot_1 + opt_bot_2
If that works, then you can try adding the weights like this:
opt=[opt_up_1,opt_up_2, opt_bot_1, opt_bot_2]
weights=[1,1,1,1]
super_opt = SuperOptimization(optimizations = opt, weights = weights)
Viewing 3 reply threads- You must be logged in to reply to this topic.
Ansys Innovation SpaceBoost 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.
Trending discussions- “Import optical generation” or “delta generation rate”?
- Why am I getting “process exited without calling finalize”, and how do I fix it?
- Error on Lumerical device
- Using a license file on a new license server
- Error: addfdtd is not a valid function or a variable name
- Ansys Insight: Diverging Simulations
- Ansys Insight: Transmission results greater than one
- Ansys Insight: About override mesh in FDTD: its use and settings
- Is there a Lumerical script command to output the Simulation and Memory requirements?
- Ansys Insight: Convergence issues in CHARGE
Top Contributors-
2726
-
2156
-
1359
-
1150
-
462
Top Rated Tags© 2023 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-