TAGGED: lumerical, optimization
-
-
May 18, 2023 at 5:40 pmColorSubscriber
Hello,
I am trying to run an extensive optimization through Lumerical but have failed multiple times due to separate issues. I have been trying to find my way through this with no success. I can send a file over if you think this can be done in Lumerical and that would be appreciated if we can find a way around this. Here are my problems:
1) I have four monitors and I want to get the output of these four monitors and combine them in another analysis box. Then, I want to minimize the output of this analysis box, using the optimizer. First problem is that the output of the analysis boxes cannot be fed to each other. So, I cannot basically feed the output of the four into the other and then minimize that one. There might be a way around this and that is to take the output of four monitors in the Figure of Merit section of the optimizer. This, however, leads to the second problem that I have, detailed below.
2) I want to optimize the sum of p and S polarizations. So, if I do the approach above, I cannot do the sum. In fact, I do not know how to do it. I saw that there was an example in Lumerical that used a polarization sweep inside the optimizer and then used a sum command to presumably sum the results, but I am not sure how this works in my case that have to sum the four monitors and then the polarizations. It gets confusing.
3) Now, let us assume that we want to optimize the structure by changing a few parameters. But I have some monitors the positions of which are dependent on the parameters that we want to optimize. I created my structure using the structure group, but I cannot define my monitors within the structure group. So, when parameters are changed within the structure group through the optimization toolbox, monitors will not be affected at all. Thus, basically, the optimizer results will be inaccurate. What can we do here to have an interconnect between the monitors and the structure group?
By the way, I created all of these using scripting, so it would be nice if we could actually do the whole scripting in Lumerical without having to rely on the GUI.
Thank you very much for the help,
Ya
-
May 18, 2023 at 10:56 pmLitoAnsys Employee
If you want to run on Linux without the GUI, see this KB: Running CAD jobs on headless Linux systems (without GUI) – Ansys Optics
-
May 18, 2023 at 11:04 pmColorSubscriber
Thank you.
I am running in Linux, but we are using the GUI. That is not really a concern. The questions are regarding running these simulations in the lumerical .lsf format. Or just being able to even run the simulations. Which is why I asked the questions in three parts. Can you please answer them point by point?
-
May 18, 2023 at 11:38 pmLitoAnsys Employee
Sorry I was replying to your last statement, where you can run scripts and simulations outside the GUI.
By the way, I created all of these using scripting, so it would be nice if we could actually do the whole scripting in Lumerical without having to rely on the GUI.
An application engineer will get back to you on your 3 concerns.
-
-
-
May 18, 2023 at 11:53 pmGuilin SunAnsys Employee
We need to fix the 3rd issue first. You can use an analysis group to host the structure and the monitor at the same time. Please refer to this example: https://optics.ansys.com/hc/en-us/articles/360042097393-Metamaterial-parameter-extraction-Smith.
The monitor can use the structure location information once you define and use the parameters properly.
Once all the four monitors are in the same analysis group, you can manipulate them to give output for optimization. In the optimization, you specify the FOM inside the analysis group. for example, if you want to get the averaged E-intensity from 4 individual monitors as FOM, you can
fom=mean(mean(E2_m1+mean(E2_m2)+mean(E2_m3)+mean(E2_m4))
this "fom" will be in the output of this analysis group, and the optimization can find this data from this analysis group.
It is also doable when the monitors are not in the same analysis group. Then you will do the fom calculation in "model" script, which has the highest pripority in the project file. and you can also set the monitors to change with geometry in "model". This might be better as you do not need to have a large analysis group. The photonic crystal examples might be good for you to refer to: https://optics.ansys.com/hc/en-us/articles/360042038213-Bandstructure-of-planar-photonic-crystal-with-a-square-lattice
With this, you can include both S and P polarization from two simulations.
I believe this will resolve the above 3 issues you are facing. In case you have questions different from the original, please write a new post.
-
May 22, 2023 at 11:14 pmColorSubscriber
Hi Guilin,
Thanks a lot for the tips. The simulation seems to be running fine for one polarization. I did not do a sweep of polarizations as I was a bit confused about the method you mentioned for polarization summation.
You used two “mean” functions. I am assuming that we first average the results of each monitor and then sum them up. What is the second mean supposed to do? Is it to average the two polarizations? But how would it know the number of polarizations I am using? If this mean is defined in the analysisgroup and I am running an optimization that has a sweep on the polarizations, then for each sweep, we get the FOM. But it is only for one polarization and not two polarizations. I am under the impression that this averaging should be done outside the analysisgroup unless the analysisgroup is smart enough to recognize how to sum polarizations.
I did not get the point regarding the four monitors and then sum them in the MODEL. How does that work?
Thank you.
-
-
May 23, 2023 at 3:56 pmGuilin SunAnsys Employee
The internal "mean" is to average the monitor data; the second mean is to average the 4 monitor data. Polarization average will be done inside the sweep.
The polarization average can be done in side the sweep of optimization.
As replied early, you can do this either in analysis group with 4 monitors, or in "model" which can control all the monitors. You will need scripting very similar to the analysis group to get the average or sum of the monitor data. Please check the photonics crystal exmaple.
-
- The topic ‘Running an optimization through scripting in Lumerical’ is closed to new replies.
- Difference between answers in version 2024 and 2017 lumerical mode solution
- Errors Running Ring Modulator Example on Cluster
- INTERCONNECT – No results unless rerun simulation until it gives any
- Import material .txt file with script
- Help for qINTERCONNECT
- Trapezoidal ring
- Issues with getting result from interconnent analysis script
- Topology Optimization Error
- Edge Coupler EME Example Issue
- How to measure transmission coefficients on a given plane .
-
1236
-
543
-
523
-
225
-
209
© 2024 Copyright ANSYS, Inc. All rights reserved.