Tutorial: Topology Optimization of a cantilever beam

52
Tutorial: Topology optimization of a cantilever beam Umer Khan, Professor W. L. Cleghorn Department of Mechanical and Industrial Engineering, University of Toronto 2000 mm 1000 mm 100 mm OBJECTIVE Minimize Volume DESIGN VARIABLE Element density CONTRAINT Resultant Displacement is 0.01 mm at nodes where force is applied Construct this model in any CAD system and save as IGES format. 2000 N 2000 N 1

description

Tutorial showing detailed steps of performing topology optimization on a cantilever beamUmer Khan, Professor W. L. CleghornUniversity of Toronto, Department of Mechanical and Industrial Engineering

Transcript of Tutorial: Topology Optimization of a cantilever beam

Page 1: Tutorial: Topology Optimization of a cantilever beam

Tutorial: Topology optimization of a cantilever beamUmer Khan, Professor W. L. Cleghorn

Department of Mechanical and Industrial Engineering, University of Toronto

2000 mm

1000 mm

100 mm

OBJECTIVE Minimize Volume

DESIGN VARIABLE Element density

CONTRAINT Resultant Displacement is 0.01 mm at nodes where force is applied

Construct this model in any CAD system and save as IGES format.

2000 N 2000 N

1

Page 2: Tutorial: Topology Optimization of a cantilever beam

2

Collectors - Collectors store data for collected entities. A collected entity must

belong to only one collector.

Card image- Card images allow for creation, editing, and deletion of a solver card

within a HyperMesh model.

Property - Property entities are used to define and store 1D, 2D, and 3D property

definitions for a model.

Component - All elements within a component are assigned the component

property and the component material.

Terminology

Page 3: Tutorial: Topology Optimization of a cantilever beam

7. Apply Loads Constraints

5. Mesh Geometry

1. Import Geometry

Process of Analysis

3

2. Material Collector

3. Property Collector

4. Component Collector

6. Load Collector

8. Loadsteps

9. Structural Optimization

10. Design Variable

11. Responses

12. Constraints 13. Objective

This chart illustrates

the steps taken

towards setting up a

problem in Optistruct.

Page 4: Tutorial: Topology Optimization of a cantilever beam

Opening HyperWorks

We will now open HyperWorks and enter into the Optistruct Profile. This will allow us to perform finite element analysis and structural optimization.

4

3. Click to import IGES file

1. Click to OptiStruct

2. Click OK

Page 5: Tutorial: Topology Optimization of a cantilever beam

Import IGES File

Choose the file beam.igs to import into HyperWorks.

5

1. Click on file

2. Click Open

Page 6: Tutorial: Topology Optimization of a cantilever beam

Import IGES

The geometry has been transferred into HyperWorks as a set of lines defining the perimeter of the object.

6

1. Click Import

Page 7: Tutorial: Topology Optimization of a cantilever beam

Rename Component

The default name assigned to any component which is imported into HyperWorks is lvl0. We will change this name to Beam.

7

1. Right click on the component lvl0

2. Click Rename, and enter the name Beam

Page 8: Tutorial: Topology Optimization of a cantilever beam

Create the material collector early because it is referred to by other collectors. It is also beneficial to establish the right units in the beginning to ensure consistency. The format of the material data will be MAT1 which is used for linear isotropic materials. We will first establish the following units:

Length – millimeters

Force – Newton

Mass - Kilograms

Create Material

Page 9: Tutorial: Topology Optimization of a cantilever beam

Create Material

Creating a material requires defining the type and card image. We will choose isotropic properties and a MAT1 card image. The MAT1 card image corresponds to an isotropic and linear elastic material.

9

1. Right click on the colour bar and change the colour to Red

2. Click on the Material Icon to create new material

4. Type “Steel” as the material name5. Click on type and choose “ISOTROPIC”6. Click on card image and choose MAT1

7. Click to create\editto input material properties

3. Click on create

Page 10: Tutorial: Topology Optimization of a cantilever beam

Material Properties

The material properties are:

E (Stiffness) = 2.1e5 N/mm2 , Nu (Poission’s Ratio) = 0.3, Rho (Density) = 7.9e-6 kg/mm3

These units correspond to the ones we have established.

10

1. Click on [E] (Stiffness) and input 2.1e+052. Click on [NU] (Poission’s Ratio) and input 0.33. Click on [RHO] (Density) and input 7.9e-06

4. Click Return on this screen and on the next

Page 11: Tutorial: Topology Optimization of a cantilever beam

A 2D surface mesh will require a property with the card image of PSHELL whereas a 3D mesh would require property with a card image of PSOLID. These collectors differentiate the different parts of the finite element model by storing specific data relating to each element type. These property collectors in turn refer to the material collectors defined previously.

Create Property

Page 12: Tutorial: Topology Optimization of a cantilever beam

Create Property

A property will now be created for storing the data relating to a surface mesh (2D elements). An element thickness of 1.0 mm is assigned.

12

1. Click on the Property Icon to create new property

3. Type Shell as the property name4. Change the colour to green5. Click on type and choose 2D6. Click on card image and choose PSHELL7. Click on material and choose Steel

8. Click create/edit to create and edit properties

2. Click on create

In the next screen, click on [T] (Element Thickness) and input a value of 1. Then click Return once to come back to this screen.

Page 13: Tutorial: Topology Optimization of a cantilever beam

Create Property

A property will now be created for storing the data relating to a solid mesh (3D elements).

13

1. Type Solid as the property name2. Change the colour to yellow3. Click on type and choose 3D4. Click on card image and choose PSOLID5. Click on material and choose Steel

6. Click create

7. Click return

Page 14: Tutorial: Topology Optimization of a cantilever beam

Component collectors are used to store the data defining different parts of the finite element model. Components are created, edited, and deleted from the Model Browser and are shown under the Component folder. Components also have a component view within the Model Browser which lists only components and has advanced options for component creation and editing.

Create Components

Page 15: Tutorial: Topology Optimization of a cantilever beam

Create Components

The shell component will store the data of the 2D mesh which will be created.

15

1. Click on the Components Icon to create new components

3. Type Shell as the comp name4. Change the colour to green5. Click on property and choose Shell

6. Click create

2. Click on create

Page 16: Tutorial: Topology Optimization of a cantilever beam

Create Components

The solid component will store the data of the 3D mesh which will be created.

16

1. Type Solid as the comp name2. Change the colour to yellow3. Click on property and choose Solid

4. Click create

5. Click return

Page 17: Tutorial: Topology Optimization of a cantilever beam

Mesh will first be created on the surface with 2D quad elements. In order to create hexahedral elements, these 2D elements will be offset, or extruded. There are many different types of finite elements available, and the use of each depends on application. There are also many different methods of applying mesh in HyperWorks. The method used for this tutorial is element offset. Note that there are many factors which play a role in the accuracy of the finite element solution. Mesh densities and type of elements are a two of these factors.

2D/3D Mesh

Page 18: Tutorial: Topology Optimization of a cantilever beam

Creating 2D Mesh

Making a component current will tell the program that we want to make changes to only this component. The shell component corresponds to the 2D elements which we will create.

18

1. Right click on Shell, under components

2. Click on Make Current

Page 19: Tutorial: Topology Optimization of a cantilever beam

Creating 2D Mesh

We will now change the view to iso-view in order to get a better view of the surfaces of the model.

19

1. Click on 2D2. Click on automesh

3. Click on iso view to change view

Page 20: Tutorial: Topology Optimization of a cantilever beam

Creating 2D Mesh

We will now choose the surface which will be meshed with 2D elements. When meshing, we will select elems to current comp option. This will tell the program that we want the mesh to be assigned to the current component, Shell. This will differentiate the 2D mesh from the 3D mesh.

20

2. Set element size = to 3003. Click on mesh type and choose quads

4. Click and change to elems to current comp

5. Click mesh

Click return twice to return to the main menu

1. Choose this surface for the mesh

Page 21: Tutorial: Topology Optimization of a cantilever beam

Creating 3D Mesh

We are now going to create the 3D mesh by entering the elem offset (element offset) option.

21

1. Right click on Solid, under components, and click Make Current

2. Click on 3D3. Click on element offset

Page 22: Tutorial: Topology Optimization of a cantilever beam

Creating 3D mesh

We will now offset the 2D elements created earlier. The total thickness is set to 2000 mm and the number of layer is set to 6. After the mesh has been created, it is represented by yellow signifying that it corresponds to the Solid component.

22

2. Click on elems and choose all

5. Number of layer = to 66. Change initial offset = to 07. Total thickness = to 2000

9. Click offset+

1. Click on solid layers

4. Click on the two surfaces highlighted in white

3. Click on surfs

8. Change to elements to current comp

10. Click return

Page 23: Tutorial: Topology Optimization of a cantilever beam

Load collectors define the different loads which will be applied to the model. Multiple load cases can be applied in order to simulate different conditions.

Load Collector

Page 24: Tutorial: Topology Optimization of a cantilever beam

Load Collector

Boundary conditions (BC) and forces are created with a different colour.

24

1. Click on the Load Collectors icon

2. Change loadcol name to Forces3. Change colour to cyan

4. Click on create

5. Repeat this step again but in step 2, change the name to BC. The click on return to proceed to the main menu.

Page 25: Tutorial: Topology Optimization of a cantilever beam

Boundary Conditions

The beam has a fixed boundary condition on the side surface replicating that of a cantilever beam.

25

1. Click on Analysis2. Click on constraints

Page 26: Tutorial: Topology Optimization of a cantilever beam

Boundary ConditionsFirst we will select the nodes which will be constrained and then specify the types of constraints. The following is the convention used in HyperWorks: dof1 = x displacement, dof2 =y displacement, dof3=z displacement, dof3=rotation about x-axis, dof3=rotation about y-axis, dof3=rotation about z-axis. These constraints are given with respect to the axis defined by HyperWorks shown at the bottom left hand corner.

26

2. Click on nodes

4. Ensure that all dof are selected5. Ensure that loadtypes = is set to SPC

6. Click create

1. Click on create

7. Click return

3. Choose the following 8 nodes

Page 27: Tutorial: Topology Optimization of a cantilever beam

Forces

We will now create loads on the model. First we have to initiate the forces load collector by making it current. This will tell the program that we want to create forces.

27

1. Right click on Forces, under LoadCollector, and click Make Current

2. Click on forces

Page 28: Tutorial: Topology Optimization of a cantilever beam

Forces

We will now create forces on two nodes as defined by the problem statement, 2000 N each. Note that a negative sign has been placed before the force in order to stay consistent with the HyperWorks coordinate system which is shown at the bottom left of the screen.

28

2. Click on nodes

4. Set magnitude = -20005. Choose y-axis

1. Click on create

3. Choose these two nodes

6. Click create

7. Click return

Page 29: Tutorial: Topology Optimization of a cantilever beam

Loadsteps

Loadsteps create a set of load collectors. You can use this to create different loading conditions by grouping loads together.

29

1. Click on loadsteps

Page 30: Tutorial: Topology Optimization of a cantilever beam

Loadsteps

We will now gather our forces and constraints, into one loadstep. The analysis type is set to linear elastic.

30

1. Set name = to LOAD1

4. Choose linear static for analysis

2. Click on = beside SPC and choose BC3. Click on = beside LOAD and choose Forces

5. Click create

6. Click return

Page 31: Tutorial: Topology Optimization of a cantilever beam

Optimization

We are now entering the optimization phase where we will define the optimization parameters. For all parts, it is recommended that a Radioss solution be run to view the finite element results. After the results have been verified, then the optimization process should begin.

As mentioned in the problem statement:

OBJECTIVE FUNCTION Minimize volume

RESONSE Volume and Deflection

DESIGN CONTRAINT Max. Deflection of 0.02 mm where forces are applied

Page 32: Tutorial: Topology Optimization of a cantilever beam

Optimization

We will now enter the optimization parameters by entering the optimization options.

32

1. Click on optimization

Page 33: Tutorial: Topology Optimization of a cantilever beam

Topology

The topology option will allow us to define our design variable as stated in the problem statement. This will also tell the program that we want to perform topology optimization.

33

1. Click on topology

Page 34: Tutorial: Topology Optimization of a cantilever beam

Design VariableThe design variable we have set is the element density of the solid 3D mesh. This is one method of differentiating between the design space and the non-design space because under the props (properties) option, only Solid is selected. Therefore, different components can be created to differentiate between the design/nondesign space. We will call the design variable Disp.

34

2. Set desvar = Disp

3. Choose PSOILD

1. Click on create

5. Click create

6. Click return

4. Click on props and set to Solid

Page 35: Tutorial: Topology Optimization of a cantilever beam

Responses

We will now define the responses of the system.

35

1. Click on responses

Page 36: Tutorial: Topology Optimization of a cantilever beam

Responses

The first response will be the magnitude of deflection at the two nodes where forces are applied.

36

1. Set responses = to deflection

4. Set to total disp

3. Choose these two nodes

5. Click create

2. Click and set to static displacement

Page 37: Tutorial: Topology Optimization of a cantilever beam

Responses

The second response will be the total volume of the part.

37

3. Click create

2. Set responses = to volume

1. Click and set to volume

4. Click return

Page 38: Tutorial: Topology Optimization of a cantilever beam

Optimization Constraints

It is now time to set the constraints on the response.

38

1. Click on dconstraints

Page 39: Tutorial: Topology Optimization of a cantilever beam

Optimization Constraints

A constraint will now be imposed on one of the response, the deflection. Here we are specifying that the maximum deflection permitted is 0.02 mm at the nodes where the forces are applied, as defined in the problem statement.

39

3. Click response = and select deflection4. Click on loadsteps and choose Loads

2. Set constraint = to magdisp

1. Check upper bound = and set it to 0.02

6. Click return

5. Click create

Page 40: Tutorial: Topology Optimization of a cantilever beam

Objective

We will now define the objective of the optimization.

40

1. Click on objective

Page 41: Tutorial: Topology Optimization of a cantilever beam

Optimization Objective

The objective of the optimization, as defined in the problem statement, is to minimize the volume. We use the response of volume and set the objective function to minimize it.

41

2. Click response = and select volume

1. Click and set to min

4. Click return

3. Click create

5. Click return on the next screen to reach the main menu

Page 42: Tutorial: Topology Optimization of a cantilever beam

Optimization Controls

We will now activate the SCREEN control. This allows us to view the result of each iteration performed during the optimization process.

42

1. Click on control cards

2. Click next two times on the following screen

Page 43: Tutorial: Topology Optimization of a cantilever beam

Optimization Setup

43

1. Click on screen

2. Click return two times

Page 44: Tutorial: Topology Optimization of a cantilever beam

Optistruct

44

1. Click on OptiStruct

Page 45: Tutorial: Topology Optimization of a cantilever beam

Optistruct

It is very important that a new folder is created because several data files are saved at the same location. After the optimization is complete, the results can be viewed using HyperView.

45

1. Choose a location where to save the files

2. Click on OptiStruct

3. Click on HyperView after the optimization is completed

Page 46: Tutorial: Topology Optimization of a cantilever beam

HyperView

There were a total of seven iterations performed. We want to view the results from the seventh iteration. Note that the part is represented by two colours which correspond to the two components created, shell (green) and solid (pale green).

46

1. Click on Design

2. Click on Iteration 7

3. Click OK

Page 47: Tutorial: Topology Optimization of a cantilever beam

Iso Density Plot

There are several ways of viewing the results in HyperView. An iso element density plot give us the ability to only view elements which have densities over, under, or at a certain value. This can be used to set an element density which gives us a feasible solution. Note that as you vary the densities, the dark green component (2D elements) does not change because it is a “non-design” area.

47

1. Click here to view iso plots

2. Choose Element Densities

3. Click apply

4. Set this to Above

5. Move the bar left and right to get an idea of the element densities in the design space

Page 48: Tutorial: Topology Optimization of a cantilever beam

Contour Plot

A contour plot is another way of viewing results. Colours correspond to different density values with red being close to 1.0 and blue being close to 0.

48

1. Click here to view contour plots

2. Choose Element Densities

3. Click apply

Page 49: Tutorial: Topology Optimization of a cantilever beam

Masking Element

Another way of viewing results is to mask elements. For this tutorial, we will mask elements with densities under 0.45 because in the iso density plot this seemed like a good solution.

49

1. Click here to mask elements

2. Choose Elements

Page 50: Tutorial: Topology Optimization of a cantilever beam

Masking Elements

By performing this step, the program will highlight all elements with element densities under 0.45.

50

1. Choose Elements

3. Enter <=0.45

2. Choose to Add elements

4. Click Add

Page 51: Tutorial: Topology Optimization of a cantilever beam

Masking Elements

The final solution we have obtained is a simple truss like structure.

51

2. Click Mask Selected

1. Choose Mask

Page 52: Tutorial: Topology Optimization of a cantilever beam

Final Solution

Starting with a cantilever beam with a point load, by applying topology optimization, we have obtained a truss structure. This simple yet powerful example clearly shows the potential of topology optimization.

52

Topology

Optimization