COLLEGE OF ENGINEERING
DEPARTMENT OF CIVIL ENGINEERING
CIVE 517 : Finite Element Analysis
Introduction to differential equations
Prof. Khaldoon Bani-Hani
Spring, 2025
Summary:
• Strong form of boundary value problems
•Elastic bar
•String in tension
•Heat conduction
•Flow through a porous medium
•Approximate solution
So far, structural mechanics using Direct Stiffness approach
Finite element method is used to solve physical problems
Solid Mechanics
Fluid Mechanics
Heat Transfer
Electrostatics
Electromagnetism
….
Physical problems are governed by differential equations which satisfy
Boundary conditions
Initial conditions
One variable: Ordinary differential equation (ODE)
Multiple independent variables: Partial differential equation (PDE)
A systematic technique of solving the differential equations
Differential equations (strong) formulation (today)
Variational (weak) formulation
Approximate the weak form using finite elements
Axially loaded elastic bar
y A(x) = cross section at x
b(x) = body force distribution
(force per unit length)
x E(x) = Young’s modulus
x u(x) = displacement of the bar
x=0 x=L at x
Differential equation governing the response of the bar
d du
AE b 0; 0 xL
dx dx
Second order differential equations
Requires 2 boundary conditions for solution
y
x
x
x=0 x=L
Boundary conditions (examples)
u 0 at x 0 Dirichlet/ displacement bc
u 1 at x L
u 0 at x 0
du
EA F at x L Neumann/ force bc
dx
Differential equation + Boundary conditions = Strong form
of the “boundary value problem”
Flexible string
S = tensile force in string
p(x) = lateral force distribution
y (force per unit length)
w(x) = lateral deflection of the
x=0 x=L string in the y-direction
x x
S S
p(x)
Differential equation governing the response of the bar
d 2u
S 2 p 0; 0 xL
dx
Second order differential equations
Requires 2 boundary conditions for solution
Heat conduction in a fin
y A(x) = cross section at x
Q(x) = heat input per unit length
per unit time [J/sm]
x k(x) = thermal conductivity [J/oC
x ms]
x=0 x=L T(x) = temperature of the fin at x
Q(x)
Differential equation governing the response of the fin
d dT
Ak Q 0; 0 xL
dx dx
Second order differential equations
Requires 2 boundary conditions for solution
y
x
x
x=0 x=L
Q(x)
Boundary conditions (examples)
T 0 at x 0 Dirichlet/ displacement bc
dT
k h at x L Neumann/ force bc
dx
Fluid flow through a porous medium (e.g., flow of water through a
dam)
y A(x) = cross section at x
Q(x) = fluid input per unit volume
per unit time
x k(x) = permeability constant
x j(x) = fluid head
x=0 x=L
Q(x)
Differential equation
d dj
k Q 0; 0 xL
dx dx
Second order differential equations
Requires 2 boundary conditions for solution
Boundary conditions (examples)
j 0 at x 0 Known head
dj
k h at x L Known velocity
dx
Observe:
1. All the cases we considered lead to very similar differential
equations and boundary conditions.
2. In 1D it is easy to analytically solve these equations
3. Not so in 2 and 3D especially when the geometry of the domain is
complex: need to solve approximately
4. We’ll learn how to solve these equations in 1D. The approximation
techniques easily translate to 2 and 3D, no matter how complex the
geometry
A generic problem in 1D
d 2u
2
x 0; 0 x 1
dx
u 0 at x 0
u 1 at x 1
Analytical solution
1 7
u ( x) x 3 x
6 6
Assume that we do not know this solution.
A generic problem in 1D
A general algorithm for approximate solution:
Guess u( x) a0j o ( x) a1j1 ( x) a2j 2 ( x) ...
where jo(x), j1(x),… are “known” functions and ao, a1, etc are
constants chosen such that the approximate solution
Satisfies the differential equation
Satisfies the boundary conditions
i.e.,
d 2j o ( x) d 2j1 ( x) d 2j 2 ( x)
a0 2
a1 2
a2 2
... x 0; 0 x 1
dx dx dx
a0j o (0) a1j1 (0) a2j 2 (0) ... 0
a0j o (1) a1j1 (1) a2j 2 (1) ... 1
Solve for unknowns ao, a1, etc and plug them back into
This is your
u ( x) a0j o ( x) a1j1 ( x) a2j 2 ( x) ...
approximate solution to
the strong form
COLLEGE OF ENGINEERING
DEPARTMENT OF CIVIL ENGINEERING
CIVE 517 : Finite Element Analysis
Principles of minimum potential
energy and Rayleigh-Ritz
Prof. Khaldoon Bani-Hani
Spring, 2023
Summary:
• Potential energy of a system
•Elastic bar
•String in tension
•Principle of Minimum Potential Energy
•Rayleigh-Ritz Principle
A generic problem in 1D
d 2u
2
x 0; 0 x 1
dx
u 0 at x 0
u 1 at x 1
Approximate solution strategy:
Guess u( x) a0j o ( x) a1j1 ( x) a2j 2 ( x) ...
Where jo(x), j1(x),… are “known” functions and ao, a1, etc are
constants chosen such that the approximate solution
1. Satisfies the boundary conditions
2. Satisfies the differential equation
Too difficult to satisfy for general problems!!
Potential energy
For linear elastic materials , the
strain energy per unit volume in
1 T ”
the body is “
2
For elastic body total strain
1 T
energy (U) is U 2 dv
The work potential is given by
.
WP u fdV u Tds u P
.
T T T
V S i i
i
The total potential energy for the general
elastic body is
Strain energy (U) potential energy of loading W
. .
1
dv V u fdV S u Tds
2
T T T
u T
P
i i
i
Strain energy of a linear spring
F x
k k
1 F
u k
u
F = Force in the spring
u = deflection of the spring
k = “stiffness” of the spring
Hooke’s Law
F = ku
Strain energy of a linear spring
dU Differential strain energy of the spring
F for a small change in displacement
(du) of the spring
dU Fdu
u u+du For a linear spring
dU kudu
The total strain energy of the spring
u 1
U k u du k u 2
0 2
Strain energy of a nonlinear spring
dU dU Fdu
F The total strain energy of the spring
u u+du
u
U F du Area under the force dispalceme nt curve
0
Potential energy of the loading (for a single spring as in the figure)
W Fu
x
k
F
k
u
Potential energy of a linear spring
Strain energy (U) potential energy of loading W
1 2
Π ku Fu
2
Example of how to obtain the equilibria
Principal of minimum potential
energy
For conservative systems, of all the
kinematically admissible displacement fields,
those corresponding to equilibrium
extremize the total potential energy . If the
extremum condition is a minimum , the
equilibrium state is stable
Principle of minimum potential energy for a system of springs
k1 k2
F
x
d1x d 2x d 3x
For this system of spring, first write down the total potential
energy of the system as:
1 1
system k1 (d 2 x ) k 2 (d 3 x d 2 x ) 2 Fd3x
2
2 2
Obtain the equilibrium equations by minimizing the potential energy
system
k1d 2 x k 2 (d 3 x d 2 x ) 0 Equation (1)
d 2 x
system
k 2 (d 3 x d 2 x ) F 0 Equation (2)
d 3 x
Principle of minimum potential energy for a system of springs
In matrix form, equations 1 and 2 look like
k1 k 2 k 2 d 2 x 0
k
2 k 2 d 3 x F
Does this equation look familiar?
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 u(x) = displacement of the bar
x=0 x=L at x
du
Axial strain ε
dx
du
Axial stress Eε E
dx 2
1 1 du
Strain energy per unit volume of the bar dU σε E
2 2 dx
Strain energy of the bar
1 L 1
U dU σε dV σε Adx since dV=Adx
2 x 0 2
Axially loaded elastic bar
Strain energy of the bar
2
L 1 1 L du
U σεA dx EA dx
0 2 2 0 dx
Potential energy of the loading
L
W bu dx Fu(x L)
0
Potential energy of the axially loaded bar
2
1 L du L
EA dx bu dx Fu(x L)
2 0 dx 0
Principle of Minimum Potential Energy
Among all admissible displacements that a body can have, the one
that minimizes the total potential energy of the body satisfies the
strong formulation
Admissible displacements: these are any reasonable displacement
that you can think of that satisfy the displacement boundary
conditions of the original problem (and of course certain
minimum continuity requirements). Example:
Any other “admissible”
displacement field w(x)
Exact solution for the
displacement field uexact(x)
x
0 L
Lets see what this means for an 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 uexact(x)
2
1 L du exact L
(u exact ) EA dx bu exact dx Fuexact (x L)
2 0 dx 0
Potential energy of the axially loaded bar corresponding to the
“admissible” displacement w(x)
2
1 dw
L L
(w) EA dx bw dx Fw(x L)
2 0 dx 0
Any other “admissible”
displacement field w(x)
Exact solution for the
displacement field uexact(x)
x
0 L
Example:
d 2u
AE 2 b 0; 0 xL
dx
u 0 at x 0
du
EA F at x L
dx
Assume EA=1; b=1; L=1; F=1
Analytical solution is
x2
uexact 2x
2
Potential energy corresponding to this analytical solution
2
1 du exact
1 1 7
(u exact ) dx u exact dx u exact (x 1)
2 0 dx 0 6
Now assume an admissible displacement
w x
Why is this an “admissible” displacement? This displacement is
quite arbitrary. But, it satisfies the given displacement boundary
condition w(x=0)=0. Also, its first derivate does not blow up.
Potential energy corresponding to this admissible displacement
2
1 dw
1 1
(w) dx 0 w dx w(x 1) 1
2 dx
0
Notice
7
since 1
6
(u exact ) (w)
Principle of Minimum Potential Energy
Among all admissible displacements that a body can have, the one
that minimizes the total potential energy of the body satisfies the
strong formulation
Mathematical statement: If ‘uexact’ is the exact solution (which
satisfies the differential equation together with the boundary
conditions), and ‘w’ is an admissible displacement (that is quite
arbitrary except for the fact that it satisfies the displacement
boundary conditions and its first derivative does not blow up),
then
(u exact ) (w)
unless w=uexact (i.e. the exact solution minimizes the potential
energy)
The Principle of Minimum Potential Energy and the strong
formulation are exactly equivalent statements of the same
problem.
The exact solution (uexact) that satisfies the strong form, renders
the potential energy of the system a minimum.
So, why use the Principle of Minimum Potential Energy?
The short answer is that it is much less demanding than the strong
formulation. The long answer is, it
1. requires only the first derivative to be finite
2. incorporates the force boundary condition automatically. The
admissible displacement (which is the function that you need to
choose) needs to satisfy only the displacement boundary condition
Finite element formulation, takes as its starting point, not the
strong formulation, but the Principle of Minimum Potential
Energy.
Task is to find the function ‘w’ that minimizes the potential energy
of the system
2
1 dw
L L
(w) EA dx 0 bw dx Fw(x L)
2 0
dx
From the Principle of Minimum Potential Energy, that function ‘w’
is the exact solution.
Rayleigh-Ritz Principle
The minimization of the potential energy is difficult to perform
exactly.
The Rayleigh-Ritz principle is an approximate way of doing this.
Step 1. Assume a solution
w( x) a0j o ( x) a1j1 ( x) a 2j 2 ( x) ...
Where jo(x), j1(x),… are “admissible” functions and ao,
a1, etc are constants to be determined from the solution.
Rayleigh-Ritz Principle
Step 2. Plug the approximate solution into the potential energy
2
1 dw
L L
(w) EA dx 0 bw dx Fw(x L)
2 0
dx
dj 0 dj1
2
L1
(a 0 , a 1 ,...) EA a0 a1 ... dx
2 0
dx dx
b a0j 0 a1j1 ... dx
L
F a0j 0 ( x L) a1j1 ( x L) ...
Rayleigh-Ritz Principle
Step 3. Obtain the coefficients ao, a1, etc by setting
(w)
0, i 0,1,2,...
ai
The approximate solution is
u ( x) a0j o ( x) a1j1 ( x) a 2j 2 ( x) ...
Where the coefficients have been obtained from step 3
Example of application of Rayleigh Ritz Principle
E=A=1
F x F=2
x=1
x=0 x=2
The potential energy of this bar (of length 2) is
2
1 du
2
(u) dx Fu(x 1)
2
0 dx
PotentialEnergy
StrainEnergy of load F applied
at x 1
Let us assume a polynomial “admissible” displacement field
u a0 a1 x a2 x 2
Note that this is NOT the analytical solution for this problem.
Example of application of Rayleigh Ritz Principle
For this “admissible” displacement to satisfy the displacement
boundary conditions the following conditions must be satisfied:
u(x 0) a0 0
u(x 2) a0 2a1 4a2 0
Hence, we obtain
a0 0
a1 2a2
Hence, the “admissible” displacement simplifies to
u a0 a1 x a2 x 2
a2 2 x x 2
Now we apply Rayleigh Ritz principle, which says that if I plug
this approximation into the expression for the potential energy , I
can obtain the unknown (in this case a 2) by minimizing
2
1 du 2
(u) dx Fu(x 1)
2 0 dx
2
1 d
2
2 0 dx
a2 2 x x 2 dx F a2 2 x x 2
evaluated
at x 1
4 2
a2 2a2
3
0
a2
8
a2 2 0
3
3
a2
4
Hence the approximate solution to this problem, using the
Rayleigh-Ritz principle is
u a0 a1 x a2 x 2
a2 2 x x 2
3
2x x2
4
Notice that the exact answer to this problem (can you prove this?) is
x for 0 x 1
u exact
2 x for 1 x 2
The displacement solution :
Exact solution
1
0.8 Approximate
solution
0.6
0.4
0.2
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
x
How can you improve the approximation?
The stress within the bar:
1.5
Exact Stress
0.5
Approximate
stress
Stress
-0.5
-1
-1.5
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
x