You are on page 1of 44

Hydroinformatics

y
Module 4:Numerical Methods I
Lecture 5 and 6: PDE, Hyperbolic
PDE, Stability, Accuracy, Parabolic
PDE, Eliptic PDE

I.Popescu

1/25/2012 Numerical Methods 1

5.4. Hyperbolic PDE-MoC schemes


u u dx
a 0
t x u ( x, t ) const along a( x, t )
dt
MoC theory

t x
u nj1 u( A) u An
u=ct u nA interpolated
n 1 between
t u nj 1 and u nj
n A

0 x
j 1 j j 1
0
1/25/2012 Numerical Methods 2

1
5.4. Hyperbolic PDE-MoC schemes
u u u An liniar interpolation between u nj1 and u nj
a 0
t x
t x
n+11

t
at
Cr
n A x

at j
xj-1 j-1 x
xA
xj
x A x j a t
x A x j 1 x j xA
u U An U nj U nj1
x j x j 1 x j x j 1
x
U nj1 U An 1 Cr U nj CrU nj1

1/25/2012 Numerical Methods 3

5.4.Hyperbolic PDE-MoC schemes


Special remarks
The MoC numerical method is stable for Cr<1
For Cr>1 extrapolation takes place
t x
n+1
Cr<1
Cr>1 t

n
j-1 at j x

Important: The formula U nj1 U An 1 Cr U nj CrU nj1 is


valid for positive values of a.
1/25/2012 Numerical Methods 4

2
Accuracy/consistency
The discretised equations are not the
real ones
The
Th scheme
h does
d not solve
l the
h reall
equations !
u
real
x

u
approximate x
1/25/2012 Numerical Methods 5

Important Properties of Numerical Schemes


Consistency
Convergence Convergence
Stability

numerical scheme solution is convergent if it comes closer and


closer to the analytical solution of the real ODE/PDE when the
ti
time step
t decreases;
d
LaxTheorem: 2 conditions needed for convergence
Consistency
A scheme is consistent if it gives a correct approximation
of the ODE/PDE as the time/space step is decreased
verified using Taylor Series expansion

Stability
A scheme is stable if any initially finite perturbation
remains bounded as time grows
Verification: Matrix method, Fourier method, Domain of
dependence

1/25/2012 I.Popescu: Numerical Methods 6

3
Accuracy/consistency Consistency
Convergence

To reduce the truncation error : Stability

Decrease both t and x


(i.e.
(i e the Courant number must lie in a
reasonable range) at
Cr
x
If the truncation error is small:
the discretised equation
q is consistent
with the real one.

1/25/2012 Numerical Methods 7

Accuracy and suitability Convergence Consistency


Stability
Consistency of schemes for PDEs
U
a
U
0 U nj 1 CrU nj 1 1 Cr U nj
t x
u
Initial profile of u Exact solution, (Cr=1)
Cr=0.5, dx=100m
Cr=0.5, dx=50m
Numerical diffusion

x
Numerical diffusion
causes amplitude error
1/25/2012 Numerical Methods 8

4
Accuracy/consistency Convergence Consistency
Stability
Numerical diffusion : profile smearing
1.2 Initial
Analytical
1 Numerical

0.8
u

0.6

0.4

0.2

0
0 2 4 6 8 10 12 14 16 18 20

1/25/2012 Numerical Methods 9

Accuracy and suitability Consistency


Convergence
Stability
Consistency of explicit schemes
U
a
U
0 U nj 1 CrU nj 1 1 Cr U nj
t x
Taylor series expansions gives
U x 2 2U
U n
j 1 U x n

x
j
2 x 2
O x 3
U t 2 2U
U n 1
j U tn
j
t

2 t 2
O t 3
Into the equation this gives:
U t 2 2U n U x 2 2U t t
U nj t
t

2 t
O t 3

U x
x

2 x
O x 3 a
1 a U nj
x x
2 j 2

1/25/2012 Numerical Methods 10

5
Accuracy and suitability Convergence Consistency
Stability
Consistency of explicit schemes
After dividing with dt we obtain:
U x 2U
U t 2U
t

2 t 2
O
t 2



2
O x 2 a
x 2 x
or:
U U t 2U x 2U
t
a
x 2 t 2
a O x O t
2 x 2
2

2

2U 2 U
2
Since a
t 2 x 2
U U ax 2U
t
a 1 Cr
x 2 x2

O x 2 O t 2
TE2 TE3
TE 1
1/25/2012 Numerical Methods TE 11

Accuracy and suitability Convergence Consistency


Stability
Consistency of explicit schemes
U U ax 2U
t
a 1 Cr
x 2 x2

O x 2 O t 2

TE2 TE3
TE 1
TE

-TE1 cancels for Cr=1 ;


- first order accurate in x;
- consistent up to the second order;

1/25/2012 Numerical Methods 12

6
Accuracy/consistency
Consistency
Convergence
Stability
What you want to solve :
u u
a 0
t x

What the scheme sees :


Numerical
diffusion
u u 2u 3u
a k1x 2 k 2 x 2 3 ...
t x x x
Numerical
Truncation error dispersion

1/25/2012 Numerical Methods 13

Accuracy and suitability Consistency


Convergence
Stability
Stability of schemes for PDEs
U
a
U
0 U nj 1 CrU nj 1 1 Cr U nj
t x
u
Initial profile of u Exact solution, (Cr=1)
Cr=0.5, dx=100m
Cr=0.5, dx=50m
Numerical diffusion

x
Numerical diffusion
causes amplitude error
1/25/2012 Numerical Methods 14

7
Accuracy and suitability
Consistency
Stability of schemes for PDEs Convergence
Stability
Because of numerical diffusion we try to use a better scheme,
like for instance Preismann scheme with psi=0.5;
a dispersion
p equation
q

U U U U 3U
a 0 a k 3
t x t x x
Analytical profile,
Initial Advected
u profile downstream Dispersion equation

Numerical dispersion
Due to derivatives estimation
x Sharper profiles and oscilations
Computational
result Create phase errors
Numerical dispersion
1/25/2012 Numerical Methods 15

Accuracy/consistency Convergence Consistency


Stability
Numerical diffusion : profile smearing
1.2 Initial
Analytical
1 Numerical

0.8
u

0.6

0.4

0.2

0
0 2 4 6 8 10 12 14 16 18 20

1/25/2012 Numerical Methods 16

8
Accuracy/consistency Convergence Consistency
Stability
Numerical dispersion : oscillations
1.2 Initial
1
Analytical
Numerical
0.8

0.6
u

0.4

0.2

0
0 2 4 6 8 10 12 14 16 18 20
-0.2

-0.4

1/25/2012 Numerical Methods 17

Accuracy and suitability Consistency


Convergence
Stability
Stability of explicit schemes
Von Neumann stability method (Using Fourier
analysis)
Same principle: amplitude factor is less than 1

1/25/2012 Numerical Methods 18

9
Stability
Stability of explicit schemes
Von Neumann stability method (Using Fourier analysis)
Same principle: amplitude factor is less than 1

U nj U 00 e nt ijx
U nj U 00 expnr t cosni t i sinni t cos jx i sin jx

U nj1 U nj1
1 Cr Cr
i
AN n n -1 1
U j U j
-x R
U nj1 U 0 expnt i j 1x
0 0 exp ix
U 0 expnt ijx
Cr
U nj

AN 1 Cr cosx i sin x Cr
Unit
circle
-i

1/25/2012 Numerical Methods 19

Amplitude and phase portraits


Wave amplitude
Amplification factor =1
Propagation of Fourier waves phase speed
Any difference between the numerical phase speed
and true phase speed is the phase error
The graph that shows how the Fourier
components are amplified is called an
amplitude portrait.
The graph that shows at what speed the
Fourier components travel is called a phase
portrait.

1/25/2012 Numerical Methods 20

10
Amplitude and phase portraits

2 M- The wave number - represents the


x number of grid intervals needed to cover
M one period of the wave
1.05

0.95

A 0.9

0.85

0.8

0.75 1.2
1 10 100 1
M
0.8
2 2
AN 1 Cr cos i sin Cr

c/u
0.6

M M 0.4

0.2

Arg AN
0

Arg AN
a M
cN
1 10 100

2
M
Cr
1/25/2012 Numerical Methods 21

Phase and amplitude errors

1/25/2012 Numerical Methods 22

11
(B)Parabolic PDEs

1/25/2012 Numerical Methods 23

Parabolic Equations Initial Value Problems


A 1D time-dependent parabolic eqn (b=c=0)
t
u 2u 0 x L T
a 2 Computational
t x 0t T domain
0 L x
With I.C u ( x , 0) f ( x )
With B.C u (0, t ) g (t )
u ( L, t ) h(t )
u t=0 u x=0 u x=L

f(x) g(t) h(t)

0 L x 0 T t 0 T t

1/25/2012 Numerical Methods 24

12
Example : Heat Conduction
Equation governing transfer of heat is:
T(x,t) temperature
T 2T
c p k 2 density

t x cp specific heat capacity


k thermal conductivity
k
a is also known as the thermal diffusivity
c p L
n 1 x
t ui N
n 1
uin1 uin uin1
n T
n 1 t
u M
n 1 i

i 1 i i 1 x
1/25/2012 Numerical Methods 25

Parabolic PDE: Solution Methods Explicit Methods

t uin1 u 2u
n 1 a 2
uin1 uin uin1 t x
n
uin1
n 1
i 1 i i 1 x
u u 2u u
2 n n n
CS: i 1 i i 1
x 2 x 2
uin 1 uin uin1 2uin uin1
n 1
u ui uin a
FT: t x 2
t t
a t

uin 1 uin r uin1 2uin uin1 r
x 2
1/25/2012 Numerical Methods 26

13
Parabolic PDE:Solution Methods Explicit Methods2

t uin1 u 2u
n 1 a 2
uin1 uin uin1 t x


n
uin1 uin 1 uin r uin1 2uin uin1
n 1
i 1 i i 1 x
I.C.: u f (ix )
0
i
B.C.:
u g ( n t )
0
n

u Nn h(nt )
We can calculate the unknown values of uin 1 from the known
n 0
values of ui starting from the initial condition ui

1/25/2012 Numerical Methods 27

Parabolic PDE: Stability of the Explicit Method

The explicit method is unstable if the time


step is too large.
Stability condition for fixed boundary
conditions is 2
x
0r 1
2
t
2a
Stability condition for derivative boundary
conditions is

0r
1 u
for k (u u f )
2
k x n

1/25/2012 Numerical Methods 28

14
Parabolic Equation An example calculation
Solve
u 2u for
0 x 1
a 2
t x 0 t
(Where u represents temperature)

with initial condition


u
1
2 x for 0 x 0.5
u ( x,0)
2(1 x) for 0.5 x 1.0
0 05
0.5 1
and boundary conditions x

u (0, t ) 0
u (1, t ) 0

1/25/2012 Numerical Methods 29

Parabolic Equation An example calculation2


Solve
u 2u 0 x 1
a 2 for
t x 0 t
(Where u represents temperature)

with initial condition u


1
2 x for 0 x 0.5
u ( x,0)
2(1 x) for 0.5 x 1.0
0 05
0.5 1 x
and boundary conditions Analytical (exact) solution
u (0, t ) 0
n 2 exp n 2 2t

8
u (1, t ) 0 u ( x, t ) 2
n 1 x sin 1 2 n sin nx
1/25/2012 Numerical Methods 30

15
Parabolic Example : Case 1 (r<0.5)
Values for a, space and time discretisation are:
a 1 x 0.1 at
r 2 0 .1
t 0.001 x
uinn1 uin r (uin1 2uin uin1 )

n=0 u00 0, u10 0.2, u20 0.4 , ... , u 40 0.8 , u50 1.0, u60 0.8, ....
t=0
u11 0.2 0.1(0.4 0.4 0.0) 0.2
n=1 ...
t=0.001
u51 1.0 0.1(0.8 2.0 0.8) 0.96
u12 0.2 0.1(0.4 0.4 0.0) 0.2
n=2 ...
t=0.002
u52 0.96 0.1(0.8 1.92 0.8) 0.928
1/25/2012 Numerical Methods 31

Parabolic Example : Case 1 (r<0.5)


First 10 time steps
i = 0 1 2 3 4 5
x = 0 0.1000 0.2000 0.3000 0.4000 0.5000
------------------------------------------------------------
mmetrical about x=0.5

-
n=0 0 0.2000 0.4000 0.6000 0.8000 1.0000
n=1 0 0.2000 0.4000 0.6000 0.8000 0.9600
n=2 0 0.2000 0.4000 0.6000 0.7960 0.9280
n=3 0 0.2000 0.4000 0.5996 0.7896 0.9016
n=4 0 0.2000 0.4000 0.5986 0.7818 0.8792
n=5 0 0.2000 0.3998 0.5971 0.7732 0.8597
sym

n=6 0 0.2000 0.3996 0.5950 0.7643 0.8424


n=7 0 0.1999 0.3992 0.5924 0.7551 0.8268
n=8 0 0.1999 0.3986 0.5893 0.7460 0.8125
n=9 0 0.1998 0.3978 0.5859 0.7370 0.7992
n=10 0 0.1996 0.3968 0.5822 0.7281 0.7867

1/25/2012 Numerical Methods 32

16
Parabolic Example : Case 1 (r<0.5)
Plot of the temperature distribution every 10
discretisation points in space for 100 time steps
Evolution of temperature distribution
1

0.9
t=0
0.8

0.7

STABLE 0.6
temperature

solution 0.5

0.4

0.3

0.2

0.1
t=0.1
& analytic solution
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
x

1/25/2012 Numerical Methods 33

Parabolic Example : Case 2 (r=0.5)


Plot of the temperature distribution every 10
space step for 20 time steps

Evolution of temperature distribution


1

x 0.1 0.9 t=0


t 0.005 0.8

at
0.7

r 0.5
x 2
0.6
temperature

0.5

0.4

0.3
STABLE
solution but 0.2
t=0.1
not very 0.1 & analytic solution
accurate 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
x

1/25/2012 Numerical Methods 34

17
Parabolic Example : Case 3 (r>0.5)
Plot of the temperature distribution at 0 and 18
time steps
Evolution of temperature distribution
1

x 0.1 0.9
t=0
t 0.0055 0.8

0.7
at t=0.1
r 2 0.55 0.6
x
temperature

0.5
analytic
0.4 solution
0.3
UNSTABLE
0.2
solution is
meaningless 0.1

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
x

1/25/2012 Numerical Methods 35

Parabolic Example :
Evolution of maximum temperature (r=0.1)

Evolution of maximum temperature


1
exact solution
r=0.1 solution

0.9

0.8
maximum temperature

0.7
STABLE
solution
0.6

0.5

0.4

0.3
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1
time

1/25/2012 Numerical Methods 36

18
Parabolic Example :
Evolution of maximum temperature (r=0.5)
Evolution of maximum temperature
1
exact solution
r=0.5 solution

0.9

0.8
maximum temperature

0.7

0.6
STABLE
solution but
not v.
0.5
accurate
0.4

0.3
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1
time

1/25/2012 Numerical Methods 37

Parabolic Example :
Evolution of maximum temperature (r=0.55)
Evolution of maximum temperature
1
exact solution
r=0.55 solution

0.9

0.8

UNSTABLE
maximum temperature

0.7

solution is
0.6 meaningless

0.5

0.4

0.3
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1
time

1/25/2012 Numerical Methods 38

19
Parabolic Example : Explicit Method Error
Comparison of temperature values at x=0.5 and t=0.1 (for N=11)

r M u % error
analytic - 0.3021 -
0.001 10000 0.3071 1.65
0.01 1000 0.3070 1.60
0.1 100 0.3056 1.16 need to
increase N
0.5 20 0.3071 1.64 to reduce
0.55 18 0.6336 109 error
further
unstable 0.6 16 7.2340 2294

1/25/2012 Numerical Methods 39

(C)Eliptic PDEs

1/25/2012 Numerical Methods 40

20
Elliptic Equations No time variable

2u 2u 0 x Lx
u ( x, y ) f (u , x, y )
y 2 x 2 0 y Ly
With the particular cases:
2u 2u
- Poisson equation 0 2 2 f (u , x, y )
y x
2u 2u
- Laplace equation 0 and f 0 2 2 0
y x
With different typs of B.C.:
Dirichlet : u is specified at the boundary
Neumann : derivative
d off u is specified
f d at the
h boundary
b d
Mixed(robin): both u and its derivative is specified at
the boundary

1/25/2012 Numerical Methods 41

Example : Laplace equation


Equation is:
2u 2u
0
y 2 x 2 Lx
x
y ui , j 1 M
j 1
ui 1, j ui , j ui 1, j
j Ly
y
ui , j 1
j 1 N

i 1 i i 1 x
Approximate solution determined at all grid points
simultaneously by solving single system of algebraic
equations

1/25/2012 Numerical Methods 42

21
Elliptic PDE:Solution Methods Explicit Methods
y ui , j 1
j 1 2u 2u
0
ui 1, j ui , j ui 1, j y 2 x 2
j
ui , j 1
j 1

i 1 i i 1 x
2u ui 1, j 2ui , j ui 1, j

x 2 x 2 ui 1, j 2ui , j ui 1, j ui , j 1 2ui , j ui , j 1
0
2u ui , j 1 2ui , j ui , j 1 x 2
y 2

y 2 y 2
ui 1, j ui 1, j ui , j 1 ui , j 1 4ui , j 0
Holds for all interior points of the domain
1/25/2012 Numerical Methods 43

Finite difference methods

What you should remember

1/25/2012 Numerical Methods 44

22
What you should remember
Numerical solutions to PDEs can be
obtained by discretising both space and
time.
Explicit numerical schemes for PDEs are
subject to stability constraints.
Implicit numerical schemes for PDEs are
always stable.
Iterations are also needed for the implicit
solution of non-linear PDEs.
The notions of consistency, stability and
convergence also hold for numerical
schemes for PDEs.
Numerical Methods
1/25/2012 45

What you should remember


First-order accurate schemes produce
numerical diffusion; numerical profiles
obtained are smoothed and may lead to
peak underestimation. Numerical
diffusion leads to amplitude error.
Second-order accurate schemes produce
numerical dispersion; numerical profiles
exhibit artificial oscillations. Undesirable
behaviours (such as negative
concentrations) may appear. Numerical
dispersion causes phase error.

1/25/2012 Numerical Methods 46

23
What you should remember
Decreasing t or x alone is not sufficient to
reduce the truncation error : t and x should
be reduced together.
Th
The MOC is i a specific
ifi kind
ki d off numerical
i l method
h d
used for advection modelling. Its main
drawback is that it is generally not conservative
(some water, pollutant, or energy, may be lost
artificially).
At least three points in space are needed to
solve a diffusion equation.
The design of 2-D and 3-D computational grid
should be carried out with care, long and
narrow grids should be avoided.

1/25/2012 Numerical Methods 47

6 Finite volume methods


(FVM)

1/25/2012 Numerical Methods 48

24
FVM principle (1)
FVMs are applicable to conservative equations, i.e. equations of the
form
U F
0 (1D problems)
t x
U F G
0 (2D problems) (5.1)
t x y
U F G H
0 (3D problems)
t x y z
F, G, H : Fluxes in x, y and z
U : Conserved variable
U U U nU nU nU
F F U , , , , , n , n
x y z x y z n
U U U nU nU nU
G G U , , , ,, n , n
x y z x y z n
U U U nU nU nU
H H U , , , ,, n , n
x y z x y z n
1/25/2012 Numerical Methods 49

FVM principle (2)


Eqs. (5.1) express the conservation of U over any bounded volume of
space
U
t

FxGy H z 0 (5.2)

: Divergence operator

By definition of the divergence, Eq. (5.2) can be rewritten as

F x G y H z .n d 0

t

U d xd yd z

1/25/2012 Numerical Methods 50

25
FVM principle (3)
Application:

1) Discretise space into volumes


2) Compute the fluxes at the edges between the volumes
3) Determine
D t i th
the changes
h iin U via
i ab
balance
l equation
ti
t
U n 1 U n Flux in Flux out (5.3)
V

1/25/2012 Numerical Methods 51

FVM application (1)


The conservation law together with piecewise constant data
having a single discontinuity is known as the Riemann problem.

q if x 0
qx l
qr if x 0
h-discontinuity
hus hus
Qus Qus

hds hds
Qds Qds

1/25/2012 Numerical Methods 52

26
FVM application (2)
h-discontinuity
hus hus
Qus Qus

hds hds
Qds Qds

Three possible patterns:


zones of constant state (depth and velocity are
homogeneous over such zones),
a shock wave (information coming from upstream catches
andd information
i f i downstream),
d )
a rarefaction wave (information downstream travels faster
than the information upstream).

1/25/2012 Numerical Methods 53

FVM applications (3)


Transport equations
t
C
uC D
C
0 C nj 1 C nj
x j

F j 1/ 2 F j 1/ 2
t x x

F
C

Fj-1/2 Fj+1/2

xj

n C nj C nj1
uC j 1 2 D if u 0
x j 1 x j
F j 1/ 2
n C nj C nj1
uC 2 D if u 0
x j 1 x j
j

1/25/2012 Numerical Methods 54

27
FVM applications (4)
Applications in 1D
Discontinuous flows
U U
0 (scalar PDE)
t x
U F
0 (system of PDEs)
t x
When F [F] is a non-linear function of U [U], the solution
may become discontinuous

Ex. Burgers equation


u u 2
0 (conservation form)
t x 2
u u
u 0 (characteristic form)
t x
Du dx
0 along u (u is a Riemann invariant)
Dt dt

1/25/2012 Numerical Methods 55

FVM applications (5)


Applications in 1D
Burgers Eq. (continued): formation of shocks from initially
smooth profiles

U
A A

Shock (u travels faster


behind than ahead)
B B

x
t
dx/dt = u t1 A B
u = Cst

t0
A B x

1/25/2012 Numerical Methods 56

28
FVM applications (6)
Applications in 1D (4)
In finite volume methods: the flux is calculated from the
solution of a Riemann problem

U
U = Cst here
Initial
Final

x
t

The characteristics are straight


lines in the phase space

1/25/2012 Numerical Methods


x 57

FVM applications (7)


Applications in 1D
The solution of the Riemann problem exists even though the
initial profile is discontinuous

Algorithm

1) At each interface j-1/2, define the Riemann problem U j 1 ,U j


n n

2) Solve it => solution Uj-1/2

3) Compute the flux F j 1/ 2 F U j 1/ 2

4) For each cell, carry out balance for U


t
U nj 1 U nj
x j

F j 1/ 2 F j 1/ 2

1/25/2012 Numerical Methods 58

29
FVM applications (8)
Multidimensional problems
Wave splitting (scalar equations)
U U U
u v 0
t x y

Interface (i 1/2, j)

Cell (i 1, j) Cell (i, j)

M(xi1/2 ut, yM)


M (xi1/2, yM)
ut
vt

x
M(xi1/2 ut, yM vt )

1/25/2012 Numerical Methods 59

FVM applications (9)


Multidimensional problems (2)

Wave splitting (systems of equations)


U F G
0
t x y

Decomposed into

U F U U
0 A 0
t x t x
followed by
U G U U
0 B 0
t y t y

=> Decompose the Riemann problem into 2 R.Ps: 1 along x


and 1 along y

1/25/2012 Numerical Methods 60

30
FVM applications (10)
Multidimensional problems (3)

Wave splitting (2)

P(p, 1) B

(yp1) t
(xp ) t
N(p) (p) M
U

(yp,2 ) t

A
P(p, 2)

1/25/2012 Numerical Methods 61

What you should remember


Finite Volume Methods (FVMs) are well-
suited for the solution of conservative
PDEs. The weak solution of the PDE is
sought.
FVMs ensure mass conservation
automaticly and can handle shocks and
discontinuities.
The solution of the advection PDE by the
Godunov-type FVMs involves the
definition and the solution of a Riemann
problem.

1/25/2012 Numerical Methods 62

31
7. Finite Element Method

(FEM) - useful for problems with


complicated geometries and
discontinuities, where analytical
y
solutions can not be obtained

1/25/2012 Numerical Methods 63

What is it FEM?
The finite element method is a numerical method
for solving problems of engineering and
mathematical physics, useful for problems with
complicated
li t d geometries
t i and d di
discontinuities,
ti iti
where analytical solutions can not be obtained.

1/25/2012 Numerical Methods 64

32
Principle of the method -(1)
Methodology
Approximating the field of a dependent variable by a finite series
expansion in terms of linearly independent analytical functions.
The form of the expansion functions in the finite-element method is in a
such way that they are only locally non zero

f U 0


f Uwd 0

1/25/2012 Numerical Methods 65

Principle of the method -(2)


Methodology:Two basic steps in the finite-element:
expand the dependent variables in terms of a set of low-
order polynomials (the basis functions) which are only locally
non-zero;
insert these expansions into the governing equations and
orthogonalize the error with respect to some test functions.

f U 0 Ne
U ( x , y ) N jU j
j 1

f Uwd 0

1/25/2012 Numerical Methods 66

33
Principle of the method -(3)
Discretization
Model the domain by dividing it into an equivalent system of
smaller domains or units (finite elements) interconnected at
points common to two or more elements (nodes or nodal points)
and/or boundary lines and/or surfaces.

1/25/2012 Numerical Methods 67

Principle of the method -(4)


Discretization

Ne
U ( x , y ) N jU j
j 1

N1 and N2 are called Shape Functions or Interpolation Functions.


They express the shape of the assumed U.

For a linear representation of 1D elements:


N1 =11 N2 =00 at node 1 N1 N2
N1 =0 N2 =1 at node 2
N1 + N2 =1
N1 N2
1 2
1
L
2 1
L
2 L
1/25/2012 Numerical Methods 68

34
Principle of the method -(5)
Methodology
Obtain a set of algebraic equations to solve for unknown
nodal quantity (displacement).
Secondary quantities (stresses and strains) are expressed
in terms of nodal values of primary quantity
History
Hrennikoff [1941] - Lattice of 1D bars
McHenry [1943] - Model 3D solids
Courant [1943] - Variational form
Levy [1947, 1953] - Flexibility & Stiffness
Argryis and Kelsey [1954] - Energy Prin. for Matrix
Methods
Turner, Clough, Martin and Topp [1956] - 2D elements
Clough [1960] - Term Finite Elements

1/25/2012 Numerical Methods 69

Applications
Fluid Flow
Heat Transfer
Structural/Stress Analysis
Electro-Magnetic Fields
Soil Mechanics
Acoustics

1/25/2012 Numerical Methods 70

35
Advantages
Irregular Boundaries
Boundary Conditions
Variable Element Size
Easy Modification
Dynamics
Nonlinear Problems (Geometric or
Material)
General Loads
Different Materials

1/25/2012 Numerical Methods 71

Algorithm
Discretize and Select Element Type
Select a Function Representation for U
Define Relationships between U and other physical
elements ( where applicable)
Derive Element Stiffness Matrix & Eqs.
Assemble Equations and Introduce B.C.s
Solve for the Unknown the system (obtain U)
Solve for the other elemnts ( depending on U-where
applicable)
Interpret the Results

1/25/2012 Numerical Methods 72

36
Application -1D advection equation

U U L
y y

a 0 t c x w.dx 0 w( x, y )
t x 0

L
U in 1 U in N i *
t
c U in 1 N j .dx 0
x
0 i i

L
Uin1 Uin L
n1 Ni *
t Ui x Nj .dx 0
*
N N
i j .dx c
0 i 0 i

N i

L
1
Ui
n 1 n 1 n 1
N j dx U j 1 U j 1
0 i x 2

1/25/2012 Numerical Methods 73

Application - 1D advection equation


U U
a 0
t x
N i

L
1
Ui
n 1 n 1 n 1
N j dx U j 1 U j 1
0 i x 2

a j y nj11 b j y nj 1 c j y nj11 d j
x j 1/ 2 2 x j 1/ 2 x j 1/ 2
x j 1/ 2
aj 1 bj cj 1
3ct 3 ct 3ct

2 x j 1/ 2 n x j 1/ 2 x j 1/ 2 n x j 1/ 2 n
dj U j 1 Uj U j 1
ct 6 3 6

1/25/2012 Numerical Methods 74

37
Modeling Considerations
Solve the tridiagonal system [A]Y=B
Symmetry - means correspondence in size, shape and position of U and
boundary conditions that are on opposite sides of a dividing line or
plane;
Use of symmetry allows us to consider a reduced problem instead of the actual
problem.
The order of the total (global) stiffness matrix and the total number of equations can be
reduced.
Solution time is reduced!

Bandwidth - An envelope that begins with the first


nonzero component in each column of the [A] matrix

1/25/2012 Numerical Methods 75

1 7
L 4 2P
1 3 6 5
4
5
L
2 8

L L

1/25/2012 Numerical Methods 76

38
2

L 1 4
P
1 3
4
5
L
2

L L

1/25/2012 Numerical Methods 77

X X 0 X 0 0 0 0 0 0 0 0
X X X X X 0 0 0 0 0 0 0

0 X X 0 X X 0 0 0 0 0 0

X X 0 X X 0 X 0 0 0 0 0
0 X X X X X 0 X 0 0 0 0

0 0 X 0 X X 0 X X 0 0 0
0 0 0 X X 0 X X 0 X 0 0

0 0 0 0 X X X X X X X 0
0 0 0 0 0 X 0 X X 0 X X

0 0 0 0 0 0 X X 0 X 0 0

0 0 0 0 0 0 0 X X 0 X 0
0 0 0 0 0 0 0 0 X 0 0 X

X is a nonzero 2 x 2 block nb

1/25/2012 Numerical Methods 78

39
Bandwidth

nb = ndof ( m + 1 )
Where:
Wh
nb is the semibandwidth
ndof is the number of degrees of freedom per node.
m is the maximum difference in node
numbers for any element.

1/25/2012 Numerical Methods 79

Poor Shapes

b >> h >>

h

b
Large aspect ratio Very large and
very small corner
angles

40
Poor Shapes

Quadrilateral degenerating
Q g g
h1 h2 into triangular shape

h1 >> h2

Quadrilateral approaching
triangular shape

Flowchart for a
Finite Element Program.

1/25/2012 Numerical Methods 82

41
START

Input Data

Zero [K] and {F}

Do JE=1,NELE

Compute element stiffness [k]

Assemble Global stiffness [K] and forces {F}

Apply B.C.s

Solve [K]{d}={f} Output Results

Compute element quantities END

INPUT
Control parameters
Number of Elements
Number of Nodes
Number of B.C.s
Geometry
x,y,z location of each node
Element connectivity (which nodes are
associated with which elements))

1/25/2012 Numerical Methods 84

42
INPUT

Element Properties
p
Area
Moment of Inertia
Thickness
Location of Neutral Axis
Physical parameters Information

1/25/2012 Numerical Methods 85

Programs

ALGOR
ANSYS
COSMOS/M
STARDYNE
IMAGES-3D
MSC/NASTRAN
SAP90
ADINA
NISA

1/25/2012 Numerical Methods 86

43
What you should remember
Finite Element Methods (FEMs) seek a
weak solution to the PDEs.
The solution is sought as the sum of a
set of basis or shape functions. Those
can be piecewise linear, or parabolic, etc.
The Galerkin technique uses a weighting
of the solution by functions that are the
same as the shape functions

1/25/2012 Numerical Methods 87

44

You might also like