Académique Documents
Professionnel Documents
Culture Documents
• FINITE DIFFERENCES
– Classification of Partial Differential Equations (PDEs) and examples
with finite difference discretizations
• Parabolic PDEs
• Elliptic PDEs
• Hyperbolic PDEs
Wave Solutions
u(x,0), ut(x,0) x
Discretization:
i-1 i i+1
u(x,0), ut(x,0) x
Finite Difference Representations
u(0,t) u(L,t)
j+1
j
j-1
Stability Requirement:
i-1 i i+1 x
c t u(x,0), ut(x,0)
C 1 Courant-Friedrichs-Lewy condition (CFL condition)
x
Physical wave speed must be smaller than the largest numerical wave speed, or,
Time-step must be less than the time for the wave to travel to adjacent grid points:
x x
c or t
t c
2.29 Numerical Fluid Mechanics PFJL Lecture 10, 7
Error Types and Discretization Properties:
Consistency
– Order p indicates how fast the error is reduced when the grid is refined
ˆx ( )
x
– The truncation error acts as a source for the discretization error, which is
convected, diffused, evolved, etc., by the operator ˆxx
2.29 Numerical Fluid Mechanics PFJL Lecture 10, 9
Error Types and Discretization Properties:
Stability
Stability
– A numerical solution scheme is said to be stable if it does not amplify
errors ε that appear in the course of the numerical solution process
– For linear(-ized)) problems, since ˆ ( ) , stability implies:
x x
ˆ 1 Const. with the Const. not a function of x
x
x
x 2 f ( xi 1 ) f ( xi ) x
f ( xi 1 ) f ( xi ) x f '( xi ) f ''( xi ) O( x 3 ) f '( xi ) f ''( xi ) O( x 2 )
2! x 2!
f ( xi 1 ) f ( xi ) x
f '( xi ) f ''( xi ) O ( x 2 )
x 2!
f ( xi 1 ) f ( xi ) x f ( xi 2 ) 2 f ( xi 1 ) f ( xi ) 2 f ( xi 2 ) 4 f ( xi 1 ) 3 f ( xi )
f '( xi ) 2
O ( x ) O ( x 2 )
x 2! x 2x
Forward
Differences
m ai u j i x
x j i r
– Can be used for forward, backward, skewed or central differences
– Can be computer automated
– Independent of coordinate system and extends to multi-dimensional
finite differences (each coordinate is often treated separately)
• Remember: order p of approximation indicates how fast the error is
reduced when the grid is refined (not necessarily the magnitude of
the error)
2.29 Numerical Fluid Mechanics PFJL Lecture 10, 19
FINITE DIFFERENCES:
Interpolation Formulas for Higher Order Accuracy
2nd approach: Generalize Taylor series using interpolation formulas
• Fit the unknown function solution of the (P)DE to an interpolation curve
and differentiate the resulting curve. For example:
• Fit a parabola to “f data” at points xi 1, xi , xi 1 (xi xi xi 1 ) , then
differentiate to obtain:
f ( xi 1 ) ( xi f ( xi 1 ) ( xi 1 f ( xi ) ( xi 1 ( xi
2 2 2 2
f '( xi )
xi 1 xi ( xi xi 1 )
What we are
looking for,
in1st column:
Taylor
series at:
j-1
j+1
Sum each column starting from left, force the sums to zero and so choose a, b, c, etc
2.29 Numerical Fluid Mechanics PFJL Lecture 10, 21
FINITE DIFFERENCES
Higher Order Accuracy: Taylor Tables Cont’d
Sum each column starting from left and force the sums to be zero by proper choice of a, b, c, etc:
1 1 1 a 0
1 0 1 b 0
a b c 1 2 1 = Familiar 3-point
central difference
1 0 1 c 2
Truncation error is first column in the table that does not vanish, here fifth column of table:
a c 4 u x 2 4u
4
1
x 24 24 x x 4 12 x 4
x2 j j
2.29 Numerical Fluid Mechanics PFJL Lecture 10, 22
FINITE DIFFERENCES
Higher Order Accuracy: Taylor Tables Cont’d
1 8a2 a1 3 3u x 2 3u
a2 a1 b 1 4 3 / 2 and x
x 6
x 3
6 x j
3 x 3 j
(as before)
2.29 Numerical Fluid Mechanics PFJL Lecture 10, 23
Integral Conservation Law for a scalar
d d
CM dV
dt
dt CVfixed
dV CS
(v .n )dA q .n dA
CS
CVfixed
s dV
Advective fluxes Other transports (diffusion, etc)
(Adv.& diff. fluxes convection) Sum of sources and
sinks terms (reactions, etc)
q k
Equations are said to be in “strong conservative form” if all terms have the form of the divergence
of a vector or a tensor. For the i th Cartesian component, in the general Newtonian fluid case:
vi u u 2 u
With Newtonian fluid only: .( vi v ) . p ei i j e j j ei gi xi ei
t
x j xi 3 x j
2.29 Numerical Fluid Mechanics PFJL Lecture 8-NS, 25
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.