Mastering Ansys optiSLang: 5 Useful Methods for Reusing Existing Results

Categories:

One of the more popular questions I get for Ansys optiSlang is along the lines of: “I finished setting up my sensitivity/optimization workflow and then let it run for xx-xx days, but I realized that I should have run more design points/scaled one of my responses differently/defined different criteria. All the raw data is there – can I reuse it in Ansys optiSLang without having to rerun everything from scratch?” I am generally happy to say that, yes, we can do that! There are some slight caveats, and the actual preferred method of doing this changes a little depending on your workflow, but I’ll cover the four most common approaches here.

Method 1: Stacking a new Ansys OptiSLang Optimization System with a Wizard

In the case where not enough design points were run and either the CoP is not high enough or convergence wasn’t attained during optimization, this is easily resolved by stacking on a new sensitivity or optimization system via one of the wizards.

Mastering Ansys OptiSLang: 4 Methods for Reusing Existing Results - Figure 1


The especially nice thing about using this wizard method is that the entire previous workflow is exactly duplicated and all previous reference values/ranges/settings/etc. are preserved. On the first page of the wizard:

Mastering Ansys OptiSLang: 4 Methods for Reusing Existing Results - Figure 2

We can see that the option for ‘Receive all designs from system “TheSystemYouDroppedTheWizardOn”’ is automatically enabled. This is also tied to the below setting on one of the following wizard windows, where the start iteration is told to ‘Use start designs only.’

Mastering Ansys OptiSLang: 4 Methods for Reusing Existing Results - Figure 3


Basically, this is purely for appending some number of new designs to an existing dataset. We are not actually changing anything about our workflow or the determination of responses/criteria, we’re simply taking our analysis further and using the previous work as a starting point. The resulting Ansys optiSLang system is just a duplicated workflow that receives the start designs, criteria, and parameter manager from the prior one, and will look something like the ‘AMOP’ system below as it is attached to ‘AMOP_Partial’:

Mastering Ansys OptiSLang: 4 Methods for Reusing Existing Results - Figure 4


I think it’s also worth at least mentioning that we can of course set up this flow up manually. If you copy paste your original workflow (AMOP in the above), you can go into the new system’s settings and use the ‘import start designs from system’ option (or one of the other import options) in the ‘Start designs’ tab. Then, go to the Adaption tab and enable that same option for ‘Use start designs only’ in the start iteration settings as noted in the wizard-based approach. There is rarely a benefit to doing it manually though, so I always start with the wizard when I can.

Methods 2 and 3: Tuning an Ansys OptiSLang Optimization System

The second and third cases, where the responses or criteria themselves need some tuning, are more or less the same. There are a couple ways to accomplish either that I think are worth discussing, but the main point I’d like to make is that this is basically the scenario for which the ‘read mode’ in Ansys optiSLang was made. This option is available under the ‘Show additional options’ tab at the bottom of text input and execution style nodes.

Mastering Ansys OptiSLang: 4 Methods for Reusing Existing Results - Figure 5
Mastering Ansys OptiSLang: 4 Methods for Reusing Existing Results - Figure 6

‘Read mode’ for input nodes prevents the Ansys optiSLang from resampling the parameter space and accidentally overwriting the previous input values. ‘Read mode’ on the execution block prevents whatever script or solver is involved from actually being executed and generating new data. Then, if all the expected result files are present in the design directory, we can leave the output nodes as-is to just reprocess our results. To read in entirely new responses, they’ll have to already exist in those result files (or at least in the correct working directories), but we can set them up exactly we would anything else – go into the output node, set up your marker/location definitions, and register it as a response. For something a little more involved like custom scaling or weighting, we can move over to the Variables tab in our output block and add new variables through Right-click > Add variable. The ID and Expression columns may be modified freely, and the expression definition can use any of the built-in Ansys optiSLang calculator functions, input parameters, or previously defined responses/variables.

Mastering Ansys OptiSLang: 4 Methods for Reusing Existing Results - Figure 7

Once that variable is set up as desired, it can be registered as a response by left-click-dragging its row in the variable window over to the Responses section. One additional note is that once any changes are made to a node that has previously been run and you select ‘OK’ or ‘Apply’, you will be prompted with a reset window. Technically speaking, as long as we have only touched individual nodes rather than the entire system, our files should not be in danger of being deleted even if we do a ‘reset full’. However, unless my goal is to completely start the entire workflow over, then my personal preference is to go through the ‘Advanced reset scenario’ and disable ‘clear working directory’ just to be safe.

Mastering Ansys OptiSLang: 4 Methods for Reusing Existing Results - Figure 8
Mastering Ansys OptiSLang: 4 Methods for Reusing Existing Results - Figure 9

Note that if we’re using this manual approach where we enable read mode, then we will have to reset the workflow definition as well, and this is the time at which you MUST disable ‘clear working directory’ if you want to reuse simulation data stored by optiSLang.

Method 4: The Ansys optiSLang Reevaluation Wizard

Are we confused yet? I would certainly not blame anyone for getting a little bit lost by now, and this is what leads me to the next method: the Reevaluation Wizard. This basically automates everything that we just discussed with the read mode.

Mastering Ansys OptiSLang: 4 Methods for Reusing Existing Results - Figure 10

This is applied the same way as any other wizard that builds on top of another system – you drag and drop it onto the prior system’s workflow. You will be prompted with some options for the path to design directories (these will be automatically populated if you’ve dragged it onto the correct reference system), merging data sets, and adjusting post processing type, but we will leave these as the default. The end result is a completely new ‘Reevaluate’ system, as below!

Note that the input and execution nodes have the ‘read mode’ icons already present on them, so we don’t need to modify anything within them. This new system gives us quite a bit of security since it functions by reading the prior system’s working directories rather than depending on its own. That means any reset operations associated with this Reevaluate system are comparatively safe. All that needs to be done here is to go into the ‘output files’ node and add new variables/responses based on the existing data.

Method 5: Using an Existing External Data Set in optSLang

This pretty much covers how to expand and reuse data from an existing Ansys optiSLang workflow. Now, what do we do in the case where we have a full external data set that we want to analyze and/or build a model around? Maybe it’s simulation data coming from another DoE style tool or maybe it’s experimental data that was measured in the real world. Obviously, that’s going to be a little different than the above since there’s not an existing folder structure laid out in a format that Ansys optiSLang is familiar with. In this case, we can go straight into postprocessing and read in data from a .csv style format.

Mastering Ansys OptiSLang: 4 Methods for Reusing Existing Results - Figure 12

The Ansys optiSLang postprocessing node can be found under the Analysis section of modules, and we can drag this into our workspace like any other component. Then, open its settings to point it towards your data file and then click ‘Show Postprocessing’.

Mastering Ansys OptiSLang: 4 Methods for Reusing Existing Results - Figure 13

There will immediately be a pop-up window to walk you through the text import process, for which I will only point out a few key items:

  1. The default format is tab delimited, but we can customize this as needed.
  2. The ‘Manipulate’ portion gives us the option to create new data columns as a function of other columns – this is like adding an internal variable and then registering it as a response in the prior examples.
  3. On the last page, ‘Finalize’, make sure to adjust the dimension type of your responses. The column needs to be registered as a response in order to have a MOP built for it. Also, there’s no concept of objectives yet since we’re just reading existing data.

Note that in the example below, the preview window is showing us that the data is not being read correctly. There are commas left in the read-in values since I have not selected ‘comma’ as the delimiter type yet – make sure you pay attention to the preview!

Mastering Ansys OptiSLang: 4 Methods for Reusing Existing Results - Figure 14

Once loaded in, the default view is ‘Statistics’ with simple correlation data, histogram, and anthill plot. We can freely load in other default views into Ansys optiSLang and/or add our own plots from the list of plots on the bottom right of the postprocessing window. To use any plots that involved an MOP, we can generate that using the ‘Create and update’ or ‘Create and save as new’ database options.

Mastering Ansys OptiSLang: 4 Methods for Reusing Existing Results - Figure 15
Mastering Ansys OptiSLang: 4 Methods for Reusing Existing Results - Figure 16

With the MOP generated and response surface plot enabled, our postprocessing view will pretty much be identical to what we would see in a pure Ansys optiSLang workflow. Note that the MOP itself is contained within the .omdb database file that we save from this window, so we can even do fancier things like use the MOP solver and perform optimization on this external dataset.

Go Forth and Optimize in Ansys optiSLang with Existing Results

In summary, we have reviewed several approaches for adding new design points to an existing Ansys optiSlang system, manually and wizardly making use of the ‘read mode’ to re-extract information from existing design points, and even reading in entire external data sets to post process and build models around. Any one of these may be the best approach depending on the particular need, and with enough familiarity of the steps involved, we can even combine them in other ways. Hopefully, this serves as a good step along the way to accomplishing this.

Please contact us if you have any questions about Ansys optSLang, other Ansys tools, or leveraging PADT experts for training, mentoring, or consulting.

Happy optimizing!

Categories

Certified Elite Channel Partner

Get Your Ansys Products & Support from the Engineers who Contribute to this Blog.

Product Development
Platinum Partner

Technical Expertise to Enable your Addictive Manufacturing Success.

PADT’s Pulse Newsletter

Keep up to date on what is going on at PADT by subscribing to our newsletter.


By submitting this form, you are consenting to receive marketing emails from: Phoenix Analysis and Design Technologies, 7755 S. Research Dr., Tempe, AZ, 85284, https://www.padtinc.com. You can revoke your consent to receive emails at any time by using the SafeUnsubscribe® link, found at the bottom of every email. Emails are serviced by Constant Contact

Share this post:

Upcoming Events

03/22/2023

2023 Arizona MedTech Conference

03/22/2023

Optimize Jigs & Fixtures with Additive - Webinar

03/15/2023

3D Design Updates in Ansys 2023 R1 - Webinar

03/08/2023

Competitive Advantages of 1D/3D Coupled Simulation - Webinar

03/01/2023

High Frequency Updates in Ansys 2023 R1 - Webinar

02/22/2023

Additive Advantages in Aerospace - Webinar

02/15/2023

Structural Updates in Ansys 2023 R1 (1) - Webinar

02/09/2023

IME 2023: MD&M | WestPack | ATX | D&M | Plastek

02/08/2023

IME 2023 MD&M | WestPack | ATX | D&M | Plastek

02/07/2023

IME 2023 MD&M | WestPack | ATX | D&M | Plastek

01/27/2023

Arizona Photonics Days, 2023

01/26/2023

Arizona Photonics Days, 2023

01/26/2023

TIPE 3D Printing | 2023

01/26/2023

Venture Cafe Phoenix Talent Night - Job Fari

01/26/2023

VFS 2023 Autonomous/Electric VTOL Symposium

01/25/2023

Arizona Photonics Days, 2023

01/25/2023

Building A.M.- Utah: Kickoff!

01/25/2023

TIPE 3D Printing | 2023

01/25/2023

VFS 2023 Autonomous/Electric VTOL Symposium

01/24/2023

VFS 2023 Autonomous/Electric VTOL Symposium

01/24/2023

TIPE 3D Printing | 2023

01/18/2023

2023 AZ Tech Council Golf Tournament

12/21/2022

Simulation Best Practices for 5G Technology - Webinar

12/14/2022

Digital Twins Updates in Ansys 2022 R2 - Webinar

12/08/2022

Tech the Halls - AZ Tech Council Holiday Mixer

12/07/2022

Electric Vehicle and Other Infrastructure Update Panel

11/30/2022

SPEOS Updates in Ansys 2022 R2 - Webinar

11/23/2022

Simulation Best Practices for Electronics Reliability - Webinar

11/16/2022

Discovery Updates in Ansys 2022 R2

11/10/2022

VentureCafe Phoenix Panel: Venture Capital in AZ

11/08/2022

2022 GOVERNOR’S CELEBRATION OF INNOVATION AWARDS + TECH SHOWCASE

11/03/2022

VentureCafe Phoenix Panel: Angel Investment in AZ

11/02/2022

High & Low Frequency Electromagnetics Updates in Ansys 2022 R2

10/26/2022

Simulation Best Practices For Chip-Package-System Design & Development

10/20/2022

Nerdtoberfest 2022

10/19/2022

2022 Southern Arizona Tech + Business Expo

10/19/2022

LS-DYNA Updates in Ansys 2022 R2 - Webinar

10/17/2022

Experience Stratasys Truck Tour - Clearfield Utah

10/14/2022

ASU School of Manufacturing Systems and Networks - Formal Opening Cele

10/14/2022

Experience Stratasys Truck Tour - Midvale Utah

10/12/2022

Experience Stratasys Truck Tour - Littleton Colorado

10/06/2022

Fluids Updates in Ansys 2022 R2 - Webinar

10/05/2022

Experience Stratasys Truck Tour - Colorado Springs

09/29/2022

White Hat Life Science Investor Conference - 2022

09/28/2022

2022 AZBio Awards

09/28/2022

Simulation Best Practices for Rotating Machinery Design & Development

09/21/2022

ExperienceIT NM 2022

09/21/2022

Additive Updates in Ansys 2022 R2 - Webinar

09/14/2022

Rocky Mountain Life Sciences Investor & Partnering Conference

09/08/2022

Ansys Optics Simulation User Group Meeting - Virtual

09/08/2022

Ansys Optics Simulation User Group Meeting

09/07/2022

SI & PI Updates in Ansys 2022 R2 - Webinar

08/31/2022

Simulation Best Practices for Developing Medical Devices - Webinar

08/24/2022

Mechanical Updates in Ansys 2022 R2 - Webinar

08/10/2022

Tucson after5 Tech Mixer: Ruda-Cardinal

08/05/2022

Flagstaff Tech Tour, 2022

08/02/2022

2022 CEO Leadership Retreat

08/01/2022

2022 CEO Leadership Retreat

07/27/2022

Thermal Integrity Updates in Ansys 2022 R1 - Webinar

07/20/2022

Simulation Best Practices for the Pharmaceutical Industry - Webinar

07/14/2022

NCMS Technology Showcase: Corpus Christi Army Depot

07/13/2022

NCMS Technology Showcase: Corpus Christi Army Depot

07/13/2022

Additive & Structural Optimization Updates in Ansys 2022 R1 - Webinar

07/07/2022

Arizona AADM Conference, 2022

06/29/2022

LS-DYNA Updates & Advancements in Ansys 2022 R1 - Webinar

06/23/2022

Simulation Best Practices for Wind Turbine Design - Webinar

06/15/2022

MAPDL Updates & Advancements in Ansys 2022 R1 - Webinar

06/01/2022

Mechanical Updates in Ansys 2022 R1 - pt. 2 Webinar

05/26/2022

Modelling liquid cryogenic rocket engines in Flownex - Webinar

05/25/2022

SMR & Advanced Reactor 2022

05/25/2022

05/24/2022

SMR & Advanced Reactor 2022

05/19/2022

RAPID + tct 2022

05/19/2022

Venture Cafe Roundtable: AI & Healthcare

05/18/2022

Tucson after5 Tech Mixer: World View

05/18/2022

RAPID + tct 2022

More Info

05/18/2022

Signal & Power Integrity Updates in Ansys 2022 R1 - Webinar

05/18/2022

Simulation World 2022

05/17/2022

RAPID + tct 2022

05/11/2022

Experience Stratasys Manufacturing Virtual Event

05/04/2022

Mechanical Meshing Updates in Ansys 2022 R1 - Webinar

04/27/2022

04/22/2022

12TH ANNUAL TUCSON GOLF TOURNAMENT

04/21/2022

04/20/2022

Additional Fluids Updates in Ansys 2022 R1

04/20/2022

Experience Stratasys Tour – Tempe Arizona

04/18/2022

Experience Stratasys Tour - Flagstaff Arizona

04/14/2022

D&M West | MD&M West

04/13/2022

D&M West | MD&M West

04/13/2022

Experience Stratasys Tour - Albuquerque New Mexico

04/12/2022

D&M West | MD&M West

04/12/2022

Experience Stratasys Tour - Los Alamos New Mexico

04/12/2022

Optimizing Engineering Workflows f​​​​or Propulsion System Design

04/07/2022

Experience Stratasys Tour - Austin Texas

04/07/2022

37th Space Symposium - Arizona Space Industry

04/06/2022

Transforming Digital Engineering with Ansys Discovery 2022 R1

04/06/2022

37th Space Symposium - Arizona Space Industry

04/05/2022

37th Space Symposium - Arizona Space Industry

04/04/2022

37th Space Symposium - Arizona Space Industry

Search in PADT site

Contact Us

Most of our customers receive their support over the phone or via email. Customers who are close by can also set up a face-to-face appointment with one of our engineers.

For most locations, simply contact us: