TAGGED: Optimization and merit functions
-
-
May 27, 2024 at 8:36 pm
-
May 27, 2024 at 9:25 pmAmrita PatiAnsys Employee
Hi Rabeeya,
The user-defined scripting option in the Optimization Utility has limited capabilities similar to the scripting options within model, analysis, and structure groups. Some functions won't work from within these environments.Â
I believe there is a workaround, but I haven't tested it fully myself. You can try and let me know if there are any issues. The getindex script works within "model", the root class in the objects tree.Â
- You can edit "model".
- Go to "Analysis" and then "Variables".
- In the Results section, define a varaible called "n".
- Copy and paste the getindex commands in the Analysis-->Script of "model".
- Now model should return "n" as a result after FDTD is run:
- Moving on to the optimization task, in the "Figures of merit", you can select "n" as shown below, in addition to any other result you might have:
- Next, you can use this "n" in the user defined fom section directly. A random code is shown as an example below:
Please feel free to let me know if you have any questions.
Regards,
Amrita
-
Viewing 1 reply thread
- The topic ‘getindex is not a valid function or variable name’ is closed to new replies.
Ansys Innovation Space
Trending discussions
- 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
- Trapezoidal ring
- Help for qINTERCONNECT
- Issues with getting result from interconnent analysis script
- Topology Optimization Error
- Edge Coupler EME Example Issue
- The two modes overlap the integral
Top Contributors
-
1191
-
513
-
488
-
225
-
209
Top Rated Tags
© 2024 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.