Professional Documents
Culture Documents
f ( x dx) f ( x) xx f } dx
Simple geophysical partial differential equations Finite differences - definitions Finite-difference approximations to pdes
Exercises
Acoustic wave equation in 2D Seismometer equations Diffusion-reaction equation
Finite differences and Taylor Expansion Stability -> The Courant Criterion Numerical dispersion
Finite Differences
Computational Seismology
x 2p ! c 2 (p s t
2 ( ! (x 2 x 2 x z ) x y
P c s
x t C ! k(C v y C RC p
C k v R p tracer concentration diffusivity flow velocity reactivity sources
Finite Differences
Finite differences
Finite elements
Finite volumes
Finite Differences
Particle-based methods
Pseudospectral methods
Finite Differences
f ( x dx) f ( x) xx f } dx
forward difference
f ( x) f ( x dx) xx f } dx
backward difference
centered difference
Finite Differences
The
big question:
}{!
Finite Differences
Taylor Series
Taylor series are expansions of a function f(x) for some finite distance dx to f(x+dx)
f ( x dx) f ( x) xx f } dx
Finite Differences
Taylor Series
The error of the first derivative using the forward formulation is of order dx. Is this the case for other formulations of the derivative? Lets check!
Finite Differences
Taylor Series
Finite Differences
f ( xj )
dx h
xj xj 1 xj 2 xj 3
xj 1
desired x location What is the (approximate) value of the function or its (first, second ..) derivative at the desired location ? How can we calculate the weights for the neighboring points?
Finite Differences
f ( x)
dx
f ( x dx) } f ( x) f ' ( x)dx f ( x dx) } f ( x) f ' ( x)dx
we are looking for something like
(1) (2)
f
Finite Differences
(i )
( x ) } w f ( xindex ( j ) )
j !1, L (i ) j
af
} af af ' dx
bf
} bf bf ' dx
af
bf
} ( a b) f ( a b) f ' dx
the solution to this equation for a and b leads to a system of equations which can be cast in matrix form
Interpolation
Derivative
a b !1 a b ! 0
Finite Differences
ab ! 0 a b ! 1 / dx
Taylor Operators
... in matrix form ... Interpolation Derivative
1 1
1 a 1 ! 1 b 0
1 1
1 a 0 ! b 1 / dx 1
a 1 ! b 1
1 1
1 0
a 1 ! b 1
1 1
1
0 1 / dx
Finite Differences
a 1 / 2 ! b 1 / 2
a 1 1 ! b 2dx 1
Finite Differences
*a | *b | *c | *d |
( 2dx) 2 ( 2dx) 3 f ( x 2dx) } f ( 2dx ) f ' f ' ' f ''' 2! 3! ( dx) 2 ( dx) 3 f ( x dx) } f (dx ) f ' f ' ' f ''' 2! 3! ( dx) 2 ( dx) 3 f ( x dx) } f (dx ) f ' f ' ' f ''' 2! 3!
( 2dx) 2 ( 2dx) 3 f ( x 2dx) } f ( 2dx ) f ' f ' ' f ''' 2! 3!
... again we are looking for the coefficients a,b,c,d with which the function values at x(2)dx have to be multiplied in order to obtain the interpolated value or the first (or second) derivative! ... Let us add up all these equations like in the previous case ...
Finite Differences
af
bf
cf
df
... we can now ask for the coefficients a,b,c,d, so that the left-hand-side yields either f,f,f,f ...
Finite Differences
Linear system
a b c d !1 2a b c 2d ! 0 b c 2a 2d ! 0 2 2 8 1 1 8 a b c d !0 6 6 6 6
... you need to solve the matrix system ...
Finite Differences
High-order interpolation
... Interpolation ...
1 1 1 a 1 1 1 1 2 b 0 2 c ! 0 2 1/ 2 1/ 2 2 8 / 6 1 / 6 1 / 6 8 / 6 d 0
... with the result after inverting the matrix on the lhs ...
1 1 1 a 0 1 1 1 2 b 1 / dx 2 c ! 0 2 1/ 2 1/ 2 2 8 / 6 1 / 6 1 / 6 8 / 6 d 0
... with the result ...
1/ 6 a b 1 4 / 3 c ! 2dx 4 / 3 1/ 6 d
Finite Differences
Problem: Solve the 1D acoustic wave equation using the finite Difference method.
Solution:
Problems: Stability
c 2 dt 2 ?p( x dx) 2 p( x) p ( x dx)A p (t dt ) ! 2 dx 2 p (t ) p (t dt ) sdt 2
Stability: Careful analysis using harmonic functions shows that a stable numerical calculation is subject to special conditions (conditional stability). This holds for many numerical problems. (Derivation on the board).
dt c e I }1 dx
Finite Differences
Problems: Dispersion
c 2 dt 2 ?p( x dx) 2 p( x) p ( x dx)A p (t dt ) ! 2 dx 2 p (t ) p (t dt ) sdt 2
Dispersion: The numerical approximation has artificial dispersion, in other words, the wave speed becomes frequency dependent (Derivation in the board). You have to find a frequency bandwidth where this effect is small. The solution is to use a sufficient number of grid points per wavelength.
True velocity
Finite Differences
Finite Differences
Snapshot Example
V elo city 5 km /s 3 0 00 2 5 00 2 0 00 T im e (s) 1 5 00 1 0 00 500 0 0 1 0 00 2 0 00 3 0 00 4 0 00 D ista nce (km ) 5 0 00 6 0 00
Finite Differences
Seismogram Dispersion
Finite Differences
Conceptually the most simple of the numerical methods and can be learned quite quickly Depending on the physical problem FD methods are conditionally stable (relation between time and space increment) FD methods have difficulties concerning the accurate implementation of boundary conditions (e.g. free surfaces, absorbing boundaries) FD methods are usually explicit and therefore very easy to implement and efficient on parallel computers FD methods work best on regular, rectangular grids
Finite Differences