0% found this document useful (0 votes)
21 views32 pages

Computational Fluid Dynamics Lectures

The document discusses Finite Difference Methods for discretizing partial differential equations in computational fluid dynamics (CFD). It explains various techniques such as forward, rearward, and central differences for approximating derivatives, as well as the transformation of these equations into algebraic forms. Additionally, it covers the concepts of time marching solutions and the distinction between explicit and implicit approaches in solving fluid dynamics equations.

Uploaded by

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

Computational Fluid Dynamics Lectures

The document discusses Finite Difference Methods for discretizing partial differential equations in computational fluid dynamics (CFD). It explains various techniques such as forward, rearward, and central differences for approximating derivatives, as well as the transformation of these equations into algebraic forms. Additionally, it covers the concepts of time marching solutions and the distinction between explicit and implicit approaches in solving fluid dynamics equations.

Uploaded by

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

Finite Difference Methods

Dr. Ugur GUVEN


Aerospace Engineer (P.hD)
Nuclear Science and Technology Engineer (M.Sc)
Discretization of Equations
• The first step in solving any CFD problem is to
discretize the equations.
• Usually all fluid dynamics equations are in a
partial differential equation format
• These differential equations must be
transformed into algebraic form, so that they
can become solvable by the computer
• The most common Discretization technique for
Partial Differential Equations is the Finite
Difference Methods
Taylor Series
• The primary background of any discretization
using Finite Differences depends on using the
Taylor series.
• In the Taylor series, you can approximate a
solution to any function at (x +dx) as long as
you know the initial value
Taylor Series
Forward Differences
• Lets write the X component of velocity at Point
(i,j) for a 2d flow.

• Lets solve for the first term derivative of the


above equation
Forward Differences
• Hence after the first term, the remaining
terms can be classified as truncation error and
can be discarded (if you accept the magnitude
of the error)
• Then, we get a first order algebraic equation
that approximates the partial derivative and it
is called a forward difference
Rearward Differences
• Lets now write the Taylor series for the point u(i-
1,j) in a 2d flow
Rearward Differences
• Thus, if we solve the above equations to get a
partial derivative of u to x, then we will have a first
order accurate algebraic form of the partial
derivative in the rearward difference form.
Central Differences
• However, the problem with both the rearward
differences as well as the forward differences
is the fact that they are first order algebraic
representations of a partial derivative.
• Hence, the accuracy is greatly decreased due
to this and we will need to look for ways to
increase the accuracy of the partial derivative
to reduce the overall error that will be formed
in the equations
Central Differences
• Lets subtract the following equations to try to
increase the order of accuracy
Central Differences
• Hence, solving the equation would cause the
following equation to be formed:

• Hence, the following is a second order


accurate central difference representation:
Central Differences
• Hence, the following equation is a more
accurate representation of a partial derivative
of u over x and thus it has less errors.
Moreover, it takes data from both sides of the
grid over point (I,j)
Differences with Respect to Y
• Using the methodology defined above, it will be
possible to create forward, rearward or central
differences with respect to y in partial
differentiation
Partial Derivatives Using Finite Differences
Writing Partial Derivatives in Algebra
• Hence, using the methods of finite differences,
you can easily transform first degree partial
derivatives so that you can create an algebraic
equation.
• For example, transform the following partial
differential equation using finite differences

u u
 0
x y
Second Order Partial Derivatives
• To find the second order partial derivatives
with respect to x, lets add the Taylor series
expansion for u(i+1,j) and u(i-1,j)
Second Order Partial Derivatives
• Summation of the above equations gives:

• As a result, the second order partial derivative


is written in central differences as:
Second Order Partial Derivatives
• Hence, the second order partial derivatives written
in the central difference notation would be:
Mixed Partial Derivatives
• By writing a mixed partial derivative , we will
be able to write second order equations as
well.
Second Order Partial Derivatives
Transformation of Partial Differential
Equations
• Transform the following partial differential equation
into an algebraic equation by using Finite Differences

2 2 2
 u  u u u  u
2
 2
   0
y x y y xy
Homework
Engineering Example 1

• Calculate the shear stress and the heat


transfer at the wall with the following data by
using finite differences
Example 1
• The shear stress and the heat transfer at the
wall is given by the following equations in first
dimensional problems.
Example 1
• First Order Difference Solution, solve for the other points
Time Marching Solution
• In the solution of fluid dynamics equations, it is usually
customary to solve flows changing over time. At each ‘t’
step of the flow, the flow properties will change
accordingly. This is called Time Marching Solution.
Example of Time Marching Solution
• Lets assume the unsteady, one dimensional
heat conduction equation with constant
thermal diffusivity
Example of Time Marching Solution
Example of Time Marching Solution
• Now, we are going to write the equation only for
T, since we are interested in finding the
temperature at different time points for x
distance. Hence, the solution for Temperature is
solved by Time Marching Solution
Time Marching Solution
• Time marching means that T at all grid points at
time level n+1 are calculated from known values at
time level n. Then n+2 is calculated pretty much the
same way as n+1 levels are used for calculation.
Explicit and Implicit Approach
• If a difference equation contains only one
unknown and all other variables are know,
then that is called an explicit solution.
• If more then one unknown variable exists,
then you will need to solve a set of algebraic
equations simultaneously. Hence, this is
called the implicit approach.
THANK YOU
• Please download this lecture as well as other
lectures and numerical examples from my website:

www.cfdlectures.co.cc

Dr. Ugur GUVEN


[email protected]

You might also like