1 Faculty Name Prof. A. A. Saati. Type of course Core Lecture, Lab., Credit2 / 3 / 3 Prerequisites Heat Transfer (804405-3) Engineering Math. II (800202-3)

Slides:



Advertisements
Similar presentations
9/5/ Measuring Errors Major: All Engineering Majors Authors: Autar Kaw, Luke Snyder
Advertisements

3- 1 Chapter 3 Introduction to Numerical Methods Second-order polynomial equation: analytical solution (closed-form solution): For many types of problems,
Roundoff and truncation errors
2009 Spring Errors & Source of Errors SpringBIL108E Errors in Computing Several causes for malfunction in computer systems. –Hardware fails –Critical.
Computational Modeling for Engineering MECN 6040
ECIV 201 Computational Methods for Civil Engineers Richard P. Ray, Ph.D., P.E. Error Analysis.
Approximations and Errors
Lecture 2: Numerical Differentiation. Derivative as a gradient
Chapter 1 Introduction The solutions of engineering problems can be obtained using analytical methods or numerical methods. Analytical differentiation.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 3 Approximations and Errors.
Dr. Jie Zou PHY Chapter 9 Ordinary Differential Equations: Initial-Value Problems Lecture (II) 1 1 Besides the main textbook, also see Ref.: “Applied.
1 Error Analysis Part 1 The Basics. 2 Key Concepts Analytical vs. numerical Methods Representation of floating-point numbers Concept of significant digits.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
8/15/ Differentiation-Continuous Functions Major: All Engineering Majors Authors: Autar Kaw, Sri Harsha Garapati.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 31.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Introduction and Analysis of Error Pertemuan 1
9/19/2015http://numericalmethods.eng.usf.edu1 Introduction to Scientific Computing Major: All Engineering Majors Authors: Autar Kaw, Luke Snyder
9/20/ Secant Method Civil Engineering Majors Authors: Autar Kaw, Jai Paul
MMJ 1113 Computational Methods for Engineers Mohsin Mohd Sies Fakulti Kejuruteraan Mekanikal, Universiti Teknologi Malaysia.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
CISE301_Topic11 CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4:
EE 3561_Unit_1(c)Al-Dhaifallah EE 3561 : - Computational Methods in Electrical Engineering Unit 1: Introduction to Computational Methods and Taylor.
Numerical Methods Applications of Loops: The power of MATLAB Mathematics + Coding 1.
10/8/ Propagation of Errors Major: All Engineering Majors Authors: Autar Kaw, Matthew Emmons
ME 142 Engineering Computation I Computer Precision & Round-Off Error.
Welcome to EML3041: Computational Methods. SIT IN FIRST FOUR ROWS ONLY My name is Dr. Kaw. Introduce yourself to the person on your left and right! Say.
10/16/20151 Sources of Error Major: All Engineering Majors Authors: Autar Kaw, Luke Snyder Transforming Numerical Methods.
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
NUMERICAL ERROR Student Notes ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier.
Applied Numerical Method for Engineers and Scientists
MECN 3500 Inter - Bayamon Lecture 3 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
10/27/ Differentiation-Continuous Functions Computer Engineering Majors Authors: Autar Kaw, Sri Harsha Garapati.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Introduction Course Outline.
Numerical Methods.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 3.
1 Faculty Name Prof. A. A. Saati. Type of course Core Lecture, Lab., Credit2 / 3 / 3 Prerequisites Heat Transfer ( ) Engineering Math. II ( )
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Numerical Analysis Intro to Scientific Computing.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 7 - Chapter 25.
Numerical Analysis CC413 Propagation of Errors.
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.
Errors in Numerical Methods
Numerical Analysis CC413 Propagation of Errors. 2 In numerical methods, the calculations are not made with exact numbers. How do these inaccuracies propagate.
6/13/ Secant Method Computer Engineering Majors Authors: Autar Kaw, Jai Paul
Lecture 1 Introduction Slide Credit Dr. S. M. Lutful Kabir, Visiting Professor, BRAC University & Professor, BUET CSE 330: Numerical Methods.
Lecture 1 Introduction Dr. Hakikur Rahman Thanks to Dr. S. M. Lutful Kabir for Slides CSE 330: Numerical Methods.
Computational Fluid Dynamics Lecture II Numerical Methods and Criteria for CFD Dr. Ugur GUVEN Professor of Aerospace Engineering.
Chapter 2 Errors in Numerical Methods and Their Impacts.
NUMERICAL ANALYSIS I. Introduction Numerical analysis is concerned with the process by which mathematical problems are solved by the operations.
Introduction to Scientific Computing
ME 142 Engineering Computation I
Differentiation-Continuous Functions
Chapter 2 ERROR ANALYSIS
Errors in Numerical Methods
Class Notes 18: Numerical Methods (1/2)
Roundoff and Truncation Errors
Errors in Numerical Methods
Computational Methods Autar Kaw University of South Florida
Sources of Error Major: All Engineering Majors
Taylor Series Revisited
Approximations and Round-Off Errors Chapter 3
Sources of Error Major: All Engineering Majors
Measuring Errors Major: All Engineering Majors
Numerical Analysis Lecture 2.
Sources of Error Major: All Engineering Majors
Roundoff and Truncation Errors
Sources of Error Major: All Engineering Majors
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
Presentation transcript:

1 Faculty Name Prof. A. A. Saati

Type of course Core Lecture, Lab., Credit2 / 3 / 3 Prerequisites Heat Transfer ( ) Engineering Math. II ( ) Engineering Computational Methods ( ) ( ) Course Description  The course focuses on finite difference solution for ordinary and partial differential equations,  Different numerical methods to solve various problems of engineering system to gain a deeper understanding of the principles of physical problems.  Individual student projects exploring and analyzing a complex physical problems and communicating the results in a written report.  Examples and applications using computer. 2

Textbook - Computational Fluid Dynamics For Engineers. By Hoffmann, K. A. and Chiang, S.T., References - An Introduction to Computational Fluid Mechanics by Example, By Sedat Biringen & Chuen-Yen Chow (2011) - Numerical Methods for Engineers and Scientists BY Joe D. Hoffman (2000) - Computational Fluid Mechanics and Heat Transfer, By J. C. Tannehill, D. A. Anderson & R. H. Pletcher - Fundamentals of Engineering Numerical Analysis By Parviz Moin Cambridge Univ Pr (Pap Txt), Applied Numerical Methods with MATLAB® for Engineers and Scientists, By Steven C. Chapra (2008), McGraw-Hill. - Numerical Methods for Engineers. By Steven C. Chapra and M. Raymond P. Canale (2010), 3

4 Ch1, ch2. ch3, ch5, and ch6

5 Ch-2

6 Ch-1 ch2 & ch3

7

8 Topics to be covered Lec Week Due Grade 1 Introduction to Computational methods1-22Lab -- HW – Extra 10 Classification of ODE and PDE Equations23Lab -- HW Classification of ODE and PDE Equations (canted.)2 - 34Lab -- HW – 2 3 Approximate Solutions of Differential Equations4 - 55Lab -- HW – 3 4 FDM - Parabolic PDE6 - 7 – 86Lab -- HW – 4 5 FDM - Parabolic PDE9 – 108App-1 ch3 sec FDM - Elliptic PDE11 – 129App-1 ch3 sec FDM - Elliptic PDE13 – 1410App-1 ch3 sec Exam ( open book only ) 15 8 FDM - Hyperbolic PDE15 – 1611App-1 ch6 sec FDM - Hyperbolic PDE17 – 1812App-2 ch6 sec Fundamentals of Discretization Finite Element- Difference-Volume 19 – Fundamentals of Discretization Finite Element- Difference-Volume 21 – Fundamentals of Discretization Finite Element- Difference-Volume 23 – Final project25 – Final project Quizzes Final Exam( open book only ) 40 F. Grade 100 Course Calendar

20%Projects 10%Home Works 5%Quizzes 15%Exam ( open book only ) 10%Final Project 40%Final Exam( open book only ) 100% F. Grad Grade Distribution 9

Introduction (Joe D. Hoffman ) 10 1.OBJECTIVE AND APPROACH After successfully completing this course you should be able to: 1.Formulate models: Formulate approriate CFD model (selection equations/models/grids/ finite difference) of a typical engineering flow situation. 2.Analyze: Select suitable numerical method to obtain quantitative estimates of the important parameters in the model. 3.Implement: Implement the chosen numerical method (the software such as Fortran, C++ and/or Matlab are used and the course provides an introduction to relevant features of the program) or use a computational fluid dynamics package to produce results. 4.Report: Present the results in suitable form (graphically, verbally, tabulate). Critically review the results, considering the probable errors.

Introduction 11 2.EXAMPLES  All of the numerical methods are illustrated by applying them to solve an example problem.  Each chapter has one or two example problems, which are solved by all of the numerical methods.  This approach allows the predictor to compare various methods for the same problem, so accuracy, efficiency, strength, and ease of application of the various methods can be evaluated.  Most of the example problems are rather simple and straightforward,

Introduction 12 3.PROBLEMS  Two types of problems are presented at the end of each chapter: 1)Exercise problems are straightforward problems designed to give practice in the application of the numerical algorithms presented in each chapter. Exercise problems emphasize the mechanics of the methods 2)Applied problems involve more applied engineering and scientific applications which require numerical solutions.

Introduction 13 4.SIGNIFICANT DIGITS, PRECISION, ACCURACY, ERRORS, AND NUMBER REPRESENTATION  Numerical calculations obviously involve the manipulation (i.e., addition, multiplication, etc.) of numbers.  Numbers can be integers (e.g., 4, 17, -23, etc.), fractions (e.g., -2/3, etc.), or an infinite string of digits (e.g., π = ).  When dealing with numerical values and numerical calculations, there are several concepts that must be considered:, 1)Significant digits 2)Precision and accuracy 3)Errors 4)Number representation These concepts are discussed briefly ha this section.

1)Significant digits:  The significant digits, or figures, in a number are the digits of the number which are known to be correct.  Engineering and scientific calculations generally begin with a set of data having a known number of significant digits.  When these numbers are processed through a numerical algorithm, it is important to be able to estimate how many significant digits are present in the final computed result. 2)Precision and accuracy:  Accuracy refers to how closely a number agrees with the true value of the number it is representing.  Precision is governed by the number of digits being carried in the numerical calculations.  Accuracy is governed by the errors in the numerical approximation,  Precision and accuracy are measured by the errors in a numerical calculation.  Introduction 14

3)Errors: The accuracy of a numerical calculation is measured by the error of the calculation. Several types of errors can occur in numerical calculations such as: o Iteration error is the error in an iterative method that approaches the exact solution of an exact problem. o Iteration errors must decrease toward zero as the iterative process progresses. o The iteration error itself may be used to determine the successive approximations to the exact solution. o Iteration errors can be reduced to the limit of the computing device. o The errors in the solution of a system of linear algebraic equations by the successive-over-relaxation (SOR) method presented. o o Approximation errors. o Round off errors. Introduction 15

3)Errors: The accuracy of a numerical calculation is quantified by the error of the calculation. Several types of errors can occur in numerical calculations such as: o Approximation error is the difference between the exact solution of an exact problem and the exact solution of an approximation of the exact problem. o Approximation error can be reduced only by choosing a more accurate approximation of the exact problem. o o Roundoff error is the error caused by the finite word length employed in the calculations. o Roundoff error is more significant when small differences between large numbers are calculated. o Most computers have either 32 bit or 64 bit word length, corresponding to approximately 7 or 13 significant decimal digits, respectively. o Some computers have extended precision capability, which increases the number of bits to 128. Introduction 16

4)Number representation: o Numbers are represented in number systems. Any number of bases can be employed as the base of a number system, for example, o the base 10 (i.e., decimal) system, o the base (i.e., octal) system (The octal numeral system, or oct for short, is the base-8 number system, and uses the digits 0 to 7. Octal numerals can be made from binary numerals by grouping..), o the base 2 (i.e., binary) system, etc. o The base 10, or decimal, system the most common system used for human communication. o Digital computers use the base 2, or binary, system. In a digital computer, a binary number consists of a number of binary bits. o The number of binary bits in a binary number determines the precision with which the binary number represents a decimal number. o The most common size binary number is a 32 bit number, which can represent approximately seven digits of a decimal number. o Some digital computers have 64 bit binary numbers, which can represent 13 to 14 decimal digits. o …………………………………….. Introduction 17

5.SOFTWARE PACKAGES AND LIBRARIES A.Software Packages  Excel  MacsymMa  Maple  Mathematica  Mathcad  Matlab B.Libraries  IMSLI  NAG  NETLIBN C.Numerical Recipes D.Languages: Fortran, C++, ……. Introduction 18

19 Part 1 - Introduction to Computational methods  Steps in Solving an Engineering Problem  Measuring Errors 1) True Error 2) Relative True Error 3) Approximate Error 4) Relative Approximate Error 5) How is Absolute Relative Error used as a stopping criterion?  Sources of Error 1) Round off error 2) Truncation error  Truncation Error  Propagation of Errors  Taylor Series Revisited

20 Why use Numerical Methods? To solve problems that cannot be solved exactly

21 Why use Numerical Methods? To solve problems that are inflexible!

22 Steps in Solving an Engineering Problem

23 How do we solve an engineering problem? Problem Description Mathematical Model Solution of Mathematical Model Using the Solution

24 Example of Solving an Engineering Problem

25 Bascule Bridge THG

26 Trunnion Hub Girder Bascule Bridge THG

27 Trunnion-Hub-Girder Assembly Procedure Step1.Trunnion immersed in dry-ice/alcohol Step2.Trunnion warm-up in hub Step3.Trunnion-Hub immersed in dry-ice/alcohol Step4.Trunnion-Hub warm-up into girder

28 Problem After Cooling, the Trunnion Got Stuck in Hub

29 Why did it get stuck? Magnitude of contraction needed in the Trunnion was 0.015” or more. Did it contract enough?

30 Consultant calculations

31 Measuring Errors

32 Why measure errors? 1) To determine the accuracy of numerical results. 2) To develop stopping criteria for iterative algorithms.

33 True Error Defined as the difference between the true value in a calculation and the approximate value found using a numerical method etc. True Error = True Value – Approximate Value

34 Example—True Error The derivative,of a functioncan be approximated by the equation, If and a) Find the approximate value of b) True value of c) True error for part (a)

35 Example (cont.) Solution: a) Forand

36 Example (cont.) Solution: b) The exact value ofcan be found by using our knowledge of differential calculus. So the true value ofis c) True error is calculated as True Value – Approximate Value

37 Relative True Error Defined as the ratio between the true error, and the true value. Relative True Error ( ) = True Error True Value

38 Example—Relative True Error Following from the previous example for true error, find the relative true error forat with From the previous example, Relative True Error is defined as as a percentage,

39 Approximate Error What can be done if true values are not known or are very difficult to obtain? Approximate error is defined as the difference between the present approximation and the previous approximation. Approximate Error () = Present Approximation – Previous Approximation

40 Example—Approximate Error Foratfind the following, a)using b)using c) approximate error for the value offor part b) Solution: a) Forand

41 Example (cont.) Solution: (cont.) b) Forand

42 Example (cont.) Solution: (cont.) c) So the approximate error,is Present Approximation – Previous Approximation

43 Relative Approximate Error Defined as the ratio between the approximate error and the present approximation. Relative Approximate Error ( Approximate Error Present Approximation ) =

44 Example—Relative Approximate Error Forat, find the relative approximate error using values fromand Solution: From Example, the approximate value of usingandusing Present Approximation – Previous Approximation

45 Example (cont.) Solution: (cont.) Approximate Error Present Approximation as a percentage, Absolute relative approximate errors may also need to be calculated,

46 How is Absolute Relative Error used as a stopping criterion? Ifwhereis a pre-specified tolerance, then If at least m significant digits are required to be correct in the final answer, then

47 Table of Values Foratwith varying step size, N/A % % % %2

48 THE END

49 Sources of Error

50 Two sources of numerical error 1) Round off error 2) Truncation error

51 Round-off Error

52 Round off Error Caused by representing a number approximately

53 Problems created by round off error 28 Americans were killed on February 25, 1991 by an Iraqi Scud missile in Dhahran, Saudi Arabia. The patriot defense system failed to track and intercept the Scud. Why?

54 Problem with Patriot missile Clock cycle of 1/10 seconds was represented in 24-bit fixed point register created an error of 9.5 x seconds. The battery was on for 100 consecutive hours, thus causing an inaccuracy of

55 Problem (cont.) The shift calculated in the ranging system of the missile was 687 meters. The target was considered to be out of range at a distance greater than 137 meters.

56 THE END Round off Error

57 Truncation Error

58 Truncation error  Error caused by truncating or approximating a mathematical procedure.

59 Example of Truncation Error Taking only a few terms of a Maclaurin series to approximate If only 3 terms are used,

60 Another Example of Truncation Error Using a finiteto approximate P Q secant line tangent line Figure 1. Approximate derivative using finite Δx

61 Another Example of Truncation Error Using finite rectangles to approximate an integral.

62 Example —Differentiation Findforusing and The actual value is Truncation error is then, Can you find the truncation error with

63 THE END Truncation Error

64 Propagation of Errors

65 Propagation of Errors  In numerical methods, the calculations are not made with exact numbers. How do these inaccuracies propagate through the calculations?

66 Example 1: Find the bounds for the propagation in adding two numbers. For example if one is calculating X +Y where X = 1.5 ± 0.05 Y = 3.4 ± 0.04 Solution Maximum possible value of X = 1.55 and Y = 3.44 Maximum possible value of X + Y = = 4.99 Minimum possible value of X = 1.45 and Y = Minimum possible value of X + Y = = 4.81 Hence 4.81 ≤ X + Y ≤4.99.

67 Propagation of Errors In Formulas If is a function of several variables then the maximum possible value of the error in is

68 Example 2: The strain in an axial member of a square cross- section is given by Given Find the maximum possible error in the measured strain.

69 Example 2: Solution

70 Example 2: Thus Hence

71 THE END

72 Taylor Series Revisited

73 What is a Taylor series? Some examples of Taylor series which you must have seen

74 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] 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” ( fine print excluded )

75 Example—Taylor Series Find the value ofgiven that and all other higher order derivatives ofatare zero. Solution:

76 Example (cont.) Solution: (cont.) Since the higher order derivatives are zero, Note that to findexactly, we only need the value of the function and all its derivatives at some other point, in this case

77 THE END Part 1 - Introduction to Computational methods

78 Quizzes —1 Find the value of given that, and all other higher order derivatives of are zero.