OS-T: 5010 Cantilever L-beam Shape Optimization

In this tutorial you will perform a shape optimization on an L-section cantilever beam modeled with shell elements.

Before you begin, copy the file(s) used in this tutorial to your working directory.
In the schematic, the vertical deflection at point N should be limited to 2.0mm while minimizing the amount of material required.

tut4002.fig
Figure 1. Cantilever L-Beam Schematic
The optimization problem for this tutorial is stated as:
Objective
Minimize mass.
Constraints
A given maximum nodal displacement < 2 mm.
Design Variables
Shape of each of the beam flanges.

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.

Open the Model

  1. Click File > Open > Model.
  2. Select the Lbeamshape.hm file you saved to your working directory.
  3. Click Open.
    The Lbeamshape.hm database is loaded into the current HyperMesh session, replacing any existing data.

Set Up the Optimization

Create Shapes with HyperMorph

  1. From the Analysis page, click the optimization panel.
  2. Click the HyperMorph panel.
  3. Create domains and handles.
    1. Click the domains panel.
    2. Select the create subpanel.
    3. Set the switch to auto functions.
    4. Click generate.
    5. Click return to return to the HyperMorph panel.

    A number of domains and handles are created which will enable us to morph the shape of the beam.

    There are two types of handles; global handles, which are represented by larger red balls and local handles, which are represented by smaller yellow balls. Only local handles are available in this tutorial.

  4. Move handles.
    1. Click the morph panel.
    2. Select the move handles subpanel.
    3. Switch from interactive to translate.
    4. Using the handles subpanel, select the local handle that is located at the node where the load is applied.
      Note: Local handles are indicated by a yellow ball.
    5. In the y val= field, enter -10.0.
    6. Click morph.
    The beam changes shape so that the handle you selected moved -10.0 in the y-direction. Note how the mesh adjusted to this change in shape.
  5. Save the shape.
    1. Select the save shape subpanel.
    2. In the name= field, enter shape1.
    3. Click color and select a color for the shape.
    4. Under shape=, select as node perturbations.
    5. Click save.
    6. Click Yes to the message regarding the perturbations.

      5010_save_perturbations
      Figure 2.
    This shape is saved as shape1. Later, you can associate it to a design variable.
  6. Click undo all.
    The model returns to its original shape.
  7. Repeat steps 4 and 5 for the local handles 3, 4 and 5.
    1. Translate handles 3 and 4 by x=-10 and handle 5 by y=-10.
    2. Save the shapes after morphing each handle as shape2, shape3 and shape4, respectively.

    5010_handles
    Figure 3. Handles to be Morphed
  8. Click return twice to go to the Optimization panel.

Create Shape Optimization Design Variables

  1. Click the shape panel.
  2. Select the desvar subpanel.
  3. Toggle the switch from single desvar to multiple desvars.
  4. Using the shapes selector, select shape1, shape2, shape3, and shape4.
  5. Click create.
  6. Click return to go to the optimization panel.

Four shape design variables are created using the shapes that were saved earlier.

A potential variation in shape of the vertical flange of the L-beam that could be achieved using the set up described.

tut4002
Figure 4.

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. Create the displacement response.
    1. In the response= field, enter Disp.
    2. Below response type, select static displacement.
    3. Using the nodes selector, select the response node.
    4. Set the displacement type to dof2.
      dof1, dof2, dof3
      Translation in the X, Y, and Z directions.
      dof4, dof5, dof6
      Rotation about the X, Y, and Z axes.
      total disp
      Resultant of the translational displacements in x, y, and z directions.
      total rotation
      Resultant of the rotational displacements in x, y, and z directions.
    5. Click create.


    Figure 5.
  5. Click return to go back to the Optimization panel.

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.

Create Design Constraints

  1. Click the dconstraints panel.
  2. In the constraint= field, enter constr.
  3. Click response = and select Disp.
  4. Check the box next to lower bound, then enter -2.0.
  5. Using the loadsteps selector, select load.
  6. Click create.
  7. Click return to go back to the Optimization panel.

Save the Database

  1. From the menu bar, click File > Save As > Model.
  2. In the Save As dialog, enter lbeamshape_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 lbeamshape_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:
    OPTIMIZATION HAS CONVERGED.
    FEASIBLE DESIGN (ALL CONSTRAINTS SATISFIED).
    OptiStruct also reports error messages if any exist. The file lbeamshape_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 Deformed Structure

It is helpful to view the deformed shape of a model to determine if the boundary conditions have been defined correctly and also to check if the model is deforming as expected. In this section, use the Deformed panel to review the deformed shape for the last design iteration and a scale factor, and overlay the undeformed shape.
  1. From the OptiStruct panel, click HyperView.
    HyperView launches within the HyperMesh Desktop and loads .h3d files that contain optimization results on page 2 and analysis results on page 3.
  2. In the top, right of the application, use the navigations buttons to navigate to the Design History (page 2).

    page_nav
    Figure 6.
  3. In the Results Browser, select the last iteration (iteration 6).

    os5010_iteration5
    Figure 7.
  4. On the Results toolbar, click resultsContour-24 to open the Contour panel.
  5. Set the Result type: to Shape change (v).
  6. Click Apply.
The final shape for the Iteration # can now be seen.

View a Transient Animation of the Shape Contour Changes

  1. On the Animation toolbar, click animationStart-24 to start the animation.
    The seek slider and playback speed slider (top and bottom respectively) are located next to the playback controls.

    animation_mini_toolbar
    Figure 8.
  2. Move the speed slider to adjust the animation speed.
  3. After reviewing the animation, click animationStop-24 to stop the animation.
  4. Move the Current time: back to 0.

Plot a Displacements Contour

  1. In the top, right of the application, click to go to page 3, which contains the analysis results.
  2. On the Results toolbar, click resultsContour-24 to open the Contour panel.
  3. Set the Result type: to Displacement (v) and Y (Y component of the Displacement, which is what was constrained).
  4. In the Results Browser, select the last iteration (iteration 6).

    os5000_iteration6
    Figure 9.
  5. Click Apply.
A plot of the displacements on your final shape displays. The maximum displacements for the last Iteration #, is still below 2.0.