Notes on Computational Mathematics

Size: px
Start display at page:

Download "Notes on Computational Mathematics"

Transcription

1 Notes on Computational Mathematics James Brunner August 19, 2013 This document is a summary of the notes from UW-Madison s Math 714, fall 2012 (taught by Prof. Shi Jin) and Math 715, spring 2013 (taught by Prof. Saverio Spagnoli). This summary was written by and for me, so a lot may be unclear to others. If you are reading this and are not me, me with questions: jdbrunner@math.wisc.edu. I probably can t answer them, but then again you probably aren t going to ask any, because the chances anyone but me reads this are slim. If you are reading this, however, I welcome both questions and comments (like if you find an error!) because they are sure to improve this document, and more importantly my own understanding of the material. This document is a work in progress and won t be fully edited for while, so there may be typos, errors, etc. If you find any, feel free to bring them to my attention. 1

2 Contents 1 Numerical Differentiation 4 2 Solving ODE s 6 3 Finite Difference Methods for PDEs Parabolic Equations Stability, Consistency, Convergence Methods for Non linear Diffusion equations The heat equation in Higher Dimensions Finite Difference Methods for Hyperbolic Equations Non Linear Hyperbolic Equations Numerical Solutions to Non Linear Hyperbolic Equations - Conservative Schemes Lax-Friedrich Scheme Lex-Wendroff Scheme The Godunov Scheme Non Linear Stability High Resolution Shock Capturing Schemes Flux Limiter Methods Slope Limiter Methods Central Schemes Relaxation Scheme Front Propagation 40 5 Finite Volume Methods For PDEs 43 6 Spectral Methods For PDEs Trigonometric Interpolation The Fast Fourier Transform Basics about the Fourier Transform Spectral Differentiation Smoothness & Spectral Accuracy Convolutions Spectral Approximation Non Periodic Problems - Chebyshev Points

3 6.5.1 FFT for Chebyshev Spectral Methods Monte Carlo Methods Probability Basics Distributions Convergence of Random Variables Random Sampling Discrete Sampling Multivariate Random Variables Variance Reduction Methods Numerical Linear Algebra Norms Induced Matrix Norms General Matrix Norms Singular Value Decomposition Projection Operators Gram-Schmidt Orthogonalization Householder Triangularization Least Squares Conditioning and Stability Floating Point Arithmetic Accuracy and Stability Backwards Stability of QR algorithms Stability of Back Substitution Gaussian Elimination Cholesky Decomposition Eigenvalues and Eigenvectors Finding Eigenvalues Two Great Eigenvalue Theorems Numerically Finding the SVD Iterative Methods Classical Iterative Methods Arnoldi Iteration The Conjugate Gradient Method Finite Elements Introduction and Review of PDEs A First Look at Finite Elements Some Analysis - Hilbert & Sobolev Spaces

4 Chapter 1 Numerical Differentiation We can approximate a derivative with a number of simple finite-difference ideas: centred difference f (x 0 ) f(x 0+h) f(x 0 h) 2h one sided difference f (x 0 ) f(x 0+h) f(x 0 ) h Estimation for the error of these approximations can be made using Taylor expansions. Taylor expanding f(x) and using this to derive expressions for f(x 0 + h) and f(x 0 h) and plugging these expressions into the approximations give an exact expression for the approximation which can be compared to f (x 0 ). For example, this procedure shows: f(x 0 + h) f(x 0 h) 2h = f (x 0 ) + f (x 0 ) h 2 + o(h 2 ) 6 This shows that the centred difference approximation is second order with respect to h, and also depends on the regularity of f(x), because any blow up of f (n) (x) will cause the error ( f (x 0 ) h 2 + o(h 2 )) to blow up (note in this error, the term o(h 2 ) is only true if f C 6 loc ). Using this same strategy, we can determine the error of any scheme of the form f (x 0 ) αf(x h) + βf(x 0 ) + γf(x 0 + h) and also use Taylor polynomials to choose α, β, and γ. For a higher order method, we could increase terms, using f(x 0 + 2h), etc. Alternatively, we may use interpolating polynomials of degree n, P n (x), and take f (x) P n(x). Note, we can instruct an interpolating polynomial using Lagrange interpolation as follows: n P n (x) = f(x i )l i (x) l i (x) = i=0 n j i x x j x i x j Accuracy of interpolation depends on regularity of f. We can also use piecewise polynomial interpolation for better accuracy. If we have a discontinuity in f, higher order interpolation will generate oscillations. The 4

5 best interpolation is the one interpolated with smooth data. Divided difference between points is defined: 1 st f[x i, x i+1 ] = f(x i+1) f(x i ) x i+1 x i 2 nd f[x i 1, x i, x i+1 ] = f[x i,x i+1 ] f[x i 1,x i ] x i+1 x i 1 n th f[x 0,..., x n ] = f[x 1,...,x n] f[x 0,...,x n 1 ] x n x 0 We want to choose the interpolation with the smaller (in absolute value) divided difference. We can also produce the interpolating polynomial using Newton s interpolation: P n (x) = f(x 0 )+f[x 0, x 1 ](x x 0 )+f[x 0, x 1, x 2 ](x x 0 )(x x 1 )+...+f[x 0,..., x x ](x x 0 )(x x 1 )...(x x n 1 ) 5

6 Chapter 2 Solving ODE s In solving ODE s (and PDE s, for that matter) we will need to ask whether our method of approximating a solution is stable - i.e. will small errors refrain from growing into large ones. However, for this question to be answerable, the equations we are solving should also be stable - i.e. small perturbations in initial data will not grow exponentially. So we have a theorem: Theorem 1. If f(y, t) is Lipschitz Continuous, ie L > 0 st f(y, t) f(y, t) L y y y, y, t, then there exists a unique solution to the IVP dy = f(y, t), y(0) = y dt 0 where y(t) is continuously differentiable. For stability of the solution, the Lipschitz condition is sufficient. To solve the IVP = f(y, t) dy dt y(0) = y 0 there are a number of numerical methods, generally based on replacing the derivative with a numerical approximation to a derivative. The simplest is the forward Euler method: y n+1 y n t = f(y n, t n ) Here the derivative has been replaced by the forward difference approximation, and this an explicit method. The backward Euler method is similar, but requires evaluation of f(y n+1, t n+1 ), and so is implicit and requires solving a non-linear equation to complete (analytically or, for example, by Newton s method). More generally, a Crank-Nicolson scheme is one in which these two are combined in a weighted average: y n+1 y n t = θf(y n, t n ) + (1 θ)f(y n+1, t n+1 ) For θ = 1, this is called the midpoint rule and is second order. 2 Finally, we may use a centred difference approximation for the derivative to get a second order leapfrog scheme: y n+1 y n 1 = f(y n, t n ) 2 t 6

7 It is necessary to determine the stability as well as accuracy of these schemes. To consider stability, we can consider f(y, t) = λy, so that we know y = y 0 e λt. Then, if λ < 0, we have y(t) y 0 t > 0. The forward Euler method can in this case be written as y n = (1 + λ t) n y 0. Then y n y 0 is only true if (1 + λ t) < 1. This gives a region of stability for λ t. This is called the region of absolute stability. For the backwards Euler method, however, we see that here, ( ) n y n 1 = y 0 1 λ t This is then stable for 1 λ t > 1, which is true if R(λ) < 0, and, of course, if R(λ) > 0, the analytical solution would not be stable, so the numerical one shouldn t be either. The same is true for the midpoint method. We call methods like this A-Stable. Interestingly, there is a theorem stating there is no A-stable method of third or higher order. There are higher order methods, and they have regions of stability, and so are useful. For example, we have multi-step methods. The general method of an r step method to solve u t = f(u) is: r j=0 α n+j u An Adams Method is one of the type: = t r β j f(u n+j ) j=0 u n+r = u n+r 1 + t r β j f(u n+j ) If β r is chosen to be 0, this is an explicit method, called Adams-Bashforth, and the coefficients can be chosen so that it is O( t r ). If not, it is an implicit, Adams-Mouton, method, and can be O( t r+1 ). We can choose the coefficients by considering the truncation error [ r ] τ(t n+r ) = 1 r α j u j+n t β j f(u n+j ) t j=0 Then we can Taylor expand u and f, and plug this in and choose coefficients to fit the properties we want. There are also Multi-stage methods, such as the Runge-Kutta methods. These require us to compute intermediate values. For example, the 2nd order Runge Kutta method is (and let s let t = k) and the 4th order Runge Kutta method is: j=0 u = u n + k 2 f(un ) u n+1 = u n + kf(u ) F 0 = f(u n, t n ) j=0 F 1 = f(u n kf 0, t n k) F 2 = f(u n kf 1, t n k) F 3 = f(u n + kf 2, t n+1 ) u n+1 = u n + k 6 (F 0 + 2F 1 + 2F 2 + F 3 ) 7

8 These also require relatively small k for stability. 8

9 Chapter 3 Finite Difference Methods for PDEs 3.1 Parabolic Equations Our goal is to numerically approximate solutions to equations such as u t = u with given initial and boundary conditions. The idea of a finite difference method is to discretize time and space and use numerical approximations to derivatives. This will give a system of equations (which must be solved for implicit methods). If we have a tridiagonal matrix, the following algorithm can be used to solve it: E j = say A j N j+1 + B j N j C j N j 1 = M j and N 0 = N m = 0 with A, B, C > 0 and let B > A + C N j = E j N j+1 + F j so E 0 = F 0 = 0 then A j B j C j E j 1 A j N j+1 + B j N j C j (E j 1 N j + F j 1 ) = M j N j = A j B j C j E j 1 N j C jf j 1 +M j B j C j E j 1 F j = C jf j 1 +M j B j C j E j 1 So this can be solved with 2 loops. A simple finite difference method to solve u t = u xx would look like: u n+1 j u n j k ( u n j+1 2u n j + u n ) ( j 1 u n+1 j+1 = θ + (1 θ) ) 2un+1 j + u n+1 j 1 h 2 h 2 Here h is the space grid SIZE(assumed to be constant - ie we have a uniform grid), j the index of the individual space grid point, k the time step size, and n the time point index. 9

10 3.2 Stability, Consistency, Convergence There are a few ways to think about the stability of these methods. For example, the diffusion equation (above) has the property that the L 2 norm of the density function (u(x, t) above) should decrease. It is then reasonable to expect the same of our numerical solution (using the l 2 norm for our discrete data). Remembering some analysis, Plancherel s theorem says ˆf L 2 = f L 2, so we can work with the Fourier transform if we want. We can approximate the Fourier transform of our exact solution with the discrete Fourier transform of our numerical solution: J û(ξ, t) = h u j (t)e iξx j and so j=0 u j (t) = 1 û(ξ, t)e iξx j h ξ I should note here I am using x j = jh as the grid points (this is all 1 D in space for ease of typing, the principle extends to higher D). We can plug this second relation into our scheme and we get: û n+1 û n e iξhj = θ k ξ ξ so integer ξ: û n eiξh 2 + e iξh e iξjh + (1 θ) h 2 ξ û n+1 eiξh 2 + e iξh e iξjh h 2 û n+1 û n k And this simplifies to: = θ eiξh 2 + e iξh û n + (1 θ) eiξh 2 + e iξh û n+1 h 2 h 2 û n+1 û n = θ 4 sin( ξh ) ξh 2 û n 4 sin( + (1 θ) ) 2 û n+1 h 2 h 2 and if we let λ = k h 2, we at long last see: û n+1 = 1 4λθ sin 2 ( ξh 2 ) 1 + 4λ(1 θ) sin 2 ( ξh 2 )ûn and so this method is stable (in the sense that it agrees that u L 2 is decreasing, as it should) if 1 4λθ sin 2 ( ξh ) λ(1 θ) sin 2 ( ξh ) 1 2 Some straightforward computation reveals that this is true if: λ(2θ 1)

11 This method of determining stability is called Von Neumann Analysis after John Von Neumann, who, along with being one of the best mathematicians and scientists of the past 100 years, was a member of the Manhattan Project. In general, Von Neumann analysis involves: assume where u n j = g n e ijξh g = ûn+1 (ξ) û n (ξ) and we have stability if g 1 This method for determining stability works for finite difference methods applied to linear PDE s, which is something I guess. We can check out consistency (ie truncation error approaches 0 with gridsize) using Taylor expansions (and a lot of scratch paper). It would be great, then if we could say something about convergence of the method. Luckily, we have: Theorem 2. The Lax Equivalence Theorem A scheme converges iff it is consistent and stable. By convergent, we mean that if E k (, t) is the difference between the analytic and numerical solution to a problem, E k 0 as k 0 in some norm. Formally, call the numerical solution U k and the analytic solution u, then and local truncation error is: E k (, t) = U k (, t) u(, t) L k (x, t) = 1 k [u(x, t + k) H k(u(, t), x)] Where H k is the operator associated with the method (ie H k (u(, t), x) is the result of using the method to find U n+1 ( ) when U n ( ) = u(, t n ) exactly). Then consistency is the condition that L k 0 as k 0. Continuing with some more formal definitions: A method is of order p if for all sufficiently smooth initial data with compact support, a constant C p such that L k C p k p k < k 0, t < T. Formally, a method is stable if for each time T, C s > 0 such that (H k ) n C s nk T, k < k 0, noting that nk = t n. So we see now that in Von Neumann analysis, we can have stability if g 1 + ck. We can also think about energy in the case of the diffusion equation to determine stability. The problem is: u t = u xx u(x, 0) = u 0 (x) u(0, t) = u(1, t) = 0 and so a multiplication, integration, and integrating by parts gives: 1 2 t 1 0 u 2 dx = uu x (u x ) 2 dx 0

12 and so, u(, t) L 2 u(, 0) L 2 This shows that energy in the system should decay (it is the diffusion equation after all). Now, because of the 0 Dirichlet boundary condition, this leads to the Maximum Principle that the maximum of u can only be obtained along x = 0, x = 1, or t = 0. We can look at L stability for a finite difference method to solve a linear PDE rather simply by solving for u n+1 j and using some basic inequalities. L 2 stability, on the other hand, is a very long computation. One helpful equality in this computation is: J 1 J 1 u j (v j+1 2v j + v j 1 ) = u J (v J v J 1 ) u 1 (v 1 v 0 ) (u j+1 u j )(v j+1 v j ) j=1 The computation is left as an exercise (ha!). j=1 3.3 Methods for Non linear Diffusion equations Now we deal with a more difficult class of equations, non linear diffusion equations, which have the form: u t = x (D(u, x) x u) We will usually just deal with 0 Dirichlet boundary conditions on the interval [0, 1], but of course that is not necessary (just simpler). We note that this equation gives a conservative system, because if x u x=0,1 = 0, then 1 t udx = 0 0 so that with no flux, total mass is conserved. A scheme that preserves this property is called a conservative scheme (shockingly). A scheme that is not conservative is probably bad. For example, the obvious finite difference scheme to deal with this equation: t u j = D j+1 D j 1 2h u j+1 u j 1 2h + D j u j+1 2u j + u j 1 h 2 is not conservative. This isn t good. I can point out here that a good rule of thumb for ANY numerical approximation is to try to keep the analytic properties of the system. A conservative scheme for this system is: t u j = D j + D j+1 2h which can be more compactly written as: u j+1 u j h 2 D j + D j 1 2h u j u j 1 h 2 t u j = D j+1/2 x u j+ 1/2 D j 1/2 x u j 1/2 h 12

13 For stability, we again notice that uut = u x (D(u, x) x u) t 0 u2 dx = 1 D( 0 xu) 2 dx < 0 u L 2 [0,1] < u 0 L 2 [0,1] And so we will call a method stable if this property is kept. To determine numerical stability, Von Neumann analysis no longer works. We need to use the energy method. This is quite a lot of computation, I will not include it here. 3.4 The heat equation in Higher Dimensions In two dimensions, the equation becomes u t = u for readability, we will denote δxu 2 = u j+1,k 2u j,k + u j 1,k and δyu 2 similarly. If we use a square, uniform grid, ie x = y, I will use λ = t = t. It turns out that for an ( x) 2 ( y) 2 explicit scheme, the stability condition is: t ( x) + t 2 ( y) We can use Von Neumann stability analysis, here the Fourier expansion gives: u n j,k = g n e i(ξj x+ηk y) An implicit scheme in 2D leads to a complicated linear algebra problem. The Crank Nicolson scheme is: u n+1 j,k u n j,k 1 ( ) = δ 2 t 2( x) 2 x u n+1 j,k + δyu 2 n+1 j,k + δxu 2 n j,k + δyu 2 n j,k Alternatively, we have the Alternating Direction Method (ADI) (see what I did there?): u n+ 1/2 u n = 1 2 λ ( δ 2 xu n+ 1/2 + δ 2 yu n) u n+1 u n+ 1/2 = 1 2 λ ( δ 2 xu n+ 1/2 + δ 2 yu n+1) The advantage here is that in each half-step, only one derivative is implicit. This gives two tri-diagonal systems, which are easy to solve. This is a 2nd order unconditionally stable method. This is shown using Von Neumann analysis. It is second order because it can be shown to be a fourth order correction to the Crank Nicolson scheme. The ADI can be extended to 3D and is still unconditionally stable: [ u u n = λ 2 δ 2 x (u + u n ) + δy(2u 2 n ) + δz(2u 2 n ) ] [ u u n = λ 2 δ 2 x (u + u n ) + δy(u 2 + u n ) + δz(2u 2 n ) ] [ u n+1 u n = λ 2 δ 2 x (u + u n ) + δy(u 2 + u n ) + δz(u 2 n+1 + u n ) ] 13

14 Computations which eliminate u and u show that this is second order as well. In general, we can deal with an arbitrarily high number of dimensions with the Fractional Step Method. The problem is then: u t = A A = A 1 + A A q A i = δ xi x i We can attack this in q steps, dealing with only one dimension at a time with a centred difference operator B i approximating A i : B i = 1 ( x) 2 δ2 x i so that we have: u n+ i/q u n+ i 1/q u n+ i/q + u n+ i 1/q = B i t 2 This is a Crank-Nicolson scheme in each direction, and so is unconditionally stable, and it is also 2nd order. A more general problem is Here we can use a fractional step method: u t = u xx + f(u) u t = u xx t n t n+ 1/2 u t = f(u) t n+ 1/2 t n+1 This is a consistent splitting, and the splitting error is first order, we whatever method we choose to solve each half-step, overall we will have a first order method. To see that it is consistent with first order error, we do the following computation with the operators Au = δ xx u and Bu = f(u) u t = Au + Bu = (A + B)u u(t) = e (A+B)t u 0 u n+1 = e (A+B) t u n U n+ 1/2 = e A t u n U n+1 = e B t U n+ 1/2 = e B t e A t u n U n+1 u n+1 = ( e B t e A t e (A+B) t) u n now we Taylor expand the exponentials and simplify to see that: U n+1 u n+1 = ( t)2 (BA AB) + O(( t) 3 ) 2 14

15 And so the overall error is first order. We can improve this to 2nd order splitting error using Strang s splitting, which uses one half step of A, one step of B, and one half step of A. This forms the exponential e t /2A e tb e t /2A and e t /2A e tb e t /2A e t(a+b) = O(( t) 3 ) so this is second order splitting. Also, in implementation this is n 1 steps of simple splitting began and ended with a half step of A. 3.5 Finite Difference Methods for Hyperbolic Equations The simplest hyperbolic equation is: u t + au x = 0 u(x, 0) = u 0 (x) which can be solved analytically using the method of characteristics, and so will be nice for setting up some theory of these methods. The solution is u(x, t) = u 0 (x at), so the initial data propagates at speed a. This advection equation can also be a system: U t + AU x = 0 with U R d and A R d d. The equation is called hyperbolic if A has d distinct, real, eigenvalues. This means that A = T ΛT 1 is diagonalizable (so Λ is diagonal), so we can solve this system. In fact, if V = T 1 U, we have: V t + ΛV x = 0 v i (x, t) = v i (x λ i t, 0) U = T V A first guess at a finite difference approach to these problems would be u n+1 j u n j k + a un j+1 u n j 1 2h and indeed this is first order in time and second order in space. However, Von Neumann analysis shows: g 1 k + a e iξh e iξh 2h = 0 g = 1 + a kh i sin(ξh) = 0 g 2 = 1 + ( a kh) 2 sin 2 (ξh) > 1 15

16 so this is unconditionally unstable. However, we can use u n+1 j un j+1 +un j 1 2 k + a un j+1 u n j 1 2h Here (I will skip the calculation, but it is good practice of Von Neumann stability analysis if you ve forgotten how to do it) we have ( ) ) 2 g 2 = 1 1 a 2 ( k h = 0 sin 2 (ξh) and so ξ, g 2 1 a k 1. We call λ = a k the Courant number or CFL number, h h and this particular scheme is the Lax - Friedrichs Scheme, which we will have to return to in more complicated cases (after all right now we are talking about a problem that is easy to solve analytically!). The stability condition is 0 λ 1. We can understand this condition in a physical sense we remember that hyperbolic equations (our example is the advection equation and is simple, but a more important example is the wave equation) allow information to propagate at finite speeds (in contrast to parabolic equations). In this case that speed is a. This means that our solution should not see information from too far away. The area of influence on the solution is called the domain of dependence and the statement that 0 λ 1 is the statement that the domain of dependence is inside the numerical domain of dependence, ie the information used in the numerical method. Another approach we could take is a one sided difference approximation, known as an upwind or downwind method: downwind un+1 j u n j + a un j+1 un j = 0 k h upwind u n+1 j u n j k + a un j un j 1 h = 0 Von Neumann analysis reveals that the stability condition is the CFL condition, ie λ 1, depending on propagation direction: if a > 0, the downwind scheme is unconditionally unstable, and if a < 0 the upwind scheme is unconditionally unstable. This makes sense physically, the downwind scheme should only work if information is propagating to the left (backwards or down wind ), and upwind should only work if information is propagating to the right (forwards). This is because each scheme only uses information from the left or right, but not both. So far all of these method have been first order. For a second order method we can use the Lax - Wendroff Scheme, which comes from the Taylor series (as all these kind of do) and the equation itself: u n+1 j = u n j + k t u n j + k2 2 ttu n j + O(k 3 ) u n+1 j = u n j ak x u n j + a2 k 2 2 xxu n j + O(k 3 ) u n+1 j = u n j ak un j+1 un j 1 + a2 k 2 2h 2 u n j+1 2un j +un j 1 2h This is a second order method because local truncation error is O(k 3 + kh 2 ), and Von Neumann analysis (all these chances to practice that!) shows that this is stable under the CFL condition. (I would also like to point out that this derivation is a good clue as to how we are 16

17 going to develop numerical methods for more interesting hyperbolic equations). One thing that comes up with a second order scheme is a problem with discontinuities (here they can only come from initial data, later they will develop on their own). We see oscillations at discontinuities in second order schemes. Discontinuities cause some problems in first order methods, as well. Considering an upwind scheme, using Taylor series to find local truncation error shows it to be a first order approximation to u t + au x = 0, but a second order approximation to t u + a x u = ah 2 ( 1 ak h ) u xx and the CFL condition implies a positive diffusion coefficient. So this method will tend to smooth out the solution, which will of course cause discontinuities to be destroyed. This is true of other methods, for example the Lax-Friedrichs scheme has a slightly larger diffusion coefficient. This phenomenon is known as numerical diffusion or numerical dissipation. Similar truncation error analysis of the Lax-Wendroff scheme reveals it to be a third order approximation to u t + au x = 1 ( ) ) 2 ak (1 6 ah2 u xxx h We say that this is a dispersive scheme. There is a general Dispersion Relation for a differential equation (more on this in my applied math notes), using the assumption that u e i(ωt ξx) where ω is the frequency and ξ is the wave number. This leads to (plugging in to the equation from the Lax-Wendroff truncation error analysis) ( iω aiξ = 1 ( ) ) 2 ak 6 ah2 1 (iξ 3 ) h solving for ω gives the dispersion relation ω(ξ) = aξ ah2 (1 for the upwind scheme, the dispersion relation is and in general we have (in 1 D) ω(ξ) = aξ + iah ( 1 ak h ( ) ) 2 ak ξ 3 h ) ξ 2 ω(ξ) ξ ω (ξ) group velocity phase velocity 17

18 It is important to realize that the dispersion relation is a property of the PDE, not the scheme. We associate a dispersion relation with the scheme when the scheme will act more like some PDE than the one it was designed for (eg the upwind scheme being a second order approximation to the diffusive PDE). The dispersion relation reveals damping and oscillations. 3.6 Non Linear Hyperbolic Equations We will rarely care about the advection equation, as it is simple and can generally be dealt with analytically. A more interesting problem is a non-linear advection type equation: u t + f(u) x = 0 where f : R n R n is the flux. If the Jacobian matrix f (u) has n real eigenvalues and a complete set of n linearly independent eigenvectors, this equation is hyperbolic. This form of the equation is called a conservation law, with u being the conserved quantity, because (assuming flux vanishes at the boundaries) t udx = 0 An example of a hyperbolic system that is non linear is the Euler equations for gas dynamics: t ρ + x ρu = 0 t ρu + x (ρu 2 + p) = 0 t ( 1 2 ρu2 + ρe ) + x (( 1 2 ρu2 + ρe + p ) u ) = 0 conservation of mass conservation of momentum conservation of energy so that ρ U = eu 1 2 ρu2 + ρe ρu f(u) = ρu 2 + p ( 1 2 ρu2 + ρe + p ) u The Jacobian of the system has 3 eigenvalues u, u ± c where c is the speed of sound, which depends of ρ, p and e. Another example (which is less unwieldy and so easier to use for demonstrative purposes) is the inviscid Burger s equation ( ) u 2 u t + = 0 2 x 18

19 where u is wave speed. We can use the method of characteristics on these equations as well, and we see that the characteristics have equations x(t) = x 0 + tu 0 (x 0 ) and u(x, t) = u 0 (x 0 ) for some x 0. These characteristics run in straight lines. However, each characteristic s slope is u 0 (x 0 ), and so they may cross. When characteristics cross, we lose the uniqueness of the solution. This is called a shock. Also possible are rarefactions in which characteristics separate, leaving gaps in the solution. When characteristics meet, u/ x, and because u x = du 0 x 0 dx x = u 0(x 0 ) 1 + tu 0(x 0 ) this implies that 1 + t b (u 0(x 0 )) = 0 where t b is the time the discontinuity occurs. If this time is positive, ie t b = 1 u 0(x 0 ) > 0 then a shock will occur. So, if there is some x 0 so that u 0(x 0 ) < 0 there will be a shock. We can also calculation the shock time by ( ) 1 t b = min u 0(x 0 ) At a shock (or a rarefaction) the strong solution fails to exist. However, we can still discuss a weak solution to the equation. Consider φ(x, t) (u t + f(u) x ) = 0 for a text function phi(x, y) C0, 1 and the integral φ (u t + f(u) x ) dtdx = 0 R 0 We then integrate by parts, and say that u is a weak solution to u t + f(u) x = 0 if for any phi C0, φ(x, 0)u 0 (x)dx (uφ t f(u)φ x )dtdx = 0 R R 0 holds. If u is a strong solution, it must also be a weak solution, but the converse is not true. The following theorem is important in determining what happens at a shock: Theorem 3. if u is a weak solution to u t + f(u) x = 0, then at a discontinuity [f(u)] = s[u] Here, [α] = lim x x + s α(x) lim x x s α(x). This theorem, the Rankine-Hugoniot jump condition, tells us the speed of the shock, s: s = [f(u)] [u] 19

20 This all follows from Greene s theorem. So, considering the inviscid Burger s equation with Riemann initial data ( ) u u t + 2 = 0 2 x u L x < 0 u(x, 0) = u R x > 0 we can look for a self similar solution, which has the form ( x ) u(x, t) = u = u(ξ) t Then the equation is reduced to (u ξ)u ξ = 0 So the solution is either a constant or u = ξ. If u L > u R, we see that a shock forms with speed and so the solution is simply However, if u L < u R, the solution is s = u2 R/2 u2 L/2 u R u L = 1 2 (u R + u L ) u(x, t) = u(x, t) = u L x t u R u L u R x < st x > st x < u L t u L t < x < u R t x > u R t This is one of infinitely many weak solutions, of course, but this one is the solution derived from the self similar equations. We can choose a different weak solution by considering the Burger s equation with viscosity: ( ) u 2 u t = = ɛu xx 2 This parabolic equation has a unique solution u ɛ which depends on epsilon. We can then take lim ɛ 0 u ɛ to arrive upon the viscosity solution to the inviscid Burger s equation. Yet another way to deal with the non uniqueness is through an entropy condition. If λ(u) is an eigenvalue of f (u), the Lax entropy condition is that, at a shock, λ(u L ) > s > λ(u R ) x 20

21 This condition can indicate if there is a shock or rarefaction, and under this condition, the inviscid Burger s equation can only have a shock if u L > u R. Otherwise, it has a rarefaction. There are other entropy conditions. For example, if there exists Φ(u) which is convex and Ψ(u) such that Ψ (u) = Φ (u)f (u) they are called convex entropy Φ and entropy flux Ψ, and they must satisfy t Φ(u) + x Ψ(u) 0 For the inviscid Burger s equation, the viscosity solution can be shown to satisfy this condition. In order to solve non linear hyperbolic equations numerically it is necessary to consider the concepts of bounded variation and total variation. We will not delve deeply into these concepts, but rather confine ourselves to their relevance in numerical methods. Total variation can be defined T V (u(, t)) = d i=1 lim sup ɛ 0 1 u(x i + ɛe i, t) u(x i, t) dx ɛ R d The total variation can be thought of as a measurement of the oscillations of a function u. Bounded variation means BV (R d ) = {f : T V (f) C} If we have the problem u t + d i=1 x i f i (u) = 0u(x, 0) = u 0 (x) L (R d ) then given Φ and Ψ, there is a unique u such that the entropy condition is satisfied and u(, t) u 0 and if u 0 L (R d ) BV (R d ) then u(, t) BV (R d ) T V (u(, t)) T V (u 0 ) 3.7 Numerical Solutions to Non Linear Hyperbolic Equations - Conservative Schemes Again, we are trying to solve u t + f(u) x = 0 The general form of a conservative scheme for hyperbolic equations is t u j + F j+1/2 F j 1/2 x These are the schemes we want. A theorem from Lax & Wendroff states 21 = 0

22 Theorem 4. A consistent, conservative scheme, if convergent, converges to a weak solution of the non linear conservation law Clearly, it is only necessary to know the numerical flux F j± 1/2 to know a conservative scheme. However, that is not always a great way to implement the scheme! In general, we will use the notation f j = f(u j ) and or, for simplicity, u j = u(x j ) u j = 1 x xj+ 1/2 x j 1/2 u(x)dx Lax-Friedrich Scheme The Lax-Friedrich Scheme is F j+ 1/2 = f j + f j+1 2 x 2 t (u j + 1 u j ) The Local Lax-Friedrich Scheme is F j+ 1/2 = f j + f j+1 2 aj+ 1/2 2 (u j + 1 u j ) where a = max f (u), u (u j, u j+1 ), or the largest eigenvalue of f (u) if we are dealing with a system of equations Lex-Wendroff Scheme The Lax-Wendroff Scheme is F j+ 1/2 = f(u j+1) + f(u j ) 2 tf (u j+ 1/2) f(u j+1) f(u j ) 2 x where u j+ 1/2 is the average of u j and u j+1. It is not obvious why this scheme is consistent, but the derivation of this scheme will make it clear. We can start, as usual, with a Taylor expansion: u n+1 j = u n j + t u n j t + tt u n t 2 j 2 + O( t3 ) we then use the PDE: u t = f (u)u x = f(u) x u tt = (f(u) x ) t = f (u) tx = (f (u)u t ) x = (f (u) x f(u)) x 22

23 For last equality, making the substitution u t = f(u) x from the PDE. This gives us expressions for u tt that we can substitute into the Taylor expansion get rid of the time derivatives in favour of spacial derivatives: u n+1 j = u n j t x f(u n j ) + t2 2 (f (u n j ) x f(u n j )) x + O( t 3 ) Then we can use standard finite difference approximations for x f(u n j ) and so on. To keep the scheme second order (as it can be seen to be so far from the Taylor expansion) we will need centred difference approximations. Making these substitutions and rearranging terms gives: u n+1 j u n j t + f(un j+1) f(u n j 1) 2 x = t 2 f (u n j+1/2 ) f(un x j+1 ) f(un j ) x f (u n j 1/2 ) f(un x j ) f(un j 1 ) x The Godunov Scheme The non linear upwind scheme is called the Godunov Scheme. The basic idea of this scheme is to divide the problem into small spacial regions in which the problem is a Riemann problem. Then the solution to the Riemann problem (either analytic or making use of a Riemann Solver) is used. We will define the solution of the local Riemann problem as ũ n (x, ). To create a set of local Riemann problems, we need piecewise constant data, so we approximate u(x): u n j = 1 xj+ 1/2 u(x)dx x x j 1/2 where u(x) is the exact solution and ũ n (x, ) := u n j for t = t n, x j 1/2 < x < x j+ 1/2. This solution is valid for t n < t < t n+1. Then the solution from our method at each time step t n is Uj n = 1 xj+ 1/2 ũ n (x, t n )dx x x j 1/2 and likewise, U n+1 j = 1 xj+ 1/2 ũ n (x, t n+1 )dx x x j 1/2 meaning we take our solution and approximate it as piecewise constant again so that we have another set of local Riemann problems. Step by step this means we 1. Approximate the data as piecewise constant (U n j )) 2. Evolve the data as a Riemann problem (ũ n (x, )) 3. Approximate this solution as piecewise constant (U n+1 j ) 23

24 For the problem of non linear advection, we have for t n < t < t n+1. Integrating, and so 1 t n+1 t t n t ũ n + x f(ũ n ) = 0 xj+ 1/2 x j 1/2 ( t ũ n + x f(ũ n ))dxdt = 0 1 x xj+ 1/2 x j 1/2 or, more simply, where ũ n (x, t n+1 )dx 1 xj+ 1/2 ũ n (x, t n )dx x x j 1/2 t t n+1 f(ũ n (x t + n j+ 1/2, t))dt t n+1 f(ũ n (x t n j 1/2, t))dt x u n+1 j u n j t F n j+1/2 = 1 t + F n j+1/2 F n j 1/2 x t n+1 t n = 0 f(ũ n (x j+ 1/2, t)dt = 0 This is an upwind scheme, and its construction makes it clear that it will only be valid as long as the local Riemann problems do not interact, that is the local parts of the piecewise data do not collide. Because the data is moving at a speed less than max f (u), this method will be valid as long as x t < max f (u) ie, before neighbouring waves arrive. This is the CFL condition again. To see this, we can examine the solution of the Riemann problems. The solution is self similar, so, locally, ( ) x ũ n (x, t) = ũ n xj+ 1/2 t so at x = x j+ 1/2, the solution does not depend on time t. we therefore have where R ( x t ; U n j ; U n j+1) solves F n j+1/2 = f(ũ n (x j+ 1/2)) = f(r(0; u n j ; u n j+1)) u t + f(u) x = 0 u n j x < 0 u(x, 0) = u n j+1 x > 0 24

25 This solution is then only valid before waves begin to intersect. We may also use this notation to say F j+ 1/2 = R(0; u j ; u j+1 ) We can either use the analytic solution to the Riemann problem, or use a Riemann Solver. This is a first order accurate scheme due to the approximation at each step of the data as piecewise constant (ie averaging over small intervals). The Godunov scheme gives better resolution than the Lax-Friedrich s scheme due to less numerical dispersion. The viscosity modified equation is again t u + x f(u) = C xu xx The difference is in the constant C, and C upwind < C Lax F riedrich. The Godunov scheme satisfies the entropy condition as long as f(u) is convex. is convex, f(u l ) u l > u 0 & s > 0 R(0; u l ; u r ) = f(u r ) u r < u 0 & s < 0 f(u 0 ) u l < u 0 < u r f (u 0 ) = 0 s = [f] [u] If f(u) Taking convex Φ(u), we need Ψ(u) so that Ψ (u) = Φ (u)f (u) and t Φ(u) + x Ψ(u) 0. If for t n t t n+1, then t Φ(ũ n ) + x Ψ(ũ n ) 0 1 t n+1 xj+ 1/2 x t t n x j 1/2 1 x t Φ(ũ n ) + x Ψ(ũ n )dxdt = xj+ 1/2 x j 1/2 Φ(ũ n (x, t n+1 ))dx 1 xj+ 1/2 Φ(ũ n (x, t n ))dx x x j 1/2 t 1 t n+1 Ψ(ũ n (x t t + n j+ 1/2, t)dt 1 t n+1 Ψ(ũ n (x t t n j 1/2, t)dt x and so Φ(u n+1 j ) + Φ(u n j ) + Ψ(R(0; un j ; u n j+1)) Ψ(R(0; u n j 1; u n j )) t x because we have 1 x xj+ 1/2 x j 1/2 Φ(ũ n (x, t n+1 ))dx Φ ( 1 x xj+ 1/2 x j 1/2 0 ũ n (x, t n+1 )dx ) 0 and by definition ( 1 Φ x xj+ 1/2 x j 1/2 ũ n (x, t n+1 )dx ) = Φ(u n+1 j ) 25

26 This scheme thus satisfies the discrete entropy inequality It may be necessary to use an approximate Riemann solver if the Riemann problem cannot be solved. Roe s approximate Riemann solver linearizes the flux of the system so that for constant matrix Â, ˆf = Âu Local linearization gives û t + Â(u l, u r )û x = 0 Â must have n real eigenvalues and a complete set of eigenvectors (ˆλ i, ˆγ i ), and should approximate the Jacobian. The requirements are, in general, Â(u l, u r )(u r u l ) = f(u l ) f(u r ) Diagonalizable with real eigenvalues Â(u l, u r ) f (u) as u l, u r ū At a shock, f(u r ) f(u l ) = s(u r u l ), so ˆλ i such that Â(u r u l ) = ˆλ i (u r u l ) with s = ˆλ i (shock speed). For a scalar equation, â = f(u r) f(u l ) u r u l To analyse the scheme, we note that a full set of eigenvectors gives a basis for the space we are working in, so n u r u l = α pˆγ p and so R(ξ; u l ; u r ) = û(ξ) = u l + ˆλp<ξ α pˆγ p = u r ˆλp>ξ α pˆγ p This can of course be recognized as a characteristic decomposition of the linearized problem. As a result, the Roe solver gives F Roe = f(u l ) + ˆλp<0 α pˆλpˆγ p = f(u r ) ˆλp>0 α pˆλpˆγ p so F j+ 1/2 = F Roe (u j, u j+1 ) = Â(u j, u j+1 )ˆγ = ˆλ 1/2ˆγ pj+ 1/2 pj+ p j+ 1/2 (You have to love those subscripts on subscripts) We now have to determine, once and for all, how to choose Â. Consider η [0, 1] and p=1 q(η) = u i 1 + (u i u i 1 )η f(u i ) f(u i 1 ) = 1 0 df(q(η)) dη dη = 1 0 f (q(η))q (η)dη = 1 0 f (q(η))(u i u i 1 )dη = (u i u i 1 ) 1 0 f (q(η))dη 26

27 so if we choose 1 f (q(η))dη to be Â, we will satisfy the first condition on Â. However, 0 this may not be an easy integral to evaluate. Roe s solution to this question was to use a parametrization vector z(q). This must be invertible, so q = q(z). Thus, f(x) = f(q(z))), and we can integrate. then and f(u i ) f(u i 1 ) = u i u i 1 = z(η) = z i 1 + (z i z i 1 )η z i = z(u i ) z (η) = z i z i 1 df(z(η)) dη = (z i z i 1 ) dη dq(z(η)) dη = (z i z i 1 ) dη f (z(η))dη = Ĉ(z i z i 1 ) q (z(η))dη = ˆB(z i z i 1 ) So if we can find z such that ˆB and Ĉ are invertible and easy to evaluate, then  = Ĉ ˆB 1. It is nice to illustrate the scheme with the problem of isothermal flow: t ρ + x ρu = 0 t ρu + x (ρu 2 + aρ 2 ) = 0 and with m = ρu, U = ρ m and so f(u) = ρu ρu 2 + a 2 ρ = f (U) = m 2 ρ 0 1 a 2 u 2 2u m + a2 ρ We need to choose Â, so we need z. Let z = ρ 1/2 ρ = z 1 ρu z 2 = ρ1 /2 ρ 1 /2 u then q(z) = U = z 1 z f(u) = z 1z 2 a 2 z z

28 and we can write U and f(u) in quadratic form: and and so So, finally, we have where is called the Roe Average. z = 1 2 (z l + z r ) = z 1 = 1 z 2 2 U l U r = f(u l ) f(u r ) = ˆB = 2 z 1 0 z 2 z 1 2 z 1 0 z 2 z 1 z 2 z 1 2a 2 z 2 2 z 2 Ĉ = /2 ρ1 l + ρ 1 /2 r m l ρ 1 /2 l (z l z r ) + mr ρ 1 /2 r (z l z r ) z 2 z 1 2a 2 z 2 2 z 2 Â = Ĉ ˆB 1 = 0 1 a 2 ū 2 2ū ū = z 2 z 1 = 3.8 Non Linear Stability ρl u l + ρ r u r ρl + ρ r In order to determine the stability of methods used to solve non linear equations, some tougher analysis is required. The first concept needed I have already mentioned: total variation. Total variation may be thought of as a way to measure the oscillatory nature of a function: 1 T V (v) = lim sup v(x) v(x ɛ) dx ɛ 0 ɛ Also, if v is differentiable, then R T V (v) = R v (x) dx We can also consider total variation in more dimensions: ( 1 T T V T (u(x, t)) = lim sup u(x + ɛ, t) u(x, t) dxdt + ɛ 0 ɛ 0 R T 0 R ) u(x, t + ɛ) u(x, t) dxdt 28

29 We often consider the 1 norm of our functions: v 1,T = T 0 v(, t) 1 dt = T and the space of functions that are finite under that norm: Consider 0 L 1,T = {v v 1,T < } R v(x, t) dxdt K = {u L 1,T T V T (u) R, supp(u(, t)) [ M, M] t [0, 1]} K is a compact set. We can also define the total variation of a discrete solution u n j : T V T (u) = N j= n=0 ( t u n j+1 u n j + x u n+1 j u n j ) = We will call a numerical solution with t = k u k. N t u n T V + n=0 N u n+1 u n 1 n=0 A numerical method is total variation stable (TV stable) if all approximate solutions u k for k < k 0 lie in some fixed set K (where R and M depend on the initial data u 0 and the flux function f(u) but not on the time step k). Theorem 5. Consider a conservative method with a Lipschitz continuous numerical flux F(u;j). Suppose that for each initial data u 0, some k 0 > 0 such that T V (u n ) R n, k, k < k 0, nk T. Then the method is TV stable. This theorem means that it is sufficient to check TV stability in space under the right conditions. We also have the lemma: If the conditions of the theorem are met, α such that u n+1 u n αk n, k k < k 0, nk < T Proof. (of the Theorem) T V T (u) N n+0 kr + N n=0 αk = (α + R) k (α + R)NK (α + R)T Proof. (of the lemma) The scheme is conservative, so u n+1 j u n j = t x [F (un ; j) F (u n ; j 1)] u n+1 u n 1 = t j= F (un ; j) F (u n ; j 1) F (u n ; j) depends on a finite number of spacial points, u n j p to u n j+q. F is Lipschitz continuous in u, so F (u n ; j) F (u n ; j 1) C max p<i<q un j+i u n j+i 1 29 q u n j+i u n j+i 1 i= p

30 so u n+1 u n 1 C t and so α = CR(p + q 1) j= i= p q u n j+i u n j+i 1 = C t q T V (u n ) C tr(q + p 1) i= p So, under the conditions of the theorem, it is sufficient that T V (u n ) = j= u n j+1 u n j is bounded for the method to be TV stable. Furthermore, Theorem 6. Suppose u k is generated by a numerical method in conservation form with a Lipschitz continuous numerical flux consistent with some scalar conservation law. If the method is TV stable, then the method is convergent (converges to a weak solution). A stronger condition for a method is Total Variation Diminishing (TVD), meaning T V (u n+1 ) T V (u n ) Unsurprisingly, TVD TV stable (as a trivial consequence of theorem 5), and so a TVD method that is consistent and conservative converges to a weak solution. Another desirable property in a numerical method the absence of numerical oscillations. A method is Monotonicity Preserving if u 0 j u 0 j+1 j u n j u n j+1 j, n Theorem 7. If a method for a hyperbolic problem is TVD, it is monotonicity preserving Proof. T V (u n ) = j= un j+1 u n j T V (u 0 ) = j= u0 j+1 u 0 j because the scheme is TVD. Monotonicity of the initial data implies T V (u 0 ) = j= u 0 j+1 u 0 j = u 0 u 0 and because of the finite wave speed of a hyperbolic problem, u n = u 0 and u n = u 0. This means that T V (u 0 ) = u 0 u 0 = u n j+1 u n j T V (u n ) j= by the triangle inequality. The scheme is TVD, so equality must hold. This implies that T V (u n ) = j= u n j+1 u n j = u n u n which can only be true if u n j u n j+1, so the scheme is monotonicity preserving. 30

31 For analytic weak solutions of hyperbolic problems, u(, t 2 ) 1 u(, t 1 ) 1 t 2 t 1 and i u and v are both entropy solutions with different initial data, u(, t 2 ) v(, t 2 ) 1 u(, t 1 ) v(, t 1 ) 1 t 2 t 1 We would like our numerical methods to in some sense preserve this, using the norm u n 1 = j u n j A numerical method is l 1 contracting if u n+1 v n+1 1 u n v n 1 u n, v n numerical solutions with different initial data. Theorem 8. l 1 contracting TVD Proof. Let u, v be solutions with different initial data. u n+1 v n+1 1 u n v n T V (u n+1 ) = j un+1 j+1 un+1 j let v n j = u n j+1, v n j is a numeric solution. T V (u n+1 ) = j v n+1 j u n+1 j j v n j u n j = T V (u n j ) Consider for a non linear advection equation u t + f(u) x = 0 the scheme so that u n+1 j u n+1 j v n+1 j u n j t + f(un j ) f(u n j 1 x = 0 ( = u n j t x f(u n j ) f(u n j 1) ) ( = vj n t x f(v n j ) f(vj 1) ) n then let w = u v. We can show that this method is l 1 contracting by showing that wj n. w n+1 j w n+1 j = wj n t [ f(u n x j ) f(vj n ) f(u n j 1) + f(vj 1) ] n 31

32 and by the mean value theorem, θ so that w n+1 j = wj n t [ ] f (θj n )wj n f (θ n x j 1)wj 1 n = [1 t x f (θj n ) w n+1 j 1 + t f (θ n x j ) wj n + t f (θ n x j 1) wj 1 n ] w n j + t t f (θ n j 1)w n j 1 x j wn+1 j x t j 1 + f (θ n x j ) wj n + x j t f (θ n x j 1) wj 1 n if the CFL condition is met, then 1 t f (u) 0 u, and t f (u) 1 u, which means x x that w n+1 1 x ( 1 t ) x f (θj n ) wj n + x ( ) t x f (θj 1) n wj 1 n = x wj n = w n 1 j j j so this scheme is l 1 contracting under the CFL condition. If u(x, t) and v(x, t) are analytical solutions which satisfy the entropy conditions, and u 0 (x) v 0 (x) x, then u(x, t) v(x, t) x, t. Again, we want to preserve this property in our numerical method. A method U n+1 = H(U n ) is called a Monotone Method if then, if u 0 j v 0 j j, u n j H(u n ) 0 j u n+1 j v n+1 j = H(u n j ) H(vj n ) = k H u k w n k (u n k v n k ) 0 and so (inductively) we see that the property is preserved. Theorem 9. Any monotone method is l 1 contracting. Proof. We need to show that u n+1 v n+1 1 u n v n 1. Suppose = H(u n j k, u n j k+1,..., u n j+k) let u n+1 j ū n j = (u n j k,..., un j+k ); sn j = sgn(u j v n j ) and u n+1 v n+1 1 = x j un+1 j v n+1 j = x j H(ūn j ) H( v j n ) = x ( j sn+1 j H(ū n j ) H( v j n ) ) H(ū n j ) H( v n j = 1 = 1 0 2k+1 l=1 0 dh dθ ( ) θū n j + (1 θ) v j n dθ H u l ( ξ j n (θ))(ū n j k+l 1 vn j k+l 1 )dθ 32

33 where ξ n j (θ) = ( θū n j + (1 θ) v n j ). Let m = j k + l 1. Then x j sn+1 j ( H(ū n j ) H( v n j ) ) = x j sn+1 j 1 2k+1 H 0 l=1 u l ( ξ j n (θ))(ū n m v m)dθ n = x m (ūn m v m) n 1 2k+1 H 0 l=1 s m+k l+1 u l ( ξ m+k l+1 n (θ))dθ x m ūn m v m n 1 2k+1 H 0 l=1 u l ( ξ m+k l+1 n (θ))dθ 1 2k+1 H 0 l=1 u l ( ξ m+k l+1 n (θ))dθ = 1 because: so u n+1 k u n+1 j = x m ūn m v n m = u n j t [ F (u n x j k+1,..., u n j+k) F (u n j k,..., u n j+k 1) ] [ = H(u 1,.., u 2k+1 ) = u k+1 t x F (u n 1,..., u n j+k 1 ) F (un 2,..., u n j+k )] ( ) = 1 t F x u k+1 (u 1,..., u j+k 1 ) F u k (u 2,.., u j+k ) H u k+1 and for all i k + 1, 1, or j + k, H u i = t x H u 1 H u j+k = t F x u 1 (u 1,..., u j+k 1 ) = t x F u j+k (u 2,..., u j+k ) [ F u i (u 1,..., u j+k 1 ) so all of these cancel except for the leading 1 in Finally, we present a couple of theorems without proof: F ] (u 2,..., u j+k ) u i 1 H u k+1 and so the sum is 1. Theorem 10. (Due to Crandall & Majda) The numerical solution of a monotone method converges to the entropy solution of the scalar conservation laws. Theorem 11. (Due to Harten, Lax, & Hyman) A monotone method is at best first order. We have now developed the following hierarchy: Monotone Method l 1 Contracting TVD Monotonicity Preserving 33

34 3.9 High Resolution Shock Capturing Schemes Monotone methods are at most first order, so if higher accuracy is desired, numerical oscillations will occur. To deal with this, artificial viscosity can be introduced to dampen artificial oscillations. For example, if we want to improve the (second order) Lax-Wendroff scheme for a linear problem: u n+1 j u t + au x = 0 = u n j ν(u n j+1 u n j 1) ν(un j+1 2u n j + u n j 1) ν = a t x we need to add an artificial viscosity term: so the modified scheme is u n+1 j is the Courant number kq(u n j+1 2u n j + u n j 1) = u n j ν(u n j+1 u n j 1) ν(un j+1 2u n j + u n j 1) + kq(u n j+1 2u n j + u n j 1) Inspecting the truncation error of this modified method: L(x, t) = L LW Q(u n j+1 2u n j + u n j 1) = O(h 2 ) so the scheme is still second order if Q is chosen wisely. The last challenge is then to choose the parameter Q so that we do not loose second order convergence, but large enough to dampen the numerical oscillations. The way to do this is to make Q depend on u, making it larger near shocks, where these oscillations occur. If Q is constant, it cannot be chosen to dampen all the oscillations, which is consistent with the theorem by Godunov: Theorem 12. A linear, monotonicity preserving method is at most first order So, if we want to preserve monotonicity, we need Q 1 /h, and thus have a first order scheme. Clearly, a higher order, monotonicity preserving scheme must be non linear, even for this linear problem. So we will need to choose a function Q(u) which is large, on the order of 1 /h, near the shock and very small away from the shock Flux Limiter Methods We can manipulate the flux of a method, splitting it according to areas of high and low flux: F H (u; j) = F L (u; j) + (F (u; j) F L (u; j)) and add a limiter where F H = F L + φ(u; j)(f H F L ) 1 smooth region φ(u; j) 0 near discontinuity 34

35 F = F H + (1 φ)(f L F H ) this the Flux Corrected Transport (FCT) Method. Wendroff method: u n+1 j and we use the smoothness indicator Applying it to our example, the Lax- = u n j ν(u n j+1 u n j 1) ν(1 ν)(un j+1 2u n j + u n j 1) F H (u; j) = au j a(1 ν)(u j+1 u j ) Let F (u; j) = au j a(1 ν)(u j+1 u j )φ j θ j = u j u j 1 u j+1 u j which has the property that, in smooth regions, θ j 1, and at discontinuities, θ j 1. So we can easily create φ j = φ(θ j ) with the properties we require of it. Theorem 13. The flux limiter method F (u; j) given above is consistent with the equation u t + au x = 0 provided φ(θ) is a bounded function. It is second order accurate (on smooth solutions with u x bounded away from 0) provided φ(1) = 1 with φ Lipschitz continuous at θ = 1. so this scheme becomes: = u n j t {a(u nj u nj 1) + 12 x a(1 ν) [ (u nj+1 u nj )φ j (u nj u nj 1)φ ] } j 1 u n+1 j = u j In general, suppose the scheme is ( ν 1 ) 2 ν(1 ν)φ j 1 (u j u j 1 ) 1 2 ν(1 ν)φ j(u j+1 u j ) u n+1 j = u j C j 1 (u j u j 1 ) + D j (u j+1 u j) Theorem 14. In order for the above scheme is be TVD, the following conditions on the coefficients are sufficient: Proof. C j 1 0 D j 0 0 C j + D j 1 j u n+1 j+1 un+1 j = u n j+1 u n j C j (u n j+1 u n j )+C j 1 (u n j u n j 1)+D j+1 (u n j+2 u n j+1) D j (u n j+1 u n j ) u n+1 j+1 un+1 j = C j 1 (u n j u n j 1) + (1 C j D j )(u n j+1 u n j ) + D j+1 (u n j+2 u n j+1) 35

Numerical Methods for Conservation Laws WPI, January 2006 C. Ringhofer C2 b 2

Numerical Methods for Conservation Laws WPI, January 2006 C. Ringhofer C2 b 2 Numerical Methods for Conservation Laws WPI, January 2006 C. Ringhofer ringhofer@asu.edu, C2 b 2 2 h2 x u http://math.la.asu.edu/ chris Last update: Jan 24, 2006 1 LITERATURE 1. Numerical Methods for Conservation

More information

Numerical Solutions to Partial Differential Equations

Numerical Solutions to Partial Differential Equations Numerical Solutions to Partial Differential Equations Zhiping Li LMAM and School of Mathematical Sciences Peking University Introduction to Hyperbolic Equations The Hyperbolic Equations n-d 1st Order Linear

More information

Math 660-Lecture 23: Gudonov s method and some theories for FVM schemes

Math 660-Lecture 23: Gudonov s method and some theories for FVM schemes Math 660-Lecture 3: Gudonov s method and some theories for FVM schemes 1 The idea of FVM (You can refer to Chapter 4 in the book Finite volume methods for hyperbolic problems ) Consider the box [x 1/,

More information

ENO and WENO schemes. Further topics and time Integration

ENO and WENO schemes. Further topics and time Integration ENO and WENO schemes. Further topics and time Integration Tefa Kaisara CASA Seminar 29 November, 2006 Outline 1 Short review ENO/WENO 2 Further topics Subcell resolution Other building blocks 3 Time Integration

More information

Advection / Hyperbolic PDEs. PHY 604: Computational Methods in Physics and Astrophysics II

Advection / Hyperbolic PDEs. PHY 604: Computational Methods in Physics and Astrophysics II Advection / Hyperbolic PDEs Notes In addition to the slides and code examples, my notes on PDEs with the finite-volume method are up online: https://github.com/open-astrophysics-bookshelf/numerical_exercises

More information

Index. higher order methods, 52 nonlinear, 36 with variable coefficients, 34 Burgers equation, 234 BVP, see boundary value problems

Index. higher order methods, 52 nonlinear, 36 with variable coefficients, 34 Burgers equation, 234 BVP, see boundary value problems Index A-conjugate directions, 83 A-stability, 171 A( )-stability, 171 absolute error, 243 absolute stability, 149 for systems of equations, 154 absorbing boundary conditions, 228 Adams Bashforth methods,

More information

Lecture Notes on Numerical Schemes for Flow and Transport Problems

Lecture Notes on Numerical Schemes for Flow and Transport Problems Lecture Notes on Numerical Schemes for Flow and Transport Problems by Sri Redeki Pudaprasetya sr pudap@math.itb.ac.id Department of Mathematics Faculty of Mathematics and Natural Sciences Bandung Institute

More information

Lecture Notes on Numerical Schemes for Flow and Transport Problems

Lecture Notes on Numerical Schemes for Flow and Transport Problems Lecture Notes on Numerical Schemes for Flow and Transport Problems by Sri Redeki Pudaprasetya sr pudap@math.itb.ac.id Department of Mathematics Faculty of Mathematics and Natural Sciences Bandung Institute

More information

FDM for wave equations

FDM for wave equations FDM for wave equations Consider the second order wave equation Some properties Existence & Uniqueness Wave speed finite!!! Dependence region Analytical solution in 1D Finite difference discretization Finite

More information

A Bound-Preserving Fourth Order Compact Finite Difference Scheme for Scalar Convection Diffusion Equations

A Bound-Preserving Fourth Order Compact Finite Difference Scheme for Scalar Convection Diffusion Equations A Bound-Preserving Fourth Order Compact Finite Difference Scheme for Scalar Convection Diffusion Equations Hao Li Math Dept, Purdue Univeristy Ocean University of China, December, 2017 Joint work with

More information

Tutorial 2. Introduction to numerical schemes

Tutorial 2. Introduction to numerical schemes 236861 Numerical Geometry of Images Tutorial 2 Introduction to numerical schemes c 2012 Classifying PDEs Looking at the PDE Au xx + 2Bu xy + Cu yy + Du x + Eu y + Fu +.. = 0, and its discriminant, B 2

More information

0.3.4 Burgers Equation and Nonlinear Wave

0.3.4 Burgers Equation and Nonlinear Wave 16 CONTENTS Solution to step (discontinuity) initial condition u(x, 0) = ul if X < 0 u r if X > 0, (80) u(x, t) = u L + (u L u R ) ( 1 1 π X 4νt e Y 2 dy ) (81) 0.3.4 Burgers Equation and Nonlinear Wave

More information

Finite Volume Schemes: an introduction

Finite Volume Schemes: an introduction Finite Volume Schemes: an introduction First lecture Annamaria Mazzia Dipartimento di Metodi e Modelli Matematici per le Scienze Applicate Università di Padova mazzia@dmsa.unipd.it Scuola di dottorato

More information

Numerical Methods for PDEs

Numerical Methods for PDEs Numerical Methods for PDEs Problems 1. Numerical Differentiation. Find the best approximation to the second drivative d 2 f(x)/dx 2 at x = x you can of a function f(x) using (a) the Taylor series approach

More information

Numerical Solutions for Hyperbolic Systems of Conservation Laws: from Godunov Method to Adaptive Mesh Refinement

Numerical Solutions for Hyperbolic Systems of Conservation Laws: from Godunov Method to Adaptive Mesh Refinement Numerical Solutions for Hyperbolic Systems of Conservation Laws: from Godunov Method to Adaptive Mesh Refinement Romain Teyssier CEA Saclay Romain Teyssier 1 Outline - Euler equations, MHD, waves, hyperbolic

More information

Info. No lecture on Thursday in a week (March 17) PSet back tonight

Info. No lecture on Thursday in a week (March 17) PSet back tonight Lecture 0 8.086 Info No lecture on Thursday in a week (March 7) PSet back tonight Nonlinear transport & conservation laws What if transport becomes nonlinear? Remember: Nonlinear transport A first attempt

More information

Math Partial Differential Equations 1

Math Partial Differential Equations 1 Math 9 - Partial Differential Equations Homework 5 and Answers. The one-dimensional shallow water equations are h t + (hv) x, v t + ( v + h) x, or equivalently for classical solutions, h t + (hv) x, (hv)

More information

Hyperbolic Systems of Conservation Laws. in One Space Dimension. I - Basic concepts. Alberto Bressan. Department of Mathematics, Penn State University

Hyperbolic Systems of Conservation Laws. in One Space Dimension. I - Basic concepts. Alberto Bressan. Department of Mathematics, Penn State University Hyperbolic Systems of Conservation Laws in One Space Dimension I - Basic concepts Alberto Bressan Department of Mathematics, Penn State University http://www.math.psu.edu/bressan/ 1 The Scalar Conservation

More information

PDEs, part 3: Hyperbolic PDEs

PDEs, part 3: Hyperbolic PDEs PDEs, part 3: Hyperbolic PDEs Anna-Karin Tornberg Mathematical Models, Analysis and Simulation Fall semester, 2011 Hyperbolic equations (Sections 6.4 and 6.5 of Strang). Consider the model problem (the

More information

Dissipation and Dispersion

Dissipation and Dispersion Consider the problem with periodic boundary conditions Dissipation and Dispersion u t = au x 0 < x < 1, t > 0 u 0 = sin 40 πx u(0, t) = u(1, t) t > 0 If a > 0 then the wave is moving to the left and if

More information

Numerical Solutions to Partial Differential Equations

Numerical Solutions to Partial Differential Equations Numerical Solutions to Partial Differential Equations Zhiping Li LMAM and School of Mathematical Sciences Peking University Modified Equation of a Difference Scheme What is a Modified Equation of a Difference

More information

Numerical Solutions to Partial Differential Equations

Numerical Solutions to Partial Differential Equations Numerical Solutions to Partial Differential Equations Zhiping Li LMAM and School of Mathematical Sciences Peking University The Implicit Schemes for the Model Problem The Crank-Nicolson scheme and θ-scheme

More information

Math 7824 Spring 2010 Numerical solution of partial differential equations Classroom notes and homework

Math 7824 Spring 2010 Numerical solution of partial differential equations Classroom notes and homework Math 7824 Spring 2010 Numerical solution of partial differential equations Classroom notes and homework Jan Mandel University of Colorado Denver May 12, 2010 1/20/09: Sec. 1.1, 1.2. Hw 1 due 1/27: problems

More information

Part 1. The diffusion equation

Part 1. The diffusion equation Differential Equations FMNN10 Graded Project #3 c G Söderlind 2016 2017 Published 2017-11-27. Instruction in computer lab 2017-11-30/2017-12-06/07. Project due date: Monday 2017-12-11 at 12:00:00. Goals.

More information

The RAMSES code and related techniques I. Hydro solvers

The RAMSES code and related techniques I. Hydro solvers The RAMSES code and related techniques I. Hydro solvers Outline - The Euler equations - Systems of conservation laws - The Riemann problem - The Godunov Method - Riemann solvers - 2D Godunov schemes -

More information

Finite difference method for heat equation

Finite difference method for heat equation Finite difference method for heat equation Praveen. C praveen@math.tifrbng.res.in Tata Institute of Fundamental Research Center for Applicable Mathematics Bangalore 560065 http://math.tifrbng.res.in/~praveen

More information

Notes: Outline. Shock formation. Notes: Notes: Shocks in traffic flow

Notes: Outline. Shock formation. Notes: Notes: Shocks in traffic flow Outline Scalar nonlinear conservation laws Traffic flow Shocks and rarefaction waves Burgers equation Rankine-Hugoniot conditions Importance of conservation form Weak solutions Reading: Chapter, 2 R.J.

More information

Finite Differences for Differential Equations 28 PART II. Finite Difference Methods for Differential Equations

Finite Differences for Differential Equations 28 PART II. Finite Difference Methods for Differential Equations Finite Differences for Differential Equations 28 PART II Finite Difference Methods for Differential Equations Finite Differences for Differential Equations 29 BOUNDARY VALUE PROBLEMS (I) Solving a TWO

More information

The one-dimensional equations for the fluid dynamics of a gas can be written in conservation form as follows:

The one-dimensional equations for the fluid dynamics of a gas can be written in conservation form as follows: Topic 7 Fluid Dynamics Lecture The Riemann Problem and Shock Tube Problem A simple one dimensional model of a gas was introduced by G.A. Sod, J. Computational Physics 7, 1 (1978), to test various algorithms

More information

Numerical Analysis Preliminary Exam 10 am to 1 pm, August 20, 2018

Numerical Analysis Preliminary Exam 10 am to 1 pm, August 20, 2018 Numerical Analysis Preliminary Exam 1 am to 1 pm, August 2, 218 Instructions. You have three hours to complete this exam. Submit solutions to four (and no more) of the following six problems. Please start

More information

PDE Solvers for Fluid Flow

PDE Solvers for Fluid Flow PDE Solvers for Fluid Flow issues and algorithms for the Streaming Supercomputer Eran Guendelman February 5, 2002 Topics Equations for incompressible fluid flow 3 model PDEs: Hyperbolic, Elliptic, Parabolic

More information

Partial differential equations

Partial differential equations Partial differential equations Many problems in science involve the evolution of quantities not only in time but also in space (this is the most common situation)! We will call partial differential equation

More information

CLASSROOM NOTES PART II: SPECIAL TOPICS. APM526, Spring 2018 Last update: Apr 11

CLASSROOM NOTES PART II: SPECIAL TOPICS. APM526, Spring 2018 Last update: Apr 11 CLASSROOM NOTES PART II: SPECIAL TOPICS APM526, Spring 2018 Last update: Apr 11 1 Function Space Methods General Setting: Projection into finite dimensional subspaces t u = F (u), u(t = 0) = u I, F : B

More information

1 Upwind scheme for advection equation with variable. 2 Modified equations: numerical dissipation and dispersion

1 Upwind scheme for advection equation with variable. 2 Modified equations: numerical dissipation and dispersion 1 Upwind sceme for advection equation wit variable coefficient Consider te equation u t + a(x)u x Applying te upwind sceme, we ave u n 1 = a (un u n 1), a 0 u n 1 = a (un +1 u n ) a < 0. CFL condition

More information

MIT (Spring 2014)

MIT (Spring 2014) 18.311 MIT (Spring 014) Rodolfo R. Rosales May 6, 014. Problem Set # 08. Due: Last day of lectures. IMPORTANT: Turn in the regular and the special problems stapled in two SEPARATE packages. Print your

More information

Ordinary Differential Equations

Ordinary Differential Equations Ordinary Differential Equations We call Ordinary Differential Equation (ODE) of nth order in the variable x, a relation of the kind: where L is an operator. If it is a linear operator, we call the equation

More information

Finite difference methods for the diffusion equation

Finite difference methods for the diffusion equation Finite difference methods for the diffusion equation D150, Tillämpade numeriska metoder II Olof Runborg May 0, 003 These notes summarize a part of the material in Chapter 13 of Iserles. They are based

More information

Lecture 4: Numerical solution of ordinary differential equations

Lecture 4: Numerical solution of ordinary differential equations Lecture 4: Numerical solution of ordinary differential equations Department of Mathematics, ETH Zürich General explicit one-step method: Consistency; Stability; Convergence. High-order methods: Taylor

More information

Sung-Ik Sohn and Jun Yong Shin

Sung-Ik Sohn and Jun Yong Shin Commun. Korean Math. Soc. 17 (2002), No. 1, pp. 103 120 A SECOND ORDER UPWIND METHOD FOR LINEAR HYPERBOLIC SYSTEMS Sung-Ik Sohn and Jun Yong Shin Abstract. A second order upwind method for linear hyperbolic

More information

Introduction to numerical schemes

Introduction to numerical schemes 236861 Numerical Geometry of Images Tutorial 2 Introduction to numerical schemes Heat equation The simple parabolic PDE with the initial values u t = K 2 u 2 x u(0, x) = u 0 (x) and some boundary conditions

More information

A Very Brief Introduction to Conservation Laws

A Very Brief Introduction to Conservation Laws A Very Brief Introduction to Wen Shen Department of Mathematics, Penn State University Summer REU Tutorial, May 2013 Summer REU Tutorial, May 2013 1 / The derivation of conservation laws A conservation

More information

Time stepping methods

Time stepping methods Time stepping methods ATHENS course: Introduction into Finite Elements Delft Institute of Applied Mathematics, TU Delft Matthias Möller (m.moller@tudelft.nl) 19 November 2014 M. Möller (DIAM@TUDelft) Time

More information

FDM for parabolic equations

FDM for parabolic equations FDM for parabolic equations Consider the heat equation where Well-posed problem Existence & Uniqueness Mass & Energy decreasing FDM for parabolic equations CNFD Crank-Nicolson + 2 nd order finite difference

More information

3.4. Monotonicity of Advection Schemes

3.4. Monotonicity of Advection Schemes 3.4. Monotonicity of Advection Schemes 3.4.1. Concept of Monotonicity When numerical schemes are used to advect a monotonic function, e.g., a monotonically decreasing function of x, the numerical solutions

More information

Applied Mathematics 205. Unit III: Numerical Calculus. Lecturer: Dr. David Knezevic

Applied Mathematics 205. Unit III: Numerical Calculus. Lecturer: Dr. David Knezevic Applied Mathematics 205 Unit III: Numerical Calculus Lecturer: Dr. David Knezevic Unit III: Numerical Calculus Chapter III.3: Boundary Value Problems and PDEs 2 / 96 ODE Boundary Value Problems 3 / 96

More information

30 crete maximum principle, which all imply the bound-preserving property. But most

30 crete maximum principle, which all imply the bound-preserving property. But most 3 4 7 8 9 3 4 7 A HIGH ORDER ACCURATE BOUND-PRESERVING COMPACT FINITE DIFFERENCE SCHEME FOR SCALAR CONVECTION DIFFUSION EQUATIONS HAO LI, SHUSEN XIE, AND XIANGXIONG ZHANG Abstract We show that the classical

More information

AIMS Exercise Set # 1

AIMS Exercise Set # 1 AIMS Exercise Set #. Determine the form of the single precision floating point arithmetic used in the computers at AIMS. What is the largest number that can be accurately represented? What is the smallest

More information

A New Fourth-Order Non-Oscillatory Central Scheme For Hyperbolic Conservation Laws

A New Fourth-Order Non-Oscillatory Central Scheme For Hyperbolic Conservation Laws A New Fourth-Order Non-Oscillatory Central Scheme For Hyperbolic Conservation Laws A. A. I. Peer a,, A. Gopaul a, M. Z. Dauhoo a, M. Bhuruth a, a Department of Mathematics, University of Mauritius, Reduit,

More information

A Central Compact-Reconstruction WENO Method for Hyperbolic Conservation Laws

A Central Compact-Reconstruction WENO Method for Hyperbolic Conservation Laws A Central Compact-Reconstruction WENO Method for Hyperbolic Conservation Laws Kilian Cooley 1 Prof. James Baeder 2 1 Department of Mathematics, University of Maryland - College Park 2 Department of Aerospace

More information

Numerical Methods for Hyperbolic Conservation Laws Lecture 4

Numerical Methods for Hyperbolic Conservation Laws Lecture 4 Numerical Methods for Hyperbolic Conservation Laws Lecture 4 Wen Shen Department of Mathematics, Penn State University Email: wxs7@psu.edu Oxford, Spring, 018 Lecture Notes online: http://personal.psu.edu/wxs7/notesnumcons/

More information

Math 46, Applied Math (Spring 2008): Final

Math 46, Applied Math (Spring 2008): Final Math 46, Applied Math (Spring 2008): Final 3 hours, 80 points total, 9 questions, roughly in syllabus order (apart from short answers) 1. [16 points. Note part c, worth 7 points, is independent of the

More information

Applied/Numerical Analysis Qualifying Exam

Applied/Numerical Analysis Qualifying Exam Applied/Numerical Analysis Qualifying Exam August 9, 212 Cover Sheet Applied Analysis Part Policy on misprints: The qualifying exam committee tries to proofread exams as carefully as possible. Nevertheless,

More information

Preliminary Examination, Numerical Analysis, August 2016

Preliminary Examination, Numerical Analysis, August 2016 Preliminary Examination, Numerical Analysis, August 2016 Instructions: This exam is closed books and notes. The time allowed is three hours and you need to work on any three out of questions 1-4 and any

More information

Spatial Discretization

Spatial Discretization Spatial Discretization Shengtai Li and Hui Li Los Alamos National Laboratory 1 Overview Finite Difference Method Finite Difference for Linear Advection Equation 3 Conservation Laws Modern Finite Difference

More information

Numerical Integration of Linear and Nonlinear Wave Equations

Numerical Integration of Linear and Nonlinear Wave Equations University of Nebraska - Lincoln DigitalCommons@University of Nebraska - Lincoln Dissertations, Theses, and Student Research Papers in Mathematics Mathematics, Department of 12-2004 Numerical Integration

More information

Chapter Two: Numerical Methods for Elliptic PDEs. 1 Finite Difference Methods for Elliptic PDEs

Chapter Two: Numerical Methods for Elliptic PDEs. 1 Finite Difference Methods for Elliptic PDEs Chapter Two: Numerical Methods for Elliptic PDEs Finite Difference Methods for Elliptic PDEs.. Finite difference scheme. We consider a simple example u := subject to Dirichlet boundary conditions ( ) u

More information

AMath 574 February 11, 2011

AMath 574 February 11, 2011 AMath 574 February 11, 2011 Today: Entropy conditions and functions Lax-Wendroff theorem Wednesday February 23: Nonlinear systems Reading: Chapter 13 R.J. LeVeque, University of Washington AMath 574, February

More information

Chapter 10 Exercises

Chapter 10 Exercises Chapter 10 Exercises From: Finite Difference Methods for Ordinary and Partial Differential Equations by R. J. LeVeque, SIAM, 2007. http://www.amath.washington.edu/ rl/fdmbook Exercise 10.1 (One-sided and

More information

Definition and Construction of Entropy Satisfying Multiresolution Analysis (MRA)

Definition and Construction of Entropy Satisfying Multiresolution Analysis (MRA) Utah State University DigitalCommons@USU All Graduate Theses and Dissertations Graduate Studies 6 Definition and Construction of Entropy Satisfying Multiresolution Analysis (MRA Ju Y. Yi Utah State University

More information

Multi-Factor Finite Differences

Multi-Factor Finite Differences February 17, 2017 Aims and outline Finite differences for more than one direction The θ-method, explicit, implicit, Crank-Nicolson Iterative solution of discretised equations Alternating directions implicit

More information

7 Hyperbolic Differential Equations

7 Hyperbolic Differential Equations Numerical Analysis of Differential Equations 243 7 Hyperbolic Differential Equations While parabolic equations model diffusion processes, hyperbolic equations model wave propagation and transport phenomena.

More information

Partial Differential Equations

Partial Differential Equations Part II Partial Differential Equations Year 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2015 Paper 4, Section II 29E Partial Differential Equations 72 (a) Show that the Cauchy problem for u(x,

More information

Numerical Analysis of Differential Equations Numerical Solution of Parabolic Equations

Numerical Analysis of Differential Equations Numerical Solution of Parabolic Equations Numerical Analysis of Differential Equations 215 6 Numerical Solution of Parabolic Equations 6 Numerical Solution of Parabolic Equations TU Bergakademie Freiberg, SS 2012 Numerical Analysis of Differential

More information

Finite Difference and Finite Element Methods

Finite Difference and Finite Element Methods Finite Difference and Finite Element Methods Georgy Gimel farb COMPSCI 369 Computational Science 1 / 39 1 Finite Differences Difference Equations 3 Finite Difference Methods: Euler FDMs 4 Finite Element

More information

Modeling and Numerical Approximation of Traffic Flow Problems

Modeling and Numerical Approximation of Traffic Flow Problems Modeling and Numerical Approximation of Traffic Flow Problems Prof. Dr. Ansgar Jüngel Universität Mainz Lecture Notes (preliminary version) Winter Contents Introduction Mathematical theory for scalar conservation

More information

n 1 f n 1 c 1 n+1 = c 1 n $ c 1 n 1. After taking logs, this becomes

n 1 f n 1 c 1 n+1 = c 1 n $ c 1 n 1. After taking logs, this becomes Root finding: 1 a The points {x n+1, }, {x n, f n }, {x n 1, f n 1 } should be co-linear Say they lie on the line x + y = This gives the relations x n+1 + = x n +f n = x n 1 +f n 1 = Eliminating α and

More information

2tdt 1 y = t2 + C y = which implies C = 1 and the solution is y = 1

2tdt 1 y = t2 + C y = which implies C = 1 and the solution is y = 1 Lectures - Week 11 General First Order ODEs & Numerical Methods for IVPs In general, nonlinear problems are much more difficult to solve than linear ones. Unfortunately many phenomena exhibit nonlinear

More information

Lecture Notes on Hyperbolic Conservation Laws

Lecture Notes on Hyperbolic Conservation Laws Lecture Notes on Hyperbolic Conservation Laws Alberto Bressan Department of Mathematics, Penn State University, University Park, Pa. 16802, USA. bressan@math.psu.edu May 21, 2009 Abstract These notes provide

More information

Math 411 Preliminaries

Math 411 Preliminaries Math 411 Preliminaries Provide a list of preliminary vocabulary and concepts Preliminary Basic Netwon's method, Taylor series expansion (for single and multiple variables), Eigenvalue, Eigenvector, Vector

More information

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations Lecture slides based on the textbook Scientific Computing: An Introductory Survey by Michael T. Heath, copyright c 2018 by the Society for Industrial and Applied Mathematics. http://www.siam.org/books/cl80

More information

Discontinuous Galerkin methods for fractional diffusion problems

Discontinuous Galerkin methods for fractional diffusion problems Discontinuous Galerkin methods for fractional diffusion problems Bill McLean Kassem Mustapha School of Maths and Stats, University of NSW KFUPM, Dhahran Leipzig, 7 October, 2010 Outline Sub-diffusion Equation

More information

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 9 Initial Value Problems for Ordinary Differential Equations Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign

More information

Chapter 4. MAC Scheme. The MAC scheme is a numerical method used to solve the incompressible Navier-Stokes. u = 0

Chapter 4. MAC Scheme. The MAC scheme is a numerical method used to solve the incompressible Navier-Stokes. u = 0 Chapter 4. MAC Scheme 4.1. MAC Scheme and the Staggered Grid. The MAC scheme is a numerical method used to solve the incompressible Navier-Stokes equation in the velocity-pressure formulation: (4.1.1)

More information

Strong Stability-Preserving (SSP) High-Order Time Discretization Methods

Strong Stability-Preserving (SSP) High-Order Time Discretization Methods Strong Stability-Preserving (SSP) High-Order Time Discretization Methods Xinghui Zhong 12/09/ 2009 Outline 1 Introduction Why SSP methods Idea History/main reference 2 Explicit SSP Runge-Kutta Methods

More information

Chp 4: Non-linear Conservation Laws; the Scalar Case. By Prof. Dinshaw S. Balsara

Chp 4: Non-linear Conservation Laws; the Scalar Case. By Prof. Dinshaw S. Balsara Chp 4: Non-linear Conservation Laws; the Scalar Case By Prof. Dinshaw S. Balsara 1 4.1) Introduction We have seen that monotonicity preserving reconstruction and iemann solvers are essential building blocks

More information

Basics on Numerical Methods for Hyperbolic Equations

Basics on Numerical Methods for Hyperbolic Equations Basics on Numerical Methods for Hyperbolic Equations Professor Dr. E F Toro Laboratory of Applied Mathematics University of Trento, Italy eleuterio.toro@unitn.it http://www.ing.unitn.it/toro October 8,

More information

Computation Fluid Dynamics

Computation Fluid Dynamics Computation Fluid Dynamics CFD I Jitesh Gajjar Maths Dept Manchester University Computation Fluid Dynamics p.1/189 Garbage In, Garbage Out We will begin with a discussion of errors. Useful to understand

More information

A THEORETICAL INTRODUCTION TO NUMERICAL ANALYSIS

A THEORETICAL INTRODUCTION TO NUMERICAL ANALYSIS A THEORETICAL INTRODUCTION TO NUMERICAL ANALYSIS Victor S. Ryaben'kii Semyon V. Tsynkov Chapman &. Hall/CRC Taylor & Francis Group Boca Raton London New York Chapman & Hall/CRC is an imprint of the Taylor

More information

Inverse Lax-Wendroff Procedure for Numerical Boundary Conditions of. Conservation Laws 1. Abstract

Inverse Lax-Wendroff Procedure for Numerical Boundary Conditions of. Conservation Laws 1. Abstract Inverse Lax-Wendroff Procedure for Numerical Boundary Conditions of Conservation Laws Sirui Tan and Chi-Wang Shu 3 Abstract We develop a high order finite difference numerical boundary condition for solving

More information

Preface. 2 Linear Equations and Eigenvalue Problem 22

Preface. 2 Linear Equations and Eigenvalue Problem 22 Contents Preface xv 1 Errors in Computation 1 1.1 Introduction 1 1.2 Floating Point Representation of Number 1 1.3 Binary Numbers 2 1.3.1 Binary number representation in computer 3 1.4 Significant Digits

More information

Ordinary Differential Equations

Ordinary Differential Equations CHAPTER 8 Ordinary Differential Equations 8.1. Introduction My section 8.1 will cover the material in sections 8.1 and 8.2 in the book. Read the book sections on your own. I don t like the order of things

More information

Numerical Analysis Preliminary Exam 10.00am 1.00pm, January 19, 2018

Numerical Analysis Preliminary Exam 10.00am 1.00pm, January 19, 2018 Numerical Analysis Preliminary Exam 0.00am.00pm, January 9, 208 Instructions. You have three hours to complete this exam. Submit solutions to four (and no more) of the following six problems. Please start

More information

Numerical Solutions to Partial Differential Equations

Numerical Solutions to Partial Differential Equations Numerical Solutions to Partial Differential Equations Zhiping Li LMAM and School of Mathematical Sciences Peking University A Model Problem and Its Difference Approximations 1-D Initial Boundary Value

More information

Fundamentals Physics

Fundamentals Physics Fundamentals Physics And Differential Equations 1 Dynamics Dynamics of a material point Ideal case, but often sufficient Dynamics of a solid Including rotation, torques 2 Position, Velocity, Acceleration

More information

Introduction - Motivation. Many phenomena (physical, chemical, biological, etc.) are model by differential equations. f f(x + h) f(x) (x) = lim

Introduction - Motivation. Many phenomena (physical, chemical, biological, etc.) are model by differential equations. f f(x + h) f(x) (x) = lim Introduction - Motivation Many phenomena (physical, chemical, biological, etc.) are model by differential equations. Recall the definition of the derivative of f(x) f f(x + h) f(x) (x) = lim. h 0 h Its

More information

Math 5588 Final Exam Solutions

Math 5588 Final Exam Solutions Math 5588 Final Exam Solutions Prof. Jeff Calder May 9, 2017 1. Find the function u : [0, 1] R that minimizes I(u) = subject to u(0) = 0 and u(1) = 1. 1 0 e u(x) u (x) + u (x) 2 dx, Solution. Since the

More information

Last time: Diffusion - Numerical scheme (FD) Heat equation is dissipative, so why not try Forward Euler:

Last time: Diffusion - Numerical scheme (FD) Heat equation is dissipative, so why not try Forward Euler: Lecture 7 18.086 Last time: Diffusion - Numerical scheme (FD) Heat equation is dissipative, so why not try Forward Euler: U j,n+1 t U j,n = U j+1,n 2U j,n + U j 1,n x 2 Expected accuracy: O(Δt) in time,

More information

u n 2 4 u n 36 u n 1, n 1.

u n 2 4 u n 36 u n 1, n 1. Exercise 1 Let (u n ) be the sequence defined by Set v n = u n 1 x+ u n and f (x) = 4 x. 1. Solve the equations f (x) = 1 and f (x) =. u 0 = 0, n Z +, u n+1 = u n + 4 u n.. Prove that if u n < 1, then

More information

Part IB Numerical Analysis

Part IB Numerical Analysis Part IB Numerical Analysis Definitions Based on lectures by G. Moore Notes taken by Dexter Chua Lent 206 These notes are not endorsed by the lecturers, and I have modified them (often significantly) after

More information

NUMERICAL METHODS FOR ENGINEERING APPLICATION

NUMERICAL METHODS FOR ENGINEERING APPLICATION NUMERICAL METHODS FOR ENGINEERING APPLICATION Second Edition JOEL H. FERZIGER A Wiley-Interscience Publication JOHN WILEY & SONS, INC. New York / Chichester / Weinheim / Brisbane / Singapore / Toronto

More information

Hierarchical Reconstruction with up to Second Degree Remainder for Solving Nonlinear Conservation Laws

Hierarchical Reconstruction with up to Second Degree Remainder for Solving Nonlinear Conservation Laws Hierarchical Reconstruction with up to Second Degree Remainder for Solving Nonlinear Conservation Laws Dedicated to Todd F. Dupont on the occasion of his 65th birthday Yingjie Liu, Chi-Wang Shu and Zhiliang

More information

Finite Differences: Consistency, Stability and Convergence

Finite Differences: Consistency, Stability and Convergence Finite Differences: Consistency, Stability and Convergence Varun Shankar March, 06 Introduction Now that we have tackled our first space-time PDE, we will take a quick detour from presenting new FD methods,

More information

Stability properties of a family of chock capturing methods for hyperbolic conservation laws

Stability properties of a family of chock capturing methods for hyperbolic conservation laws Proceedings of te 3rd IASME/WSEAS Int. Conf. on FLUID DYNAMICS & AERODYNAMICS, Corfu, Greece, August 0-, 005 (pp48-5) Stability properties of a family of cock capturing metods for yperbolic conservation

More information

Preliminary Examination in Numerical Analysis

Preliminary Examination in Numerical Analysis Department of Applied Mathematics Preliminary Examination in Numerical Analysis August 7, 06, 0 am pm. Submit solutions to four (and no more) of the following six problems. Show all your work, and justify

More information

Fixed point iteration and root finding

Fixed point iteration and root finding Fixed point iteration and root finding The sign function is defined as x > 0 sign(x) = 0 x = 0 x < 0. It can be evaluated via an iteration which is useful for some problems. One such iteration is given

More information

Notes on Numerical Analysis

Notes on Numerical Analysis Notes on Numerical Analysis Alejandro Cantarero This set of notes covers topics that most commonly show up on the Numerical Analysis qualifying exam in the Mathematics department at UCLA. Each section

More information

ME Computational Fluid Mechanics Lecture 5

ME Computational Fluid Mechanics Lecture 5 ME - 733 Computational Fluid Mechanics Lecture 5 Dr./ Ahmed Nagib Elmekawy Dec. 20, 2018 Elliptic PDEs: Finite Difference Formulation Using central difference formulation, the so called five-point formula

More information

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 9

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 9 Lecture Notes to Accompany Scientific Computing An Introductory Survey Second Edition by Michael T. Heath Chapter 9 Initial Value Problems for Ordinary Differential Equations Copyright c 2001. Reproduction

More information

A numerical study of SSP time integration methods for hyperbolic conservation laws

A numerical study of SSP time integration methods for hyperbolic conservation laws MATHEMATICAL COMMUNICATIONS 613 Math. Commun., Vol. 15, No., pp. 613-633 (010) A numerical study of SSP time integration methods for hyperbolic conservation laws Nelida Črnjarić Žic1,, Bojan Crnković 1

More information

2.2. Methods for Obtaining FD Expressions. There are several methods, and we will look at a few:

2.2. Methods for Obtaining FD Expressions. There are several methods, and we will look at a few: .. Methods for Obtaining FD Expressions There are several methods, and we will look at a few: ) Taylor series expansion the most common, but purely mathematical. ) Polynomial fitting or interpolation the

More information