7 Rectangular Beam
7 Rectangular Beam
7 Rectangular Beam
clear all
syms C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C16 C17 C18
syms x y a b p
%stress function
phi = C1*x^2+C2*x*y+C3*y^2+C4*x^3+C5*x^2*y+C6*x*y^2+C7*y^3+C8*x^4+ ...
C9*x^3*y+C10*x^2*y^2+C11*x*y^3+C12*y^4+C13*x^5+C14*x^4*y+ ...
C15*x^3*y^2+C16*x^2*y^3+C17*x*y^4+C18*y
%stress field
sxx = diff(diff(phi,y),y)
syy = diff(diff(phi,x),x)
sxy = -diff(diff(phi,x),y)
s5 = subs(diff(t2,x,3),x,0)/factorial(3)
s6 = subs(diff(t2,x,2),x,0)/factorial(2)
s7 = subs(diff(t2,x,1),x,0)/factorial(1)
s8 = subs(t2,x,0)
12
4/23/06 8:13 PM C:\Documents and Settings\Wei Cai\My Documents\Courses...\S522a.m 2 of 3
s9 = subs(diff(t3,x,3),x,0)/factorial(3)
s10 = subs(diff(t3,x,2),x,0)/factorial(2)
s11 = subs(diff(t3,x,1),x,0)/factorial(1)
s12 = subs(t3,x,0)
s13 = subs(diff(t4,x,3),x,0)/factorial(3)
s14 = subs(diff(t4,x,2),x,0)/factorial(2)
s15 = subs(diff(t4,x,1),x,0)/factorial(1)
s16 = subs(t4,x,0)
%coefficients of biharm
b1 = subs(diff(biharm,x,1),{x,y},{0,0})
b2 = subs(diff(biharm,y,1),{x,y},{0,0})
b3 = subs(biharm,{x,y},{0,0})
disp('syy=') pretty(syy2)
disp('sxy=') pretty(sxy2)
figure(1)
subplot(2,2,1) mesh(xn,yn,phin)
title('\phi') xlabel('x') ylabel('y')
subplot(2,2,2) mesh(xn,yn,sxxn)
title('\sigma_{xx}') xlabel('x') ylabel('y')
subplot(2,2,3) mesh(xn,yn,syyn)
title('\sigma_{yy}') xlabel('x') ylabel('y')
subplot(2,2,4) mesh(xn,yn,sxyn)
title('\sigma_{xy}') xlabel('x') ylabel('y')
% results
%phi=
%
% 2 3 2 2 3 2 3 2 2 3 5
% p (10 x b + 15 x y b - 2 y b + 5 y a - 5 x y + y )
% - 1/40 ------------------------------------------------------------
% 3
% b
%sxx=
%
% 2 2 2 2
% p y (-6 b + 15 a - 15 x + 10 y )
% - 1/20 -----------------------------------
% 3
% b
%syy=
%
% 3 2 3
% p (-2 b - 3 y b + y )
% 1/4 -----------------------
% 3
% b
%sxy=
%
% 2 2
% p x (-b + y )
% - 3/4 --------------
% 3
% b
φ σxx
14
5 5
0 0
−5 −5
1 1
2 2
0 0
0 0
y −1 −2 x y −1 −2 x
σyy σxy
−0.5 0
−1
1 2 −2
1
0 0 2
0
0
y −1 −2 x y −1 −2 x