39
ME5311 Computational Methods of Viscous Fluid Dynamics Instructor: Prof. Zhuyin Ren Department of Mechanical Engineering University of Connecticut Spring 2013

ME5311 Computational Methods of Viscous Fluid …rzr11001/ME5311_S13/ME5311 -Lecture3...ME5311 Computational Methods of Viscous Fluid Dynamics Instructor: Prof. Zhuyin Ren Department

  • Upload
    ngokiet

  • View
    225

  • Download
    0

Embed Size (px)

Citation preview

ME5311 Computational Methods of Viscous Fluid Dynamics

Instructor: Prof. Zhuyin Ren

Department of Mechanical EngineeringUniversity of Connecticut

Spring 2013

Systems of Linear Equations

� Motivation and Plans

� Direct Methods for solving Linear Equation Systems � Cramer’s Rule (and other methods for a small number of equations)

� Gaussian Elimination

� Numerical implementation o Numerical stability

� Partial Pivoting

� Equilibration

� Full Pivoting

o Multiple right hand sides, Computation count

o LU factorization

o Error Analysis for Linear Systems � Condition Number

o Special Matrices: Tri-diagonal systems

� Iterative Methods � Jacobi’s method

� Gauss-Seidel iteration

� …

Motivations and Plans

� Fundamental equations in engineering are conservation laws (mass, momentum, energy, mass ratios/concentrations, etc)

� Can be written as “ System Behavior (state variables) = forcing ”

� Result of the discretized (volume or differential form) of the Navier-Stokes equations (or most other differential equations):

� System of (mostly coupled) algebraic equations which are linear or nonlinear, depending on the nature of the continuous equations

� Often, resulting matrices are sparse (e.g. banded and/or block matrices)

� Here we first deal with solving Linear Algebraic equations: Ax = b or AX = B

Motivations and Plans

� Above 75% of engineering/scientific problems involve solving linear systems of equations � As soon as methods were used on computers => dramatic advances

� Main Goal: Learn methods to solve systems of linear algebraic equations and apply them to CFD applications

� Reading Assignment � Part III and Chapter 9 of “Chapra and Canale, Numerical Methods for Engineers,

2006.”

� For Matrix background, see Chapra and Canale (pg 219-227) and other linear algebra texts (e.g. Trefethen and Bau, 1997; Golub & Van Loan)

� Other References : � Any chapter on “Solving linear systems of equations” in CFD references

provided.

� For example: chapter 5 of “J. H. Ferziger and M. Peric, Computational Methods for Fluid Dynamics. Springer, NY, 3rd edition, 2002”

Direct Numerical Methodsfor Linear Equation Systems

Direct Methods for Small Systems:Determinants and Cramer’s Rule

Direct Methods for large dense systemsGauss Elimination

Gauss Elimination:Number of Operations

Gauss Elimination:Issues and Pitfalls to be addressed

Systems of Linear EquationsGauss Elimination

Gauss Elimination: Multiple Right-hand Sides

LU Decomposition/Factorization:

LU Decomposition / Factorizationvia Gauss Elimination, assuming no pivoting needed

Special Matrices

Special Matrices: Tri-diagonal Systems

Special Matrices: Tri-diagonal Systems

Special Matrices: Tri-diagonal SystemsThomas Algorithm

Special Matrices:General, Banded Matrix

Special Matrices:General, Banded Matrix

Special Matrices:Symmetric (Positive-Definite) Matrix

Special Matrices:Symmetric, Positive Definite Matrix

Special Matrices:Symmetric, Positive Definite Matrix

The Condition Number

Linear Systems of EquationsError Analysis

Linear Systems of Equations: Norms

Examples of Matrix Norms

Linear Systems of Equations: Iterative MethodsWU3

Slide 27

WU3 USE NOTES !!!!!Windows User, 2/18/2013

Linear Systems of Equations: Iterative MethodsElement-by-Element Form of the Equations

Iterative Methods: Jacobi and Gauss Seidel

Iterative Methods: Jacobi’s Matrix form

Convergence of Jacobi and Gauss-Seidel

Sufficient Condition for ConvergenceProof for Jacobi

Convergence (left) and Divergence (right)of the Gauss-Seidel Method

Special Matrices: Tri-diagonal Systems

Successive Over-relaxation (SOR) Method

Gradient Methods

Steepest Descent Method

Conjugate Gradient Method