Professional Documents
Culture Documents
A) Geometry
The following terms are defined:
nd : Problem dimension (i.e. 2D, nd = 2 )
nel : Total number of bars
n : Total number of nodes (joints)
ngl : Total degrees of freedom ( ngl = n nd )
y1 , , yn
T : Array containing the connectivity table
5
A
A
A
T =
(1)
B (e ) B ( nel )
B
(1)
(e)
( nel )
1 2 4 2 3
Texample =
4 4 5 5 5
( y2e y1e )
( x2e x1e )
e
,
c
,
le
le
c2
cs c 2 cs
s 2 cs s 2
Ae E e cs
e
K e
l c 2 cs c 2
cs
2
cs
s2
cs s
se
Kel (r , s, e) = K e (r , s)
end
end
end
C) Global matrix, KG
0 0
KG
0 0 n ,n
gl gl
nel
KG A K e
e 1
K RL u R
R
F ext
K LL u L
0
where u R and u L are the imposed and free displacement vectors, respectively.
Reduced global system
K LL u L FLext K LR u R
R K RR u R K RLu L
9,10
7,8
1, 2
3, 4
5, 6
K LL KG (vL , vL )
% then
K LR KG (vL , vR )
K RL KG (vR , vL )
K RR KG (vR , vR )
(1) , , ( nel )
Strains and stresses can be computed by means of the following procedure:
for e 1: nel
% calculate s e and c e
x1e x(1, T(1, e)), y1e x(2, T(1, e))
x2e x(1, T(2, e)),
( y2e y1e )
( x2e x1e )
e
c
l e ( x2e x1e ) 2 ( y2e y1e ) 2
,
,
e
e
l
l
% obtain element displacements
for a 1: nnod
A T( a , e )
% global node
for i 1: nd
r = nd (a -1) + i
% local degree of freedom
p = nd ( A -1) + i
% global degree of freedom
se
d e (r ) u( p)
% element displacements at global coordinates
end
end
% calculate local element displacements
c s
Re
s c
de R e d e
u1xe
e
e d
u
2x
% calculate strain and stress
u e u e
( e ) 2 x e 1x
l
( e ) E ( e )
end
% element strain
% element stress