You are on page 1of 24

Structural Optimization Assignment

Kevin Hunt
November 6, 2006




University oI Texas at Austin
Department oI Aerospace Engineering
ASE 463Q Design and Testing oI Aerospace Structures
Instructor: Dr. Stearman
TA: Andrew Feistel


2
TabIe of Contents

1.0 Introduction ............................................................................................................... 3
2.0 Theory ....................................................................................................................... 4
2.1 The Two Bar Truss ................................................................................................ 4
2.2 The Three Bar Truss .............................................................................................. 6
3.0 Problem ................................................................................................................... 12
3.1 Two Bar Truss Problem ....................................................................................... 12
3.2 Three Bar Truss Problem ..................................................................................... 12
4.0 Results and Conclusions .......................................................................................... 13
4.1 Two Bar Truss ..................................................................................................... 13
4.2 Three Bar Truss ................................................................................................... 15
5.0 ReIerences ............................................................................................................... 16
6.0 Appendix................................................................................................................. 17
6.1 MATLAB M-Iiles ............................................................................................... 17
6.2 MATLAB Output ................................................................................................ 22
3
Introduction

There are several things any designer must keep in mind when designing any
structures. Some oI these Iactors are saIety, cost, and weight. II a designer reduces the
weight oI a structure, while still keeping it saIe, the cost will most likely be reduced as
well. A Designer`s and engineer`s Iinal goal should be to optimize the weight oI a
structure by Iinding the correct dimensions the structure should be to minimize the
weight. Weight can be minimized through the theoretical equations and putting them to
work with some sort oI computer code. For this assignment, MATLAB code was used to
optimize the weights oI a two bar and a three bar truss.
4
Theory

2.1 The Two Bar Truss

Figure 1 shows a two-bar, thin-walled tube structure. This structure is called a truss
because it is made up oI triangular Iorce elements. The truss tube has a thickness T and a
diameter D as shown in Figure 1 A load 2P is Iorced upon the two-bar structure with a
height h and a width 2B.


Figure 1. Two Bar Truss Structure
D and H are two independent design variables. (A design variable is a quantity which
deIines the structural system and is varied by the 'design modiIication procedure |1|.)
The weight oI the structure is given The weight is also given in Schmit`s paper |1| as

Min H B DT W + =
2
1
2 2
) ( 2px (1)

Where o is the density and D, T, B, and H are seen in Figure 1. II the total stress in the
structure is greater than the Iailure stress o
c
, the structure will Iail. Also, the load P must
be below the load at which the structure will buckle
EULER
P .


2
2
l
EI
P
EULER
x
= (2)

Where E Young`s Modulus, and I is the Moment oI Inertia

5

4
)
2
(
4
)
2
(
4 4 I O
D D
I
x x
= (3)

Where D
o
and D
i
are the outer diameter and the inner diameter, respectively.


EULER
9 9 A (4)
and


YIELD
9 9 A (5)

where stress equals the Iorce over the area


A
P
= 9 . (6)

The angle oI the truss must be taken into account

Figure 2: Free Body Diagram of Member

so,

2 2
cos
H B
H
P
P
+
= = (7)

and

2 2
H B +
H
B
P
P
P
6
H
H B P
P
2 2
+
= (8)

so the yield constraint is given by

DT H
H B P
x
9
2 2
+
= (9)

to prevent Euler buckling and yield condition Iailure modes the Iollowing two equations
should be satisIied.

0
) (
) ( 8
) (
) , (
2
1
2 2
2 2
2 2 2
1
>
+

+
+
= =
TDH
H B P
H B
T D E
H D g
e
x
x
9 9 (10)

and
0
) (
) , (
2
1
2 2
2
>
+
= =
TDH
H B P
H D g
y y
x
9 9 9 . (11)

The curves given by equations (11) and (12) can be plotted to show the acceptable and
unacceptable values Ior D and H. Then W can be varied to give contours oI constant
weight. A minimum weight design can be chosen be looking at this plot.

2.2 The Three Bar Truss


Figure 3. Three Bar Truss Structure
7

Figure 3 shows a three bar truss with two Iorces, P
1
and P
2
, acting on it. The truss has
three members that are labeled 1, 2 and 3 as seen in the Iigure. The members have areas
oI A
1
, A
2
and A
3
respectively. The middle member, A
2
, has a length oI N10 in. From
trigonometric relations the lengths oI A
1
and A
3
are equal are

2 45 cos
3 , 1
N N L = =
3
. (12)

The k values Ior the truss are the stiIIness values Ior each member and can be calculated
using the Iormula

i
i i
L
E A
k = (13)


Figure 3. Three Bar Truss with Angles Shown


Figure 3 shows the angles 0
1
, 0
2
, and 0
3
. With all these values, a table can be constructed.

Table 1. Member Properties
Member (i) Area (A
i
) Length (L
i
) k (k
i
) 0(
i
) cos0 sin0
1 A
1
L
1

1
1 1
L
E A

0
1
cos0
1
sin0
1

2 A
2
L
2

1
1 1
L
E A

0
2
cos0
2
sin0
2

8
3 A
3
L
3

1
1 1
L
E A

0
3
cos0
3
sin0
3



Inserting the known values into Table 2 results in

Table 2. Member Properties
Member (i) Area (A
i
) Length (L
i
) k (k
i
) 0(
i
) cos0 sin0
1 A
1

2 N
1
1 1
L
E A

-45
2
1

2
1

2 A
2
N
1
1 1
L
E A

-90 0 -1
3 A
3

2 N
1
1 1
L
E A

-135
2
1

2
1


II the Iorce P
2
0, we can Iind the sum oI the Iorces in each member can be Iound. The
Iorces in the x-direction are,

3 3 3
45 cos 45 cos 45 cos 0
3 1 1
N P N F
x
+ + = =

(14)

Where N
1
is the Iorce in member 1 and N
2
is the Iorce in member 2. Inserting the known
values, Equation (14) reduces to,

0
3 1
= + + P N N .
(15)

The equilibrium equation in the y-direction is

3 3 3
45 sin 45 sin 45 sin 0
3 1 1 2
N P N N F
y
+ = =

, (16)

which reduces to

0 2
1 3 1 2
= + + P N N N . (17)

The general compatibility equation Ior a single node truss is given by the
equations

i i i i
L J U e I + = sin cos (18)

and

i i i i
L J U e I + = sin cos . (19)
9

Where U and J are the displacements in the x and y directions respectively. For the 3
beam truss in Figure 4, the compatibility equation Ior member 1 become

1 1 1
sin cos J U e + = (20)

3 3
45 sin 45 cos
1
J U e + = (21)

1
1
1
2 1
2 2
: :
J U
e = = (22)

but because the truss is pinned :
2
is zero, so

2 2
1
2 1
J U
: e = = . (23)

For member 2 the compatibility equations become

3 3
90 sin 90 cos
2
+ = J U e (24)

or

J : e = =
1
2 2
. (25)

The compatibility equations Ior member 3 are

) 135 sin( ) 135 cos(
3
2 3
3 3
= = J U : e (26)

Or

2 2
3
2 3
J U
: e = = . (27)

From the material behavior we can relate N
1
, N
2
and N
3
to the displacements U
and J through k
1
, k
2
, and k
3
.

J U
k
e k N = =
2
1
1 1 1
(28)

J k e k N
2 2 2 2
= = (29)

J U
k
J U
k
e k N = = =
2 2
1 3
3 3 3
. (30)
10

These Iorces can be inserted back into the equilibrium equations and solved Ior the
displacements U and J in terms oI P
1
, k
1
, and k
2
.

1
1
2k
P
U = (31)


2 1
1
2 k k
P
J
+

= . (32)

Once the displacements are Iound, they can be inserted back into the equations Ior N
1
, N
2
,
and N
3
with the result

+
=
1
2
1
2
1
1
2
1
1
k
k
k
k
N (33)

+
=
1
2
1
1
2
2
1 2
k
k
P
k
k
N (34)

1
1
2
1
2
3
1
2
1
P
k
k
k
k
N

+
= . (35)

Now inserting the stiIIness values in the equations Ior N
i
, N
i
can be Iound as a Iunction oI
P and A and then solved Ior the stress.

1
1
2
1
2
1
1
2
1
1
P
A
A
A
A
N

+
= (36)

+
=
1
2
1
1
2
2
1 2
A
A
P
A
A
N (37)

11
1
1
2
1
2
3
1
2
1
P
A
A
A
A
N

+
= (38)

1 2
2
1
1 2
1
31
31
2 2 A A A
P A
A
N
+
= = 9 (39)

2
1 2 1
1 1
2
21
21
2 2 A A A
A P
A
N
+
= = 9 (40)

)
2
1 2 1
1 2 1
2
11
11
2 2
2
A A A
P A A
A
N
+
+
= = 9 . (41)

Inserting P
1
20,000 lb Equations (36), (37), and (38) become,

1 2
2
1
2
1
31
31
2 2
000 , 20
A A A
A
A
N
+
= = 9 (42)

2
1 2 1
1
2
21
21
2 2
) 000 , 20 ( 2
A A A
A
A
N
+
= = 9 (43)


)
2
1 2 1
2 1
2
11
11
2 2
000 , 20 2
A A A
A A
A
N
+
+
= = 9 . (44)

These can be solved Ior A
2
,

1 2
) 1 ( 2
1
1 1
2
+

=
A
A A
A (45)

2
) 1 ( 2
1 1
2
A A
A

= (46)

) 2
15
20
(
2
1
2
1
2
A
A
A

= (47)
12
ProbIem

.1 Two Bar Truss Problem

For the two bar truss shown in Figure 1, minimize the weight by only changing
the average diameter and the height oI the structure and by modiIying the given
MATLAB code. The truss must have the Iollowing parameters:
2P 70,000 lbs
2B 66 in
T 0.15 in
E 3.0 x 10
7
psi
p 0.3 lb/in
3

o
y(case 1)
60,000 psi
o
y(case 2)
100,000 psi


.2 Three Bar Truss Problem

For the three bar truss shown in Figure 3, minimize the weight by only changing
the cross sectional area oI each member. The truss must have the Iollowing parameters:
P
1
25 kips
P
2
25 kips
N10 in.
3
135
1
=
3
90
2
=
3
45
3
=
3
/ 1 . 0 in lb = p
E10x10
6
lb/in.
2

000 , 15 =
E COMPRESSIJ
9
lb/in.
2

000 , 20 =
TENSILE
9
lb/in.
2

13
ResuIts and ConcIusions

.1 Two Bar Truss

For the two bar truss, MATLAB code was written to Iind the best average
diameter and height to optimize weight. Equations (1), (10), and (11) were used along
with the Imincon Iunction. The data Iound was plotted in Figure 4 Ior the 60,000 case
and Figure 5 Ior the 100,000 case.

Figure 4. The Optimal Design Plot of the o 60,000 Case

The blue lines are lines oI constant weight increasing Irom leIt to right, the green
line shows the iterations oI the Imincon Iunction. The red and black lines are given by
the Euler and Yield Stress constraints.
The optimal design point Ior the two bar truss with a load oI 60,000 psi is, a
height oI 1.814 in and a average diameter oI 31 in.


14

Figure 5. The Optimal Design Plot of the o 100,000 Case

The optimal design point Ior the two bar truss with a load oI 60,000 psi is, a
height oI 1.814 in and a average diameter oI 31 in.

15
.2 Three Bar Truss

MATLAB code was also written to Iind the best values oI cross sectional area Ior
the three bar truss. The Imincon Iunction was used again to Iind the values oI cross
sectional area oI each member to minimize the weight. Equations (45), (46), and (47) Ior
each member are plotted in Figure 6.


Figure 6. The Optimal Design Plot of the o 100,000 Case
The optimal design Ior the three beam truss is A
1
oI .5 in and A
2
oI 1 in.
16
References
|1| Schmit, Lucien A. 'Structural Synthesis-Its Genesis and Development, AIAA
Journal 81-4270, University oI CaliIornia, Los Angeles CaliI., October 1981.

|2| Stearman, Ronald. 463Q Notes

|3| Stearman, Ronald. 463Q - Design and Testing oI Aerospace Structures. Handout:
'Computer Project-Structural Optimization
17
Appendix

.1 MATLAB M-files


function c,ceq, = mycon_2(v)

global counter
global iterationstate
counter = counter+1;
iterationstate(counter,1:2) = v(1:2);

global P
global B
global T
global E
global density
global sigma_y

D = v(1);
H = v(2);

% Euler Inequality Constraint
h1 = (P(B^2+H^2)^(1/2)/(piTDH))-pi^2E(D^2+T^2)/8/(B^2+H^2);

% Yield Stress Inequality Constraint
h2 = -sigma_y+P(B^2+H^2)^.5/(piTDH);

h = h1 h2,;
c = (h);
ceq = ,;



function W = weight_2(v)

global B
global T
global density

D = v(1);
H = v(2);

% Weight function to be minimized
W = 2densitypiDTsqrt(B^2+H^2);


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The University of Texas %
% Aerospace Engineering and Engineering Mechanics Department %
18
% ASE463Q - Dr. Ronald J. Stearman %
% Structural Jptimization Homework %
% Example MATLAB file for the 2-bar truss problem %
% Last Modified: Jct 30, 2006 by Andrew Feistel %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clear all

global counter % global counter for iterationstate
global iterationstate % global storage for iteration values
counter = 0; % initialize counter value

global P
global B
global T
global E
global density
global sigma_y

P = 70000/2; % pounds
B = 66/2; % inches
T = 0.15; % inches
E = 3.010^7; % pounds per square inch
density = 0.3; % pounds per cubic inch
%sigma_y = 60000; % yield stress constraint, Case 1
sigma_y = 100000; % yield stress constraint, Case 2

v = 1,2,; % vector containing starting iterates, v =
D,H,
options = optimset('display','iter','TolX',1e-5);
lb = 0,0,; % vector containing the lower bound on v =
D,H,
ub = 40,40,; % vector containing the upper bound on v =
D,H,

x,fval,exitflag,output, =
fmincon('weight_2',v,,,,,,,,,lb,ub,'mycon_2',options);

figure
axis(0 5 0 50,)
hold on
Wvec = 6,10,14,20,24,30,;
Dmat = 0.10 0.01 1.20;...
0.10 0.01 1.80;...
0.10 0.01 3.00;...
0.10 0.01 4.00;...
0.10 0.01 5.00;...
0.10 0.01 6.00 ,;
% Weight Bands
for k = 1:length(Wvec)
W = Wvec(k);
D = Dmat(k,1):Dmat(k,2):Dmat(k,3);
D = D';
H = zeros(length(D),1);
for i = 1:length(D)
19
H(i) = sqrt((W/(2pidensityD(i)T))^2-B^2);
end
plot(D,H)
end
% Iteration Curve
n = length(iterationstate);
plot(iterationstate(:,1),iterationstate(:,2),'g')
plot(iterationstate(:,1),iterationstate(:,2),'.k')
plot(iterationstate(n,1),iterationstate(n,2),'ok')
% Constraint Bands
H = 1:1:50;
D = zeros(50,1);
D1(1:50) = 0; D2(1:50) = 0;
for i = 1:50
D1(i) = Psqrt(B^2+H(i)^2)/(sigma_ypiTH(i));
R_D2 = roots(1 0 T^2 -
((8P(B^2+H(i)^2)^(3/2))/(pi^3TEH(i))),);
for m = 1:length(R_D2)
if(imag(R_D2(m)) == 0)
D2(i) = R_D2(m);
end
end
end
plot(D1,H,'r')
plot(D2,H,'k')

xlabel('H in,')
ylabel('D in,')



function c,ceq, = mycon_3(A)

global counter
global iterationstate
counter = counter+1;
iterationstate(counter,1:2) = A(1:2);

global P
global sigma_c
global sigma_t

A1 = A(1);
A2 = A(2);

% Stress constraints
h1 = -sigma_t+P(1/A1-A2/(2A1A2+sqrt(2)A1^2));
h2 = -sigma_t+(Psqrt(2)A1)/(2A1A2+sqrt(2)A1^2);
h3 = -sigma_c+PA2/(2A1A2+sqrt(2)A1^2);
h = h1 h2 h3,;
c = max(h);
ceq = ,;


function W=weight_3(A)
20

global density
global N

A1 = A(1);
A2 = A(2);

% Weight function to be minimized
W = densityN(2sqrt(2)A1+A2);


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The University of Texas %
% Aerospace Engineering and Engineering Mechanics Department %
% ASE463Q - Dr. Ronald J. Stearman %
% Structural Jptimization Homework %
% Example MATLAB file for the 3-bar truss problem %
% Last Modified: Jct 31, 2006 by Andrew Feistel %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clear all

global counter % global counter for iterationstate
global iterationstate % global storage for iteration values
counter = 0; % initialize counter value

global P
global density
global N
global sigma_c
global sigma_t

P = 25000; % pounds
density = 0.1; % pounds per inches cubed
N = 10; % length of member 2
sigma_c = 15000; % maximum compression stress
sigma_t = 20000; % maximum tension stress

A = .1,.1,; % vector containing starting iterates, v =
A1,A2,
options = optimset('display','iter');
lb = 0.1,0.1,; % vector containing the lower bound on A =
A1,A2,
ub = 3,3,; % vector containing the upper bound on A =
A1,A2,

A,fval,exitflag,output,=fmincon('weight_3',A,,,,,,,,,lb,ub,'mycon_
3',options);

figure
axis(0.1 1.1 0.0 4.0,)
hold on
Wvec = 2,3,4,5,6,;
A1mat = 0.10 0.01 2.00;...
21
0.10 0.01 2.00;...
0.10 0.01 2.00;...
0.10 0.01 2.00;...
0.10 0.01 2.00; ,;
% Weight Bands
for k = 1:length(Wvec)
W = Wvec(k);
A1 = A1mat(k,1):A1mat(k,2):A1mat(k,3);
A1 = A1';
A2 = zeros(length(A1),1);
for i = 1:length(A1)
A2(i) = (W/(densityN))-2sqrt(2)A1(i);
end
plot(A1,A2)
end
% Iteration Curve
n = length(iterationstate);
plot(iterationstate(:,1),iterationstate(:,2),'g')
plot(iterationstate(:,1),iterationstate(:,2),'.k')
plot(iterationstate(n,1),iterationstate(n,2),'ok')
ops = 'm','c','r',;
if P==20000
A1mat = 0.10 0.01 2.00;...
0.10 0.01 2.00;...
0.10 0.01 0.65; ,;
elseif P==25000
A1mat = 0.65 0.01 2.55;...
0.10 0.01 2.00;...
0.10 0.01 0.74; ,;
else
error('user must define own constraint curve values')
end
for k = 1:length(A1mat)
A1 = A1mat(k,1):A1mat(k,2):A1mat(k,3);
A1 = A1';
A2 = zeros(length(A1),1);
for i = 1:length(A1)
if(k == 1)
A2(i) = (P/20000sqrt(2)A1(i)-sqrt(2)A1(i)^2)/(-
P/20000+2A1(i));
elseif(k == 2)
A2(i) = (P/20000sqrt(2)A1(i)-sqrt(2)A1(i)^2)/(2A1(i));
elseif(k == 3)
A2(i) = sqrt(2)A1(i)^2/(P/15000-2A1(i));
end
end
plot(A1,A2,ops(k))
end

xlabel('A_2 in,')
ylabel('A_1 in,')



22
.2 MATLAB Output

Warning: Large-scale (trust region) method does not currently solve this type oI problem,
using medium-scale (line search) instead.
~ In Imincon at 303
In variables2 at 36

max Line search Directional First-order
Iter F-count I(x) constraint steplength derivative optimality Procedure
0 3 9.34765 1.193e006 InIeasible start point
1 7 4.96458 1.166e006 0.5 -8.8 7.56
2 10 6.28283 5.313e005 1 1.36 6.52
3 13 6.39252 2.837e005 1 0.214 5.83
4 16 12.3752 1.184e005 1 5.9 3.73
5 19 16.3438 3.876e004 1 4.35 3.22
6 22 20.4398 1.026e004 1 4.46 2.73
7 25 22.6997 1518 1 2.37 0.58
8 28 23.1149 108.3 1 0.42 0.0395
9 31 23.1524 0.3139 1 0.0375 0.00747
10 34 23.1525 2.285e-006 1 0.000112 1.1e-005 Hessian modiIied
11 37 23.1525 0 1 7.11e-010 3.54e-008 Hessian modiIied
Optimization terminated: Iirst-order optimality measure less
than options.TolFun and maximum constraint violation is less
than options.TolCon.
Active inequalities (to within options.TolCon 1e-006):
lower upper ineqlin ineqnonlin
1
2
Warning: Imaginary parts oI complex X and/or Y arguments ignored
~ In variables2 at 57
Warning: Imaginary parts oI complex X and/or Y arguments ignored
~ In variables2 at 57
Warning: Imaginary parts oI complex X and/or Y arguments ignored
~ In variables2 at 57
Warning: Imaginary parts oI complex X and/or Y arguments ignored
~ In variables2 at 57
Warning: Imaginary parts oI complex X and/or Y arguments ignored
~ In variables2 at 57
Warning: Imaginary parts oI complex X and/or Y arguments ignored
~ In variables2 at 57
~~

Warning: Large-scale (trust region) method does not currently solve this type oI problem,
using medium-scale (line search) instead.
~ In Imincon at 303
23
In variables2 at 36

max Line search Directional First-order
Iter F-count I(x) constraint steplength derivative optimality Procedure
0 3 9.34765 1.193e006 InIeasible start point
1 7 4.96458 1.166e006 0.5 -8.8 7.56
2 10 6.28283 5.313e005 1 1.36 6.52
3 13 6.39252 2.837e005 1 0.214 5.83
4 16 12.3752 1.184e005 1 5.9 3.73
5 19 16.6099 3.479e004 1 4.57 3.26
6 22 19.1285 -1.814 1 2.49 2.79
7 25 19.0884 7.508 1 -0.0399 7.59 Hessian modiIied twice
8 28 19.0894 0.004433 1 0.000961 8.16
9 31 19.0894 3.638e-010 1 1.83e-007 8.16 Hessian modiIied
Optimization terminated: magnitude oI search direction less than 2*options.TolX
and maximum constraint violation is less than options.TolCon.
Active inequalities (to within options.TolCon 1e-006):
lower upper ineqlin ineqnonlin
1
Warning: Imaginary parts oI complex X and/or Y arguments ignored
~ In variables2 at 57
Warning: Imaginary parts oI complex X and/or Y arguments ignored
~ In variables2 at 57
Warning: Imaginary parts oI complex X and/or Y arguments ignored
~ In variables2 at 57
Warning: Imaginary parts oI complex X and/or Y arguments ignored
~ In variables2 at 57
Warning: Imaginary parts oI complex X and/or Y arguments ignored
~ In variables2 at 57
Warning: Imaginary parts oI complex X and/or Y arguments ignored
~ In variables2 at 57
~~

Warning: Large-scale (trust region) method does not currently solve this type oI problem,
using medium-scale (line search) instead.
~ In Imincon at 303
In variables3 at 33

max Line search Directional First-order
Iter F-count I(x) constraint steplength derivative optimality Procedure
0 3 0.382843 1.568e005 InIeasible start point
1 6 0.685637 7.624e004 1 0.303 2.04
2 9 1.21239 4.603e004 1 0.527 0.797
3 12 1.41217 2.713e004 1 0.2 0.989
4 15 2.08938 1.318e004 1 0.677 0.815
5 18 2.70551 4424 1 0.616 0.57
24
6 21 3.19235 681.8 1 0.487 0.845
7 24 3.29567 24 1 0.103 0.136
8 27 3.29882 1.071 1 0.00315 0.0296
9 30 3.2984 1.834 1 -0.000422 0.000689 Hessian modiIied
10 33 3.2987 0.0004569 1 0.000302 0.000114 Hessian modiIied
11 36 3.2987 1.162e-007 1 7.53e-008 1.23e-006 Hessian modiIied
Optimization terminated: Iirst-order optimality measure less than options.TolFun
and maximum constraint violation is less than options.TolCon.
Active inequalities (to within options.TolCon 1e-006):
lower upper ineqlin ineqnonlin
1
~~

You might also like