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

  1. Start HyperMesh Desktop.
  2. In the User Profiles dialog, set the user profile to OptiStruct.
  3. Open model.
    1. From the menu bar, click File > Open > Model.
    2. In the Open Model dialog, open the plate_with_shapes.hm file.
    A model appears in the graphics area.
  4. From the Analysis page, click optimization.


    Figure 3.
  5. Click shape.
  6. Go to the desvar subpanel.
  7. Create a design variable XTrans.
    1. In the desvar= field, enter XTrans.
    2. Click Shape=.
    3. Select the shape, xtrans.
    4. Click create.


    Figure 4.
  8. Create two more design variables labeled YTrans and Rad.
    Select the shape ytrans for design variable YTrans, and select the shape radius for design variable Rad.
  9. Export shape variables.
    1. Go to the export subpanel.
    2. Set analysis code to HyperStudy.
    3. Set sub-code to OptiStruct.
    4. Click export as.


      Figure 5.
    5. In the Save As dialog, save the file as plate_with_shapes.shp.
  10. Quit HyperMesh by clicking File > Exit from the menu bar.

Create Base Input Template

  1. Start HyperStudy.
  2. From the menu bar, click Tools > Editor.
    The Editor opens.
  3. In the File field, open the plate_with_shapes.fem file.
  4. 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.
  5. Right-click on the highlighted cards and select Include Shape from the context menu.
  6. In the Shape Template dialog, open the plate_with_shapes.optistruct.node.tpl file.
  7. Click Save.
  8. In the Save Template dialog, save the file as plate_with_shapes.tpl.
  9. 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.

  1. Start a new study in the following ways:
    • From the menu bar, click File > New.
    • On the ribbon, click .
  2. In the Add Study dialog, enter a study name, select a location for the study, and click OK.
  3. Go to the Define Models step.
  4. Add a Parameterized File model.
    1. From the Directory, drag-and-drop the plate_with_shapes.tpl file into the work area.


      Figure 7.
    2. In the Solver input file column, enter plate.fem.
      This is the name of the solver input file HyperStudy writes during any evaluation.
    3. In the Solver execution script column, select OptiStruct (os).


    Figure 8.
  5. Click Import Variables.
    Three input variables are imported from the plate_with_shapes.tpl resource file.
  6. Go to the Define Input Variables step.
  7. Review the input variable's lower and upper bound ranges.

Perform Nominal Run

  1. Go to the Test Models step.
  2. 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.

  1. Go to the Define Output Responses step.
  2. Create the Mass output response.
    1. 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.
    2. In the File Assistant dialog, set the Reading technology to Altair® HyperWorks® and click Next.
    3. Select Single Item in a Time Series, then click Next.
    4. Define the following options, then click Next.
      • Set Type to Mass.
      • Set Request to Mass.
      • Set Component to Value.


      Figure 10.
    5. Label the output response Mass.
    6. 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.
    7. Click Finish.


      Figure 11.
    The Mass output response is displayed in the work area.
  3. Create the Displacement output response.
    1. From the Directory, drag-and-drop the plate.h3d file, located in approaches/setup_1-def/run__00001/m_1, into the work area.
    2. In the File Assistant dialog, set the Reading technology to Altair® HyperWorks® and click Next.
    3. Select Single Item in a Time Series, then click Next.
    4. 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.
    5. Label the output response Displacement.
    6. Set Expression to First Element.
    7. Click Finish.
    The Displacement output response is added to the work area.
  4. Click Evaluate to extract the response values.