The Finite-Difference Method Taylor Series Expansion Suppose we have a continuous function f(x), its value in the vicinity of can be approximately expressed.

Slides:



Advertisements
Similar presentations
Computational Modeling for Engineering MECN 6040
Advertisements

Part 5 Chapter 19 Numerical Differentiation PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
1 Numerical Differentiation Jyun-Ming Chen. 2 Contents Forward, Backward, Central Difference Richardson Extrapolation.
CE33500 – Computational Methods in Civil Engineering Differentiation Provided by : Shahab Afshari
1cs542g-term Notes  Even if you’re not registered (not handing in assignment 1) send me an to be added to a class list.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Ordinary Differential Equations Equations which are.
An Optimal Nearly-Analytic Discrete Method for 2D Acoustic and Elastic Wave Equations Dinghui Yang Depart. of Math., Tsinghua University Joint with Dr.
Chapter 19 Numerical Differentiation §Estimate the derivatives (slope, curvature, etc.) of a function by using the function values at only a set of discrete.
Atms 4320 Lab 2 Anthony R. Lupo. Lab 2 -Methodologies for evaluating the total derviatives in the fundamental equations of hydrodynamics  Recall that.
Computer-Aided Analysis on Energy and Thermofluid Sciences Y.C. Shih Fall 2011 Chapter 6: Basics of Finite Difference Chapter 6 Basics of Finite Difference.
Chapter 1 Introduction The solutions of engineering problems can be obtained using analytical methods or numerical methods. Analytical differentiation.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 31 Ordinary Differential Equations.
1 Lecture 11: Unsteady Conduction Error Analysis.
Lecture 34 - Ordinary Differential Equations - BVP CVEN 302 November 28, 2001.
Chapter 7 Differentiation and Integration
Introduction to Numerical Methods I
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 5 Approximations, Errors and The Taylor Series.
Math 3120 Differential Equations with Boundary Value Problems
Dr. Jie Zou PHY Chapter 7 Numerical Differentiation: 1 Lecture (I) 1 Ref: “Applied Numerical Methods with MATLAB for Engineers and Scientists”, Steven.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 23 Numerical Differentiation.
Types of Governing equations
MATH 685/ CSI 700/ OR 682 Lecture Notes Lecture 10. Ordinary differential equations. Initial value problems.
Derivatives and Differential Equations
Finite Differences Finite Difference Approximations  Simple geophysical partial differential equations  Finite differences - definitions  Finite-difference.
© Arturo S. Leon, BSU, Spring 2010
Numerical Methods on Partial Differential Equation Md. Mashiur Rahman Department of Physics University of Chittagong Laplace Equation.
Lecture 3.
1 EEE 431 Computational Methods in Electrodynamics Lecture 4 By Dr. Rasime Uyguroglu
MECN 3500 Lecture 4 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
To Dream the Impossible Scheme Part 1 Approximating Derivatives on Non-Uniform, Skewed and Random Grid Schemes Part 2 Applying Rectangular Finite Difference.
7. Introduction to the numerical integration of PDE. As an example, we consider the following PDE with one variable; Finite difference method is one of.
+ Numerical Integration Techniques A Brief Introduction By Kai Zhao January, 2011.
Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1.
Engineering Analysis – Computational Fluid Dynamics –
Engineering Analysis – Computational Fluid Dynamics –
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Numerical Analysis – Differential Equation
Discretization for PDEs Chunfang Chen,Danny Thorne Adam Zornes, Deng Li CS 521 Feb., 9,2006.
Today’s class Ordinary Differential Equations Runge-Kutta Methods
1/14  5.2 Euler’s Method Compute the approximations of y(t) at a set of ( usually equally-spaced ) mesh points a = t 0 < t 1
Lecture 39 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
NUMERICAL DIFFERENTIATION or DIFFERENCE APPROXIMATION Used to evaluate derivatives of a function using the functional values at grid points. They are.
1 Week 11 Numerical methods for ODEs 1.The basics: finite differences, meshes 2.The Euler method.
1 Numerical Differentiation. 2  First order derivatives  High order derivatives  Examples.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 21 Numerical Differentiation.
Keywords (ordinary/partial) differencial equation ( 常 / 偏 ) 微分方程 difference equation 差分方程 initial-value problem 初值问题 convex 凸的 concave 凹的 perturbed problem.
Lecture 4: Numerical Stability
Finite Difference Methods
Introduction to Numerical Methods I
Numerical Differentiation
Applied Numerical Methods
Numerical Differentiation
21th Lecture - Advection - Diffusion
Sec:4.1 THE TAYLOR SERIES.
MATH 2140 Numerical Methods
Chapter 23.
Finite Volume Method for Unsteady Flows
Topic 3 Discretization of PDE
Find the Taylor series for f (x) centered at a = 8. {image} .
Numerical Differentiation Chapter 23
Topic 3 Discretization of PDE
5.3 Higher-Order Taylor Methods
SKTN 2393 Numerical Methods for Nuclear Engineers
5.6 Multistep Methods The methods discussed to this point in the chapter are called one-step methods because the approximation for the mesh point involves.
An optimized implicit finite-difference scheme for the two-dimensional Helmholtz equation Zhaolun Liu Next, I will give u an report about the “”
Topic 3 Discretization of PDE
Presentation transcript:

The Finite-Difference Method Taylor Series Expansion Suppose we have a continuous function f(x), its value in the vicinity of can be approximately expressed using a Taylor series as (2.1) Using (2.1), we have derive the discrete expression for the first order derivative as (2.2)

f(x) x i-2 i-1 i i+1 i+2 Backward Central Forward Replacing x by x i+1 or x i-1, in (2.2) or substracting Taylor expansion equation for x i-1 from x i+1, we can get Expressing ; we obtain

The order of the higher-order terms that are deleted from the right-hand sides of the discrete equation. In numerical method, they are called “truncation errors”. General forms: FDS: The first order accurate BDS: The first order accurate CDS: The second order accurate Exercise: Derive CDS and determine its truncation error

For the second order derivative, we also can use the same approach. Example: Use the uniform grid (2.3) (2.4) Eq. (2.3) + Eq. (2.4) Then, we have Centered Difference Scheme (CDS) with second order accuracy

i,j i,j +1 i,j- 1 i+ 1,j i- 1,j X: i=1, 2, 3….N Y: j=1,2,3…...M Fig. 2.2: Uniform rectangular grids. Example of constructing the difference equation Select the CDS The basic idea for the finite-difference method is to replace the derivatives using the discrete approximation and convert the differential equation to a set of algebraic equations.

The time derivatives n-1nn+1 FDS BDS CDS

2.2. Numerical Schemes Explicit scheme: A numerical scheme in which the numerical value at time step (n+1) is calculated directly from its previous value at the time step n. This means that once the values at the time step n are known, we can “predict” a new value at the time step (n+1) by a direct time integration. Implicit scheme: A numerical scheme in which the numerical value at the time step (n+1) is not explicitly obtained from its previous value at the time step n. This value must be solved from an algebraic equation formed at the time step n+1. Example: C x g Fig. 2.3: Schematic of a propagation of a blob. It is solvable, with a general form

a) Leapfrog Scheme Truncation error: for time derivative for space derivative (2.5) Then, the difference equation is

b). Forward Time/Central Space Scheme (Euler Scheme). Truncation error: First-order accurate Second-order accurate

c). Forward Time/Backward Space Scheme First-order accurate Truncation errors: Sometime, it is also called the upwind scheme for the case C > 0.

d). Forward Time/Implicit Central Space Scheme First-order accurate Second-order accurate This is a fully-implicit scheme!

e). Crank-Nicolson Scheme—Semi-implicit Scheme First-order accurate Second-order accurate Truncation errors:

f). Lax-Wendroff Scheme n+1 n+1/2 n t x i-1 ii+1i-1/2 i+1/2 Fig. 2.5: The space-time stencil used to construct the Lax-Wendroff scheme Then Truncation errors:

QS: How could we know which scheme is better? Or How do we evaluate these schemes? Next ! Note: The next Wed is the exercise class to work on modeling project #1 Dr. Huang will be supervisor for that in-class lab work.