HS-1021: Work with a Parameterized File Model for Shape Variables
Learn how to create a template file for shape variables and how to import them to
HyperStudy.
Before you begin, copy the model files used in
this tutorial from <hst.zip>/HS-1021/ to your working
directory.
The input variables are three shape variables:
xtrans
ytrans
radius
Each of these shapes are created by perturbing the mesh in the corresponding
direction by 1 unit. Figure 1. Double Symmetric Plate Model Figure 2. Double Symmetric Plate Model with Shape Vectors
Export Shape Variables from HyperMesh
Start HyperMesh.
In the User Profiles dialog, set the user profile to
OptiStruct.
Open model.
From the menu bar, click File > Open > Model.
In the Open Model dialog, open the
plate_with_shapes.hm file.
A model appears in the graphics area.
From the Morph tab, click
Shapes.
Figure 3.
In Edit Shapes window, select
xtrans, ytrans and
radius shapes as Design Variable.
Figure 4.
Export shape variables.
ClickExport.
Set analysis code to HyperStudy.
Set sub-code to OptiStruct.
Click Export.
Figure 5.
Quit HyperMesh by clicking File > Exit from the menu bar.
Create Base Input Template
Start HyperStudy.
From the menu bar, click Tools > Editor.
The Editor opens.
In the File field, open the plate_with_shapes.fem
file.
In the Editor, right-click and select Select Nodes > GRID from the context menu.
All of the GRID cards in the plate_with_shapes.fem
file highlight.Figure 6.
Right-click on the highlighted cards and select Include
Shape from the context menu.
In the Shape Template dialog, open the
plate_with_shapes.optistruct.node.tpl file.
Click Save.
In the Save Template dialog, save the file as
plate_with_shapes.tpl.
Close the Editor.
Perform the Study Setup
In this step, you will import the design variables (known as input variables in
HyperStudy) created in the step Export Shape Variables from HyperMesh to HyperStudy.
Start a new study in the following ways:
From the menu bar, click File > New.
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.
From the Directory, drag-and-drop the
plate_with_shapes.tpl file into the work area.
Figure 7.
In the Solver Input File column, enter
plate.fem.
This is the name of the solver input file HyperStudy
writes during any evaluation.
In the Solver Execution Script column, select OptiStruct
(os).
Figure 8.
Click Import Variables.
Three input variables are imported from the
plate_with_shapes.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.
Create and Evaluate Output Responses
In this step you will create output responses, Mass and Displacement.
Go to the Define Output Responses step.
Create the Mass output response.
From the Directory, drag-and-drop the
plate.out file, located in
approaches/setup_1-def/run__00001/m_1, into the
work area.
Figure 9.
In the File Assistant dialog, set the Reading
technology to Altair® HyperWorks® and click
Next.
Select Single Item in a Time Series, then click
Next.
Define the following options, then click Next.
Set Type to Mass.
Set Request to Mass.
Set Component to Value.
Figure 10.
Label the output response Mass.
Set Expression to First Element.
Note: Because there is only a single value in this data source, [0] is
inserted after m_1_ds_1, thereby choosing the first (and only) entry
in the data source.
Click Finish.
Figure 11.
The Mass output response is displayed in the work area.
Create the Displacement output response.
From the Directory, drag-and-drop the
plate.h3d file, located in
approaches/setup_1-def/run__00001/m_1, into the work area.
In the File Assistant dialog, set the Reading
technology to Altair® HyperWorks® and click
Next.
Select Single Item in a Time Series, then click
Next.
Define the following options, and then click Next.
Set Subcase to Subcase 1 (Load).
Set Type to Displacement (Grids).
Set Request to N298.
Set Component to MAG.
Label the output response Displacement.
Set Expression to First Element.
Click Finish.
The Displacement output response is added to the work area.