Time stepping methods

Size: px
Start display at page:

Download "Time stepping methods"

Transcription

1 Time stepping methods ATHENS course: Introduction into Finite Elements Delft Institute of Applied Mathematics, TU Delft Matthias Möller 19 November 2014 M. Möller Time stepping / 54

2 Part I Space-Time Discretization M. Möller (DIAM@TUDelft) Time stepping / 54

3 Space-Time discretization Initial-boundary value problem (IBVP) u(x,t) t + Lu(x, t) = f in Ω (0, T ) time-dependent PDE u(x, t) = g 0 on Γ 0 (0, T ) n u(x, t) = g 1 on Γ 1 (0, T ) boundary conditions n u(x, t) + αu(x) = g 2 on Γ 2 (0, T ) u(x, 0) = u 0 in Ω at t = 0 initial condition Observation: transient term u t represents linear convection with unit velocity along the t-direction ( forward in time ) Interpret n-dimensional IBVP as n + 1-dimensional space-time BVP Use FEM-space discretization technique to approximate the n + 1-dimensional BVP by a set of algebraic equations M. Möller (DIAM@TUDelft) Time stepping / 54

4 Example: Transient heat equation Experiment: rod with initial constant temperature is heated from the left Transient heat equation in 1D u u = 0 t x 2 in (0, L) (0, T ) time-dependent PDE u(0, t) = 1 at x = 0, in (0, T ) Dirichlet boundary conditions u(1,t) = 0 x at x = L, in (0, T ) Neumann boundary conditions u(x, 0) = u 0 in (0, L), at t = 0 initial condition Space-time heat equation L := α 2 t x 2 Lu = 0 in Ω stationary PDE u = 1 on Γ 0 Dirichlet boundary conditions T Γ 0 Γ final Ω Γ 1 u = 0 x on Γ1 Neumann boundary conditions u = u 0 on Γ init Dirichlet boundary conditions 0 0 Γ init L M. Möller (DIAM@TUDelft) Time stepping / 54

5 Example: Transient heat equation Transient heat equation Space-time heat equation 2.0 sec sec 1.0 sec u sec 0.0 sec t x Grid: x = 0.05, t = 0.01 Attains steady-state limit u 1, that is, u t 0 for time t M. Möller (DIAM@TUDelft) Time stepping / 54

6 Take home lessons #1 Time-dependent IBVPs in nd can be interpreted as stationary BVPs in (n + 1)D subject to additional boundary conditions at Γ init Solution values for all time levels can be computed simultaneously Space-time discretization can become computationally expensive (large memory requirements and computing times especially in 3D) Final time T must be known a priori and cannot be changed Mesh generation in 4D is non-trivial (need for special elements) Solutions to boundary value problems can be computed by marching the solution of the associated transient problem to the steady state M. Möller (DIAM@TUDelft) Time stepping / 54

7 Part II Single-Step Methods M. Möller Time stepping / 54

8 Time-stepping techniques Idea: Unsteady flows are parabolic in time use time-stepping methods to advance transient solutions step-by-step in time time future present past zone of influence domain of dependence space Time discretization: 0 = t 0 < t 1 < t 2 < t M = T and solve IBVP on short time intervals (t n, t n+1 ), where t n+1 = t n + t t 0 t 1 t 2 t n t n+1 T Initialize solution values by the initial condition u 0 u 0 in Ω Given u n u(t n ) use it as initial condition to compute u n+1 u(t n+1 ) M. Möller (DIAM@TUDelft) Time stepping / 54

9 Time-stepping techniques Time-dependent PDE u(x, t) t + Lu(x, t) = f in Ω (0, T ) Observation: The space and time variables x and t are essentially decoupled and can be discretized independently Space discretization by the FEM yields time-dependent unknowns u h (t) Method of lines (MOL): du h (t) dt L L h yields ODE system for u i (t) + L h u h (t) = f h on (t n, t n+1 ) semi-discretized equations Remark: It is also possible to perform the time discretization before the discretization in space (later in this lecture) M. Möller (DIAM@TUDelft) Time stepping / 54

10 Method of lines (MOL) MOL du h(t) dt + L h u h (t) = f h, R(t, u h (t)) = f h L h u h (t) Initial value problem { duh (t) dt u h (t n ) = u n h = R(t, u h (t)) on (t n, t n+1 ) Exact integration t n+1 t n du h dt dt = un+1 h u n h = t n+1 R(t, u t n h (t)) dt Mean value theorem: τ (t n, t n+1 ) u n+1 R(τ, u h (τ)) h = u n h + R(τ, u h(τ)) t, t = t n+1 t n t n τ t n+1 Idea: evaluate the integral numerically using a suitable quadrature rule M. Möller (DIAM@TUDelft) Time stepping / 54

11 Two-level time-stepping schemes Numerical integration on the time interval (t n, t n+1 ) R R R R t n left endpoint t n+1 t t n t n+1 t right endpoint t n t n+1 t trapezoidal rule t n t n+1 t midpoint rule Forward Euler u n+1 h = u n h + R(t n, u n h) t + O( t 2 ) Backward Euler u n+1 h = u n h + R(t n+1, u n+1 h ) t + O( t 2 ) [ Crank-Nicolson u n+1 h = u n h R(t n, u n h) + R(t n+1, u n+1 h ) ] t + O( t 3 ) Leapfrog method u n+1 h = u n h + R(t n+1/2, u n+1/2 h ) t + O( t 3 ) M. Möller (DIAM@TUDelft) Time stepping / 54

12 Two-level θ-time-stepping schemes Standard finite difference discretization of the time derivative u n+1 h u n h t = θr(t n+1, u n+1 h ) + (1 θ)r(t n, u n h), 0 θ 1 where 0 θ 1 is the implicitness parameter θ = 0 forward Euler O( t) explicit update of u n+1 h θ = 1/2 Crank-Nicolson O( t 2 ) solution of (linear) implicit θ = 1 backward Euler O( t) algebraic system For θ 1 2 the θ-scheme is A-stable ( numerical solution is bounded) So, what it the best time-stepping method then? It depends M. Möller (DIAM@TUDelft) Time stepping / 54

13 Properties of the θ-scheme The optimal choice of the time-stepping scheme depends on its purpose: to march the numerical solution to a steady state limit (intermediate results are immaterial) use large t to reach convergence quickly to obtain a time-accurate discretization of a highly dynamic flow problem (evolution details are essential and must be captured) use sufficiently small time steps t to reduce temporal errors or Time discretization t 0 t 1 t 2... t n = n t... T = M t Accumulation of truncation errors n = 0, 1,..., M 1, M = T t ɛ loc τ = O( t p ) ɛ glob τ = Mɛ loc τ = O( t p 1 ) The order of a time-stepping method (i.e., the asymptotic rate at which the error is reduced as t 0) is not the sole indicator of accuracy M. Möller (DIAM@TUDelft) Time stepping / 54

14 Explicit vs. implicit time-stepping schemes Explicit time-stepping schemes easy to implement and parallelize, low cost per time step a good starting point for the development of CFD software small time steps are required for stability reasons, especially if the velocity and/or mesh size are varying strongly extremely inefficient for solution of stationary problems unless local time-stepping i.e. t = t(x) is employed Remark: Use the forward Euler method (θ = 0) with care since it may be unconditionally unstable (e.g., for standard Galerkin in space) M. Möller (DIAM@TUDelft) Time stepping / 54

15 Explicit vs. implicit time-stepping schemes Implicit time-stepping schemes stable over a wide range of time steps, sometimes unconditionally constitute excellent iterative solvers for steady-state problems difficult to implement and parallelize, high cost per time step insufficiently accurate for truly transient problems at large t convergence of linear solvers deteriorates/fails as t increases M. Möller (DIAM@TUDelft) Time stepping / 54

16 Galerkin method of lines Continuous problem: find u V such that Ω [ ] u v t + Lu f dx = 0 v V, t (t n, t n+1 ) FEM approximation u h (x, t) = N u j (t)ϕ j (x), u n i u(x i, t n ) j=1 Semi-discrete problem: find u h V h such that N [ ] N du j ϕ iϕ j dx Ω dt + [ ] ϕ ilϕ j dx u j = Ω j=1 } {{ } m ij j=1 } {{ } a ij ϕ if dx, Ω } {{ } b i i = 1,..., N, t (t n, t n+1 ) Differential-Algebraic Equation (DAE) M C du dt + Au = b where M C = {m ij } is the mass matrix and u(t) = [u 1 (t),..., u N (t)] T M. Möller (DIAM@TUDelft) Time stepping / 54

17 Galerkin method of lines du Galerkin MOL M C dt + Au = b, 1 R(t, u) = M [b Au] C [M C θ ta]u n+1 = [M C + (1 θ) ta]u n + tb n+θ where b n+θ = θb n+1 + (1 θ)b n, 0 θ 1, n = 0, 1,..., M 1 Linear algebraic system needs to be solved even for explicit scheme (θ = 0) Idea: Replace M C by the lumped mass matrix M L = diag{m i } where m i = m ij = Ω ϕ i, ϕ j dx = Ω ϕ i dx since ϕ 1 j j j for most finite elements. 1D case FDM=FVM=FEM+mass lumping Lumped-Galerkin MOL du M L dt + Au = b, 1 R(t, u) = M [b Au] L M. Möller (DIAM@TUDelft) Time stepping / 54

18 Take home lessons #2 Due to the parabolic nature of unsteady flows, time-stepping schemes can be used to advance transient solutions step-by-step Space discretizations techniques yield a first-order ODE system which is integrated forward in time numerically (method of lines) Galerkin method of lines leads to differential-algebraic equations unless the consistent mass matrix is replaced by the lumped mass matrix The optimal choice of the time-stepping scheme depends on its purpose (steady-state vs. dynamic flows, explicit vs. implicit) M. Möller (DIAM@TUDelft) Time stepping / 54

19 Part III Multi-Step and other Advanced Methods M. Möller Time stepping / 54

20 Fractional-step θ-scheme Given parameters θ (0, 1), θ = 1 2θ, and α [0, 1] subdivide time interval (t n, t n+1 ) into three substeps and update the solution as follows Step 1. u n+θ = u n + [αr(t n+θ, u n+θ ) + (1 α)r(t n, u n )]θ t Step 2. u n+1 θ = u n+θ + [(1 α)r(t n+1 θ, u n+1 θ ) + αr(t n+θ, u n+θ )]θ Step 3. u n+1 = u n+1 θ + [αr(t n+1, u n+1 ) Properties of this time-stepping method + (1 α)r(t n+1 θ, u n+1 θ )]θ t second-order accurate in the special case θ = coefficient matrices are the same for all substeps if α = 1 2θ 1 θ combine the advantages of Crank-Nicolson and backward Euler M. Möller (DIAM@TUDelft) Time stepping / 54

21 Predictor-corrector and multipoint methods Objective: to combine the simplicity of explicit schemes and robustness of implicit ones in the framework of a fractional-step algorithm, e.g., 1. Predictor ũ n+1 = u n + R(t n, u n ) t forward Euler 2. Corrector u n+1 = u n [R(tn, u n ) Crank-Nicolson +R(t n+1, ũ n+1 )] t or u n+1 = u n + R(t n+1, ũ n+1 ) t backward Euler Stability still leaves a lot to be desired, additional correction steps usually do not pay off since iterations may diverge if t is too large Order barrier: two-level methods are at most second-order accurate, so extra points are needed to construct higher-order integration schemes t 0 t 1 t 2 t n 2 t n t n+1 t n 1 T M. Möller (DIAM@TUDelft) Time stepping / 54

22 Adams methods Derivation: polynomial fitting R past present future Truncation error: ɛ glob τ = O( t p ) for polynomials of degree p 1 which interpolate function values at p points Adams-Bashforth methods (explicit) p = 1 u n+1 = u n + tr(t n, u n ) forward Euler p = 2 p = 3 t n 2 t n 1 t n t n+1 t u n+1 = u n + t 2 [3R(tn, u n ) R(t n 1, u n 1 )] u n+1 = u n + t 12 [23R(tn, u n ) 16R(t n 1, u n 1 ) + 5R(t n 2, u n 2 )] Adams-Moulton methods (implicit) p = 1 u n+1 = u n + tr(t n+1, u n+1 ) backward Euler p = 2 p = 3 u n+1 = u n + t 2 [R(tn+1, u n+1 ) + R(t n, u n )] Crank-Nicolson u n+1 = u n + t 12 [5R(tn+1, u n+1 ) + 8R(t n, u n ) R(t n 1, u n 1 )] M. Möller (DIAM@TUDelft) Time stepping / 54

23 Adams methods Predictor-corrector algorithm 1 Compute ũ n+1 using an Adams-Bashforth method of order p 1 2 Compute u n+1 using an Adams-Moulton method of order p with predicted value R(t n+1, ũ n+1 ) instead of R(t n+1, u n+1 ) methods of any order are easy to derive and implement only one function evaluation per time step is performed error estimators for ODEs can be used to adapt the order other methods are needed to start/restart the calculation time step is difficult to change (coefficients are different) tend to be unstable and produce nonphysical oscillations M. Möller (DIAM@TUDelft) Time stepping / 54

24 Runge-Kutta methods Multipredictor-multicorrector algorithms of order p p = 2 ũ n+1/2 = u n + t 2 R(tn, u n ) forward Euler / predictor u n+1 = u n + tr(t n+1/2, ũ n+1/2 ) midpoint rule / corrector p = 4 ũ n+1/2 = u n + t 2 R(tn, u n ) forward Euler / predictor û n+1/2 = u n + t 2 R(tn+1/2, ũ n+1/2 ) backward Euler / corrector ũ n+1 = u n + tr(t n+1/2, û n+1/2 ) midpoint rule / predictor u n+1 = u n + t 6 [R(tn, u n ) + 2R(t n+1/2, ũ n+1/2 ) Simpson rule + 2R(t n+1/2, û n+1/2 ) + R(t n+1, ũ n+1 )] corrector There exist embedded Runge-Kutta methods which perform extra steps in order to estimate the error and adjust t in an adaptive fashion M. Möller (DIAM@TUDelft) Time stepping / 54

25 Runge-Kutta methods Runge-Kutta methods self-starting, easy to operate with variable time steps more stable and accurate than Adams methods of the same order high order approximations are rather difficult to derive; p function evaluations per time step are required more expensive than Adams methods of comparable order Use of variable time step sizes makes it possible to achieve the desired accuracy at a relatively low computational cost Explicit method: use the largest time step satisfying the stability condition Implicit method: estimate the error and adjust the time step if necessary M. Möller (DIAM@TUDelft) Time stepping / 54

26 Take home lessons #3 Advantages of Crank-Nicolson and backward Euler method can be combined by using the fractional-step θ-scheme Second-order barrier of two-level methods can be avoided by adding extra points from previous time steps (Adams methods) Simple time-stepping schemes can be combined in a predictor-corrector algorithm (Runge-Kutta methods) M. Möller (DIAM@TUDelft) Time stepping / 54

27 Part IV Analysis of numerical dissipation and dispersion M. Möller Time stepping / 54

28 Properties of numerical methods Example: convection-dominated / hyperbolic PDEs P e 1, Re 1 u t + v u x = 0, v > 0 1 High-order numerical method wiggles (phase errors) Low-order numerical method smearing (amplitude errors) Objective: to analyze the creation of wiggles and the smearing of solutions; design accurate methods which do not lead to spurious oscillations M. Möller (DIAM@TUDelft) Time stepping / 54

29 Modified equation method Motivation: PDEs are difficult or impossible to solve analytically but their qualitative behavior is easier to predict than that of discretized equations Observation: exact solution (no roundoff errors) of the discretized equations satisfies a PDE which is generally different from the one to be solved Original PDE u t + Lu = 0 Numerical method solves modified equation u t + Lu = 2p u α 2p x + 2p+1 u α 2p 2p+1 x 2p+1 p=1 p=1 1 Expand all nodal values in the difference scheme in a double Taylor series about a single point (x i, t n ) of the space-time mesh PDE 2 Express high-order time derivatives and mixed derivatives in this PDE in terms of space derivatives only modified equation M. Möller (DIAM@TUDelft) Time stepping / 54

30 Derivation of the modified equation Example: pure convection equation u t + v u x = 0, v > 0 discretized by BDS in space FE in time u n+1 i u n i t + v un i un i 1 x = 0 (upwind) ( ) Taylor series expansions about the point (x i, t n ) u n+1 i = u n i + t ( ) u n + ( t)2 t i 2 u n i 1 = u n i x ( ) u n + ( x)2 x i 2 Substitution into the difference scheme yields ( u + v u t x ) ( ) n = t 2 n u i 2 t 2 i ( ) 2 n u + ( t)3 t 2 6 i ( ) 2 n u ( x)3 x 2 6 i ( ) 3 n u +... t 3 i ( ) 3 n u +... x 3 i ( ) ( t)2 3 n ( ) u + v x 2 n ( ) u v( x)2 3 n u t 3 2 x i 2 6 x i 3 i Next step: Replace high-order time derivatives by space derivatives M. Möller (DIAM@TUDelft) Time stepping / 54

31 Derivation of the modified equation (1) 2 u t 2 Differentiate ( ) with respect to t to obtain + v 2 u x t = t 2 3 u t 3 ( t)2 6 4 u t 4 + v x 2 3 u x 2 t v( x)2 6 4 u x 3 t +... Differentiate ( ) with respect to x and multiply by v to obtain (2) v 2 u t x + v2 2 u x 2 = v t 2 3 u t 2 x v( t)2 4 u 6 t 3 x + v2 x 3 u 2 x v2 ( x) u x (3) 2 u t 2 Subtract (2) from (1) and drop high-order terms to obtain [ ] [ ] = v 2 2 u + t 3 u + v 3 u + O( t) + x v 3 u x 2 2 t 3 t 2 x 2 x 2 t v2 3 u + O( x) x 3 Replace 3rd order time derivative and mixed derivatives by space derivatives M. Möller (DIAM@TUDelft) Time stepping / 54

32 Derivation of the modified equation Differentiate (2) with respect to x and divide by v to obtain (4) 3 u x 2 t = v 3 u x + O[ t, x] 3 Differentiate (3) with respect to t and x to obtain respectively (5) 3 u t = v 2 3 u 3 x 2 t + O[ t, x] and (6) 3 u t 2 x = v2 3 u x + O[ t, x] 3 Equations (5) and (4) imply (7) 3 u t 3 = v 3 3 u x + O[ t, x] 3 (8) 2 u t 2 Plugging equations (4), (6), and (7) into (3) yields = v 2 2 u x + v 2 (v t x) 3 u 2 x + O[ t, x] 3 M. Möller (DIAM@TUDelft) Time stepping / 54

33 Derivation of the modified equation Substitute (7) and (8) into ( ) to obtain the modified equation [ ] u + v u = v2 t 2 u + (v t x) 3 u + v3 ( t) 2 3 u + v x 2 u v( x)2 3 u +... t x 2 x 2 x 3 6 x 3 2 x 2 6 x 3 Reformulation in terms of the Courant number ν = v t x yields Modified equation for FE/BDS discretization of u + v u = 0, v > 0 t x u t + v u = v x x 2 (1 u ν) 2 x 2 + v( x)2 6 }{{} original PDE }{{} numerical dissipation (3ν 2ν 2 1) 3 u x 3 } {{ } numerical dispersion +... Remark: the CFL stability condition ν 1 must be satisfied for the discrete problem to be well-posed. In the case ν > 1, the numerical diffusion coefficient v x 2 (1 ν) is negative, which corresponds to a backward heat equation. M. Möller (DIAM@TUDelft) Time stepping / 54

34 Significance of terms in the modified equation Exact solution of the discretized equation satisfies the modified equation u t + Lu = 2p u α 2p x + 2p+1 u α 2p 2p+1, with L = v x2p+1 x p=1 p=1 Even-order derivatives 2p u x 2p cause numerical dissipation smearing (amplitude errors) Odd-order derivatives 2p+1 u x 2p+1 cause numerical dispersion wiggles (phase errors) Qualitative analysis: the numerical behavior of the discretization scheme largely depends on the relative importance of dispersive and dissipative effects M. Möller (DIAM@TUDelft) Time stepping / 54

35 Forward Euler central difference scheme Stability condition (necessary but not sufficient) Coefficients of the even-order derivatives in the modified equation must have alternating signs, the one for the second-order term being positive Modified equation for the FE/CDS scheme u t + v u x = v x 2 ν 2 u where ν = v t x x 2 v( x)2 6 is the Courant number (1 + 2ν 2 ) 3 u x FE/CDS scheme is unconditionally unstable since the coefficient v x 2 ν = t v2 < 0 v 0 2 of the second-order term is negative for nonzero velocity M. Möller (DIAM@TUDelft) Time stepping / 54

36 Forward Euler finite element method Stability condition (necessary but not sufficient) Coefficients of the even-order derivatives in the modified equation must have alternating signs, the one for the second-order term being positive Modified equation for the FE/FEM scheme with ν = v t x u t + v u x = v x 2 ν 2 u x 2 v( x)2 3 ν 2 3 u x Elimination of leading dispersion error due to space discretization FE/FEM scheme is unconditionally unstable since the coefficient v x 2 ν = t v2 < 0 v 0 2 of the second-order term is negative for nonzero velocity M. Möller (DIAM@TUDelft) Time stepping / 54

37 Stabilization by means of artificial diffusion Stabilization strategy: if the necessary stability condition is violated, it can be enforced by adding artificial diffusion to the numerical scheme: Stabilized methods +δ(v ) 2 u Nonoscillatory methods +δ(v ) 2 u + ɛ(u) u streamline diffusion shock-capturing viscosity Remark: in the one-dimensional case both terms are proportional to 2 u x 2 Free parameters depending on the mesh size h and the residual R(u) δ = c δh 1+ v, ɛ(u) = c ɛh 2 R(u) Problem: how to determine proper values of the constants c δ and c ɛ??? M. Möller (DIAM@TUDelft) Time stepping / 54

38 Take home lessons #4 The exact solution of the discretized equations does not satisfy the original PDE but the modified equation Even-order derivatives in the modified equation cause numerical dissipation which affects to amplitude errors ( smearing) Odd-order derivatives in the modified equation cause numerical dispersion which affects the phase errors ( wiggles) For stability, the coefficients of the even-order derivatives must have alternating sign, the one for the second-order term being positive Numerical schemes can be stabilized by adding artificial diffusion M. Möller (DIAM@TUDelft) Time stepping / 54

39 Part V Lax-Wendroff Time-Stepping Method M. Möller (DIAM@TUDelft) Time stepping / 54

40 Lax-Wendroff method Objective: to use a high-order time-stepping method for stabilization Consider a time-dependent PDE u t + Lu = 0 in Ω (0, T ) 1 Discretize it in time by means of the Taylor series expansion u n+1 = u n + t ( ) u n ( ) t + ( t) 2 n 2 u 2 t + O( t 3 ) 2 2 Transform time derivatives into space derivatives using the PDE u t = Lu, 2 u t 2 = t ( u t ) = u t ( Lu) = L t = L2 u 3 Substitute the resulting expressions into the Taylor series u n+1 = u n tlu n + ( t)2 2 L 2 u n + O( t 3 ) 4 Perform space discretization using the FDM / FVM / FEM M. Möller (DIAM@TUDelft) Time stepping / 54

41 Lax-Wendroff central difference scheme Example: pure convection equation Time derivatives Semi-discrete scheme u t + v u x = 0 L = v x u u t = v x, 2 u t 2 u n+1 = u n v t ( ) u n+ v 2 ( t) 2 x 2 = v 2 2 u x 2 ( 2 u x 2 ) n+ O( t 3 ) Central difference approximation (CDS) in space ( u ) ( x i = ui+1 ui 1 2 x + O( x 2 ), 2 u x = )i ui+1 2ui+ui 1 2 ( x) + O( x 2 ) 2 Fully discrete LW/CDS scheme u n i + v un i+1 u n i 1 } t {{ 2 x } FE/CDS scheme u n+1 i = v2 t 2 u n i+1 2u n i + u n i 1 ( x) 2 } {{ } numerical dissipation +O[ t 2, x 2 ] FE/CDS scheme stabilized by artificial diffusion (no adjustable parameter) M. Möller (DIAM@TUDelft) Time stepping / 54

42 Lax-Wendroff central difference scheme Modified equation for the LW/CDS scheme u t + v u x = v( x)2 (1 ν 2 ) 3 u 6 x 3 v( x)3 ν(1 ν 2 ) 4 u 8 x 4 v( x)4 120 (1 + 5ν2 6ν 4 ) 5 u x , ν = v t x conditionally stable for ν 2 1 in 1D, ν in 2D, ν in 3D the second-order derivative (leading dissipation error) has been eliminated the leading truncation error vanishes for ν 2 = 1 (unit CFL property) the negative dispersion coefficient corresponds to a lagging phase error i. e. harmonics travel too slow, spurious oscillations occur behind steep fronts M. Möller (DIAM@TUDelft) Time stepping / 54

43 Lax-Wendroff finite element method Modified equation for the LW/FEM scheme u t + v u x =v( x)2 ν 2 3 u 6 x 3 v( x)3 ν(1 3ν 2 ) 4 u 24 x 4 + v( x)4 15 ( ν2 + 9ν 4 ) 5 u x , ν = v t x conditionally stable for ν in 1D, ν in 2D, ν in 3D the second-order derivative (leading dissipation error) has been eliminated the truncation error does not vanish for ν 2 = 1 (no unit CFL property) the positive dispersion coefficient corresponds to a leading phase error i. e. harmonics travel too fast, spurious oscillations occur ahead of steep fronts M. Möller (DIAM@TUDelft) Time stepping / 54

44 Part VI Taylor-Galerkin Time-Stepping Methods M. Möller Time stepping / 54

45 Taylor-Galerkin methods TG methods: family of high-order time-stepping schemes which stabilize the convective terms by means of intrinsic streamline diffusion (Donea 84) Generic procedure (to be adapted for a particular scheme) 1 Taylor series expansion(s) in time up to the third/fourth order u n+1 = u n +..., u n = u n+1... or u n 1 = u n... 2 Transform time derivatives into space derivatives avoiding thirdorder space derivatives. As example, let u t + Lu = 0 then u t = Lu, 2 u t = L 2 u, 3 u 2 t = L 2 u 3 t = L2 un+1 u n t + O( t) 3 Substitute the resulting expressions into the Taylor series and perform space discretization using the FEM / FDM / FVM M. Möller (DIAM@TUDelft) Time stepping / 54

46 Euler Taylor-Galerkin scheme Consider convection-dominated PDE u t + Lu = 0 in Ω (0, T ) Taylor series expansion up to the third order u n+1 = u n + t ( ) u n ( ) t + ( t) 2 n ( ) 2 u 2 t + ( t) 3 n 3 u 2 6 t + O( t 3 ) 3 Substitution of u t = Lu, 2 u t 2 = L 2 u, 3 u t 3 yields the semi-discrete FE/TG scheme = L 2 un+1 u n t + O( t) u n+1 = u n tlu n + ( t)2 2 L 2 u n + ( t)2 6 L 2 (u n+1 u n ) + O( t 4 ) The Lax-Wendroff scheme is recovered for u n+1 = u n (steady state) Equivalent form ] [I ( t)2 6 L 2 u n+1 u n t = Lu n + t 2 L2 u n M. Möller (DIAM@TUDelft) Time stepping / 54

47 Euler Taylor-Galerkin scheme Example: pure convection equation u t + v u x = 0, L = v x discretized in space by the Galerkin FEM with linear elements Modified equation for the FE/TG scheme u t + v u x = v( x)3 24 ν(1 ν 2 ) 4 u x 4 + v( x)4 180 (1 5ν2 + 4ν 4 ) 5 u x ν = v t x conditionally stable for ν 2 1 in 1D, ν in 2D, ν in 3D the leading truncation error vanishes for ν 2 = 1 (unit CFL property) the leading dispersion error is of higher order than that for LW/FEM M. Möller (DIAM@TUDelft) Time stepping / 54

48 Take home lessons #5 Numerical methods can be stabilized using high-order time-stepping schemes which introduce artificial diffusion (no free parameter) Such methods can be constructed by the three-step approach: discretize the PDE in time by a Taylor series expansion replace time derivatives by space derivatives using the PDE perform discretization in space by FDM / FVM / FEM Lax-Wendroff methods involve space derivative which may be significantly higher than in the original PDE (e.g. 3 u t 3 = L 3 u) Taylor-Galerkin methods avoid higher-order space derivatives but their derivation needs to be adapted for each particular scheme M. Möller (DIAM@TUDelft) Time stepping / 54

49 Part VII Adaptive Time-Step Control M. Möller Time stepping / 54

50 Automatic time step control Objective: to make sure that u u t T OL (prescribed tolerance) Assume that the error at t = t n is equal to zero (no accumulation) Local truncation error u t = u + t 2 e(u) + O( t 4 ) u m t = u + m 2 t 2 e(u) + O( t 4 ) Heuristic error analysis e(u) u m t u t t 2 (m 2 1) Estimate of the relative error u u t ( ) 2 t u m t u t t m 2 = T OL 1 Adaptive time stepping t 2 = T OL t2 (m 2 1) u t u m t Richardson extrapolation u = m2 u t u m t m O( t 4 ) M. Möller (DIAM@TUDelft) Time stepping / 54

51 Practical implementation Given the old solution u n do: 1 Make one large time step of size m t to compute u m t 2 Make m small time steps each of size t to compute u t 3 Evaluate the relative solution changes u t u m t 4 Calculate the optimal value t for the next time step 5 If t t, reset the solution and go back to the beginning 6 Set u n+1 = u t or perform Richardson extrapolation enhance robustness and overall efficiency of the code simulation results are more credible due to estimated error cost per time step increases substantially (u m t may be as expensive to obtain as u t due to slow convergence at large time steps) M. Möller (DIAM@TUDelft) Time stepping / 54

52 Evolutionary PID controller Idea: Monitor the relative changes e n = un+1 u n u n of an indicator variable u and keep them close to some prescribed tolerance T OL Strategy: Use proportional-integral-differential (PID) controller M. Möller (DIAM@TUDelft) Time stepping / 54

53 Evolutionary PID controller Given the old solution u n do: 1 Make one step of size t to compute u n+1 2 Compute the relative changes e n = un+1 u n u n 3 If e n < ɛ reject solution and repeat time step using t = ɛ e n t n 4 Adjust time step smoothly to approach the prescribed tolerance ( ) kp ( ) ki ( en 1 T OL e 2 ) kd t n+1 = n 1 t n e n e n e n e n 2 5 Limit the growth and reduction of the time step so that t min t n+1 t max, l t n+1 t n L Empirical PID parameter k P = 0.075, k I = 0.175, k D = 0.01 M. Möller (DIAM@TUDelft) Time stepping / 54

54 Take home lessons #6 Adaptive time-stepping enhances the robustness of the code, the overall efficiency and the credibility of simulation results Automatic time step control is based on local truncation error analysis PID controllers provide an easy to implement and cost effective mechanism to keep the relative changes close to a prescribed tolerance M. Möller (DIAM@TUDelft) Time stepping / 54

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

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

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

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

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

Finite Difference Method for PDE. Y V S S Sanyasiraju Professor, Department of Mathematics IIT Madras, Chennai 36

Finite Difference Method for PDE. Y V S S Sanyasiraju Professor, Department of Mathematics IIT Madras, Chennai 36 Finite Difference Method for PDE Y V S S Sanyasiraju Professor, Department of Mathematics IIT Madras, Chennai 36 1 Classification of the Partial Differential Equations Consider a scalar second order partial

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

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

Chapter 5. Formulation of FEM for Unsteady Problems

Chapter 5. Formulation of FEM for Unsteady Problems Chapter 5 Formulation of FEM for Unsteady Problems Two alternatives for formulating time dependent problems are called coupled space-time formulation and semi-discrete formulation. The first one treats

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

Algebraic flux correction and its application to convection-dominated flow. Matthias Möller

Algebraic flux correction and its application to convection-dominated flow. Matthias Möller Algebraic flux correction and its application to convection-dominated flow Matthias Möller matthias.moeller@math.uni-dortmund.de Institute of Applied Mathematics (LS III) University of Dortmund, Germany

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

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

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

CHAPTER 5: Linear Multistep Methods

CHAPTER 5: Linear Multistep Methods CHAPTER 5: Linear Multistep Methods Multistep: use information from many steps Higher order possible with fewer function evaluations than with RK. Convenient error estimates. Changing stepsize or order

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 method of lines (MOL) for the diffusion equation

The method of lines (MOL) for the diffusion equation Chapter 1 The method of lines (MOL) for the diffusion equation The method of lines refers to an approximation of one or more partial differential equations with ordinary differential equations in just

More information

Numerical Methods for Engineers and Scientists

Numerical Methods for Engineers and Scientists Numerical Methods for Engineers and Scientists Second Edition Revised and Expanded Joe D. Hoffman Department of Mechanical Engineering Purdue University West Lafayette, Indiana m MARCEL D E К К E R MARCEL

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

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 20

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 20 2.29 Numerical Fluid Mechanics Fall 2011 Lecture 20 REVIEW Lecture 19: Finite Volume Methods Review: Basic elements of a FV scheme and steps to step-up a FV scheme One Dimensional examples d x j x j 1/2

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

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

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

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

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

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

Review for Exam 2 Ben Wang and Mark Styczynski

Review for Exam 2 Ben Wang and Mark Styczynski Review for Exam Ben Wang and Mark Styczynski This is a rough approximation of what we went over in the review session. This is actually more detailed in portions than what we went over. Also, please note

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

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations ECE257 Numerical Methods and Scientific Computing Ordinary Differential Equations Today s s class: Stiffness Multistep Methods Stiff Equations Stiffness occurs in a problem where two or more independent

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

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 13

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 13 REVIEW Lecture 12: Spring 2015 Lecture 13 Grid-Refinement and Error estimation Estimation of the order of convergence and of the discretization error Richardson s extrapolation and Iterative improvements

More information

Basic Aspects of Discretization

Basic Aspects of Discretization Basic Aspects of Discretization Solution Methods Singularity Methods Panel method and VLM Simple, very powerful, can be used on PC Nonlinear flow effects were excluded Direct numerical Methods (Field Methods)

More information

Partial Differential Equations

Partial Differential Equations Partial Differential Equations Introduction Deng Li Discretization Methods Chunfang Chen, Danny Thorne, Adam Zornes CS521 Feb.,7, 2006 What do You Stand For? A PDE is a Partial Differential Equation This

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

5. FVM discretization and Solution Procedure

5. FVM discretization and Solution Procedure 5. FVM discretization and Solution Procedure 1. The fluid domain is divided into a finite number of control volumes (cells of a computational grid). 2. Integral form of the conservation equations are discretized

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

Universität des Saarlandes. Fachrichtung 6.1 Mathematik

Universität des Saarlandes. Fachrichtung 6.1 Mathematik Universität des Saarlandes U N I V E R S I T A S S A R A V I E N I S S Fachrichtung 6.1 Mathematik Preprint Nr. 219 On finite element methods for 3D time dependent convection diffusion reaction equations

More information

Time-dependent variational forms

Time-dependent variational forms Time-dependent variational forms Hans Petter Langtangen 1,2 1 Center for Biomedical Computing, Simula Research Laboratory 2 Department of Informatics, University of Oslo Oct 30, 2015 PRELIMINARY VERSION

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

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

3.3. Phase and Amplitude Errors of 1-D Advection Equation

3.3. Phase and Amplitude Errors of 1-D Advection Equation 3.3. Phase and Amplitude Errors of 1-D Advection Equation Reading: Duran section 2.4.2. Tannehill et al section 4.1.2. The following example F.D. solutions of a 1D advection equation show errors in both

More information

Lecture IV: Time Discretization

Lecture IV: Time Discretization Lecture IV: Time Discretization Motivation Kinematics: continuous motion in continuous time Computer simulation: Discrete time steps t Discrete Space (mesh particles) Updating Position Force induces acceleration.

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

Review Higher Order methods Multistep methods Summary HIGHER ORDER METHODS. P.V. Johnson. School of Mathematics. Semester

Review Higher Order methods Multistep methods Summary HIGHER ORDER METHODS. P.V. Johnson. School of Mathematics. Semester HIGHER ORDER METHODS School of Mathematics Semester 1 2008 OUTLINE 1 REVIEW 2 HIGHER ORDER METHODS 3 MULTISTEP METHODS 4 SUMMARY OUTLINE 1 REVIEW 2 HIGHER ORDER METHODS 3 MULTISTEP METHODS 4 SUMMARY OUTLINE

More information

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK KINGS COLLEGE OF ENGINEERING MA5-NUMERICAL METHODS DEPARTMENT OF MATHEMATICS ACADEMIC YEAR 00-0 / EVEN SEMESTER QUESTION BANK SUBJECT NAME: NUMERICAL METHODS YEAR/SEM: II / IV UNIT - I SOLUTION OF EQUATIONS

More information

Applied Math for Engineers

Applied Math for Engineers Applied Math for Engineers Ming Zhong Lecture 15 March 28, 2018 Ming Zhong (JHU) AMS Spring 2018 1 / 28 Recap Table of Contents 1 Recap 2 Numerical ODEs: Single Step Methods 3 Multistep Methods 4 Method

More information

Numerical methods for the Navier- Stokes equations

Numerical methods for the Navier- Stokes equations Numerical methods for the Navier- Stokes equations Hans Petter Langtangen 1,2 1 Center for Biomedical Computing, Simula Research Laboratory 2 Department of Informatics, University of Oslo Dec 6, 2012 Note:

More information

ALGEBRAIC FLUX CORRECTION FOR FINITE ELEMENT DISCRETIZATIONS OF COUPLED SYSTEMS

ALGEBRAIC FLUX CORRECTION FOR FINITE ELEMENT DISCRETIZATIONS OF COUPLED SYSTEMS Int. Conf. on Computational Methods for Coupled Problems in Science and Engineering COUPLED PROBLEMS 2007 M. Papadrakakis, E. Oñate and B. Schrefler (Eds) c CIMNE, Barcelona, 2007 ALGEBRAIC FLUX CORRECTION

More information

MTH 452/552 Homework 3

MTH 452/552 Homework 3 MTH 452/552 Homework 3 Do either 1 or 2. 1. (40 points) [Use of ode113 and ode45] This problem can be solved by a modifying the m-files odesample.m and odesampletest.m available from the author s webpage.

More information

Evolution equations with spectral methods: the case of the wave equation

Evolution equations with spectral methods: the case of the wave equation Evolution equations with spectral methods: the case of the wave equation Jerome.Novak@obspm.fr Laboratoire de l Univers et de ses Théories (LUTH) CNRS / Observatoire de Paris, France in collaboration with

More information

ECE539 - Advanced Theory of Semiconductors and Semiconductor Devices. Numerical Methods and Simulation / Umberto Ravaioli

ECE539 - Advanced Theory of Semiconductors and Semiconductor Devices. Numerical Methods and Simulation / Umberto Ravaioli ECE539 - Advanced Theory of Semiconductors and Semiconductor Devices 1 General concepts Numerical Methods and Simulation / Umberto Ravaioli Introduction to the Numerical Solution of Partial Differential

More information

Lecture V: The game-engine loop & Time Integration

Lecture V: The game-engine loop & Time Integration Lecture V: The game-engine loop & Time Integration The Basic Game-Engine Loop Previous state: " #, %(#) ( #, )(#) Forces -(#) Integrate velocities and positions Resolve Interpenetrations Per-body change

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

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

Chapter 5 Exercises. (a) Determine the best possible Lipschitz constant for this function over 2 u <. u (t) = log(u(t)), u(0) = 2.

Chapter 5 Exercises. (a) Determine the best possible Lipschitz constant for this function over 2 u <. u (t) = log(u(t)), u(0) = 2. Chapter 5 Exercises From: Finite Difference Methods for Ordinary and Partial Differential Equations by R. J. LeVeque, SIAM, 2007. http://www.amath.washington.edu/ rjl/fdmbook Exercise 5. (Uniqueness for

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

First, Second, and Third Order Finite-Volume Schemes for Diffusion

First, Second, and Third Order Finite-Volume Schemes for Diffusion First, Second, and Third Order Finite-Volume Schemes for Diffusion Hiro Nishikawa 51st AIAA Aerospace Sciences Meeting, January 10, 2013 Supported by ARO (PM: Dr. Frederick Ferguson), NASA, Software Cradle.

More information

Diffusion / Parabolic Equations. PHY 688: Numerical Methods for (Astro)Physics

Diffusion / Parabolic Equations. PHY 688: Numerical Methods for (Astro)Physics Diffusion / Parabolic Equations Summary of PDEs (so far...) Hyperbolic Think: advection Real, finite speed(s) at which information propagates carries changes in the solution Second-order explicit methods

More information

Lecture 4.5 Schemes for Parabolic Type Equations

Lecture 4.5 Schemes for Parabolic Type Equations Lecture 4.5 Schemes for Parabolic Type Equations 1 Difference Schemes for Parabolic Equations One-dimensional problems: Consider the unsteady diffusion problem (parabolic in nature) in a thin wire governed

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

Solving PDEs with PGI CUDA Fortran Part 4: Initial value problems for ordinary differential equations

Solving PDEs with PGI CUDA Fortran Part 4: Initial value problems for ordinary differential equations Solving PDEs with PGI CUDA Fortran Part 4: Initial value problems for ordinary differential equations Outline ODEs and initial conditions. Explicit and implicit Euler methods. Runge-Kutta methods. Multistep

More information

Block-Structured Adaptive Mesh Refinement

Block-Structured Adaptive Mesh Refinement Block-Structured Adaptive Mesh Refinement Lecture 2 Incompressible Navier-Stokes Equations Fractional Step Scheme 1-D AMR for classical PDE s hyperbolic elliptic parabolic Accuracy considerations Bell

More information

Name of the Student: Unit I (Solution of Equations and Eigenvalue Problems)

Name of the Student: Unit I (Solution of Equations and Eigenvalue Problems) Engineering Mathematics 8 SUBJECT NAME : Numerical Methods SUBJECT CODE : MA6459 MATERIAL NAME : University Questions REGULATION : R3 UPDATED ON : November 7 (Upto N/D 7 Q.P) (Scan the above Q.R code for

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

Design of optimal Runge-Kutta methods

Design of optimal Runge-Kutta methods Design of optimal Runge-Kutta methods David I. Ketcheson King Abdullah University of Science & Technology (KAUST) D. Ketcheson (KAUST) 1 / 36 Acknowledgments Some parts of this are joint work with: Aron

More information

CS520: numerical ODEs (Ch.2)

CS520: numerical ODEs (Ch.2) .. CS520: numerical ODEs (Ch.2) Uri Ascher Department of Computer Science University of British Columbia ascher@cs.ubc.ca people.cs.ubc.ca/ ascher/520.html Uri Ascher (UBC) CPSC 520: ODEs (Ch. 2) Fall

More information

Appendix C: Recapitulation of Numerical schemes

Appendix C: Recapitulation of Numerical schemes Appendix C: Recapitulation of Numerical schemes August 31, 2009) SUMMARY: Certain numerical schemes of general use are regrouped here in order to facilitate implementations of simple models C1 The tridiagonal

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

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

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

Gradient Descent and Implementation Solving the Euler-Lagrange Equations in Practice

Gradient Descent and Implementation Solving the Euler-Lagrange Equations in Practice 1 Lecture Notes, HCI, 4.1.211 Chapter 2 Gradient Descent and Implementation Solving the Euler-Lagrange Equations in Practice Bastian Goldlücke Computer Vision Group Technical University of Munich 2 Bastian

More information

MASSACHUSETTS INSTITUTE OF TECHNOLOGY DEPARTMENT OF MECHANICAL ENGINEERING CAMBRIDGE, MASSACHUSETTS NUMERICAL FLUID MECHANICS FALL 2011

MASSACHUSETTS INSTITUTE OF TECHNOLOGY DEPARTMENT OF MECHANICAL ENGINEERING CAMBRIDGE, MASSACHUSETTS NUMERICAL FLUID MECHANICS FALL 2011 MASSACHUSETTS INSTITUTE OF TECHNOLOGY DEPARTMENT OF MECHANICAL ENGINEERING CAMBRIDGE, MASSACHUSETTS 02139 2.29 NUMERICAL FLUID MECHANICS FALL 2011 QUIZ 2 The goals of this quiz 2 are to: (i) ask some general

More information

Numerical Methods - Initial Value Problems for ODEs

Numerical Methods - Initial Value Problems for ODEs Numerical Methods - Initial Value Problems for ODEs Y. K. Goh Universiti Tunku Abdul Rahman 2013 Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs 2013 1 / 43 Outline 1 Initial Value

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

Jim Lambers MAT 772 Fall Semester Lecture 21 Notes

Jim Lambers MAT 772 Fall Semester Lecture 21 Notes Jim Lambers MAT 772 Fall Semester 21-11 Lecture 21 Notes These notes correspond to Sections 12.6, 12.7 and 12.8 in the text. Multistep Methods All of the numerical methods that we have developed for solving

More information

Chapter 3. Finite Difference Methods for Hyperbolic Equations Introduction Linear convection 1-D wave equation

Chapter 3. Finite Difference Methods for Hyperbolic Equations Introduction Linear convection 1-D wave equation Chapter 3. Finite Difference Methods for Hyperbolic Equations 3.1. Introduction Most hyperbolic problems involve the transport of fluid properties. In the equations of motion, the term describing the transport

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

Initial value problems for ordinary differential equations

Initial value problems for ordinary differential equations Initial value problems for ordinary differential equations Xiaojing Ye, Math & Stat, Georgia State University Spring 2019 Numerical Analysis II Xiaojing Ye, Math & Stat, Georgia State University 1 IVP

More information

Ordinary differential equations - Initial value problems

Ordinary differential equations - Initial value problems Education has produced a vast population able to read but unable to distinguish what is worth reading. G.M. TREVELYAN Chapter 6 Ordinary differential equations - Initial value problems In this chapter

More information

Solution Methods. Steady State Diffusion Equation. Lecture 04

Solution Methods. Steady State Diffusion Equation. Lecture 04 Solution Methods Steady State Diffusion Equation Lecture 04 1 Solution methods Focus on finite volume method. Background of finite volume method. Discretization example. General solution method. Convergence.

More information

Module 3: BASICS OF CFD. Part A: Finite Difference Methods

Module 3: BASICS OF CFD. Part A: Finite Difference Methods Module 3: BASICS OF CFD Part A: Finite Difference Methods THE CFD APPROACH Assembling the governing equations Identifying flow domain and boundary conditions Geometrical discretization of flow domain Discretization

More information

x n+1 = x n f(x n) f (x n ), n 0.

x n+1 = x n f(x n) f (x n ), n 0. 1. Nonlinear Equations Given scalar equation, f(x) = 0, (a) Describe I) Newtons Method, II) Secant Method for approximating the solution. (b) State sufficient conditions for Newton and Secant to converge.

More information

Module 4: Numerical Methods for ODE. Michael Bader. Winter 2007/2008

Module 4: Numerical Methods for ODE. Michael Bader. Winter 2007/2008 Outlines Module 4: for ODE Part I: Basic Part II: Advanced Lehrstuhl Informatik V Winter 2007/2008 Part I: Basic 1 Direction Fields 2 Euler s Method Outlines Part I: Basic Part II: Advanced 3 Discretized

More information

Linear Multistep Methods I: Adams and BDF Methods

Linear Multistep Methods I: Adams and BDF Methods Linear Multistep Methods I: Adams and BDF Methods Varun Shankar January 1, 016 1 Introduction In our review of 5610 material, we have discussed polynomial interpolation and its application to generating

More information

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

On finite element methods for 3D time dependent convection diffusion reaction equations with small diffusion

On finite element methods for 3D time dependent convection diffusion reaction equations with small diffusion On finite element methods for 3D time dependent convection diffusion reaction equations with small diffusion Volker John and Ellen Schmeyer FR 6.1 Mathematik, Universität des Saarlandes, Postfach 15 11

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

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

PARTIAL DIFFERENTIAL EQUATIONS

PARTIAL DIFFERENTIAL EQUATIONS MATHEMATICAL METHODS PARTIAL DIFFERENTIAL EQUATIONS I YEAR B.Tech By Mr. Y. Prabhaker Reddy Asst. Professor of Mathematics Guru Nanak Engineering College Ibrahimpatnam, Hyderabad. SYLLABUS OF MATHEMATICAL

More information

NUMERICAL SOLUTION OF ODE IVPs. Overview

NUMERICAL SOLUTION OF ODE IVPs. Overview NUMERICAL SOLUTION OF ODE IVPs 1 Quick review of direction fields Overview 2 A reminder about and 3 Important test: Is the ODE initial value problem? 4 Fundamental concepts: Euler s Method 5 Fundamental

More information

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 11 Partial Differential Equations Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002.

More information

9.6 Predictor-Corrector Methods

9.6 Predictor-Corrector Methods SEC. 9.6 PREDICTOR-CORRECTOR METHODS 505 Adams-Bashforth-Moulton Method 9.6 Predictor-Corrector Methods The methods of Euler, Heun, Taylor, and Runge-Kutta are called single-step methods because they use

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

A Fifth Order Flux Implicit WENO Method

A Fifth Order Flux Implicit WENO Method A Fifth Order Flux Implicit WENO Method Sigal Gottlieb and Julia S. Mullen and Steven J. Ruuth April 3, 25 Keywords: implicit, weighted essentially non-oscillatory, time-discretizations. Abstract The weighted

More information

Finite Difference Methods for

Finite Difference Methods for CE 601: Numerical Methods Lecture 33 Finite Difference Methods for PDEs Course Coordinator: Course Coordinator: Dr. Suresh A. Kartha, Associate Professor, Department of Civil Engineering, IIT Guwahati.

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

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

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

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

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