Presentation is loading. Please wait.

Presentation is loading. Please wait.

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)

Similar presentations


Presentation on theme: "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)"— Presentation transcript:

1 1 Faculty Name Prof. A. A. Saati

2 Type of course Core Lecture, Lab., Credit2 / 3 / 3 Prerequisites Heat Transfer (804405-3) Engineering Math. II (800202-3) Engineering Computational Methods (804242-3) (804370-3) 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

3 Textbook - Computational Fluid Dynamics For Engineers. By Hoffmann, K. A. and Chiang, S.T., 2004. 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), 2001. - 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 4 Ch1, ch2. ch3, ch5, and ch6

5 5 Ch-2

6 6 Ch-1 ch2 & ch3

7 7

8 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 - 1 2 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 3.5 4 6 FDM - Elliptic PDE11 – 129App-1 ch3 sec 3.5 4 7 FDM - Elliptic PDE13 – 1410App-1 ch3 sec 5.4 4 Exam ( open book only ) 15 8 FDM - Hyperbolic PDE15 – 1611App-1 ch6 sec 6.5 4 9 FDM - Hyperbolic PDE17 – 1812App-2 ch6 sec 6.5 4 10 Fundamentals of Discretization Finite Element- Difference-Volume 19 – 20 11 Fundamentals of Discretization Finite Element- Difference-Volume 21 – 22 12 Fundamentals of Discretization Finite Element- Difference-Volume 23 – 24 13 Final project25 – 26 12-13Final project 10 14 Quizzes27 - 28 5 15Final Exam( open book only ) 40 F. Grade 100 Course Calendar

9 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

10 Introduction (Joe D. Hoffman - 2001) 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.

11 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,

12 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.

13 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., π = 3.1415926535...).  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.

14 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

15 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

16 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

17 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

18 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 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 20 Why use Numerical Methods? To solve problems that cannot be solved exactly

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

22 22 Steps in Solving an Engineering Problem

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

24 24 Example of Solving an Engineering Problem

25 25 Bascule Bridge THG

26 26 Trunnion Hub Girder Bascule Bridge THG

27 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 28 Problem After Cooling, the Trunnion Got Stuck in Hub

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

30 30 Consultant calculations

31 31 Measuring Errors

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

33 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 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 35 Example (cont.) Solution: a) Forand

36 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 37 Relative True Error Defined as the ratio between the true error, and the true value. Relative True Error ( ) = True Error True Value

38 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 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 40 Example—Approximate Error Foratfind the following, a)using b)using c) approximate error for the value offor part b) Solution: a) Forand

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

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

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

44 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 45 Example (cont.) Solution: (cont.) Approximate Error Present Approximation as a percentage, Absolute relative approximate errors may also need to be calculated,

46 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 47 Table of Values Foratwith varying step size, 0.310.263N/A0 0.159.88003.877%1 0.109.75581.273%1 0.019.53782.285%1 0.0019.51640.2249%2

48 48 THE END

49 49 Sources of Error

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

51 51 Round-off Error

52 52 Round off Error Caused by representing a number approximately

53 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 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 10 -8 seconds. The battery was on for 100 consecutive hours, thus causing an inaccuracy of

55 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 56 THE END Round off Error

57 57 Truncation Error

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

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

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

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

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

63 63 THE END Truncation Error

64 64 Propagation of Errors

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

66 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 = 1.55 + 3.44 = 4.99 Minimum possible value of X = 1.45 and Y = 3.36. Minimum possible value of X + Y = 1.45 + 3.36 = 4.81 Hence 4.81 ≤ X + Y ≤4.99.

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

68 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 69 Example 2: Solution

70 70 Example 2: Thus Hence

71 71 THE END

72 72 Taylor Series Revisited

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

74 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 75 Example—Taylor Series Find the value ofgiven that and all other higher order derivatives ofatare zero. Solution:

76 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 77 THE END Part 1 - Introduction to Computational methods

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


Download ppt "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)"

Similar presentations


Ads by Google