HyperWorks Solvers

OS-5010: Cantilever L-beam Shape Optimization

OS-5010: Cantilever L-beam Shape Optimization

Previous topic Next topic No expanding text in this topic  

OS-5010: Cantilever L-beam Shape Optimization

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

This tutorial focuses on performing a shape optimization on an L-section cantilever beam modeled with shell elements. A schematic is shown in the figure below. The vertical deflection at point N should be limited to 2.0mm while minimizing the amount of material required.

tut4002.fig

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.

In this tutorial, you will learn to:

Set up the shape optimization problem in HyperMesh
Post-process the optimization results in HyperView

Exercise


Step 1: Launch the HyperMesh Desktop, Set the User Profile and Retrieve the File

1.Launch HyperMesh Desktop.
2.Choose OptiStruct in the User Profiles dialog 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.
3.From the File menu on the toolbar, select Open > Model.
4.Select the Lbeamshape.hm file you saved to your working directory from the optistruct.zip file. Refer to Accessing the Model Files.
5.Click Open.

 

Setting Up the Shape Optimization Problem in HyperMesh


Step 2: Create Shapes using HyperMorph

This section makes use of HyperMorph. For a more detailed description of the functionality of HyperMorph, refer to the HyperMorph section of the HyperMesh documentation.

1.From the Analysis page, enter the optimization panel.
2.Select the HyperMorph panel.
3.Select the domains panel.
4.Select the create subpanel using the radio buttons on the left-hand side of the panel.
5.Click the switch next to global domain and select the auto functions from the pop-up menu.
6.Click generate on the right side of the panel.

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

7.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.
8.Click return to return to the HyperMorph panel.
9.Select the morph panel.
10.Select the move handles subpanel using the radio buttons on the left side of the panel.
11.Click the right-hand switch and select translate instead of interactive from the pop-up menu.
12.If the handles button is not already highlighted, click on it.
13.Select the local handle that is located at the node where the load is applied by clicking on it in the graphics window (local handles are indicated by a yellow ball).
14.Click y val = and enter -10.0.
15.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.
16.Select the save shape subpanel using the radio buttons on the left side of the panel.
17.Click name = and enter shape1.
18.Click color and choose a color from the palette.
19.Set the toggle beneath shape = to as node perturbations.
20.Click save.

5010_save_perturbations

21.Select Yes to the message regarding the perturbations, as shown above.

This shape is saved as shape1. Later, you can associate it to a design variable.

22.Click undo all. The model returns to its original shape.

5010_handles

Figure showing handles to be morphed

23.Repeat steps 9 through 22 for the local handles 3, 4 and 5. Referring to the figure above, translate handles 3 and 4 by x=-10 and handle 5 by y=-10. Save the shapes after morphing each handle as shape2, shape3 and shape4, respectively.
24.Click return twice to go to the optimization panel.

Step 3: Create Design Variables for Shape Optimization

1.On the Analysis page, in the optimization panel, select shape.
2.Select the desvar subpanel using the radio buttons on the left side of the panel.
3.Toggle the switch to multiple desvars from single desvar.
4.Click shapes, (the yellow button that appears).
5.Check the boxes next to shape1, shape2, shape3, and shape4 and click select.
6.Click create.

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

7.Click return to go to the optimization panel.

tut4002

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

Step 4: Create Mass and Static Displacement for Nodes as Responses

Two responses are defined in this tutorial, a mass response for the objective function and a displacement response for the constraint. A detailed description can be found in the OptiStruct User's Guide under Responses.

1.Select the responses panel (accessed through the optimization panel on the Analysis page).
2.Click response = and enter Mass.
3.Click the response type: switch and select mass from the pop-up menu.
4.Click create. A response, mass, is defined for the total mass of the model.
5.Click response = and enter Disp.
6.Click the response type: switch and select static displacement from the pop-up menu.

5010_node_disp_response

Figure showing node to be selected while defining displacement response.

7.Select the response node by clicking on the node, shown in the above figure.
8.Select dof 2.

Dofs 1, 2, and 3 refer to translation in the X, Y, and Z directions.

Dofs 4, 5, and 6 refer to rotation about the X, Y, and Z axes.

9.Click create. A response, Disp, is defined for the y-displacement of the node selected.
10.Click return to go to the optimization panel.

Step 5: Define Minimize Mass as Objective Function

In this step, the objective is to minimize the mass response defined in the previous section.

1.Select the objective panel (accessed from the optimization panel on the Analysis page).
2.Click the switch in the upper left corner of the panel, and select min from the pop-up menu.
3.Click response = and select mass from the response list.
4.Click create. The objective function is now defined.
5.Click return to go to the optimization panel.

Step 6: Apply Design Constraint on Static Displacement Response

A response defined as the objective cannot be constrained (volume, in this case).

A lower bound constraint is to be defined for the displacement response defined in the previous section.

1.Select the dconstraints panel (accessed from the optimization panel on the Analysis page).
2.Click constraint = and enter Constr.
3.Click response = and select Disp from the list of responses. A loadsteps button appears in the panel.
4.Click loadsteps.
5.Check the box next to load and click select.
6.Check the box next to lower bound =.
7.Click lower bound = and enter -2.0. Note this is a lower bound, as the response is negative.
8.Click create.

A constraint is defined on the response disp. The constraint is a lower bound with a value of -2.0. The constraint applies to the subcase Load.

9.Click return twice to go to the main menu.

Step 7: Save the Database as an hm File

1.From the File menu, select Save as > Model. A Save As dialog opens.
2.For Name, enter lbeamshape_opt.hm.
3.Click Save.

Step 8: Run OptiStruct

1.Select the OptiStruct panel on the Analysis page.
2.Click save as following the input file: field.
3.Select the directory where you would like to write the OptiStruct model file and enter the name for the model, lbeamshape_opt.fem, in the File name: field. The .fem extension is suggested for OptiStruct input decks.
4.Click Save.

The name and location of the lbeamshape_opt.fem file displays in the input file: field.

5.Set the memory options: switch, located in the center of the panel, to memory default.
6.Click the run options: switch, located at the left of the panel, and select optimization.
7.Set the export options: switch to all.
8.Click OptiStruct.

This launches the OptiStruct job. If the job was successful, new results files can be seen in the directory where the OptiStruct model file was written. The lbeamshape_opt.out file is a good place to look for error messages that will help to debug the input deck if any errors are present.

 

Post-processing the Optimization Results in HyperView


Shape contour information is output from OptiStruct for all iterations. In addition, displacement and stress results are output for the first and last iterations by default. This section describes how to view those results in HyperView.

Step 9: 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.While still in the OptiStruct panel, click HyperView.
2.Close the Message Log window that details the result files loaded into HyperView.

In the HyperWorks Desktop, the loaded .h3d files contain optimization results on page 2 and analysis results on page 3.

3.Use the navigations icons, seen in the figure below to navigate to Design History (page 2).

page_nav

4.Select the last iteration (iteration 6) using the drop-down selection, as seen in the figure below.

os5010_iteration5

5.Click the Contour panel toolbar icon resultsContour-24.
6.Under Result type:, select Shape change (v).
7.Click Apply. The final shape for the Iteration # can now be seen.

Step 10: View a Transient Animation of Shape contour changes

1.Click the Play icon animationStart-24 to start the animation.
2.The seek slider and playback speed slider (top and bottom respectively) are located next to the playback controls.

animation_mini_toolbar

3.Move the speed slider to adjust the animation speed.
4.After reviewing the animation, click the Stop icon animationStop-24 to stop the animation and move Current time: back to 0.

Step 11: Plot a Contour of Displacements

1.Click the Next Page arrow to go to page 3, which contains the analysis results.
2.Click the Contour panel toolbar animationStart-24.
3.Under Result type:, select Displacement (v).
4.Next, select the Y component of the Displacement (since that is what was constrained).
5.Select the last iteration (iteration 6) using the drop-down selection, as seen in the image below.

os5000_iteration6

6.Click Apply.

A plot of the displacements on your final shape should be displayed. The maximum displacements for the last Iteration #, is still below 2.0.

See Also:

OptiStruct Tutorials