HS-1080: Set Up an Operator Model
Learn how to use the Operator model type to run a script that uses a combination of HyperView and HVTrans to split the solver result file in multiple result files, one for each component in the model.
This tutorial uses a model which consists of a plate with a hole which is loaded in plane. The design has three thickness variables; one for each zone. The output responses of interest are the maximum stress in each of the three zones.
Perform the Study Setup
- Start HyperStudy.
-
Start a new study in the following ways:
- From the menu bar, click .
- On the ribbon, click .
- In the Add Study dialog, enter a study name, select a location for the study, and click OK.
- Go to the Define Models step.
-
Add a Parameterized File model.
-
Click Import Variables.
Three input variables are imported from the plate.tpl resource file.
- Go to the Define Input Variables step.
- Review the input variable's lower and upper bound ranges.
Perform Nominal Run
- Go to the Test Models step.
-
Click Run Definition.
An approaches/setup_1-def/ directory is created inside the study Directory. The approaches/setup_1-def/run__00001/m_1 directory contains the input file, which is the result of the nominal run.
Set Up the Operator Model
- Go to the Define Models step.
-
Add an Operator model.
- Click Add Model.
- In the Add - HyperStudy dialog, select Operator and click OK.
-
Click Model Resources.
The Model Resources dialog opens.
-
Define a model dependency that references the python script that will be used
as the solver script.
This is a reference to a file that is not generated during a solver run, therefore it is of type Normal. This file does not need to be in the run directory.
-
Set the Solver execution script.
Option Description Python based model - Set the Solver Execution Script to Python (py).
- In the Solver Input Arguments column, enter
${m_2.file_2} ${m_2.file_4}
.
The input arguments are references to the model resources' varnames. The first argument (m_2.file_2) is a reference to the model resource’s varname, and tells python which script to run. The second argument (m_2.file_4) is the varname to the target result file to split, and will be the first argument to the python script.
Direct Solver (hw.exe) Model - Set the Solver Execution Script to HyperWorks (hw.exe).
- In the Solver Input Arguments column, enter
-tcl ${m_2.file_2} -b -result ${m_2.file_3}
.
The input arguments are references to the model resources' varnames. The first argument (m_2.file_2) is a reference to the model resource’s varname, and tells hw.exe which tcl script to run. The second argument (m_2.file_3) is the varname to the target result file to split.
Perform Nominal Run
- Go to the Test Models step.
- Click Run Definition.
-
In the Altair HyperStudy dialog, click
Overwrite.
The m_1 and m_2 directories are created inside the approaches/setup_1-def/run__00001/ directory.
Create and Evaluate Output Responses
In this step you will create four output responses: maxStressPart2, maxStressPart4, maxStress3, Volume.
- Go to the Define Output Responses step.
-
Create the maxStressPart2 output response.
-
Create the maxStressPart4 output response.
-
Create the maxStress3 output response.
-
Create the Volume output response.
The Volume output response is added to the work area.
- Click Evaluate to extract the response values.
Run DOE
-
Add a DOE.
- Go to the step.
- In the work area, set the Mode to Modified Extensible Lattice Sequence.
- Click Apply.
- Go to the step.
- Click Evaluate Tasks.
- Go to the step.
-
Click the Pareto Plot tab to plot the effects of
variables on output responses in hierarchical order (highest to lowest).
Each variable contributes nearly equally to volume. A positive hashing indicates that the relationship is positive: as the variable increases, mass increases. For the three stress output responses, the maximum stress in each zone is dominated by the thickness of that zone.