You are on page 1of 15

21

Implementation of
One-Dimensional
Elements

21–1
Chapter 21: IMPLEMENTATION OF ONE-DIMENSIONAL ELEMENTS 21–2

TABLE OF CONTENTS

Page
§21.1. THE PLANE BAR ELEMENT 21–3
§21.1.1. Element Formulation . . . . . . . . . . . . . . . 21–3
§21.1.2. Element Formation Modules . . . . . . . . . . . . 21–4
§21.1.3. Testing the Plane Bar Element Modules . . . . . . . . . 21–5
§21.2. THE PLANE BEAM-COLUMN ELEMENT 21–8
§21.2.1. Element Formulation . . . . . . . . . . . . . . 21–9
§21.2.2. Element Formation Modules . . . . . . . . . . . . 21–11
§21.2.3. Testing the Beam-Column Element Modules . . . . . . 21–13
§21.3. THE SPACE BAR ELEMENT 21–15
§21.3.1. Element Formulation . . . . . . . . . . . . . . . 21–16
§21.3.2. Element Formation Modules . . . . . . . . . . . . 21–18
§21.3.3. Testing the Space Bar Element Modules . . . . . . . . 21–20
EXERCISES . . . . . . . . . . . . . . . . . . . . . . 21–21

21–2
21–3 §21.1 THE PLANE BAR ELEMENT

This Chapter begins Part III of the course. This Part deals with the computer implementation of the
Finite Element Method. It is organized in “bottom up” fashion. It begins with simple topics, such
as programming of bar and beam elements, and gradually builds up toward more complex models
and calculations.
Theis Chapter illustrates, through specific examples, the programming of one-dimensional elements:
bars and beams, using Mathematica as implementation language. The programming of both stiffness
and mass matrices are illustrated although only the stiffness matrix is used in this course.

§21.1. THE PLANE BAR ELEMENT


The two-node, prismatic, two-dimensional bar element was studied in Chapters 2-3 for modeling
plane trusses. It is reproduced in Figure 21.1 for conveniency. It has two nodes and four degrees
of freedom. The element node displacements and congugate forces are
   
u x1 f x1
u  f 
u(e) =  y1  , f(e) =  y1  . (21.1)
u x2 f x2
u y2 f y2

The element geometry is described by the coordinates {xi , yi }, i = 1, 2 of the two end nodes.
The two material properties involved in the stiffness and mass computations are the modulus of
elasticity E and the mass density per unit volume ρ. The only fabrication property required is the
cross section area A. All of these properties are taken to be constant over the element.

x−

2 (x 2 , y2 )
 = L(e)
y−
y
ϕ E, A, ρ

x 1 (x 1 , y1 )

Figure 21.1. Plane bar element.

§21.1.1. Element Formulation


The element stiffness matrix in global {x, y} coordinates is given by the explicit expression derived
in §3.1:
   
c2 sc −c2 −sc x21 x21 x21 y21 −x21 x21 −x21 y21
E A  sc s 2 −sc −s 2  E A  x21 y21 y21 y21 −x21 y21 −y21 y21 
K(e) =  2 = 3  .
 −c −sc c 2
sc  −x x
21 21 −x 21 y21 x21 x21 x21 y21
−sc −s 2 sc s2 −x21 y21 −y21 y21 x21 y21 y21 y21
(21.2)

21–3
Chapter 21: IMPLEMENTATION OF ONE-DIMENSIONAL ELEMENTS 21–4

PlaneBar2Stiffness[ncoor_,mprop_,fprop_,opt_]:= Module[
{x1,x2,y1,y2,x21,y21,Em,Gm,Ρ,Α,A,numer,L,LL,LLL,Ke},
{{x1,y1},{x2,y2}}=ncoor; {x21,y21}={x2-x1,y2-y1};
{Em,Gm,Ρ,Α}=mprop; {A}=fprop; {numer}=opt;
If [numer,{x21,y21,Em,A}=N[{x21,y21,Em,A}]];
LL=x21^2+y21^2; L=PowerExpand[Sqrt[LL]]; LLL=Simplify[LL*L];
Ke=(Em*A/LLL)*{{ x21*x21, x21*y21,-x21*x21,-x21*y21},
{ y21*x21, y21*y21,-y21*x21,-y21*y21},
{-x21*x21,-x21*y21, x21*x21, x21*y21},
{-y21*x21,-y21*y21, y21*x21, y21*y21}};
Return[Ke]
];
PlaneBar2ConsMass[ncoor_,mprop_,fprop_,opt_]:= Module[
{x1,x2,y1,y2,x21,y21,Em,Gm,Ρ,Α,A,numer,L,MeC},
{{x1,y1},{x2,y2}}=ncoor; {x21,y21}={x2-x1,y2-y1};
{Em,Gm,Ρ,Α}=mprop; {A}=fprop; {numer}=opt;
If [numer,{x21,y21,Ρ,A}=N[{x21,y21,Ρ,A}]];
L=Simplify[PowerExpand[Sqrt[x21^2+y21^2]]];
MeC=(Ρ*A*L/6)*{{2,0,1,0},{0,2,0,1},{1,0,2,0},{0,1,0,2}};
Return[MeC]
];
PlaneBar2LumpMass[ncoor_,mprop_,fprop_,opt_]:= Module[
{x1,x2,y1,y2,x21,y21,Em,Gm,Ρ,Α,A,numer,L,MeL},
{{x1,y1},{x2,y2}}=ncoor; {x21,y21}={x2-x1,y2-y1};
{Em,Gm,Ρ,Α}=mprop; {A}=fprop; {numer}=opt;
If [numer,{x21,y21,Ρ,A}=N[{x21,y21,Ρ,A}]];
L=Simplify[PowerExpand[Sqrt[x21^2+y21^2]]];
MeL=(Ρ*A*L/2)*IdentityMatrix[4];
Return[MeL]
];

Figure 21.2. Mathematica modules to form stiffness and mass


matrices of a 2-node, prismatic plane bar element.

Here c = cos ϕ = x21 /, s = sin ϕ = y21 /, in which x21 = x2 −x1 , y21 = y2 −y1 ,  = x21 2
+ y21
2
,
and ϕ is the angle formed by x̄ and x, measured from x positive counterclockwise (see Figure 21.1).
The second matrix expression in (21.2) is useful in symbolic work, because it enhances simplification
possibilities.
The consistent and lumped mass matrix are given by
   
2 0 1 0 1 0 0 0
ρ A  0 2 0 1 ρ A  0 1 0 0
MC(e) =  , M(e)
L =  . (21.3)
6 1 0 2 0 2 0 0 1 0
0 1 0 2 0 0 0 1

Both mass matrices are independent of the orientation of the element, that is, do not depend on the
angle ϕ.1

1 For the derivation of the consistent mass matrix, see, e.g., the book by Przemieniecki, Matrix Structural Analysis, Dover,
1968.

21–4
21–5 §21.1 THE PLANE BAR ELEMENT

§21.1.2. Element Formation Modules

Figure 21.2 lists three Mathematica modules:


PlaneBar2Stiffness returns the element stiffness matrix K(e) of a 2-node, prismatic plane bar
element, given by (21.2). PlaneBar2ConsMass returns the consistent mass matrix MC(e) of a 2-
node, prismatic plane bar element, given by (21.3). PlaneBar2LumpMass returns the lumped mass
matrix M(e)
L of a 2-node, prismatic plane bar element, given by (21.3).
The argument sequence of the three modules is exactly the same:
[ ncoor, mprop, fprop, opt ]

These four arguments are actually lists that collect the following data:
node coordinates, material properties, fabrication properties, options

The internal structure of these lists is

ncoor { { x1,y1 },{ x2,y2 } }


mprop { Em,Gm,rho,alpha }
(21.4)
fprop {A}
opt { numer }

Here x1,y1 and x2,y2 are the coordinates of the end nodes, and Em, Gm, rho, alpha and A stand
for E, G, ρ, α and A, respectively. For the stiffness matrix only E and A are used. In the mass
matrix modules only ρ and A are used. Entries Gm and alpha are included to take care of other 1D
elements.
The only option is numer, which is a logical flag with the value True or False. If True the
computations are carried out in numerical floating-point arithmetic.

§21.1.3. Testing the Plane Bar Element Modules

The modules are tested by the statements listed in Figures 21.3 and 21.5.
The script of Figure 21.3 tests a numerically defined element with end nodes located at (0, 0) and
(30, 40), with E = 1000, A = 5, ρ = 6/10, and numer set to True. Executing the statements in
Figure 21.3 produces the results listed in Figure 21.4. The tests consist of the following operations:
Testing K(e) . The stiffness matrix returned in Ke is printed. Its four eigenvalues are computed
and printed. As expected three eigenvalues, which correspond to the three independent rigid body
motions of the element, are zero. The remaining eigenvalue is positive and equal to E A/. The
symmetry of Ke is also checked but the output is not shown to save space.
Testing MC(e) . The consistent mass matrix returned in MeC is printed. Its four eigenvalues are
computed and printed. As expected they are all positive and form two pairs. The symmetry is also
checked but the output is now shown.
Testing M(e)
L . The lumped mass matrix returned in MeL is printed. This is a diagonal matrix and
consequently its eigenvalues are the same as the diagonal entries.

21–5
Chapter 21: IMPLEMENTATION OF ONE-DIMENSIONAL ELEMENTS 21–6

ncoor={{0,0},{30,40}}; mprop={1000,0,6/10,0};
fprop={5}; opt={True};

Ke= PlaneBar2Stiffness[ncoor,mprop,fprop,opt];
Print["Numerical Elem Stiff Matrix: "];
Print[Ke//MatrixForm];
Print["Eigenvalues of Ke=",Chop[Eigenvalues[N[Ke]]]];
Print["Symmetry check=",Simplify[Transpose[Ke]-Ke]];

MeC= PlaneBar2ConsMass[ncoor,mprop,fprop,opt];
Print["Numerical Consistent Mass Matrix: "];
Print[MeC//MatrixForm];
Print["Eigenvalues of MeC=",Eigenvalues[N[MeC]]];
Print["Symmetry check=",Simplify[Transpose[MeC]-MeC]];

MeL= PlaneBar2LumpMass[ncoor,mprop,fprop,opt];
Print["Numerical Lumped Mass Matrix: "];
Print[MeL//MatrixForm];
Print["Eigenvalues of MeL=",Eigenvalues[N[MeL]]];

Figure 21.3. Test of plane bar element modules with numerical inputs.

Numerical Elem Stiff Matrix:


 36. 48. 36. 48. 

 



 48. 64. 48. 64. 


 


 36. 48. 




36. 48. 


 48. 64. 48. 64. 
Eigenvalues of Ke200., 0, 0, 0
Numerical Consistent Mass Matrix:


50. 0 25. 0 


 



 0 50. 0 25. 



 


 25. 0 50. 0 


 

 0 25. 0 50. 
Eigenvalues of MeC75., 75., 25., 25.
Numerical Lumped Mass Matrix:

 75.

0 0 0 


 


 0 75. 0 0 









 0 0 75. 0 

 
 0 0 0 75. 
Eigenvalues of MeL75., 75., 75., 75.

Figure 21.4. Output from test statements of Figure chapdot3


(outputs from symmetry checks not shown).

The script of Figure 21.5 tests a symbolically defined element with end nodes located at (0, 0) and
(L , 0), which is aligned with the x axis. The element properties E, ρ and A are kept symbolic.
Executing the statements in Figure 21.4 produces the results shown in Figure 21.5.

The sequence of tests on the symbolic element is essentially the same carried out before, but a

21–6
21–7 §21.1 THE PLANE BAR ELEMENT

ClearAll[A,Em,Ρ,L,opt];
ncoor={{0,0},{L,0}}; mprop={Em,0,Ρ,0}; fprop={A}; opt={False};
Ke= PlaneBar2Stiffness[ncoor,mprop,fprop,opt];
kfac=Em*A/L; Ke=Simplify[Ke/kfac];
Print["Symbolic Elem Stiff Matrix: "];
Print[kfac," ",Ke//MatrixForm];
Print["Eigenvalues of Ke=",kfac,"*",Eigenvalues[Ke]];
MeC= PlaneBar2ConsMass[ncoor,mprop,fprop,opt];
mfac=Ρ*L*A/6; MeC= Simplify[MeC/mfac];
Print["Symbolic Consistent Mass Matrix: "];
Print[mfac," ",MeC//MatrixForm];
Print["Eigenvalues of MeC=",mfac,"*",Eigenvalues[MeC]];
Print["Squared frequencies=",Simplify[kfac/mfac],"*",
Simplify[Eigenvalues[Inverse[MeC].Ke]]];
MeL= PlaneBar2LumpMass[ncoor,mprop,fprop,opt];
mfac=Ρ*L*A/2; MeL= Simplify[MeL/mfac];
Print["Symbolic Lumped Mass Matrix: "];
Print[mfac," ",MeL//MatrixForm];
Print["Eigenvalues of MeL=",mfac,"*",Eigenvalues[MeL]];
Print["Squared frequencies=",Simplify[kfac/mfac],"*",
Simplify[Eigenvalues[Inverse[MeC].Ke]]];

Figure 21.5. Test of plane bar element modules with symbolic inputs.

Symbolic Elem Stiff Matrix:


 1 0 1 0 

 

A Em  

 0 0 0 0 


 
 

L 

 1 0 1 0 


 
 0 0 0 0
A Em
Eigenvalues of Ke  0, 0, 0, 2
L
Symbolic Consistent Mass Matrix:


2 0 1 0


 
ALΡ 

 0 2 0 1



 
 
6 

 1 0 2 0



 
0 1 0 2
ALΡ
Eigenvalues of MeC  1, 1, 3, 3
6
6 Em
Squared frequencies   0, 0, 0, 2
L2 Ρ
Symbolic Lumped Mass Matrix:


0
1 0

0

 
ALΡ 0 1 0
 0
 




2 

0

0 0
 1
 
0 0
1 0
ALΡ
Eigenvalues MeL  1, 1, 1, 1
of
2
2 Em
Squared frequencies   0, 0, 0, 2
L2 Ρ

Figure 21.6. Output from test statements of Figure 21.5.

21–7
Chapter 21: IMPLEMENTATION OF ONE-DIMENSIONAL ELEMENTS 21–8

y−
u− x 2 θz 2

u−x1 θz1
u− y 2
u− y1

1 2 x−

 = L(e) E, A, Izz , ρ

Figure 21.7. Plane beam-column element in its local system.

x−

2 (x 2 , y2 )

y y−

x
1 (x 1 , y1 )

Figure 21.8. Plane beam-column element transformation to global system.

frequency test has been added. This consists of solving the one-element vibration eigenproblem

K(e) vi = ωi2 MC(e) vi , K(e) vi = ωi2 M(e)


L vi , (21.5)

in which ωi are circular frequencies and vi the associated eigenvectors or vibration mode shapes.
Because the 3 rigid body modes are solution of (21.5), three zero frequencies are expected, which is
borned out by the tests. The single positive nonzero frequency ωa > 0 corresponds to the vibration
mode of axial extension and contraction. The consistent mass yields ωa2 = 12E/(ρ L 2 ) whereas
the lumped mass yields ωa2 = 4E/(ρ L 2 ). The exact continuum solution for this axial mode is
ωa2 = π 2 E/(ρ L 2 ) ≈ 9.86E/(ρ L 2 ). Hence the consistent mass overestimates the true frequency
whereas the lumped mass underestimates it, which is a well known property.
Running the script of Figure 21.5 produces the output shown in Figure 21.6. One thing to be noticed
is the use of stiffness and mass matrix scaling factors, called kfac and mfac, respectively, in Figure
21.5. These embody symbolic quantities that can be taken out as matrix factors, for example E A/L
in K(e) . The effect is to clean up matrix and vector output, as can be observed in Figure 21.6.

§21.2. THE PLANE BEAM-COLUMN ELEMENT


Beam-column elements model structural members that resist both axial and bending actions. This
is the case in skeletal structures such as frameworks which are comnmon in buildings. A plane
beam-column element is a combination of a plane bar (such as that considered in §21.1), and a
plane beam.

21–8
21–9 §21.2 THE PLANE BEAM-COLUMN ELEMENT

We consider such an element in its local system (x̄, ȳ) as shown in Figure 21.7, and then in the
global system (x, y) as shown in Figure 21.8. The six degrees of freedom and conjugate node
forces of the elements are:
   ¯     
ū x1 f x1 u x1 f x1
 ū y1   f¯y1   u y1   f y1 
       
θ  (e) m  θ  m 
ū(e) =  z1  , f̄ =  z1  , u(e) =  z1  , f(e) =  z1  . (21.6)
 ū x2   ū x2   u x2   f x2 
       
ū y2 ū y2 u y2 f y2
θz2 m z2 θz2 m z2

The rotation angles θ and the nodal moments m are the same in the local and the global systems
because they are about the z axis, which does not change.
The element geometry is described by the coordinates {xi , yi }, i = 1, 2 of the two end nodes. The
element length is . The two material properties involved in the stiffness and mass computations
are the modulus of elasticity E and the mass density per unit volume ρ. The fabrication properties
required are the cross section area A and the bending moment of inertia I = Izz about the neutral
axis, which is taken as defining the position of the z axis. All of these properties are taken to be
constant over the element.

§21.2.1. Element Formulation


For the plane bar and plane beam components we use the elements derived in Chapters 12 and 13,
respectively. (For beam bending this is the Euler-Bernoulli mathematical model.) Combining these
two we obtain the stiffness matrix of prismatic beam-column element in the local system x̄, ȳ as
   
1 0 0 −1 0 0 0 0 0 0 0 0
 0 0 0 0 0  12 6 0 −12 6 
  EI  
(e) EA  0 0 0 0  42 0 −6 22 
K̄ =  + 3  
  1 0 0   0 0 0 
   
0 0 12 −6
symm 0 symm 42
(21.7)
The first matrix on the right is the contribution from the bar stiffness, but in which rows and
columns have been rearranged in accordance with the nodal freedoms (21.6). The second matrix is
the contribution from the Bernoulli-Euler bending stiffness; again freedoms have been rearranged
as appropriate.
The consistent mass matrix in the local system x̄, ȳ is
   
2 0 0 1 0 0 0 0 0 0 0 0
 0 0 0 0 0  156 21 0 54 −13 
(e) ρ A 
 0 0 0
 
0  ρ A  42 0 13 −32 

M̄C =  +  
6  2 0 0  420  0 0 0 
   
0 0 156 −21
symm 0 symm 42
(21.8)

21–9
Chapter 21: IMPLEMENTATION OF ONE-DIMENSIONAL ELEMENTS 21–10

PlaneBeamColumn2Stiffness[ncoor_,mprop_,fprop_,opt_]:= Module[
{x1,x2,y1,y2,x21,y21,Em,Gm,Ρ,Α,A,Izz,numer,c,s,L,LL,
LLL,ra,rb,T,Kebar,Ke},
{{x1,y1},{x2,y2}}=ncoor; {x21,y21}={x2-x1,y2-y1};
{Em,Gm,Ρ,Α}=mprop; {A,Izz}=fprop; {numer}=opt;
LL=Simplify[x21^2+y21^2]; L=PowerExpand[Sqrt[LL]]; LLL=L*LL;
c=x21/L; s=y21/L; ra=Em*A/L; rb= 2*Em*Izz/LLL;
Kebar= ra*{
{ 1,0,0,-1,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},
{-1,0,0, 1,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}} +
rb*{
{ 0,0,0,0,0,0},{0, 6, 3*L,0,-6, 3*L},{0,3*L,2*LL,0,-3*L, LL},
{ 0,0,0,0,0,0},{0,-6,-3*L,0, 6,-3*L},{0,3*L, LL,0,-3*L,2*LL}};
T={{c,s,0,0,0,0},{-s,c,0,0,0,0},{0,0,1,0,0,0},
{0,0,0,c,s,0},{0,0,0,-s,c,0},{0,0,0,0,0,1}};
Ke=Transpose[T].Kebar.T; If [numer,Ke=N[Ke]];
Return[Ke]
];

Figure 21.9. Mathematica module to form the stiffness matrix of a


2-node, prismatic plane beam-column element.

The first matrix on the right is the contribution from the axial (bar) inertia, whereas the second one
comes from the bending (beam) inertia. The expression for the latter neglect the shear and rotatory
inertia. Their derivation may be followed in the book of Przemieniecki cited in footnote 1.
The displacement transformation matrix between local and global systems is
    
ū x1 c s 0 0 0 0 u x1
 ū y1   −s c 0 0 0 0   u y1 
    
 θz1   0 0 1 0 0 0   θz1 
ū(e) = =   = T u(e) (21.9)
 u x2   0 0 0 c s 0   u x2 
    
ū y2 0 0 0 −s c 0 u y2
θz2 0 0 0 0 0 1 θz2

where c = cos ϕ, s = sin ϕ, and ϕ is the angle between x̄ and x, measured positive-counterclockwise
from x; see Figure 21.3. The stiffness and consistent mass matrix in the global system are obtained
(e) (e)
through the congruential transformation K(e) = TT K̄ T, MC(e) = TT M̄ T. The lumped mass
matrix is diagonal and is the same in the local and global systems:
 
1 0 0 0 0 0
0 1 0 0 0 0 
(e) ρ 
0 0 mθ 0 0 0 

M(e)
L = M̄ L =  . (21.10)
2 0 0 0 1 0 0 
 
0 0 0 0 1 0
0 0 0 0 0 mθ

Here the rotational lumped mass is shown as m θ . There are several ways to compute m θ , including
the simplest one of leaving it zero. In the implementation shown in Figure 21.6, m θ = ρ A3 /78.

21–10
21–11 §21.2 THE PLANE BEAM-COLUMN ELEMENT

PlaneBeamColumn2ConsMass[ncoor_,mprop_,fprop_,opt_]:= Module[
{x1,x2,y1,y2,x21,y21,Em,Gm,Ρ,Α,A,Izz,numer,c,s,L,LL,m,
T,MeClocal,MeC},
{{x1,y1},{x2,y2}}=ncoor; {x21,y21}={x2-x1,y2-y1};
{Em,Gm,Ρ,Α}=mprop; {A,Izz}=fprop; {numer}=opt;
LL=x21^2+y21^2; L=PowerExpand[Sqrt[LL]];
c=x21/L; s=y21/L; m=Ρ*L*A;
MeClocal= (m/6)*{
{2,0,0,1,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0},
{1,0,0,2,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}}+
+(m/420)*{
{0,0,0,0,0,0},{0,156,22*L,0,54,-13*L},
{0,22*L,4*LL,0,13*L,-3*LL},
{0,0,0,0,0,0},{0,54,13*L,0,156,-22*L},
{0,-13*L,-3*LL,0,-22*L,4*LL}};
T={{c,s,0,0,0,0},{-s,c,0,0,0,0},{0,0,1,0,0,0},
{0,0,0,c,s,0},{0,0,0,-s,c,0},{0,0,0,0,0,1}};
MeC=Transpose[T].MeClocal.T; If [numer,MeC=N[MeC]];
Return[MeC]
];
PlaneBeamColumn2LumpMass[ncoor_,mprop_,fprop_,opt_]:= Module[
{x1,x2,y1,y2,x21,y21,Em,Gm,Ρ,Α,A,Izz,numer,L,LL,MeL},
{{x1,y1},{x2,y2}}=ncoor; {x21,y21}={x2-x1,y2-y1};
{Em,Gm,Ρ,Α}=mprop; {A,Izz}=fprop; {numer}=opt;
LL=Simplify[x21^2+y21^2]; L=PowerExpand[Sqrt[LL]];
(* HRZ lumping scheme for rotational masses *)
MeL=(Ρ*A*L/2)*
{{1,0,0,0,0,0},{0,1,0,0,0,0},{0,0,LL/39,0,0,0},
{0,0,0,1,0,0},{0,0,0,0,1,0},{0,0,0,0,0,LL/39}};
If [numer,MeL=N[MeL]];
Return[MeL]
];

Figure 21.10. Mathematica modules to form mass matrices of a


2-node, prismatic plane beam-column element.

This is called the “HRZ lumping scheme” in the FEM literature.2

§21.2.2. Element Formation Modules


Figures 21.9 and 21.10 list three Mathematica modules:
PlaneBeamColumn2Stiffness returns the element stiffness matrix K(e) of a 2-node, prismatic
plane beam-column element, given by (21.7). PlaneBeamColumn2ConsMass returns the con-
sistent mass matrix MC(e) of a 2-node, prismatic plane beam-column element, given by (21.8).
PlaneBeamColumn2LumpMass returns the lumped mass matrix M(e) L of a 2-node, prismatic plane
beam-column element, given by (21.10).

2 See e.g., R. D. Cook, D. S. Malkus and M. E. Plesha, Concepts and Applications of Finite Element Analysis, 3rd ed.,
Wiley, 1989.

21–11
Chapter 21: IMPLEMENTATION OF ONE-DIMENSIONAL ELEMENTS 21–12

ncoor={{0,0},{3,4}}; mprop={100,0,84/5,0}; fprop={125,250};


opt={True};

Ke= PlaneBeamColumn2Stiffness[ncoor,mprop,fprop,opt];
Print["Numerical Elem Stiff Matrix: "];
Print[Ke//MatrixForm];
Print["Eigenvalues of Ke=",Chop[Eigenvalues[Ke]]];

MeC= PlaneBeamColumn2ConsMass[ncoor,mprop,fprop,opt];
Print["Numerical Consistent Mass Matrix: "];
Print[MeC//MatrixForm];
Print["Eigenvalues of MeC=",Eigenvalues[MeC]];
Print["Squared frequencies (consistent)=",
Chop[Eigenvalues[Inverse[MeC].Ke],10^(-7)]];

MeL= PlaneBeamColumn2LumpMass[ncoor,mprop,fprop,opt];
Print["Numerical Lumped Mass Matrix: "];
Print[MeL//MatrixForm];
Print["Eigenvalues of MeL=",Eigenvalues[MeL]];
Print["Squared frequencies (lumped)=",
Chop[Eigenvalues[Inverse[MeL].Ke],10^(-7)]];

Figure 21.11. Test of 2-node plane beam-column element with numeric inputs.

Numerical Elem Stiff Matrix:


 2436. 48. 4800. 2436. 48. 4800. 

 


 48. 2464. 3600.  



48. 2464. 3600. 



 4800. 3600. 


 3600. 20000. 4800. 10000. 








 2436. 48. 4800. 2436. 48. 4800. 








 48. 2464. 3600. 48. 2464. 3600. 

 
 4800. 3600. 10000. 4800. 3600. 20000. 
Eigenvalues of Ke34800., 10000., 5000., 0, 0, 0
Numerical Consistent Mass Matrix:
 3756. 192. 2200. 1494. 192. 1300. 

 



 192. 3644. 1650. 192. 1606. 975. 



 



 2200. 1650. 2500. 1300. 975. 1875. 



 


 1300. 192. 


 1494. 192. 3756. 2200. 



 



 192. 1606. 975. 192. 3644. 1650. 

 
 1300. 975. 1875. 2200. 1650. 2500. 
Eigenvalues of MeC9209.32, 5250., 3068.05, 1750., 415.679, 106.949
Squared frequencies consistent
160., 13.7143, 2.85714, 0, 0, 0
Numerical Lumped Mass Matrix:
 5250.

0. 0. 0. 0. 0. 


 



 0. 5250. 0. 0. 0. 0. 



 


 0. 0. 3365.38 0. 0. 0. 


 


 


 0. 0. 0. 5250. 0. 0. 


 


 



0. 0. 0. 0. 5250. 0. 

 0. 0. 0. 0. 0. 3365.38 
Eigenvalues of MeL5250., 5250., 5250., 5250., 3365.38, 3365.38
Squared frequencies lumped
9.82857, 2.97143, 0.952381, 0, 0, 0

Figure 21.12. Output from test statements of Figure 21.11.

21–12
21–13 §21.2 THE PLANE BEAM-COLUMN ELEMENT

ClearAll[L,Em,Ρ,A,Izz,opt];
ncoor={{0,0},{L,0}}; mprop={Em,0,Ρ,0}; fprop={A,Izz};
opt={False};

Ke= PlaneBeamColumn2Stiffness[ncoor,mprop,fprop,opt];
Print["Symbolic Elem Stiff Matrix:"]; kfac=Em*A/L;
Ke=Simplify[Ke/kfac]; Print[kfac," ",Ke//MatrixForm];
Print["Eigenvalues of Ke=",kfac,"*",Eigenvalues[Ke]];

MeC= PlaneBeamColumn2ConsMass[ncoor,mprop,fprop,opt];
Print["Symbolic Consistent Mass Matrix:"]; mfac=Ρ*A*L;
MeC= Simplify[MeC/mfac]; Print[mfac," ",MeC//MatrixForm];
Print["Eigenvalues of MeC=",mfac,"*",Eigenvalues[MeC]];
Print["Squared frequencies=",Simplify[kfac/mfac],"*",
Simplify[Eigenvalues[Inverse[MeC].Ke]]];

MeL= PlaneBeamColumn2LumpMass[ncoor,mprop,fprop,opt];
Print["Symbolic Lumped Mass Matrix:"]; mfac=Ρ*A*L;
MeL= Simplify[MeL/mfac]; Print[mfac," ",MeL//MatrixForm];
Print["Eigenvalues of MeL=",Eigenvalues[MeL]];
Print["Squared frequencies=",Simplify[kfac/mfac],"*",
Simplify[Eigenvalues[Inverse[MeL].Ke]]];

Figure 21.13. Test of 2-node plane beam-column element with symbolic inputs.

As in the case of the plane bar, the calling argument sequence of the three modules is exactly the
same:
[ ncoor, mprop, fprop, opt ]
These four arguments are lists that collect the following data:
node coordinates, material properties, fabrication properties, options
The internal structure of these lists is

ncoor { { x1,y1 },{ x2,y2 } }


mprop { Em,Gm,rho,alpha }
(21.11)
fprop { A,Izz }
opt { num }

Here x1,y1 and x2,y2 are the coordinates of the end nodes, while Em, Gm, rho, alpha, A and Izz
stand for E, G, ρ, α, A and Izz , respectively. For the stiffness matrix only E, A and Izz are used.
In the mass matrix modules only ρ and A are used. Entries Gm and alpha are included to take care
of other 1D elements.
The only option is numer, which is a logical flag with the value True or False. If numer=True
the computations are carried out in numerical floating-point arithmetic.

§21.2.3. Testing the Beam-Column Element Modules


The modules are tested by the statements collected in the scripts of Figures 21.11 and 21.13.

21–13
Chapter 21: IMPLEMENTATION OF ONE-DIMENSIONAL ELEMENTS 21–14

Symbolic Elem Stiff Matrix:


 1 0 0 1 0 0 

 

 6 Izz  


 0 
12 Izz
  
6 Izz
  0  
12 Izz
   
 


 
A L 2 A L A L 2 A L

 2 Izz 


 
6 Izz
  
4 Izz
   
6 Izz
  
  

A Em  

0 A L A
0 A L A 



  

L 
 1 0 0 1 0 0 


 


 6 Izz 

 0  

12 Izz
  6 Izz
 0 
12 Izz
    




 A L 2 A L A L 2 A L 


 4 Izz 

 0 
6 Izz
AL
  
2 Izz
A
  0  
6 Izz
AL
  
A
  
A Em 2 Izz 6 4 Izz  Izz L2

Eigenvalues of Ke   0, 0, 0, 2,  ,  


L A A L2
Symbolic Consistent Mass Matrix:

 
1
 0 0 
1
 0 0  

 3 6 


 13 L  


 
13
 
11 L
 
9
    



0 0 



35 210 70 420 



 2 2 


 0 
11 L
 
L
 0 
13 L
  
L
 

ALΡ  
 210 105 420 140 


 


 
1
 
1
 


 6
0 0 3
0 0 



 


 
9
 
13 L
 
13
  
11 L
 




0 0 210  


70 420 35 

 2 2 

 0  
13 L
420
  
L
140
 0  
11 L
210
 
L
105 

Em 720 Izz 8400 Izz
Squared frequencies    0, 0, 0, 12,   , 
L2 Ρ A L2 A L2
Symbolic Lumped Mass Matrix:

 
1
 0 0 0 0 0  

 2 








 0 
1
 0 0 0 0 


 2 









2

L 

 0 0 0 0 0 
ALΡ  


78 




 
1
 




0 0 0 2
0 0 



 


 0  1
 0  



0 0 0 




2


 L2 
 0 0 0 0 0 
78 
Em 156 Izz 516 Izz
Squared frequencies    0, 0, 0, 4,   , 
L2 Ρ A L2 A L2

Figure 21.14. Results from test statements of Figure 21.13. Output


of eigenvalues of mass matrices deleted to save space.

The script of Figure 21.7 tests a numerically defined element of length  = 5 with end nodes located
at (0, 0) and (3, 4) respectively, with E = 100, ρ = 84/5, A = 125 and Izz = 250. The output is
shown in Figure 21.12. The tests consist of the following operations:
Testing K(e) . The stiffness matrix returned in Ke is printed. Its six eigenvalues are computed and
printed. As expected three eigenvalues, which correspond to the three independent rigid body
motions of the element, are zero. The remaining three eigenvalues are positive.
Testing MC(e) . The consistent mass matrix returned in MeC is printed. Its symmetry is checked. The
six eigenvalues are computed and printed. As expected they are all positive. A frequency test is
also carried out.
Testing M(e)L . The lumped mass matrix returned in MeL is printed. This is a diagonal matrix and
thus its eigenvalues are the same as the diagonal entries. A frequency test is also carried out.
The script of Figure 21.13 tests a symbolically defined element with end nodes located at (0, 0) and

21–14
21–15 §21.3 THE SPACE BAR ELEMENT

(L , 0), which is aligned with the x axis. The element properties E, ρ, A and Izz are kept in symbolic
form. The output is shown in shown in Figure 21.14, except that the output of the eigenvalues of
the mass matrices has been deleted to save space.
The sequence of tests on the symbolic element is similar to that performed for the bar element in
Figure 21.4. The vibration eigenproblems are
K(e) vi = ωi2 MC(e) vi , K(e) vi = ωi2 M(e)
L vi , (21.12)
where ωi are circular frequencies and vi the associated eigenvectors or vibration mode shapes.
Because the three rigid body modes are solution of (21.12), three zero frequencies are expected
for the consistent mass eigenproblem, which is borned out by the tests. The three positive nonzero
frequencies corresponds to one free-free axial and two free-free bending modes. The consistent
mass gives for the latter ω2 = 720E I /(ρ AL4 ) and ω2 = 8400E I /(ρ A4 ). These are upper
bounds to the exact continuum solution for the first two free-free bending frequencies, which are
are 502E I /(ρ A4 ) and 1382E I /(ρ A4 ).
The lumped mass vibration eigenproblem, using the HRZ lumping scheme for the rotational masses,
yields three zero frequencies, one finite positive axial vibration frequency, which is the same
as that provided by the bar element, and two bending frequencies ω2 = 156E I /(ρ AL4 ) and
ω2 = 516E I /(ρ A4 ). These are lower bounds to the exact free-free continuum frequencies given
above.

§21.3. THE SPACE BAR ELEMENT

y−


z 1 (x 1 , y1, z 1 )
y E, A, ρ

2 (x 2 , y2 , z 2 )
z x
 = L(e) x−

Figure 21.15. The space (3D) bar element.

To provide a taste of the world of space structures, this section outlines the extension of the bar
element to three dimensions.
The two-node, prismatic, three-dimensional bar element is shown in Figure 21.15. It has two nodes
and six degrees of freedom. The element node displacements and congugate forces are
   
u x1 f x1
 u y1   f y1 
   
u   f 
u(e) =  z1  , f(e) =  z1  . (21.13)
 u x2   f x2 
   
u y2 f y2
u z2 f z1

21–15

You might also like