Prepare Twin Activate Models for Use in HyperStudy
You can use Altair HyperStudyto import Twin Activate SCM files as models.
HyperStudy is an advanced design exploration and optimization tool that allows you to improve product performance through robust design analysis. It provides a suite of methods for design of experiments (DOE), optimization, and stochastic analysis, which help you explore a vast design space efficiently. HyperStudy automates workflows, integrates with multiple simulation tools, and allows engineers to identify optimal configurations for system performance and reliability. Together, Twin Activate and HyperStudy provide a powerful combination to develop high-performance, reliable digital twin models and conduct thorough, data-driven design optimizations.
Design variables from Twin Activate can be read into HyperStudy. Output sources can be read into HyperStudy during design exploration and optimization studies.
- While building systems models, you create variables in Twin Activate, which could be used as design variables. These are first read into HyperStudy.
- During each run, HyperStudy invokes Twin Activate, passes values of design variables to Twin Activate, performs a simulation, and creates output resources that are read into HyperStudy.
- The response you create in HyperStudy are then updated for each run.
To achieve this connection, Twin Activate models must be prepared in a certain way so that the connection is seamless. This procedure discusses the preparation of the model to achieve this.
-
Define the design variables in Twin Activate.
In Twin Activate, you must define variables that you want to use as design variables only in the script section of the file.
All independent variables in the initialization script will be imported to HyperStudy as design variables. You can deselect the ones you might not need.
Figure 1. Defining Variables in the Initialization Script
Note:- Only independent variables can be used as design variables.
- K=750.0 is an independent variable and will be a design variable in HyperStudy.
- m=K*0.235 is not an independent variable and cannot be used as design variable in HyperStudy.
- They can be defined in different lines or can defined in one
line with ‘;’ separation:
- K=750.0 m=0.5
- K=750.0; m=0.5;
- You can use these independent variables as desired in various fields in the model. When HyperStudy changes the value in the initialization script, all fields get modified due to the parametrization created by you.
- Independent variables defined inside loops are ignored (if, for, function, while, switch, try blocks).
- Only independent variables can be used as design variables.
-
Create output resources for use in HyperStudy.
Output resources are vectors that are output from the results of a simulation. Using these vectors, you can create output responses for design exploration in HyperStudy. In Twin Activate, only output resources need to be created. Output responses are created in HyperStudy.
You need to create ToCSV blocks in Twin Activate and output all signals you want to be included as response sources.
Figure 2. ToCSV Block to Output Signals into a CSV File
Note:- You can output all required signals into one or more CSV files. Each signal from each CSV file will be used as an output resource (or output vector).
- The column names (Variable name fields) must be unique between all CSV files. The Name of the first column must also be unique between CSV files. If you define ‘time’ as the name of the first column in one.csv, you must use a different name (say, time1) as the name of the first column in the second.csv file.
- Column names cannot contain special characters, such as / * + -.
- The ToCSV block should only have scalars as output. Vectors are not handled by the HyperStudy-Twin Activate bridge. Vectors must be split using the demux block into scalars, and those scalars must be added to the ToCSV block.
- While running design exploration, the CSV blocks are read into HyperStudy. Each column is presented as an output resource. You can create your own responses from these output resources.