HS-1010: Set Up a Simple Study

Learn how to set up a study on simple functions defined using a Templex template.

Before you begin, copy the model files used in this tutorial from <hst.zip>/HS-1010/ to your working directory.
Simple.tpl
Base input template

The base input template defines two input variables, DV1 and DV2, labeled X and Y, respectively. The objective of this study is to investigate the two random variables X, Y forming the two functions X+Y and 1/X + 1/Y – 2.

Review the Base Input Template

In this step you will use HyperMesh Desktop to review the base input template.

  1. Start HyperMesh Desktop.
  2. On the Client Selector toolbar, select TextView.


    Figure 1.
  3. On the Standard toolbar, click .
  4. In the Open Document dialog, navigate to your working directory and open the Simple.tpl file.
    The text editor displays the following Templex statements:
    {parameter(DVAR1,"Area 1",.5,0.2,5)}
    {parameter(DVAR2,"Area 2",.5,0.2,5)}
    {RES =  DVAR1 + DVAR2}
    {CON =  1/DVAR1 + 1/DVAR2 - 2}
    {RES}
    {CON}
    {DVAR1}
    {DVAR2}
  5. On the Text toolbar, click .
    The text editor evaluates the Templex statements, replaces the parameters with their initial values, and displays the following results:
    1
    2
    0.5
    0.5
  6. Start HyperStudy by clicking Applications > HyperStudy from the menu bar.

Perform the Study Setup

  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 Simple.tpl file into the work area.


      Figure 2.
    2. In the Solver input file column, enter res.
      This is the name of the solver input file HyperStudy writes during the evaluation.
    3. In the Solver execution script column, select Templex (templex).


    Figure 3.
  5. Click Import Variables.
    Two input variables are imported from the Simple.tpl resource file.
  6. Go to the Define Input Variables step.
  7. Review the input variable's lower and upper bound ranges.
  8. Optional: Access additional editing and visualization features from the context menu by right-clicking anywhere in the work area.


    Figure 4.

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 two output responses.

  1. Go to the Define Output Responses step.
  2. Create output response 1.
    1. From the Directory, drag-and-drop the .res file, located in approaches/setup_1-def/run__00001/m_1, into the work area.


      Figure 5.
    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 unknown.
      • Set Request to Block 1.
      • Set Component to Column 1.


      Figure 6.
    5. Optional: Enter labels for the data source and output response.
    6. Set Expression to First Element.
      The expression changes to m_1_ds_1[0].
      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.


      Figure 7.
    7. Click Finish.
    Output response 1 is added to the work area.
  3. Create output response 2 by repeating step 2.
  4. In the Expression field for Response 2, select the second value by changing the [0] to [1] after m_1_ds_2.


    Figure 8.
  5. Click Evaluate to extract the response values.
Proceed to the desired study type: DOE, Optimization, of Stochastic study.