OS-T: 2080 Hook with Stress Constraints

In this tutorial you will perform a topology optimization on a bracket-hook modeled with shell elements.

Before you begin, copy the file(s) used in this tutorial to your working directory.
The objective of this tutorial is to minimize the volume of the material used in the model subject to certain stress constraints. Topology optimization is performed to find the optimal material placement and reduce the volume. This optimization normalizes each element according to its density and lets you remove elements that have low density.
Figure 1. Structural Model with Loads and Constraints


The structural model is loaded into HyperMesh Desktop. The constraints, loads, subcases and material properties are already defined in the model. The topology design variables and the optimization problem setup will be defined using HyperMesh, and OptiStruct is used to determine the optimal material layout. The results can then be reviewed in HyperView.

The optimization problem is stated as:
Objective Function
Minimize mass.
Minimum Member Size = 1.0
Von Mises stress < 1000
Design Variables
The density of each element in the design space.

Launch HyperMesh and Set the OptiStruct User Profile

  1. Launch HyperMesh.
    The User Profile dialog opens.
  2. Select OptiStruct and click OK.
    This loads the user profile. It includes the appropriate template, macro menu, and import reader, paring down the functionality of HyperMesh to what is relevant for generating models for OptiStruct.

Import the Model

  1. Click File > Import > Solver Deck.
    An Import tab is added to your tab menu.
  2. For the File type, select OptiStruct.
  3. Select the Files icon files_panel.
    A Select OptiStruct file browser opens.
  4. Select the hook.fem file you saved to your working directory.
  5. Click Open.
  6. Click Import, then click Close to close the Import tab.

Set Up the Optimization

Set the View

  1. In the Model Browser, right-click on Components and select Isolate Only from the context menu.
  2. From the Standard Views toolbar, click viewAxisOrientationZYFront-24 to fit the model to the screen.
Only the components display.

Create Topology Design Variables

In this step you will set the optimization to optimize the shell elements in the Design and Base components to create structural members with minimum member size of 1.0 unit in width with thicknesses that vary between zero and the thickness of the shell. The optimization will use 1000 as the maximum stress for any element within the design region when validating the design.

  1. From the Analysis page, click optimization.
  2. Click topology.
  3. Select the create subpanel.
  4. In the desvar= field, enter shells.
  5. Set type: to PSHELL.
  6. Using the props selector, select Design and Base.
  7. Click create.
  8. Update the design variable's parameters.
    1. Select the parameters subpanel.
    2. Toggle minmemb off to mindim=, then enter 1.0.
    3. Under stress constraint, toggle none to stress= and enter 1000.
    4. Click update.
  9. Click return.

Create Optimization Responses

  1. From the Analysis page, click optimization.
  2. Click Responses.
  3. Create the mass response, which is defined for the total volume of the model.
    1. In the responses= field, enter mass.
    2. Below response type, select mass.
    3. Set regional selection to total and no regionid.
    4. Click create.
  4. Click return to go back to the Optimization panel.

Apply Constraints

There is no need for additional constraints, since setting a stress target in the design variable serves as a constraint that limits the amount of material used in the optimized model.

Define the Objective Function

  1. Click the objective panel.
  2. Verify that min is selected.
  3. Click response= and select mass.
  4. Click create.
  5. Click return twice to exit the Optimization panel.

Save the Database

  1. From the menu bar, click File > Save As > Model.
  2. In the Save As dialog, enter hook_opt.hm for the file name and save it to your working directory.

Run the Optimization

  1. From the Analysis page, click OptiStruct.
  2. Click save as.
  3. In the Save As dialog, specify location to write the OptiStruct model file and enter hook_opt for filename.
    For OptiStruct input decks, .fem is the recommended extension.
  4. Click Save.
    The input file field displays the filename and location specified in the Save As dialog.
  5. Set the export options toggle to all.
  6. Set the run options toggle to optimization.
  7. Set the memory options toggle to memory default.
  8. Click OptiStruct to run the optimization.
    The following message appears in the window at the completion of the job:
    OptiStruct also reports error messages if any exist. The file hook_opt.out can be opened in a text editor to find details regarding any errors. This file is written to the same directory as the .fem file.
  9. Click Close.

View the Results

View the Iso Surface Plot of the Density Results

  1. In the Mechanical Solver View dialog, click Results.
    The results of the Optimization run and the corresponding Linear Static subcases are loaded into HyperView.
  2. Review the Contour plot of element density results.
    1. From the Results toolbar, click resultsContour-24 to open the Contour panel.
    2. Set the Result type to Element Densities[s].
    3. Click Apply to display the density contour.
    4. In the Results Browser, select Design and Iteration 26 (or your final iteration number).
    Figure 2.

  3. Review the Iso Value plot of element density results.
    1. From the Results toolbar, click resultsIso-24 to open the Iso Value panel.
    2. Set the Result type to Element Densities.
    3. In the Results Browser, select the last design iteration.
      Figure 3.

    4. Click Apply.
    5. In the Current value field, change the value to see the results with varying density values.
      When you update the density threshold, the Iso value displayed in the modeling window updates interactively. Use this tool to get a better look at the material layout and the load paths from OptiStruct.
    Figure 4. Iso Value Plot. Current value=0.4528


View the Element Stress Results

  1. In the top, right of the application, click pageNext-24 to move to the page which displays results from the Linear Static Analysis of Subcase 1.
    The results is this page are loaded from hook_opt_s19.h3d, and contain the linear static results for the 1st subcase.
  2. From the Results toolbar, click resultsContour-24 to open the Contour panel.
  3. Set the Result type to Element stresses(2D&3D)(t) and vonMises.
  4. In the Results Browser, select the last displayed Iteration.
  5. In the Contour panel, click Apply.
    Figure 5. von Mises Stress Results

  6. Similarly, review the results from the other subcases.

You will notice that there are some local regions where the stresses are still high; this is because topology stress constraints should be interpreted as global stress control or global stress target.

The functionality has some ways to filter out the artificial or local stresses caused by point loading or boundary conditions, but those artificial stresses will not be completely removed unless the geometry is changed by shape optimization.
Note: There might still be high local stress regions which can be improved more effectively with local shape and size optimization.