Vous êtes sur la page 1sur 17

Lecture 5: Overview of Numerical

Methods (contd)

Last time

Examined important classes of partial differential


equations and understood their behavior

Saw how this knowledge would apply to the general


scalar transport equation

Started an overview of numerical methods including


mesh terminology, finite difference, finite volume and
finite element methods

This time
We will continue the overview and examine

Accuracy, consistency, stability and convergence of a


numerical scheme

Solution of Linear Equations

Linear equation set has two important characteristics


Matrix is sparse, may be banded
Coefficients are provisional for non-linear problems
Two different approaches
Direct methods
Iterative methods
Approach defines path to solution
Final answer only determined by discretization

Direct Methods

All discretization schemes lead to

Here is solution vector [1 , 2 ,, N]T.

Can invert:

Inversion is O(N3 ) operation. Other more efficient


methods exist.
Take advantage of band structure if it exists
Take advantage of sparsity
5

Direct Methods (contd)

Large storage and operation count


For N grid points, must store NxN matrix
Only store non-zero entries and fill pattern

For non-linear problems, A is provisional and is usually updated


as a part of an outer loop
Not worth solving system too exactly

As a result, direct methods not usually preferred in CFD today

Iterative Methods

Guess and correct philosophy

Gauss-Seidel scheme is typical:


Visit each grid point
Update using
Sweep repeatedly through grid points until convergence
criterion is met
In each sweep, points already visited have new values; points
not yet visited have old values

Iterative Methods (contd)

Jacobi scheme is similar to Gauss-Seidel scheme but does not


use latest available values
All values are updated simultaneously at end of sweep.

Iterative are not guaranteed to converge to a solution unless


Scarborough criterion is satisfied

Scarborough Criterion

Scarborough criterion states that convergence of an iterative


scheme is guaranteed if:

This means that coefficient matrix must be diagonally dominant

Gauss-Seidel Scheme

No need to store coefficient matrix

Operation count per sweep scales as O(N)

However, convergence, even when guaranteed, is slow for large


meshes

Will examine alternatives later in course

10

Accuracy

While looking at finite difference methods, we wrote:


Secondorder
truncation
error

Halving grid size reduces error by factor of four for second-order


scheme

Cannot say what absolute error is truncation error only gives


rate of decrease

11

Accuracy

Order of discretization scheme is n if truncation error is O(xn )

When more than one term is involved, the order of the


discretization scheme is that of the lowest order term.

Accuracy is a property of the discretization scheme, not the path


to solution

12

Consistency

A discretization scheme is consistent if the truncation error


vanishes as x ->0

Does not always happen: What if truncation error is O(x/t) ?

Consistency is a property of the discretization scheme, not the


path to solution

13

Convergence

Two uses of the term


Convergence to a mesh-independent solution through mesh
refinement
Convergence of an iterative scheme to a final unchanging
answer (or one meeting convergence criterion)

We will usually use the latter meaning

14

Stability

Property of the path to solution

Typically used to characterize iterative schemes

Depending on the characteristics of the coefficient matrix, errors


may either be damped or may grow during iteration

An iterative scheme is unstable if it fails to produce a solution to


the discrete equation set

15

Stability

Also possible to speak of the stability of unsteady


schemes
Unstable: when solving a time-dependent problem,
the solution blows up
Von-Neumann (and other) stability analyses determine
whether linear systems stable under various
iteration/time-stepping schemes
For non-linear/coupled problems, stability analysis is
difficult and not much used
Take guidance from linear analysis in appropriate
parameter range; intuition
16

Closure

This time we completed an overview of the numerical


discretization and solution process

Domain discretization
Discretization of governing equations
Solution of linear algebraic set
Properties of discretization and path to solution
Accuracy, consistency, convergence, stability

Next time, we will start looking at finite volume discretization of


diffusion equation

17

Vous aimerez peut-être aussi