0% found this document useful (0 votes)
35 views11 pages

Lecture-1 CFD

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views11 pages

Lecture-1 CFD

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Computational Fluid Dynamics-I, Lecture-1

Dr. Tariq Talha

College of EME, NUST.

Dr. Tariq Talha Computational Fluid Dynamics-I, Lecture-1: College of EME, NUST
Finite Difference Formulations
Numerical solution of PDEs comprises of following three steps:
1 Mesh generation: Division of domain in uniform/non-uniform mesh is
performed.

2 Replacement of exact derivative with FD approximation: After the mesh


generation, the continuous form of PDE is replaced by finite difference
approximations at each grid point which in turn result in algebraic equation
for each grid point/control volume (matrix system A x = b). The boundary
conditions are applied on the control volumes adjacent to physical
boundaries.
3 Solution of the matrix system using different numerical schemes depending
upon type of PDEs.
Methods for finite difference approximations.
1 Taylor series expansions.
2 Recurrence Formulas.
Dr. Tariq Talha Computational Fluid Dynamics-I, Lecture-1: College of EME, NUST
Taylor Series Expansion (First Derivative)
Consider an analytic function f (x), f (x + ∆ x) expansion about x:

Solution for ∂ f /∂ x:

The forward difference approximation of order ∆ x (first order) at node i:

Dr. Tariq Talha Computational Fluid Dynamics-I, Lecture-1: College of EME, NUST
Taylor Series Expansion (First Derivative)

Taylor series expansion of function f (x − ∆ x) about x:

The Backward difference approximation of order ∆ x (first order) at node i:

Higher order approximations???

Dr. Tariq Talha Computational Fluid Dynamics-I, Lecture-1: College of EME, NUST
Taylor Series Expansion (First Derivative)
Taylor series expansion of function f (x + ∆ x) and f (x − ∆ x) about x:

Central difference approximation of order ∆ x2 (second order) at node i:

Second order approximation of first derivative can also be obtained by


considering three point approximations in the same (Forward or
Backward) direction.
Dr. Tariq Talha Computational Fluid Dynamics-I, Lecture-1: College of EME, NUST
Finite Difference Approximation: Mathematical Interpretation
The first derivative ∂ φ /∂ x at a point is the slope of the tangent to the
curve φ (x) at that point.

The approximation of slope using two points, with one point in the
positive x-direction, is called Forward finite difference.
The approximation of slope using two points, with one point in the
negative x-direction, is called Backward finite difference.
The approximation of slope using two points with both point lying on the
opposite side of the original point is called Central finite difference.
Importance of grid refinement!!!
Dr. Tariq Talha Computational Fluid Dynamics-I, Lecture-1: College of EME, NUST
Taylor Series Expansion (Second Derivative)
Taylor series expansion of function f (x + ∆ x) and f (x + 2∆ x) about x for
second derivative approximation:

Multiplication of first equation by 2 and subtraction from the second


equation:

Solution for ∂ 2 f /∂ x2 , results in the forward difference approximation of


order ∆ x (first order) at node i.

Dr. Tariq Talha Computational Fluid Dynamics-I, Lecture-1: College of EME, NUST
Taylor Series Expansion (Second Derivative)
Similarly, the backwarf difference approximation of order ∆ x (first order) at
node i, using Taylor series expansions of f (x − ∆ x) and f (x − 2 ∆ x).

For second order order approximation, consider Taylor series expansion of


function f (x + ∆ x) and f (x − ∆ x) about x:

Add the above two equations to get ∂ 2 f /∂ x2 :

Dr. Tariq Talha Computational Fluid Dynamics-I, Lecture-1: College of EME, NUST
Taylor Series Expansion for Higher Order Derivatives: Recurrence formula

Writing conventions for forward and backward differences:

∆x fi = fi+1 − fi and ∇x fi = fi − fi−1 =

In general terms, the higher order forward and backward differences:

∆xn fi = ∆xn−1 (∆x fi ) and ∇nx fi = ∇n−1


x (∇x f i )

It can be shown:

Dr. Tariq Talha Computational Fluid Dynamics-I, Lecture-1: College of EME, NUST
Taylor Series Expansion for Higher Order Derivatives: Recurrence formula

Finite difference forward, backward and central difference approximations


for higher derivatives on a uniform grid using recurrence formula:

Constraint matrix formulation for uniform/non-uniform meshes for


finding FDA using Taylor series expansion!!!

Dr. Tariq Talha Computational Fluid Dynamics-I, Lecture-1: College of EME, NUST
Example problems

Find a finite difference approximation of O(∆ x) for ∂ 4 f /∂ x4 using forward


difference recurrence formula.
Determine the approximate forward difference approximation of O(∆ x) for
∂ 3 f /∂ x3 using Taylor series expansion.
Using the Taylor series expansion, find a second-order accurate forward
difference approximation for ∂ f /∂ x with unequally spaced grid points.

Dr. Tariq Talha Computational Fluid Dynamics-I, Lecture-1: College of EME, NUST

You might also like