numerical analysis intro to scientific computing

Download Numerical Analysis Intro to Scientific Computing

If you can't read please download the document

Upload: warren-williamson

Post on 13-Dec-2015

213 views

Category:

Documents


1 download

TRANSCRIPT

  • Slide 1

Numerical Analysis Intro to Scientific Computing Slide 2 Numerical Methods Numerical Methods: Algorithms that are used to obtain numerical solutions of a mathematical problem. Why do we need them? 1. No analytical solution exists, 2. An analytical solution is difficult to obtain or not practical. Slide 3 Why use Numerical Methods? To solve problems that cannot be solved exactly Slide 4 Introduction 1. Introduction to numerical methods for engineering as a general and fundamental tool for all engineering disciplines. We plan to cover (almost) the main topics of numerical analysis. 2. We will use commercial software widely used in science and engineering: MATLAB and Excel. 3. We will illustrate and discuss how numerical methods are used in practice. We will consider examples from Engineering. Slide 5 5 Modelling in Industry: Automobiles Slide 6 http://numericalmethods.eng.usf.edu 6 Example of Solving an Engineering Problem Slide 7 7 Modelling in Industry: Aerospace Slide 8 8 Modelling in Industry: Electronics Slide 9 http://numericalmethods.eng.usf.edu 9 Bascule Bridge THG Slide 10 http://numericalmethods.eng.usf.edu 10 Trunnion Hub Girder Bascule Bridge THG Slide 11 http://numericalmethods.eng.usf.edu 11 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 Slide 12 http://numericalmethods.eng.usf.edu 12 Problem After Cooling, the Trunnion Got Stuck in Hub Slide 13 http://numericalmethods.eng.usf.edu 13 Why did it get stuck? Magnitude of contraction needed in the trunnion was 0.015 or more. Did it contract enough? Slide 14 Course overview 1.Finding roots of functions of one variable 2.Approximation, errors, and precision. 3.System of linear equations 4.Numerical integration and differentiation. Slide 15 Introduction Why are Numerical Methods so widely used in Engineering? Engineers use mathematical modeling (equations and data) to describe and predict the behavior of systems. Closed-form (analytical) solutions are only possible and complete for simple problems (geometry, properties, etc.). Computers are widely available, powerful, and (relatively) cheap. Powerful software packages are available (special or general purpose). Slide 16 Applications of Numerical Methods in Engineering Communication/power Network simulation Train and traffic networks Computational Fluid Dynamics (CFD): Weather prediction Groundwater & pollutant movement Slide 17 Electronic Communication by e-mail Computer assignments will be submitted as attachments via e-mail: [email protected] Text files, Excel & MATLAB documents as attachments. documents will be distributed via the AAST web page. Slide 18 Useful info Course website: MATLAB instructions: http://math.gmu.edu/introtomatlab.htm Mathworks, the creator of MATLAB: http://www.mathworks.com http://www.mathworks.com OCTAVE = free MATLAB clone Available for download at http://octave.sourceforge.net/ http://octave.sourceforge.net/ Slide 19 Scientific computing Design and analysis of algorithms for numerically solving mathematical problems in science and engineering Considers the effect of approximations and performs error analysis modern simulations of engineering applications Slide 20 Develop mathematical model (usually requires a combination of math skills and some a priori knowledge of the system) Come up with numerical algorithm (numerical analysis skills) Implement the algorithm (software skills) Run, debug, test the software Visualize the results Interpret and validate the results Computational problems: attack strategy Mathematical modeling Slide 21 Computational problems: well-posedness The problem is well-posed, if (a) solution exists (b) it is unique (c) it depends continuously on problem data Simplification strategies: Infinite finite Nonlinear linear High-order low-order Only approximate solution can be obtained this way! Slide 22 Sources of numerical errors Before computation modeling approximations empirical measurements, human errors previous computations During computation truncation or discretization Rounding errors Perturbations during computation may be amplified by algorithm Abs_error = approx_value true_value Rel_error = abs_error/true_value Approx_value = (true_value)x(1+rel_error) Can be controlled through error analysis Cannot be controlled Slide 23 Representing Real Numbers You are familiar with the decimal system: Decimal System: Base = 10, Digits (0,1,,9) Standard Representations: Slide 24 Normalized Floating Point Representation Normalized Floating Point Representation: Scientific Notation: Exactly one non-zero digit appears before decimal point. Advantage: Efficient in representing very small or very large numbers. Slide 25 Binary System Binary System: Base = 2, Digits {0,1} Slide 26 IEEE 754 Floating-Point Standard Single Precision (32-bit representation) 1-bit Sign + 8-bit Exponent + 23-bit Fraction Double Precision (64-bit representation) 1-bit Sign + 11-bit Exponent + 52-bit Fraction SExponent 8 Fraction 23 SExponent 11 Fraction 52 (continued) Slide 27 Machine precision Slide 28 Calculator Example Suppose you want to compute: 3.578 * 2.139 using a calculator with two-digit fractions 3.57 * 2.137.60 = 7.653342 True answer: Slide 29 29 Bridge crane design example Design elements : top plate, bottom plate, web, etc. Bridge girder Slide 30 Stability Algorithm is stable if result produced is relatively insensitive to perturbations during computation Stability of algorithms is analogous to conditioning of problems For stable algorithm, effect of computational error is no worse than effect of small data error in input Slide 31 Accuracy Accuracy : closeness of computed solution to true solution of problem Accuracy depends on conditioning of problem as well as stability of algorithm Slide 32 48.9 Significant Digits - Example Slide 33 Rounding and Chopping Rounding: Replace the number by the nearest machine number. Chopping: Throw all extra digits. Slide 34 Can be computed if the true value is known: Error Definitions True Error Slide 35 We say that the estimate is correct to n decimal digits if: We say that the estimate is correct to n decimal digits rounded if: Notation Slide 36 Solution of Nonlinear Equations Some simple equations can be solved analytically: Many other equations have no analytical solution: Slide 37 Methods for Solving Nonlinear Equations o Bisection Method o Newton-Raphson Method o Secant Method Slide 38 Solution of Systems of Linear Equations Slide 39 Cramers Rule is Not Practical Slide 40 Methods for Solving Systems of Linear Equations o Gaussian Elimination o Gaussian Elimination with Scaled Partial Pivoting o Gauss- Jordan Slide 41 Integration Some functions can be integrated analytically: Slide 42 Methods for Numerical Integration o Trapezoid Method o Simpson Method o Mid-point method