MMJ 1113 Computational Methods for Engineers Mohsin Mohd Sies Fakulti Kejuruteraan Mekanikal, Universiti Teknologi Malaysia.

Slides:



Advertisements
Similar presentations
Part 1 Chapter 4 Roundoff and Truncation Errors PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
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.
CSE 330: Numerical Methods
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
NUMERICAL ERROR ENGR 351 Numerical Methods for Engineers
Round-Off and Truncation Errors
Lecture 2: Numerical Differentiation. Derivative as a gradient
Transfer Functions Convenient representation of a linear, dynamic model. A transfer function (TF) relates one input and one output: The following terminology.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 3 Approximations and Errors.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 2 Mathematical Modeling and Engineering Problem Solving.
Transfer Functions Convenient representation of a linear, dynamic model. A transfer function (TF) relates one input and one output: The following terminology.
The Islamic University of Gaza Faculty of Engineering Numerical Analysis ECIV 3306 Introduction.
NUMERICAL ERROR ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier.
1 Error Analysis Part 1 The Basics. 2 Key Concepts Analytical vs. numerical Methods Representation of floating-point numbers Concept of significant digits.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 11.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 31.
Introduction and Analysis of Error Pertemuan 1
Interpolation. Interpolation is important concept in numerical analysis. Quite often functions may not be available explicitly but only the values of.
Development of An ERROR ESTIMATE P M V Subbarao Professor Mechanical Engineering Department A Tolerance to Error Generates New Information….
BsysE595 Lecture Basic modeling approaches for engineering systems – Summary and Review Shulin Chen January 10, 2013.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
MATH 685/CSI 700 Lecture Notes Lecture 1. Intro to Scientific Computing.
CISE301_Topic11 CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4:
ES 240: Scientific and Engineering Computation. Chapter 4 Chapter 4: Errors Uchechukwu Ofoegbu Temple University.
Computational Physics Introduction 3/30/11. Goals  Calculate solutions to physics problems  All physics problems can be formulated mathematically. 
Truncation Error and the Taylor Series
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University 1 Chapter 1 Mathematical.
Round-off Errors and Computer Arithmetic. The arithmetic performed by a calculator or computer is different from the arithmetic in algebra and calculus.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter.
NUMERICAL ERROR Student Notes ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier.
MECN 3500 Inter - Bayamon Lecture 3 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
CSE 3802 / ECE 3431 Numerical Methods in Scientific Computation
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 3.
Numerical Analysis Intro to Scientific Computing.
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
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Truncation Errors and the Taylor Series Chapter 4.
ERT 210/4 Process Control & Dynamics DYNAMIC BEHAVIOR OF PROCESSES :
ESO 208A/ESO 218 LECTURE 2 JULY 31, ERRORS MODELING OUTPUTS QUANTIFICATION TRUE VALUE APPROXIMATE VALUE.
Numerical Analysis CC413 Propagation of Errors. 2 In numerical methods, the calculations are not made with exact numbers. How do these inaccuracies propagate.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1-1 Chapter 1.
Lecture 1 Introduction Dr. Hakikur Rahman Thanks to Dr. S. M. Lutful Kabir for Slides CSE 330: Numerical Methods.
1 Approximations and Round-Off Errors Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis Applied Numerical Method for Engineers Chapter.
CSE 330: Numerical Methods. What is true error? True error is the difference between the true value (also called the exact value) and the approximate.
Numerical Methods and Optimization C o u r s e 1 By Bharat R Chaudhari.
1 M 277 (60 h) Mathematics for Computer Sciences Bibliography  Discrete Mathematics and its applications, Kenneth H. Rosen  Numerical Analysis, Richard.
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.
Solving Engineering Problems
Transfer Functions Convenient representation of a linear, dynamic model. A transfer function (TF) relates one input and one output: The following terminology.
Chapter 1.
Chapter 2 ERROR ANALYSIS
Errors in Numerical Methods
Roundoff and Truncation Errors
Errors in Numerical Methods
Solving Engineering Problems
Approximations and Round-Off Errors Chapter 3
Mathematical Model.
Numerical Analysis Lecture 2.
SKTN 2393 Numerical Methods for Nuclear Engineers
Roundoff and Truncation Errors
Errors and Error Analysis Lecture 2
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
Presentation transcript:

MMJ 1113 Computational Methods for Engineers Mohsin Mohd Sies Fakulti Kejuruteraan Mekanikal, Universiti Teknologi Malaysia

Solving Engineering Problems From physical problem to solution – Develop Model – Apply Fundamental Principles – Obtain Governing Equations – Solution of Governing Equations – Interpretation of Solution

1-3 Fig. 1.1

1-4 A mathematical model is represented as a functional relationship of the form Dependent independentforcing Variable = fvariables, parameters,functions Dependent variable: Characteristic that usually reflects the state of the system Independent variables: Dimensions such as time ans space along which the systems behavior is being determined Parameters: reflect the system’s properties or composition Forcing functions: external influences acting upon the system

Figure 1_02.jpg Falling Parachutist Problem

Develop Model Model is developed to represent all important characteristics of the physical system – Identify system – Identify external influences on system (load, input, output) – Material properties (Ideal gas, real gas, Newtonian fluid, Elastic/plastic etc.)

Apply Fundamental Principles Apply Physical Laws – Equilibrium equation – Newton's Law of motion – Conservation of mass – Conservation of momentum – Conservation of energy – Accounting principle (change = input - output)

1-8

Obtain governing equation Apply simplifying assumptions on the physical laws Derive final governing equation

1-10 This is a differential equation and is written in terms of the differential rate of change dv/dt of the variable that we are interested in predicting. If the parachutist is initially at rest (v=0 at t=0), using calculus Independent variable Dependent variable Parameters Forcing function

Solution of governing equation The problem may now appear mathematically as a set of – linear/nonlinear algebraic equations – Transcendental equations – Ordinary differential equations (ODE) – Partial differential equations (PDE) – Eigenvalue problem The set of simultaneous equations is readily handled using matrices.

Solutions of governing equations Two types of solutions – Closed form mathematical expression leading to analytical solution – Closed form not possible, thus needs approximated numerical solution (computers)

Figure 1_03.jpg

Figure 1_04.jpg

Figure 1_05.jpg

Solution of governing equation

Interpretation of Solution Reality Check – Test with simple, known cases Graphics representation better conveys the meaning of solution – Graphs – Bar charts – Contour plots

Softwares Languages – FORTRAN – Matlab – C, C++, Python, etc Libraries – Netlib ( – LAPACK – EISPACK – LINPACK – IMSL, etc

Softwares Others Octave, Scilab Maxima, Maple Mathematica, Mathcad R (statistical) OpenDX, Paraview, Viz5D (plotting, visualization)

Taylor Series Non-elementary functions such as trigonometric, exponential, and others are expressed in an approximate fashion using Taylor series when their values, derivatives, and integrals are computed. Any smooth function can be approximated as a polynomial. Taylor series provides a means to predict the value of a function at one point in terms of the function value and its derivatives at another point.

(x i+1 -x i )= hstep size (define first) Remainder term, R n, accounts for all terms from (n+1) to infinity. Taylor Series

Any smooth function can be approximated as a polynomial. f(x i+1 ) ≈ f(x i ) zero order approximation, only true if x i+1 and x i are very close to each other. f(x i+1 ) ≈ f(x i ) + f′(x i ) (x i+1 -x i )first order approximation, in form of a straight line

Precision and Accuracy Accuracy. How close is a computed or measured value to the true value Precision (or reproducibility). How close is a computed or measured value to previously computed or measured values. Inaccuracy (or bias). A systematic deviation from the actual value. Imprecision (or uncertainty). Magnitude of scatter.

Errors For many engineering problems, we cannot obtain analytical solutions. Numerical methods yield approximate results, results that are close to the exact analytical solution. We cannot exactly compute the errors associated with numerical methods. – Only rarely given data are exact, since they originate from measurements. Therefore there is probably error in the input information. – Algorithm itself usually introduces errors as well, e.g., unavoidable round-offs, etc … – The output information will then contain error from both of these sources. How confident we are in our approximate result? The question is “how much error is present in our calculation and is it tolerable?”

Errors Types – Absolute – Relative

True Value = Approximation + Error E t = True value – Approximation (+/-) Error Definitions True error (Absolute Error)

Errors

In Absence of True Value For numerical methods, the true value will be known only when we deal with functions that can be solved analytically (simple systems). In real world applications, we usually not know the answer a priori. Then Iterative approach, example Newton’s method (+ / -)

Tolerance 31 Use absolute value. Computations are repeated until stopping criterion is satisfied. If the following criterion is met you can be sure that the result is correct to at least n significant figures. Pre-specified % tolerance based on the knowledge of your solution

Sources of Error Errors in mathematical modeling: – simplifying approximation, – assumption made in representing physical system by mathematical equations Blunders: – undetected programming errors, – silly mistakes Errors in input: – due to unavoidable reasons e.g. errors in data transfer, – uncertainties associated with measurements

Sources of Error Machine errors: – rounding, – chopping, – overflow, – underflow Truncation errors associated with mathematical process: – approximate evaluation of an infinite series, – integral involving infinity

34 Round-off Errors Numbers such as , e, or cannot be expressed by a fixed number of significant figures. Computers use a base-2 representation, they cannot precisely represent certain exact base-10 numbers. Fractional quantities are typically represented in computer using “floating point” form, e.g., exponent Base of the number system used mantissa Integer part

35 Chopping Example:  = to be stored on a base-10 system carrying 7 significant digits.  = chopping error  t = If rounded  =  t = Some machines use chopping, because rounding adds to the computational overhead. Since number of significant figures is large enough, resulting chopping error is negligible.

Error Propagation

Neglecting higher order derivative terms, the error in the output can be expressed as and denoting errors in input parameters as we can estimate propagation error as

Error Propagation