Professional Documents
Culture Documents
Basic Equations
BasicEquations
The linear triangular element is a twodimensional finite element with both
is the stress vector in the element (of size 3 1) and u is the 6 1 element
displacement vector. The vector is written for each element as {} = [x y xy]T.
MATLABFunctionsUsed
functionA=LinearTriangleElementArea(xi,yi,xj,yj,xm,ym)
%LinearTriangleElementArea Thisfunctionreturnsthe
areaofthe
f h
%lineartriangularelementwhosefirst
% d h
%nodehascoordinates(xi,yi),second
di t ( i i)
d
%nodehascoordinates(xj,yj),and
%thirdnodehascoordinates(xm ym)
%thirdnodehascoordinates(xm,ym).
A=(xi*(yjym)+xj*(ymyi)+xm*(yiyj))/2;
f
i k Li
Ti
l El
S iff
(E NU i i j j
)
functionk=LinearTriangleElementStiffness(E,NU,t,xi,yi,xj,yj,xm,ym,p)
%LinearTriangleElementStiffness Thisfunctionreturnstheelement
%stiffnessmatrixforalineartriangularelementwithmodulusofelasticityE,PoissonsratioNU,
%thicknesst,coordinatesofthefirstnode(xi,yi),coordinatesofthe secondnode(xj,yj),and
( ,y )
p
p
,
p
%coordinatesofthethirdnode(xm,ym).Usep=1forcasesofplanestress,andp=2forcases
%ofplanestrain.Thesizeoftheelementstiffness
%matrixis6x6.
A=(xi*(yjym)+xj*(ymyi)+xm*(yiyj))/2;
betai =yjym;
yj ym;
betaj =ymyi;
betam =yiyj;
gammai =xmxj;
gammaj =xixm;
gammam =xjxi;
B=[betai 0betaj 0betam 0;
0gammai0gammaj0gammam;
gammaibetaigammajbetajgammambetam]/(2*A);
ifp==1
D=(E/(1NU*NU))*[1NU0;NU10;00(1NU)/2];
elseif p==2
D=(E/(1+NU)/(12*NU))*[1NUNU0;NU1NU0;00(12*NU)/2];
end
d
k=t*A*B*D*B;
functionK=LinearTriangleAssemble(K k i j m)
functionK=LinearTriangleAssemble(K,k,i,j,m)
%LinearTriangleAssemble Thisfunctionassemblestheelement
%stiffnessmatrixkofthelinear
%triangularelementwithnodesi,j,
%andmintotheglobalstiffnessmatrixK.
%Thisfunctionreturnstheglobalst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2*m1
K(2
m 1,22*m)=K(2*m1
m)=K(2 m 1,22*m)+k(5
m)+k(5,6);
6);
K(2*m,2*i1)=K(2*m,2*i1)+k(6,1);
K(2*m,2*i)=K(2*m,2*i)+k(6,2);
K(2*m,2*j1)=K(2*m,2*j1)+k(6,3);
K(2*m 2*j) K(2*m 2*j)+k(6 4);
K(2*m,2*j)=K(2*m,2*j)+k(6,4);
K(2*m,2*m1)=K(2*m,2*m1)+k(6,5);
K(2*m,2*m)=K(2*m,2*m)+k(6,6);
Or
ElementDofs=[2 i 12i2 j 12j2 m 12m];
ElementDofs=[2*i12i2*j12j2*m12m];
K(ElementDofs,ElementDofs)=K(ElementDofs,ElementDofs)+k;
f
i S Li
Ti
l El
S
(E NU i i j j
)
functionS=LinearTriangleElementStresses(E,NU,xi,yi,xj,yj,xm,ym,p,u)
%LinearTriangleElementStressesThis functionreturnstheelement
%stressvectorforalineartriangularelementwithmodulusofelasticityE,PoissonsratioNU,
%coordinatesofthefirstnode(xi,yi),coordinatesofthesecondnode(xj,yj),coordinatesofthethirdnode
( ,y ),
p
p
p
,
p
%(xm,ym),andelementdisplacementvectoru.Usep=1forcasesofplanestress,andp=2forcases
%ofplanestrain.Thesizeoftheelementstressvectoris3x1.
A=(xi*(yjym)+xj*(ymyi)+xm*(yiyj))/2;
betai =yjym;
betaj =ymyi;
ym yi;
betam =yiyj;
gammai =xmxj;
gammaj =xixm;
gammam =xjxi;
B=[betai 0betaj 0betam 0;
0gammai0gammaj0gammam;
gammaibetaigammajbetajgammambetam]/(2*A);
ifp==1
D=(E/(1NU*NU))*[1NU0;NU10;00(1NU)/2];
elseif p==2
D=(E/(1+NU)/(12*NU))*[1NUNU0;NU1NU0;00(12*NU)/2];
end
S D*B*
S=D*B*u;
functionPS=LinearTriangleElementPStresses(sigma)
%LinearTriangleElementPStresses
%Thisfunctionreturnstheelement
%principalstressesandtheiranglegiventheelementstressvector.
R=(sigma(1)+sigma(2))/2;
Q=((sigma(1) sigma(2))/2)2+sigma(3)^2;
M 2*sigma(3)/(sigma(1) sigma(2));
M=2*sigma(3)/(sigma(1)
s1=R+sqrt(Q);
s2=R sqrt(Q);
th t ( t d(M)/ )
theta=(atand(M)/2);
PS=[s1;s2;theta];
E ample
Example
Consider the thin plate subjected to both a uniformly
Solution
Step 1 Discretizing the Domain
We subdivide the plate into twelve elements and eleven
nodes.
The
Th totall force
f
d to the
due
h distributed
di ib d load
l d is
i divided
di id d
equally between nodes 5 and 10.
Since the plate is thin,
thin a case of plane stress is assumed.
assumed
The units used in the MATLAB calculations are kN and
meter.
Step2 WritingtheElementStiffnessMatrices
The twelve element stiffness matrices are obtained by making calls to the
E=210e6;
NU=0.3;
t=0.025;
k1=LinearTriangleElementStiffness(E,NU,t,xi,yi,xj,yj,xm,ym,p)
k1=LinearTriangleElementStiffness(E,NU,t,0,0.5,0.125,0.375,0.25,0.5,1)
k1=
1.0e+006*
1.94710.93751.00960.86540.93750.0721
0.93751.94711.00962.88460.07210.9375
1.00961.00962.019201.00961.0096
0.86542.884605.76920.86542.8846
0.93750.07211.00960.86541.94710.9375
0.07210.9375 1.0096 2.88460.93751.9471
0.07210.93751.00962.88460.93751.9471
k2=LinearTriangleElementStiffness(E,NU,t,0,0.5,0,0.25,0.125,0.375,1);
k3=LinearTriangleElementStiffness(E,NU,t,0.125,0.375, 0.25,0.25,0.25,0.5,1)
g
(
k4=LinearTriangleElementStiffness(E,NU,t,0.125,0.375,
0,0.25,0.25,0.25,1))
k5=LinearTriangleElementStiffness(E,NU,t,0,0.25,0.125, 0.125,0.25,0.25,1)
k6=LinearTriangleElementStiffness(E,NU,t,0,0.25,0,0, 0.125,0.125,1)
k7=LinearTriangleElementStiffness(E,NU,t,0.25,0.25, 0.125,0.125,0.25,0,1)
k8=LinearTriangleElementStiffness(E,NU,t,0.125,0.125, 0,0,0.25,0,1)
k9=LinearTriangleElementStiffness(E,NU,t,0.25,0.25,0.25, 0,0.375,0.125,1)
k10=LinearTriangleElementStiffness(E,NU,t,0.25,0.25, 0.375,0.125,0.5,0.25,1)
k11=LinearTriangleElementStiffness(E,NU,t,0.25,0,0.5,
k11 Li
T i l El
tStiff
(E NU t 0 25 0 0 5 0,0.375,0.125,1)
0 0 375 0 125 1)
k12=LinearTriangleElementStiffness(E,NU,t,0.375,0.125, 0.5,0,0.5,0.25,1)
S AssemblingtheGlobalStiffnessMatrix
A
bli h Gl b lS iff
M i
Step3
The size of the global stiffness matrix is 2222.
p a zero matrix of size 2222 then make twelve calls to
To obtain K we first set up
K=zeros(22,22);
e os( , );
K=LinearTriangleAssemble(K,k1,1,3,2);
K=LinearTriangleAssemble(K,k2,1,4,3);
K=LinearTriangleAssemble(K,k3,3,5,2);
K=LinearTriangleAssemble(K,k4,3,4,5);
K Li
Ti
l A
bl (K k
)
K=LinearTriangleAssemble(K,k5,4,6,5);
K=LinearTriangleAssemble(K,k6,4,7,6);
K=LinearTriangleAssemble(K,k7,5,6,8);
g
( 75
)
K=LinearTriangleAssemble(K,k8,6,7,8);
K=LinearTriangleAssemble(K,k9,5,8,9);
K=LinearTriangleAssemble(K,k10,5,9,10);
K LinearTriangleAssemble(K k11 8 11 9);
K=LinearTriangleAssemble(K,k11,8,11,9);
K=LinearTriangleAssemble(K,k12,9,11,10);
u=
1.0e005*
0.1158
0.3010
0 0432
0.0432
0.1657
0.0013
0.4170
0.0409
0.1762
0.1340
0.3528
0.0530
0.4526
0.4526
0.0083
0.5114
0.1270
0.5290
Step 6 Postprocessing
We obtain the reactions at nodes 1, 4, and 7 using