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.

Slides:



Advertisements
Similar presentations
Courant and all that Consistency, Convergence Stability Numerical Dispersion Computational grids and numerical anisotropy The goal of this lecture is to.
Advertisements

Computational Modeling for Engineering MECN 6040
Ordinary Differential Equations
Numerical Computation
Lecture 18 - Numerical Differentiation
CE33500 – Computational Methods in Civil Engineering Differentiation Provided by : Shahab Afshari
Total Recall Math, Part 2 Ordinary diff. equations First order ODE, one boundary/initial condition: Second order ODE.
PART 7 Ordinary Differential Equations ODEs
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Ordinary Differential Equations Equations which are.
Lecture 2: Numerical Differentiation. Derivative as a gradient
Chapter 19 Numerical Differentiation §Estimate the derivatives (slope, curvature, etc.) of a function by using the function values at only a set of discrete.
Chapter 1 Introduction The solutions of engineering problems can be obtained using analytical methods or numerical methods. Analytical differentiation.
Numerical Integration CSE245 Lecture Notes. Content Introduction Linear Multistep Formulae Local Error and The Order of Integration Time Domain Solution.
Basics of Finite Difference Methods
1 Lecture 11: Unsteady Conduction Error Analysis.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 5 Approximations, Errors and The Taylor Series.
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.
Numerical Methods for Partial Differential Equations
Types of Governing equations
Differential Equations and Boundary Value Problems
MATH 685/ CSI 700/ OR 682 Lecture Notes Lecture 10. Ordinary differential equations. Initial value problems.
Numerical solution of Differential and Integral Equations PSCi702 October 19, 2005.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Tutorial 5: Numerical methods - buildings Q1. Identify three principal differences between a response function method and a numerical method when both.
Scientific Computing Partial Differential Equations Introduction and
© Arturo S. Leon, BSU, Spring 2010
Numerical Methods on Partial Differential Equation Md. Mashiur Rahman Department of Physics University of Chittagong Laplace Equation.
1 EEE 431 Computational Methods in Electrodynamics Lecture 4 By Dr. Rasime Uyguroglu
Numerical methods to solve parabolic PDEs. Mathematical models: 5° Classification Classification based on the type of the solution (except, usually, the.
To Dream the Impossible Scheme Part 1 Approximating Derivatives on Non-Uniform, Skewed and Random Grid Schemes Part 2 Applying Rectangular Finite Difference.
Elliptic PDEs and the Finite Difference Method
Boundary Value Problems l Up to this point we have solved differential equations that have all of their initial conditions specified. l There is another.
Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation.
Numerical Differentiation UC Berkeley Fall 2004, E77 Copyright 2005, Andy Packard. This work is licensed under.
Today’s class Numerical Differentiation Finite Difference Methods Numerical Methods Lecture 14 Prof. Jinbo Bi CSE, UConn 1.
Sensitivity derivatives Can obtain sensitivity derivatives of structural response at several levels Finite difference sensitivity (section 7.1) Analytical.
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
Numerical Analysis. Numerical Analysis or Scientific Computing Concerned with design and analysis of algorithms for solving mathematical problems that.
Chapter 3- Model Fitting. Three Tasks When Analyzing Data: 1.Fit a model type to the data. 2.Choose the most appropriate model from the ones that have.
FALL 2015 Esra Sorgüven Öner
Discretization Methods Chapter 2. Training Manual May 15, 2001 Inventory # Discretization Methods Topics Equations and The Goal Brief overview.
Elliptic PDEs and Solvers
Dr. Mujahed AlDhaifallah ( Term 342)
Today’s class Ordinary Differential Equations Runge-Kutta Methods
NUMERICAL DIFFERENTIATION or DIFFERENCE APPROXIMATION Used to evaluate derivatives of a function using the functional values at grid points. They are.
3/23/05ME 2591 Numerical Methods in Heat Conduction Reference: Incropera & DeWitt, Chapter 4, sections Chapter 5, section 5.9.
Computational Fluid Dynamics Lecture II Numerical Methods and Criteria for CFD Dr. Ugur GUVEN Professor of Aerospace Engineering.
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.
1 Week 11 Numerical methods for ODEs 1.The basics: finite differences, meshes 2.The Euler method.
EEE 431 Computational Methods in Electrodynamics
Finite Difference Methods
Numerical Differentiation
Chapter 2 ERROR ANALYSIS
21th Lecture - Advection - Diffusion
Class Notes 18: Numerical Methods (1/2)
Numerical Solutions of Ordinary Differential Equations
Class Notes 9: Power Series (1/3)
ME/AE 339 Computational Fluid Dynamics K. M. Isaac Topic2_PDE
Chapter 27.
Topic 3 Discretization of PDE
Sec:4.3 Total Numerical Error.
Topic 3 Discretization of PDE
SKTN 2393 Numerical Methods for Nuclear Engineers
MATH 175: Numerical Analysis II
6th Lecture : Numerical Methods
Topic 3 Discretization of PDE
Presentation transcript:

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 OUTLINE 6.1 Components of Numerical Methods 6.2 Introduction to Finite Difference 6-3 Errors Involved in Numerical Solutions 6-4 Example

Computer-Aided Analysis on Energy and Thermofluid Sciences Y.C. Shih Fall 2011 Chapter 6: Basics of Finite Difference 6.1 Components of numerical methods (3) Discretization methods (Finite Difference)-1 First step in obtaining a numerical solution is to discretize the geometric domain  to define a numerical grid Each node has one unknown and need one algebraic equation, which is a relation between the variable value at that node and those at some of the neighboring nodes. The approach is to replace each term of the PDE at the particular node by a finite-difference approximation. Numbers of equations and unknowns must be equal 6-3

Computer-Aided Analysis on Energy and Thermofluid Sciences Y.C. Shih Fall 2011 Chapter 6: Basics of Finite Difference 6.1 Components of numerical methods (4) Discretization methods (Finite Difference)-2 Taylor Series Expansion: Any continuous differentiable function, in the vicinity of x i, can be expressed as a Taylor series: Higher order derivatives are unknown and can be dropped when the distance between grid points is small. By writing Taylor series at different nodes, x i-1, x i+1, or both x i-1 and x i+1, we can have: Forward-FDSBackward-FDS Central-FDS 1 st order, order of accuracy P kest =1 2 nd order, order of accuracy P kest =1 6-4

Computer-Aided Analysis on Energy and Thermofluid Sciences Y.C. Shih Fall 2011 Chapter 6: Basics of Finite Difference 6-2 Introduction to Finite Difference (1) Numerical solutions can give answers at only discrete points in the domain, called grid points. If the PDEs are totally replaced by a system of algebraic equations which can be solved for the values of the flow-field variables at the discrete points only, in this sense, the original PDEs have been discretized. Moreover, this method of discretization is called the method of finite differences. 6-5

Computer-Aided Analysis on Energy and Thermofluid Sciences Y.C. Shih Fall 2011 Chapter 6: Basics of Finite Difference 6-2 Introduction to Finite Difference (2) A partial derivative replaced with a suitable algebraic difference quotient is called finite difference. Most finite-difference representations of derivatives are based on Taylor’s series expansion. Taylor’s series expansion: Consider a continuous function of x, namely, f(x), with all derivatives defined at x. Then, the value of f at a location can be estimated from a Taylor series expanded about point x, that is, In general, to obtain more accuracy, additional higher-order terms must be included. 6-6

Computer-Aided Analysis on Energy and Thermofluid Sciences Y.C. Shih Fall 2011 Chapter 6: Basics of Finite Difference 6-2 Introduction to Finite Difference (3) 6-7

Computer-Aided Analysis on Energy and Thermofluid Sciences Y.C. Shih Fall 2011 Chapter 6: Basics of Finite Difference 6-2 Introduction to Finite Difference (4) Forward, Backward and Central Differences: (1) Forward difference: Neglecting higher-order terms, we can get (a) 6-8

Computer-Aided Analysis on Energy and Thermofluid Sciences Y.C. Shih Fall 2011 Chapter 6: Basics of Finite Difference 6-2 Introduction to Finite Difference (5) (2) Backward difference: Neglecting higher-order terms, we can get (3) Central difference: (a)-(b) and neglecting higher-order terms, we can get (b) …(c) 6-9

Computer-Aided Analysis on Energy and Thermofluid Sciences Y.C. Shih Fall 2011 Chapter 6: Basics of Finite Difference 6-2 Introduction to Finite Difference (6) (4) If, then (a), (b), (c) can be expressed as Forward: Backward: Central: Note: …(d) …(e) …(f) 6-10

Computer-Aided Analysis on Energy and Thermofluid Sciences Y.C. Shih Fall 2011 Chapter 6: Basics of Finite Difference 6-2 Introduction to Finite Difference (7) Truncation error: The higher-order term neglecting in Eqs. (a), (b), (c) constitute the truncation error. The general form of Eqs. (d), (e), (f) plus truncated terms can be written as Forward: Backward: Central: 6-11

Computer-Aided Analysis on Energy and Thermofluid Sciences Y.C. Shih Fall 2011 Chapter 6: Basics of Finite Difference 6-2 Introduction to Finite Difference (8) Second derivatives: * Central difference: If, then (a)+(b) becomes * Forward difference: * Backward difference: 6-12

Computer-Aided Analysis on Energy and Thermofluid Sciences Y.C. Shih Fall 2011 Chapter 6: Basics of Finite Difference 6-2 Introduction to Finite Difference (9) Mixed derivatives: * Taylor series expansion: * Central difference: * Forward difference: * Backward difference: 6-13

Computer-Aided Analysis on Energy and Thermofluid Sciences Y.C. Shih Fall 2011 Chapter 6: Basics of Finite Difference 6-3 Errors Involved in Numerical Solutions (1) In the solution of differential equations with finite differences, a variety of schemes are available for the discretization of derivatives and the solution of the resulting system of algebraic equations. In many situations, questions arise regarding the round-off and truncation errors involved in the numerical computations, as well as the consistency, stability and the convergence of the finite difference scheme. Round-off errors:computations are rarely made in exact arithmetic. This means that real numbers are represented in “floating point” form and as a result, errors are caused due to the rounding-off of the real numbers. In extreme cases such errors, called “round-off” errors, can accumulate and become a main source of error. 6-23

Computer-Aided Analysis on Energy and Thermofluid Sciences Y.C. Shih Fall 2011 Chapter 6: Basics of Finite Difference 6-3 Errors Involved in Numerical Solutions (2) Truncation error: In finite difference representation of derivative with Taylor’s series expansion, the higher order terms are neglected by truncating the series and the error caused as a result of such truncation is called the “truncation error”. The truncation error identifies the difference between the exact solution of a differential equation and its finite difference solution without round-off error. 6-24