HS-4230: Optimization Study with Discrete Variables

Learn how to use discrete variables.

Before you begin, copy the model files used in this tutorial from <hst.zip>/HS-4230/ to your working directory.

The objective of this tutorial is to maximize the minimum frequency of the first five modes of a plate. The input variables are the thickness of each of the three components, defined in the input deck via the PSHELL card. The thickness should be between 0.05 and 0.15; the initial thickness within the files is 0.1. The optimization type is size. Furthermore, optimum design should have input variables from a discrete set of 0.05, 0.08, 0.11, and 0.14 for all three thicknesses. By default, HyperStudy will add the values from the lower and upper bounds to this set. Hence the resulting set is 0.05, 0.08, 0.11, 0.14, and 0.15. Delete any of these values if needed.



Figure 1. Double Symmetric Plate Model

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


      Figure 2.
    2. In the Solver input file column, enter plate.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.
    Three input variables are imported from the plate.tpl resource file.
  7. Go to the Define Input Variables step.
  8. Change Property 21 to be discrete.
    1. Click the Modes tab.
    2. In the Modes column of Property 21, select Discrete.


      Figure 3.
    3. In the Values column of Property 21, click (...).
    4. Click Step Size, enter 0.03, and click Set.


      Figure 4.
    5. Click OK.
  9. Repeat step 8 for Property 22 and Property 23.

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 the Freq1 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.
    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 click Next.
      • Set Type to Frequency.
      • Set Request to Mode 1.
      • Set Component to Value.


      Figure 5.
    5. Label the output response Freq1.
    6. Set Expression to First Element.
    7. Click Finish.


      Figure 6.
  3. Create the Volume 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.
    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 click Next.
      • Set Type to Volume.
      • Set Request to Volume.
      • Set Component to Value.
    5. Label the output response Value.
    6. Set Expression to First Element.
    7. Click Finish.
  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 Volume output response.
    1. Click Add Goal.
    2. In the Apply On column, select Volume (r_2).
    3. In the Type column, select Minimize.


    Figure 7.
  5. Apply a constraint to the Freq1 output response.
    1. Click Add Goal.
    2. In the Apply On column, select Freq1.
    3. In the Type column, select Constraint.
    4. deterministic
    5. In column 1, select >= (less than or equal to).
    6. In column 2, enter 32.


    Figure 8.
  6. Go to the Optimization > Specifications step.
  7. 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.
  8. Click Apply.
  9. Go to the Optimization > Evaluate step.
  10. Click Evaluate Tasks.
  11. Click the Iteration History tab to monitor the progress of the Optimization iteration.


    Figure 9.

Run DOE

Run a DOE to find the the true best design.

  1. Add a DOE.
    1. In the Explorer, right-click and select Add from the context menu.
    2. In the Add dialog, select DOE and click OK.
  2. Go to the DOE 1 > Specifications step.
  3. In the work area, set the Mode to Full Factorial.
  4. Click the Levels tab, and change the Levels for each input variable to 5.


    Figure 10.
  5. Click Apply.
  6. Go to the DOE 1 > Evaluate step.
  7. Click Evaluate Tasks.
  8. Go to the DOE 1 > Post-Processing step.
  9. Click the Summary tab.
  10. Sort run data based on the Volume (which was to be minimized) by right-clicking on the Volume column and selecting Sort down from the context menu. The lowest volume design which satisfies the constraint (frequency > 32) is the same as that found by the optimizer.
    Note: The DOE took 125 solver calls to exhaust all combinations, whereas the Optimization found it in 8 solver calls.


    Figure 11.