# Computational Fluid

Dynamics
Finite Difference Method

1-1

FDM

1-2

FDM

1-3

FDM

1-4

FDM

1-5

FDM 1-6 .

FDM 1-7 .

FDM 1-8 .

FDM 1-9 .

FDM 1-10 .

FDM 1-11 .

FDM 1-12 .

FDM 1-13 .

FDM 1-14 .

FDM 1-15 .

FDM 1-16 .

FDM 1-17 .

FDM 1-18 .

FDM 1-19 .

FDM 1-20 .

FDM 1-21 .

now we derive the three point central difference formula for second order derivative 1-22 .FDM Using this approach.

FDM 1-23 .

FDM 1-24 .

FDM 1-25 .

POLYNOMIAL FITTING 1-26 .

POLYNOMIAL FITTING 1-27 .

POLYNOMIAL FITTING 1-28 .

Also obtain the corresponding approximations for the first. 1-29 .POLYNOMIAL FITTING Derive fourth order central difference Eq. by fitting a polynomial of degree 4 on uniform grid. third and fourth order derivatives.

POLYNOMIAL FITTING 1-30 .

POLYNOMIAL FITTING 1-31 .

POLYNOMIAL FITTING 1-32 .

POLYNOMIAL FITTING 1-33 .

POLYNOMIAL FITTING 1-34 .

POLYNOMIAL FITTING 1-35 .

APPROXIMATION OF SECOND ORDER DERIVATIVE IN GENERIC TRANSPORT EQUATION 1-36 .

APPROXIMATION OF SECOND ORDER DERIVATIVE IN GENERIC TRANSPORT EQUATION 1-37 .

the non-linear equation would require linearization in the process of its numerical solution.  This equation is linear for a linear PDE. In the latter case.FINITE DIFFERENCE DISCRETE ALGEBRAIC SYSTEM  Finite difference approximation of derivatives in a partial differential equation (PDE) leads to an algebraic equation at each node in terms of the variable values at the node and its neighboring nodes. and non-linear for non-linear PDEs. QP 1-38 contains all the terms which do not contains unknown variable .  This quasi-linear equation obtained from the finite difference discretization of a PDE of a generic scalar ϕ at a grid point can be represented as (1) where index P represents the node at which the PDE is approximated and l denotes the neighboring node involved in finite difference approximation. Coefficients Al and AP are functions of grid size and material properties.

and so on. compass notation is usually employed. j). node (i. In the finite difference and the finite volume methods.e. i. j-1) is denoted by S (southern neighbor). Figure depicts the computational molecules in 1D .2D and 3D 1-39 . node (i+1. for a node (i.FINITE DIFFERENCE DISCRETE ALGEBRAIC SYSTEM  The node P and its neighbors form the so called computational molecule (or stencil). j) is denoted by E (eastern neighbor).

For example. if we start ordering the entries in vector Φ starting from southwest corner of the domain.  For structured grids. and then northward across the domain. Matrix A is sparse. (1). However. variables are usually ordered starting from a corner and traversing line after-line in a regular manner. Φ is the vector of unknown nodal values of ϕ and Q is the vector containing terms on RHS of Eq. • This ordering is not unique as it depends on the order of line traversal in different directions. we get the 1-40 ordering of indices as given in Table .FINITE DIFFERENCE DISCRETE ALGEBRAIC SYSTEM  Collection of algebraic equation (1) at all the computational nodes leads to a system of algebraic equations given by (2) where A is the coefficient matrix. This ordering scheme is called lexicographic ordering and results in a poly-diagonal structure for matrix A. proceed eastward along each grid line. its structure depends on ordering of variables in vector Φ.

). it is preferable to store it as a set of one dimensional arrays instead of a full two-dimensional array. and thus write the algebraic equation (1) for a two dimensional problem as 1-41 .FINITE DIFFERENCE DISCRETE ALGEBRAIC SYSTEM Because matrix A is sparse and has a poly-diagonal structure for structured grids. We can use the directional connection in naming these 1D arrays (calling them as AP AW etc.

FINITE DIFFERENCE DISCRETE ALGEBRAIC SYSTEM 1-42 .

large size of the system matrix normally dictates use of iterative solvers 1-43 .FINITE DIFFERENCE DISCRETE ALGEBRAIC SYSTEM The indexing scheme described above is primarily required if one plans to use a direct solver which require specification of an algebraic system in the standard form Ax= b. In practical CFD applications.

ONE DIMENSIONAL HEAT CONDUCTION 1-44 .

ONE DIMENSIONAL HEAT CONDUCTION 1-45 .

TWO DIMENSIONAL HEAT CONDUCTION 1-46 .