Computational Modeling for Engineering MECN 6040

Slides:



Advertisements
Similar presentations
Truncation Errors and Taylor Series
Advertisements

Roundoff and truncation errors
Chapter 8 Elliptic Equation.
Parabolic Partial Differential Equations
By S Ziaei-Rad Mechanical Engineering Department, IUT.
EE3561_Unit 6(c)AL-DHAIFALLAH14351 EE 3561 : Computational Methods Unit 6 Numerical Differentiation Dr. Mujahed AlDhaifallah ( Term 342)
NUMERICAL DIFFERENTIATION AND INTEGRATION
Chapter 3 Steady-State Conduction Multiple Dimensions
ECIV 201 Computational Methods for Civil Engineers Richard P. Ray, Ph.D., P.E. Error Analysis.
PART 7 Ordinary Differential Equations ODEs
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.
CHE/ME 109 Heat Transfer in Electronics LECTURE 12 – MULTI- DIMENSIONAL NUMERICAL MODELS.
Basics of Finite Difference Methods
CHE/ME 109 Heat Transfer in Electronics LECTURE 11 – ONE DIMENSIONAL NUMERICAL MODELS.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 5 Approximations, Errors and The Taylor Series.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 23 Numerical Differentiation.
Numerical Methods Due to the increasing complexities encountered in the development of modern technology, analytical solutions usually are not available.
CHAPTER 7 NON-LINEAR CONDUCTION PROBLEMS
MECN 3500 Inter - Bayamon Lecture Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
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
Finite Differences Finite Difference Approximations  Simple geophysical partial differential equations  Finite differences - definitions  Finite-difference.
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
MECN 3500 Inter - Bayamon Lecture 7 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
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
Integration of 3-body encounter. Figure taken from
MECN 3500 Inter - Bayamon Lecture 3 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Two-Dimensional Conduction: Finite-Difference Equations and Solutions
Module 4 Multi-Dimensional Steady State Heat Conduction.
Elliptic PDEs and the Finite Difference Method
Chapter 5: Numerical Methods in Heat Transfer
Numerical Methods for Engineering MECN 3500
Transient Conduction: Finite-Difference Equations and Solutions Chapter 5 Section 5.9  
Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation.
MECN 3500 Inter - Bayamon Lecture Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
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
HEAT TRANSFER FINITE ELEMENT FORMULATION
MECN 3500 Inter - Bayamon Lecture 6 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Numerical Analysis CC413 Propagation of Errors.
Discretization Methods Chapter 2. Training Manual May 15, 2001 Inventory # Discretization Methods Topics Equations and The Goal Brief overview.
Elliptic PDEs and Solvers
MULTIDIMENSIONAL HEAT TRANSFER  This equation governs the Cartesian, temperature distribution for a three-dimensional unsteady, heat transfer problem.
Finite-Difference Solutions Part 2
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.
3/23/05ME 2591 Numerical Methods in Heat Conduction Reference: Incropera & DeWitt, Chapter 4, sections Chapter 5, section 5.9.
ERT 216 HEAT & MASS TRANSFER Sem 2/ Dr Akmal Hadi Ma’ Radzi School of Bioprocess Engineering University Malaysia Perlis.
FINITE DIFFERENCE In numerical analysis, two different approaches are commonly used: The finite difference and the finite element methods. In heat transfer.
1 Week 11 Numerical methods for ODEs 1.The basics: finite differences, meshes 2.The Euler method.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 21 Numerical Differentiation.
EEE 431 Computational Methods in Electrodynamics
High Accuracy Differentiation Formulas
Finite Difference Methods
Chapter 30.
Numerical Differentiation
21th Lecture - Advection - Diffusion
PDEs and Examples of Phenomena Modeled
Chapter 23.
Finite Volume Method for Unsteady Flows
Chapter 27.
Chapter 26.
Numerical Differentiation Chapter 23
topic4: Implicit method, Stability, ADI method
topic16_cylinder_flow_relaxation
SKTN 2393 Numerical Methods for Nuclear Engineers
Programming assignment #1 Solving an elliptic PDE using finite differences Numerical Methods for PDEs Spring 2007 Jim E. Jones.
Presentation transcript:

Computational Modeling for Engineering MECN 6040 Professor: Dr. Omar E. Meza Castillo omeza@bayamon.inter.edu http://facultad.bayamon.inter.edu/omeza Department of Mechanical Engineering

Best known numerical method of approximation Finite differences Best known numerical method of approximation

FINITE DIFFERENCE FORMULATION OF DIFFERENTIAL EQUATIONS finite difference form of the first derivative Taylor series expansion of the function f about the point x, The smaller the x, the smaller the error, and thus the more accurate the approximation.

The big question: How good are the FD approximations? This leads us to Taylor series....

EXPASION OF TAYLOR SERIES Numerical Methods express functions in an approximate fashion: The Taylor Series. What is a Taylor Series? Some examples of Taylor series which you must have seen

General Taylor Series The general form of the Taylor series is given by provided that all derivatives of f(x) are continuous and exist in the interval [x,x+h], where h=∆x What does this mean in plain English? As Archimedes would have said, “Give me the value of the function at a single point, and the value of all (first, second, and so on) its derivatives at that single point, and I can give you the value of the function at any other point”

Example: Find the value of f(6) given that f(4)=125, f’(4)=74, f’’(4)=30, f’’’(4)=6 and all other higher order derivatives of f(x) at x=4 are zero. Solution: x=4, x+h=6  h=6-x=2 Since the higher order derivatives are zero,

The Taylor Series (xi+1-xi)= h step size (define first) Reminder term, Rn, accounts for all terms from (n+1) to infinity.

Zero-order approximation First-order approximation Second-order approximation

Example: Taylor Series Approximation of a polynomial Use zero- through fourth-order Taylor Series approximation to approximate the function: From xi=0 with h=1. That is, predict the function’s value at xi+1=1 f(0)=1.2 f(1)=0.2 - True value

Zero-order approximation First-order approximation

Second-order approximation

Third-order approximation

Fourth-order approximation

Taylor Series to Estimate Truncation Errors If we truncate the series after the first derivative term Truncation Error First-order approximation

Numerical Differentiation Forward Difference Approximation

Numerical Differentiation The Taylor series expansion of f(x) about xi is From this: This formula is called the first forward divided difference formula and the error is of order O(h). 18

Or equivalently, the Taylor series expansion of f(x) about xi can be written as From this: This formula is called the first backward divided difference formula and the error is of order O(h). 19

A third way to approximate the first derivative is to subtract the backward from the forward Taylor series expansions: This yields to This formula is called the centered divided difference formula and the error is of order O(h2). 20

Numerical Differentiation Forward Difference Approximation

Backward Difference Approximation

Centered Difference Approximation

Example: To find the forward, backward and centered difference approximation for f(x) at x=0.5 using step size of h=0.5, repeat using h=0.25. The true value is -0.9125 h=0.5 xi-1=0 - f(xi-1)=1.2 xi=0.5 - f(xi)=0.925 Xi+1=1 - f(xi+1)=0.2

Forward Difference Approximation Backward Difference Approximation

Centered Difference Approximation

h=0.25 xi-1=0.25 - f(xi-1)=1.10351563 xi=0.5 - f(xi)=0.925 Xi+1=0.75 - f(xi+1)=0.63632813 Forward Difference Approximation

Backward Difference Approximation Centered Difference Approximation

FINITE DIFFERENCE APPROXIMATION OF HIGHER DERIVATIVE The forward Taylor series expansion for f(xi+2) in terms of f(xi) is Combine equations: 29

Solve for f ''(xi): This formula is called the second forward finite divided difference and the error of order O(h). The second backward finite divided difference which has an error of order O(h) is 30

The second centered finite divided difference which has an error of order O(h2) is 31

High-Accuracy Differentiation Formulas High accurate estimates can be obtained by retaining more terms of the Taylor series. High-Accuracy Differentiation Formulas The forward Taylor series expansion is: From this, we can write 32

Substitute the second derivative approximation into the formula to yield: By collecting terms: Inclusion of the 2nd derivative term has improved the accuracy to O(h2). This is the forward divided difference formula for the first derivative. 33

Forward Formulas 34

Backward Formulas 35

Centered Formulas 36

Example Estimate f '(1) for f(x) = ex + x using the centered formula of O(h4) with h = 0.25. Solution From Tables 37

In substituting the values: 38

Error Truncation Error: introduced in the solution by the approximation of the derivative Local Error: from each term of the equation Global Error: from the accumulation of local error Roundoff Error: introduced in the computation by the finite number of digits used by the computer 39

Introduction to Finite Difference 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. (i,j)

y y u y x x x Discretization: PDE FDE Explicit Methods Simple No stable Implicit Methods More complex Stables ∆x ¬ ® y n+1 ∆y y n u m,n y n-1 x x x m-1 m m+1

Summary of nodal finite-difference relations for various configurations: Case 1: Interior Node

Case 2: Node at an Internal Corner with Convection

Case 3: Node at Plane Surface with Convection

Case 4: Node at an External Corner with Convection

Case 5: Node at Plane Surface with Uniform Heat Flux

SOLVING THE Finite difference EQUATIONS Heat Transfer Solved Problems

The Matrix Inversion Method

jacobi ITERATION method

GAUSS-SEIDEL ITERATION

Pre-specified % tolerance based on the knowledge of your solution Error Definitions Use absolute value. Computations are repeated until stopping criterion is satisfied. If the following Scarborough criterion is met Pre-specified % tolerance based on the knowledge of your solution

Matrix Inversion Method USIG EXCEL Matrix Inversion Method =MMULT(A7:C9,E2:E4) =MINVERSE(A2:C4)

Jacobi Iteration Method using Excel

Gauss-Seidel Iteration Method using Excel

A large industrial furnace is supported on a long column of fireclay brick, which is 1 m by 1 m on a side. During steady-state operation is such that three surfaces of the column are maintained at 500 K while the remaining surface is exposed to 300 K. Using a grid of ∆x=∆y=0.25 m, determine the two-dimensional temperature distribution in the column. (1,3) (2,3) (3,3) (1,2) (2,2) (3,2) (1,1) (2,1) (3,1) Ts=300 K

System of Linear Equations -4 1 -800 -500 -1000 -300 = System of Linear Equations

Matrix Inversion Method

Iteration Method using Excel

Jacobi Iteration Method using Excel

Error Iteration Method using Excel

Gauss-Seidel Iteration Method using Excel

Error Iteration Method using Excel

Iteration Method using Excel