Presentation is loading. Please wait.

Presentation is loading. Please wait.

MECN 3500 Inter - Bayamon Lecture 8 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo

Similar presentations


Presentation on theme: "MECN 3500 Inter - Bayamon Lecture 8 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo"— Presentation transcript:

1 MECN 3500 Inter - Bayamon Lecture 8 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo omeza@bayamon.inter.edu http://www.bc.inter.edu/facultad/omeza Department of Mechanical Engineering Inter American University of Puerto Rico Bayamon Campus

2 Lecture 8 MECN 3500 Inter - Bayamon 2 Tentative Lectures Schedule TopicLecture Mathematical Modeling and Engineering Problem Solving 1 Introduction to Matlab 2 Numerical Error 3 Root Finding 4-5-6 System of Linear Equations 7 Least Square Curve Fitting Polynomial Interpolation Numerical Integration Ordinary Differential Equations

3 Lecture 8 MECN 3500 Inter - Bayamon Elimination Method LU Decomposition and Matrix Inversion 3

4 Lecture 8 MECN 3500 Inter - Bayamon  To solve linear algebraic equations using the technique LU Decomposition in order to provides an efficient means to compute the matrix inverse. 4 Course Objectives

5 Lecture 8 MECN 3500 Inter - Bayamon Provides an efficient way to compute matrix inverse by separating the time consuming elimination of the Matrix [A] from manipulations of the right-hand side {B}. Provides an efficient way to compute matrix inverse by separating the time consuming elimination of the Matrix [A] from manipulations of the right-hand side {B}. Gauss elimination, in which the forward elimination comprises the bulk of the computational effort, can be implemented as an LU decomposition Gauss elimination, in which the forward elimination comprises the bulk of the computational effort, can be implemented as an LU decomposition 5 Introduction

6 Lecture 8 MECN 3500 Inter - Bayamon 6 LU Decomposition If L- lower triangular matrix U- upper triangular matrix Then, [A]{X} = {B} or [A]{X} - {B} = 0 [L]{[U]{X}-{D}} = [A]{X} - {B}

7 Lecture 8 MECN 3500 Inter - Bayamon LU Decomposition [L][U]=[A] and [L]{D}={B} A two-step strategy 1.-LU Decomposition step: [A] can be decomposed into two matrices [L] and [U] such that [L][U]=[A] 2.-Substitution step: Similar to first phase of Gauss elimination, consider [U]{X}={D}[L]{D}={B} [L]{D}={B} is used to generate an intermediate vector {D} by forward substitution Then, [U]{X}={D} is used to get {X} by back substitution.

8 Lecture 8 MECN 3500 Inter - Bayamon LU Decomposition

9 Lecture 8 MECN 3500 Inter - Bayamon LU Decomposition Requires the same total FLOPS as for Gauss elimination. Requires the same total FLOPS as for Gauss elimination. Saves computing time by separating time- consuming elimination step from the manipulations of the right hand side. Saves computing time by separating time- consuming elimination step from the manipulations of the right hand side. Provides efficient means to compute the matrix inverse Provides efficient means to compute the matrix inverse

10 Lecture 8 MECN 3500 Inter - Bayamon NGaussElimwLUDecomp.m

11 Lecture 8 MECN 3500 Inter - Bayamon >>Enter Matrix A > [3 -0.1 -0.2; 0.1 7 -0.3; 0.3 -0.2 10] A = 3.0000 -0.1000 -0.2000 0.1000 7.0000 -0.3000 0.3000 -0.2000 10.0000 >>Enter Solution Vector B > [7.85 -19.3 71.4] B = 7.8500 -19.3000 71.4000 S = 3.0000 -2.5000 7.0000 Bc = 7.8500 -19.3000 71.4000 >>Enter Matrix A > [3 -0.1 -0.2; 0.1 7 -0.3; 0.3 -0.2 10] A = 3.0000 -0.1000 -0.2000 0.1000 7.0000 -0.3000 0.3000 -0.2000 10.0000 >>Enter Solution Vector B > [7.85 -19.3 71.4] B = 7.8500 -19.3000 71.4000 S = 3.0000 -2.5000 7.0000 Bc = 7.8500 -19.3000 71.4000 Example 10.2

12 Lecture 8 MECN 3500 Inter - Bayamon L = 1.0000 0 0 0.0333 1.0000 0 0.1000 -0.0271 1.0000 U = 3.0000 -0.1000 -0.2000 0 7.0033 -0.2933 0 0 10.0120 Ac = 3.0000 -0.1000 -0.2000 0.1000 7.0000 -0.3000 0.3000 -0.2000 10.0000 Lc = 1.0000 0 0 0.0333 1.0000 0 0.1000 -0.0271 1.0000 Uc = 3.0000 -0.1000 -0.2000 0 7.0033 -0.2933 0 0 10.0120 L = 1.0000 0 0 0.0333 1.0000 0 0.1000 -0.0271 1.0000 U = 3.0000 -0.1000 -0.2000 0 7.0033 -0.2933 0 0 10.0120 Ac = 3.0000 -0.1000 -0.2000 0.1000 7.0000 -0.3000 0.3000 -0.2000 10.0000 Lc = 1.0000 0 0 0.0333 1.0000 0 0.1000 -0.0271 1.0000 Uc = 3.0000 -0.1000 -0.2000 0 7.0033 -0.2933 0 0 10.0120

13 Lecture 8 MECN 3500 Inter - Bayamon Homework6  www.bc.inter.edu/facultad/omeza www.bc.inter.edu/facultad/omeza Omar E. Meza Castillo Ph.D. 13


Download ppt "MECN 3500 Inter - Bayamon Lecture 8 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo"

Similar presentations


Ads by Google