HS-4410: Readmac Delegate for Mode Tracking

Learn how to use the Readmac delegate for mode tracking applications.

Before you begin, copy the model files used in this tutorial from <hst.zip>/HS-4410/ to your working directory.
In this tutorial you will set up an optimization problem with the objective of maximizing the first natural frequency of a simple rectangular section beam.

Figure 1. Bar Cross-Section of the Beam Element from HyperBeam

Perform the Study Setup

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

      Figure 2.
    2. In the Solver input file column, enter Bar_beam.fem.
      This is the name of the solver input file HyperStudy writes during the evaluation.
    3. In the Solver execution script column, select OptiStruct (os).
  6. Click Import Variables.
    Two input variable is imported from the .tpl resource file.
  7. Go to the Define Input Variables step.
  8. 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 three output responses that are based on elements of a single data source from the Readmac delegate.

  1. Go to the Define Output Responses step.
  2. Create a data source.
    1. Click the Data Sources tab.
    2. From the Directory, drag-and-drop the Bar_beam.h3d file, located in approaches/setup_1-def/run__00001/m_1, into the work area.
      The Data Source Builder dialog opens.
    3. For Tool, select Modal Assurance Criteria.
    4. Under Reference, define the options as show in Figure 3.
      • File: Navigate to approaches/setup_1-def/run__00001/m_1/Bar_beam.h3d
        Note: The file source uses a relative position of the Bar_beam.h3d file, and updates for successive run numbers. However, the reference file uses an absolute path and points to the given file source throughout all the runs.
      • Subcase: Subcase 1 (loadstep1)
      • Type: Eigen Mode (Grids)
      • Mode: Reference mode index = 1
    5. Under Target, maintain the default settings.

      The default Target settings adopt the same Type and Subcase as the Reference settings, which enables HyperStudy to search all modes for the best match in the reference file.

    6. Click OK.

    Figure 3.
  3. Create and define output responses.
    1. Click the Define Output Responses tab.
    2. Click Add Output Responses to add three output responses.
    3. Label the output responses Freq of best matched mode, MAC of matched mode, and ID of matched mode.
    4. In the Expression field, enter the following expressions for each output response:
      • Freq of best matched mode = ds_1[0]
      • MAC of matched mode = ds_1[1]
      • ID of matched mode = ds_1[2]

      Figure 4.
  4. Click Evaluate to extract the response values.

Run Optimization

  1. Add an Optimization.
    1. In the Explorer, right-click and select Add from the context menu.
    2. In the Add dialog, select Optimization and click OK.
  2. Go to the Optimization > Definition > Define Output Responses step.
  3. Click the Objectives/Constraints - Goals tab.
  4. Apply an objective on the Freq of best matched mode output response.
    1. Click Add Goal.
    2. In the Apply On column, select Freq of best matched mode.
    3. In the Type column, select Maximize.

    Figure 5.
  5. Go to the Optimization > Specifications step.
  6. In the work area, set the Mode to Adaptive Response Surface Method (ARSM).
    Note: Only the methods that are valid for the problem formulation are enabled.
  7. Click Apply.
  8. Go to the Optimization > Evaluate step.
  9. Click Evaluate Tasks.
  10. Click the Iteration History tab.
    The frequency of best matched mode in the target file is maximized to 50.067 from 33.388. The readmac function that was running the background was able to track the ID of the matched mode in the target .h3d file. The mode ID in the converged solution switched from 1 to 2.

    Figure 6.