Automatic Calculus
Lec 7
Finite element formulation for
1D elasticity using the
Rayleigh-Ritz Principle
Prof. Gian Paolo Cimellaro
&
Prof. Giuseppe Marano
Dipartimento d’ingegneria strutturale e geotecnica,
Politecnico di Torino
Reading assignment:
Lecture notes
Summary:
• Stiffness matrix and nodal load vectors for 1D elasticity
problem
Axially loaded elastic bar
y A(x) = cross section at x
b(x) = body force distribution
F (force per unit length)
x E(x) = Young’s modulus
x
x=0 x=L
Potential energy of the axially loaded bar corresponding to the
exact solution u(x)
2
1 du
L L
(u) EA dx bu dx Fu(x L)
2 0 dx 0
Potential energy of the bar corresponding to an admissible
displacement w(x)
2
1 dw
L L
(w) EA dx 0 bw dx Fw(x L)
2 0
dx
Finite element idea:
Step 1: Divide the truss into finite elements connected to each
other through special points (“nodes”)
1 2 3 4
El #1 El #2 El #3
Total potential energy=sum of potential energies of the elements
2
1 dw
L L
(w) EA dx bw dx Fw(x L)
2 0 dx 0
x1=0 x2 x3 x4=L
El #1 El #2 El #3
Total potential energy
2
1 dw
L L
(w) EA dx bw dx Fw(x L)
2 0 dx 0
Potential energy of element 1:
2
1 dw
x2 x2
1 (w) EA dx x bw dx
2 1
x
dx 1
Potential energy of element 2:
2
1 dw
x3 x3
2 (w) EA dx x bw dx
2 2
x
dx 2
x1=0 x2 x3 x4
El #1 El #2 El #3
Potential energy of element 3:
2
1 dw
x4 x4
3 (w) EA dx bw dx Fw(x L)
2 x3 dx x3
Total potential energy=sum of potential energies of the elements
(w) 1 (w) 2 (w) 3 (w)
Step 2: Describe the behavior of each element
In the “direct stiffness” approach, we derived the stiffness matrix
of each element directly (See lecture on Springs/Trusses).
- Now, we will first approximate the displacement inside each
element and then show you a systematic way of deriving the
stiffness matrix.
- Then we will use the minimum of potential energy to derive the
stiffness matrix (Rayleigh-Ritz-Galerkin method)
Summary
Inside an element, the three most important approximations in
terms of the nodal displacements {d} are:
Displacement approximation in terms of shape functions
w(x) [N]d (1)
Strain approximation in terms of strain-displacement matrix
ε(x) [B]d (2)
Stress approximation in terms of strain-displacement matrix and
Young’s modulus
[D][B]d (3)
The shape functions for a 1D linear element
1 1
x2 - x x - x1
N 1 (x) N 2 (x)
x 2 x1 x 2 x1
x1 x2 x
El #1
Within the element, the displacement approximation is
x2 - x x - x1
w(x) d1x d 2x
x 2 x1 x 2 x1
For a linear element
Displacement approximation in terms of shape functions
x 2 - x x - x1 d1x
w(x) d
x 2 x1 x 2 x1 2x
Strain approximation
d1x
ε
dw
1
1 1
dx x 2 x1 d 2x
Stress approximation
d1x
Eε
E
1 1
x 2 x1 d 2x
Why is the approximation “admissible”?
x1=0 x2 x3 x4=L
El #1 El #2 El #3
For the entire bar, the displacement approximation is
w(x) w (1) (x) w (2) (x) w (3) (x)
Where w(i)(x) is the displacement approximation within element (i).
Let’s set d1x=0. Then, can you see that the above approximation does
satisfy the two conditions of being an admissible function on the
entire bar, i.e.,
(1) w(x 0) 0
dw
(2) exists
dx
Step 3 : DERIVE THE STIFFNESS MATRIX OF EACH
ELEMENT USING THE RAYLEIGH-RITZ-GALERKIN
PRINCIPLE
Potential energy of element 1:
1 x2 x2
1 (w) Adx bw dx
2 x1 x1
Lets plug in the approximation
w(x) [ N ]d ε(x) [ B]d [ D][ B]d
A
1 (d) d
2
T
x1
x2
T T
[ B] [D] [B]dx d d
T
x1
x2
[ N ]T b dx
Lets see what the matrix
x2
x1
[B]T [D]T [B]Adx
is for a 1D linear element
Recall that
1
[B] 1 1
x 2 x1
Hence
1 1 1
[B] [D] [B]A
T T
EA 1 1
x 2 x1 1 x 2 x1
EA 1 EA 1 1
1 1
x 2 x1 x 2 x1 1
2 2
1 1
x2
2 1
1 1 x2
1
x1 [B] [D] [B]Adx x x 2 1 1 x1 EAdx
T T
x1
x2
EAdx 1 1 1
2
x 2 x1 1 1
Now, if we assume E and A are constant
x1
x2
[B] [D] [B]Adx
T T
x1
x2
EAdx 1
2 1
x x
1 1 EA(x 2 x1 ) 1 1
2
1 1
2 1
x x
2
1 1
EA 1 1
x 2 x1 1 1
Remembering that (x2-x1) is the length of the element (L), this is the
stiffness matrix we had derived directly before using the direct
stiffness approach!!
Then why is it necessary to go through this complicated procedure??
1. Easy to handle nonuniform E and A
2. Easy to handle distributed loads
For nonuniform E and A, i.e. E(x) and A(x), the stiffness matrix of
the linear element will NOT be
EA 1 1
x 2 x1 1 1
But it will ALWAYS be
x2
[k ] [B]T [D]T [B]Adx
x1
Now lets go back to
1 T x2 T x2
1 (d) d [B] [D] [B]Adx d d [ N ] b dx
T T T
2
x1
x1
[ k ] fb
1
fb
T T
d [ k ] d d
2
Element stiffness matrix
x2
[k ] [B]T [ D][ B] A dx
x1
Element nodal load vector due to distributed body force
fb x [N]T b dx
x2
1
Apply Rayleigh-Ritz-Galerkin principle for the 1D linear element
Π1 (d)
0
d1x Π1 (d)
0
Π1 (d) d
0
d 2x
Recall from linear algebra (Lecture notes on Linear Algebra)
1 (d)
d [k ]d d fb 1 [k ]d fb
T T
1 (d)
2 d
Hence
Π1 (d)
0 [k ]d fb
d
Exactly the same equation that we had before, except that the
stiffness matrix and nodal force vectors are more general
Recap of the properties of the element stiffness matrix
x2
[k ] [B]T [D]T [B] Adx
x1
1. The stiffness matrix is singular and is therefore non-invertible
2. The stiffness matrix is symmetric
3. Sum of any row (or column) of the stiffness matrix is zero!
Sum of any row (or column) of the stiffness matrix is zero
Consider a rigid body motion of the element
1 ε 0 [B]d
2
d Element strain
1 1
d1x=1 d2x=1 [ k ] d
x1
x2
[B]T [D]T [B] Adx d
[B]T [D]T [B]d Adx
x2
x1
0
0
k11 k12 1 0
kd
k 21 k 22 1 0
k11 k12 0 and k 21 k 22 0
The nodal load vector
fb x1 N b dx
x2 T
b(x) 2
1 x2 N1 ( x )
b x1
x2
f [ N ] b dx x1 N 2 ( x) b dx
d1x d2x x2 N ( x) b dx
f1x x1 1
x2
2x
f N 2 ( x) b dx
x1
x2
f 1x N1 ( x) b dx
x1
x2 “Consistent” nodal loads
f 2x N 2 ( x) b dx
x1
b(x) /unit length 1 f 2
1 2 1x
f2x
Replaced by
d2x d1x d2x
d1x
A distributed load is represented by two nodal loads in a
consistent manner
e.g., if b=1
x2 x2 x 2 x1
f1x N1 ( x) b dx N1 ( x) dx
x1 x1 2
x2 x2 x 2 x1
f 2x N 2 ( x) b dx N 2 ( x) dx
x1 x1 2
Divide the total force into two equal halves and lump them at the
nodes. Furthermore, whenever you have a concentrated load at ANY
node, that load should be applied as an extra right hand side term.
Summary: For each element
Displacement approximation in terms of shape functions
w(x) [N]d
Strain approximation in terms of strain-displacement matrix
ε(x) [B]d
Stress approximation
[D][B]d
Element stiffness matrix
x2
[k ] [B]T [D]T [B] Adx
x1
Element nodal load vector
f fconc.load fb fconc.load [ N ]T b dx
x2
x1
Step 4:Assembly exactly as you had done before, assemble the
global stiffness matrix and global load vector and solve the
resulting set of equations by properly taking into account the
displacement boundary conditions
Problem:
6” E=30x106 psi
r=0.2836 lb/in3
Thickness of plate, t=1”
12”
24”
P=100lb Model the plate as 2 finite elements and
3”
(1)Write the expression for element stiffness
x matrix and body force vectors
(2)Assemble the global stiffness matrix and
load vector
(3)Solve for the unknown displacements
(4)Evaluate the stress in each element
(5)Evaluate the reaction in each support
Solution (1) Node-element connectivity chart
Finite element model Element # Node 1 Node 2
1 1 2
1
El #1 12” 2 2 3
2
El #2 P=100lb 12” Stiffness matrix of El #1
3
x
[k ]
(1)
0
12
T
L
E
[B] [D] [B] Adx 2
T
0
12
1 1
A( x)dx
1 1
12 12 12
A( x)dx t (6 0.125x)dx t (6 0.125x)dx 63 in3 6 - 0.125x
0 0 0
6”
E 1 1 61 1 x
2
[k ] (1)
63 13.125 10 12”
(12) 1 1 1 1
4.5”
x
Stiffness matrix of El #2
12
24
L
E
[k ] [B] [D] [B] Adx 2
(2) T T
12
24
1 1
A( x)dx
1 1
24 24 24
12
A( x)dx t (6 0.125x)dx t (6 0.125x)dx 45 in3
12 12
E 1 1 61 1
2
[k ] (2)
45 9.375 10
(12) 1 1 1 1
Now compute the element load vector due to distributed body
force (weight)
fb x
x2
[N]T b dx
1
For element #1
fb [N] b dx [N]T r A dx
(1) 12 12
T
0 0
12
r [N]T A dx
0
12 N1(1) ( x) 1
r (1) t (6 0.125 x) dx
0
N 2 ( x) N1(1) ( x)
A( x )
12”
33
0.2836 lb N 2(1) ( x)
30 2
El #1
9.3588 N1(1) ( x) 1
x x
lb 12
8.508 x
N 2(1) ( x)
12
Superscript in parenthesis indicates
element number
For element #2
fb [N] b dx [N]T r A dx
(2) 24 24
T
12 12
24
1
r [N]T A dx ( 2)
El #1 12”
12
N 2 ( x) 2
24 N 2(2) ( x)
r (2) t (6 0.125 x) dx El #2 12”
N3 ( x)
12
A( x )
N 3( 2) ( x) 3
24
0.2836 lb x
21
x
6.8064 N 2(2) ( x) 1
lb 12
5.9556 N 3(2) ( x)
x
12
Solution (2) Assemble the system equations
13.125 13.125 0
K 106 13.125 22.5 9.375
0 9.375 9.375
f fb fconcentrated load
9.3588
b
f 8.508 6.8064 lb
5.9556
0
f concentrated load 100 lb
0
9.3588
f 115.3144 lb
5.9556
Solution (3)
Hence we need to solve
13.125 13.125 0 d1x 9.3588 R1
106 13.125 22.5 9.375 d 2x 115.3144
0 9.375 9.375 d3x 5.9556
R1 is the reaction at node 1.
Notice that since the boundary condition at x=0 (d1x=0) has not been
taken into account, the system matrix is not invertible.
Incorporating the boundary condition d1x=0 we need to solve the
following set of equations
22.5 9.375 d 2x 115.3144
10
6
9.375 9.375 3x
d 5.9556
Solve to obtain
d 2 x 0.92396 105
5
in
d3 x 0.98749 10
Solution (4) Stress in elements
Notice that since we are using linear elements, the stress within
each element is constant.
In element #1
(1) [ D][ B](1) d
(1)
d1x
1 1
E
x2 x1 d 2x
30 106
d 2x d1x 0
12
23.099 psi
In element #2
(2) [ D][ B](2) d
(2)
d 2x
1 1
E
x3 x2 d 3x
30 106
d3x -d 2x
12
1.5882 psi
Solution (5) Reaction at support
Go back to the first line of the global equilibrium equations…
13.125 13.125 0 d1x 9.3588 R1
106 13.125 22.5 9.375 d 2x 115.3144
0 9.375 9.375 d3x 5.9556
R1 130.6288 lb (The –ve sign indicates that the force is in the –ve x-direction)
R1
Check 6” The reaction at the wall from force
equilibrium in the x-direction
12” 24
24” R1 P r A( x) dx
x 0
24
P=100lb 100 r t (6 0.125 x) dx
x 0
3” 130.6288 lb
x
Problem: Can you solve for the displacement and stresses
analytically?
Check out
4.727 109 x 2 9.487 107 x for 0 x 12
ua 9 2 7 6
4.727 10 x 2.0797 10 x 8.89 10 for 12 x 24
Stress
dua 6 dua
( x) a E 30 10
dx dx
Comparison of
-4
displacement solutions
x 10
1.2
Analytical solution
1
0.8
Displacement (in)
0.6
Finite element solution
0.4
0.2
0
0 5 10 15 20
x (in)
Notice:
1. Slope discontinuity at x=12 (why?)
2. The finite element solution does not produce the exact
solution even at the nodes
3. We may improve the solution by
(1) Increasing the number of elements
(2) Using higher order elements (e.g., quadratic instead of
linear)
Comparison of stress solutions
30
25
20
Stress (psi)
15
Finite element solution
Analytical solutions
10
-5
0 5 10 15 20
x (in)
The analytical as well as the finite element stresses are
discontinuous across the elements