ANSYS TUTORIAL – Shape Optimal Design of a Bracket
ANSYS Release 9.0
Dr. A.-V. Phan, University of South Alabama
1 Problem Statement
Figure 1: Bracket to be designed
A bracket as shown in Fig. 1 is made of 7075-T651 aluminum (E = 71, 018 MPa, ν = 0.33). An
initial geometry of the bracket is given in the figure (dimensions in mm). The bracket is clamped
at the left hub and carries a downward load at the right hub. The load is modeled as a uniform
pressure p = 50 N/mm2 as shown. Perform the minimum weight design of the structure while the
allowable stress is assumed to be Sy /1.5 where the yield strength of the material is assumed to
be SY = 524 MPa. Here, R1 , R2 , R3 , R4 and W are used as the design variables. Based on some
physical constraints, R1 is limited to be no greater than 45 mm.
2 Data Preparation for the Bracket Geometry
Consider a general shape of the outer boundary of the bracket (thick solid lines) as shown in Fig.
2. Within ANSYS, this shape can be constructed using the four keypoints K1 through K4 . Their
coordinates are
x1 = R1 cos α
p
y1 = R1 sin α = R1 1 − cos2 α
x2 = x 1
y2 = −y1
x3 = L + R2 cos α
p
y3 = R2 sin α = R2 1 − cos2 α
x4 = x 3
y4 = −y3
where, from the triangle OAB,
OB R1 − R 2
cos α = =
OA L
Similarly, the boundary of the cutout (shown by the dash lines in Fig. 2) can be constructed
using the keypoints K5 through K8 . The coordinates of these keypoints are given by
x5 = (L − W )/2 + R4 cos β
1
y
K1
K5 K3
B
K7
R1
α β R2 x
O A
R3
R4
K8
K6 K4
K2 W
L = 200
Figure 2: Determination of keypoints
q
y5 = R4 sin β = R4 1 − cos2 β
x6 = x 5
y6 = −y5
x7 = (L + W )/2 + R3 cos β
q
y7 = R3 sin β = R3 1 − cos2 β
x8 = x 7
y8 = −y7
where
R4 − R 3
cos β =
W
3 Problem Formulation
Note that, in addition to some physical constraints imposed on R1 , the geometry of the bracket
also implies the following constraints:
R4 < R1 ≤ 45 mm
R3 < R2 ≤ 45 mm
30 + W + R3 + R4 < L or W + R3 + R4 < 170 mm
cos β < 1 or W 2 − (R4 − R3 )2 > 0
Thus, the problem formulation may be written as follows:
Minimize Volume = f (R1 , R2 , R3 , R4 , W ) [±10 mm3 ]
2
Subject to 0 ≤ σVM ≤ 349.33 [±1 MPa]
5 ≤ S1 ≤ 45 [±1 mm]
5 ≤ S2 ≤ 45 [±1 mm]
5 ≤ S3 ≤ 160 [±1 mm]
0 ≤ S4 ≤ 1000 [±0.1 mm2 ]
25 ≤ R1 ≤ 45 [±1 mm]
15 ≤ R2 ≤ 45 [±1 mm]
5 ≤ R3 ≤ 45 [±1 mm]
5 ≤ R4 ≤ 45 [±1 mm]
5 ≤ W ≤ 170 [±1 mm] (1)
where S1 = R1 − R4 , S2 = R2 − R3 , S3 = W + R3 + R4 , and S4 = W 2 − (R4 − R3 )2 .
4 Creating a Log File
An example of a log file required for the optimization process is given as follows:
/BATCH
! /COM,ANSYS RELEASE 9.0A1 UP20050128 22:57:20 09/29/2005
!*
!* Fixed parameters
!*
*SET,L,200
*SET,R,10
!*
!* Initialize the design variables
!*
*SET,R1,40
*SET,R2,40
*SET,R3,20
*SET,R4,20
*SET,W,50
!*
!* Define the state variables due to geometry constraints
!*
*SET,S1,R1-R4
*SET,S2,R2-R3
*SET,S3,W+R3+R4
*SET,S4,W*W-(R4-R3)*(R4-R3)
3
!*
!* Sines and cosines of the angles alpha and beta
!*
*SET,CA,(R1-R2)/L
*SET,SA,sqrt(1-CA*CA)
*SET,CB,(R4-R3)/W
*SET,SB,sqrt(1-CB*CB)
!*
!* Create the 8 keypoints K1 through K8
!*
/PREP7
K,1,R1*CA,R1*SA,,
K,2,R1*CA,-R1*SA,,
K,3,L+R2*CA,R2*SA,,
K,4,L+R2*CA,-R2*SA,,
K,5,(L-W)/2+R4*CB,R4*SB,,
K,6,(L-W)/2+R4*CB,-R4*SB,,
K,7,(L+W)/2+R3*CB,R3*SB,,
K,8,(L+W)/2+R3*CB,-R3*SB,,
!*
!* Create 2 circular areas (A1 & A2) of the left and right hubs, respectively
!* (Lines L1 through L4 are created on the boundary of area A1)
!* (Lines L5 through L8 are created on the boundary of area A2)
!*
CYL4,,,2*R
CYL4,L,,R
!*
!* Create lines L9 to L12 connecting keypoints K1 through K4
!*
LSTR,1,3
LSTR,2,4
LSTR,1,2
LSTR,3,4
!*
!* Create lines L13 to L16 connecting keypoints K5 through K8
!*
LSTR,5,7
LSTR,6,8
LSTR,5,6
LSTR,7,8
!*
!* Create an area (A3) bound by lines L9 to L12
!*
FLST,2,4,4
FITEM,2,9
FITEM,2,10
FITEM,2,11
FITEM,2,12
4
AL,P51X
!*
!* Create 2 circles (A4 & A5) of radii R1 & R2, respectively
!*
CYL4,,,R1
CYL4,L,,R2
!*
!* Merge A3, A4 & A5 to create the outer solid (A6)
!* Note that A3, A4 & A5 are now automatically deleted by ANSYS
!*
FLST,2,3,5,ORDE,2
FITEM,2,3
FITEM,2,-5
AADD,P51X
!*
!* Create an area (A3) bound by lines L13 to L16
!*
FLST,2,4,4
FITEM,2,13
FITEM,2,14
FITEM,2,15
FITEM,2,16
AL,P51X
!*
!* Create 2 circles (A4 & A5) of radii R3 & R4, respectively
!*
CYL4,(L-W)/2,,R4
CYL4,(L+W)/2,,R3
!*
!* Merge A3, A4 & A5 to create the inner solid (A7)
!* Note that A3, A4 & A5 are now deleted
!*
FLST,2,3,5,ORDE,2
FITEM,2,3
FITEM,2,-5
AADD,P51X
!*
!* Substract the 3 holes (A1, A2 & A7) from A6 to
!* create the model (A3). A1, A2 & A7 are deleted
!*
FLST,3,3,5,ORDE,3
FITEM,3,1
FITEM,3,-2
FITEM,3,7
ASBA,6,P51X
!*
!* Define the element type
!*
5
ET,1,PLANE82
!*
!* Define the material model (E=71018, nu=0.33)
!*
MPTEMP,,,,,,,,
MPTEMP,1,0
MPDATA,EX,1,,71018
MPDATA,PRXY,1,,0.33
!*
!* Apply boundary conditions on the left hub
!* Select the circular boundary of the left hub (lines L1 to L4)
!*
FLST,2,4,4,ORDE,2
FITEM,2,1
FITEM,2,-4
!*
!* Fix all DOFs on the selected boundary
!*
/GO
DL,P51X, ,ALL,0
!*
!* Apply loading conditions on the right hub
!* Select the lower half arc of the right hub (lines L7 & L8)
!*
FLST,2,2,4,ORDE,2
FITEM,2,7
FITEM,2,-8
!*
!* Apply the pressure of 50 MPa on the selected arc
!*
/GO
SFL,P51X,PRES,50,
!*
!* Meshing
!* Choose element size of 4mm
!*
ESIZE,4,0,
!*
!* Mesh the model (A3)
!*
MSHKEY,0
CM,_Y,AREA
ASEL, , , , 3
CM,_Y1,AREA
CHKMSH,’AREA’
CMSEL,S,_Y
!*
AMESH,_Y1
6
!*
CMDELE,_Y
CMDELE,_Y1
CMDELE,_Y2
!*
!* Solve the problem
!*
FINISH
/SOL
! /STATUS,SOLU
SOLVE
!*
!* Define element volumes
!*
FINISH
/POST1
AVPRIN,0,0,
ETABLE, ,VOLU,
!*
!* Sum the element volumes to get the structure volume
!*
SSUM
!*
!* Assign the structure volume to variable ‘Volume’
!*
*GET,Volume,SSUM, ,ITEM,VOLU
!*
!* Sort the nodal solution for von Mises stresses
!* General Postproc>List Results>Sorted Listing>Sort Nodes
!*
NSORT,S,EQV,0,0,,0
!*
!* Get the maximum von Mises stress
!* and assign it to variable ‘VM_MAX’
!*
*GET,VM_MAX,SORT,,MAX
5 Result
The first order method is employed to solve this problem. A list of the optimization result sets
obtained after 25 iterations is shown where SET 25 represents the best solution. The histories of
the objective function, the state and design variables are depicted in Figs. 3 through 5 where a
convergence of the solution can be observed. For some reasons, the maximum von Mises stress
listed in SET 25 (349.65 MPa) is slightly different than the result shown in Fig. 6 (349.761 MPa).
The design optimization helps reduce 45.4% of the structure weight (the initial and final volumes
of the bracket are 16,199 and 8,843.8 mm3 , respectively).
7
LIST OPTIMIZATION SETS FROM SET 1 TO SET 26.
(A "*" SYMBOL IS USED TO INDICATE THE BEST LISTED SET)
SET 1 SET 2 SET 3 SET 4
(INFEASIBLE) (FEASIBLE) (FEASIBLE) (FEASIBLE)
VM_MAX (SV) 344.58 263.78 324.69 330.52
S1 (SV) 20.000 19.999 17.938 17.802
S2 (SV) 20.000 19.999 16.736 16.316
S3 (SV) 90.000 70.161 72.363 71.706
S4 (SV) > 2500.0 909.60 909.70 875.71
R1 (DV) 40.000 40.000 39.039 38.854
R2 (DV) 40.000 40.000 37.837 37.377
R3 (DV) 20.000 20.001 21.101 21.061
R4 (DV) 20.000 20.001 21.101 21.053
W (DV) 50.000 30.160 30.161 29.592
VOLUME (OBJ) 16199. 16993. 15776. 15602.
SET 5 SET 6 SET 7 SET 8
(FEASIBLE) (FEASIBLE) (FEASIBLE) (FEASIBLE)
VM_MAX (SV) 332.82 283.73 296.75 325.53
S1 (SV) 17.725 18.706 18.748 18.773
S2 (SV) 15.477 11.139 9.8712 8.2753
S3 (SV) 68.826 40.617 37.326 35.060
S4 (SV) 754.34 63.199 43.877 46.509
R1 (DV) 38.383 35.012 34.096 32.932
R2 (DV) 36.180 27.500 25.225 22.356
R3 (DV) 20.703 16.361 15.354 14.081
R4 (DV) 20.657 16.306 15.348 14.159
W (DV) 27.465 7.9500 6.6240 6.8202
VOLUME (OBJ) 15234. 12956. 12187. 11172.
...
SET 23 SET 24 *SET 25* SET 26
(FEASIBLE) (FEASIBLE) (FEASIBLE) (INFEASIBLE)
VM_MAX (SV) 345.52 345.78 349.65 > 350.77
S1 (SV) 22.891 22.819 22.625 22.577
S2 (SV) 10.408 10.408 10.408 10.408
S3 (SV) 20.812 19.177 19.777 19.852
S4 (SV) 86.033 58.344 67.881 69.098
R1 (DV) 28.833 28.761 28.568 28.521
R2 (DV) 15.996 15.996 15.996 15.996
R3 (DV) 5.5874 5.5874 5.5874 5.5874
R4 (DV) 5.9427 5.9427 5.9427 5.9443
W (DV) 9.2822 7.6466 8.2467 8.3202
VOLUME (OBJ) 8909.7 8907.4 8843.8 8829.1
8
Figure 3: History of the objective function
Figure 4: History of the maximum von Mises stress
9
Figure 5: History of the design variables
Figure 6: von Mises stress distribution in the final geometry
10