0% found this document useful (0 votes)
78 views15 pages

Foundation of Computational Fluid Dynamics Dr. S. Vengadesan Department of Applied Mechanics Indian Institute of Technology, Madras Lecture - 13

This lecture discusses numerical analysis of computational fluid dynamics (CFD) schemes. It introduces three key aspects of numerical analysis: consistency, convergence, and stability. Consistency defines the relationship between a differential equation and its discrete formulation. Convergence connects the computed solution to the exact solution. Stability establishes the relationship between the computed and exact solutions of the discretized equations. The Lax equivalence theorem states that for a consistent discretization scheme, stability is both necessary and sufficient for convergence of the solution. The lecture will provide definitions and examples of these concepts using model equations in subsequent lectures.

Uploaded by

mahesh d
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)
78 views15 pages

Foundation of Computational Fluid Dynamics Dr. S. Vengadesan Department of Applied Mechanics Indian Institute of Technology, Madras Lecture - 13

This lecture discusses numerical analysis of computational fluid dynamics (CFD) schemes. It introduces three key aspects of numerical analysis: consistency, convergence, and stability. Consistency defines the relationship between a differential equation and its discrete formulation. Convergence connects the computed solution to the exact solution. Stability establishes the relationship between the computed and exact solutions of the discretized equations. The Lax equivalence theorem states that for a consistent discretization scheme, stability is both necessary and sufficient for convergence of the solution. The lecture will provide definitions and examples of these concepts using model equations in subsequent lectures.

Uploaded by

mahesh d
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/ 15

Foundation of Computational Fluid Dynamics

Dr. S. Vengadesan
Department of Applied Mechanics
Indian Institute of Technology, Madras

Lecture - 13

(Refer Slide Time: 00:28)

It is my pleasure to welcome you all for this course on CFD. We are now into the
module three of this week. So, far, we have done different approximation method,
introduction about finite volume, finite difference, finite element methods, then we
talked about properties associated with numerical schemes, mainly three properties
conservativeness, transportiveness, boundedness. Today’s class, we will particularly talk
about analysis of numerical scheme, there are again three aspects – consistency,
convergence and stability, particular theorem called Lax equivalent theorem that relates
or connects all the three aspects while doing the numerical analysis. We will talk about
these aspects in detail with example. Then it will be followed by explanation by taking
different model equations.

(Refer Slide Time: 01:31)


While doing CFD approximations are made at different stages. And you get errors arises
due to these approximations. First step in CFD is computational modeling of a physical
problem, either we take a physical problem in dou tau or we simplify the physical
problem and then solved. So, in any one of this stage, there is a possibility some
assumptions are made or there is an error in the conversion of computational modeling
from physical problem. Second aspect is appropriate choice of boundary condition, again
ill posed boundary condition may result additional error. There is also possibility that
you have computationally modeled properly, there is a problem in coding. So, you may
have index, for example, i at j replaced with j i, in such problem, you may not be able to
identify so easily, the program may run, but it may give wrong results after sometimes or
after some iteration. So, one has to go back and check the code and it is possible to debug
and fix the code for the correct coding. One more type of error is due to numerical
approximation. There are three possibilities, one is truncation error, other one is round-
off error, and third one is discretization error. So, we will now focus mainly on this
numerical approximation error associated due to the numerical approximation.

(Refer Slide Time: 03:46)


So, round-off error is the number of significant digits considered. So, we know there are
lot of mathematical operations, subtraction, addition, multiplication and division. And
each of these arithmetic operation, we handle numbers, and number of digits, significant
digits considered after the decimal make the difference in the solution. So, there is
something called single precision; in this we usually consider 8 digits after decimals. If
someone decides to higher accuracy then you go for double precision, where we consider
16 digits after decimals. So, there is a repeated calculation in terms of iteration or in
terms of unsteady calculation and over so many nodal points in a computational domain,
so though this appears this kind of error appears very small over cumulative this error
will affect the results. And next important error is a truncation error. This is resulting by
considering or neglecting leading terms while writing finite difference approximation.
Now, there is a third error what is known as a discretization error, this is a numerical
error without considering the round-off error.

(Refer Slide Time: 05:36)


So, this truncation error, we mentioned how many or what terms you are considering
while writing the finite difference form of governing equation. So, you can neglect or
you will consider up to some terms in the expansion then you will neglect the remaining
terms. Remaining terms can be odd order or even order. So, accordingly the error can be
two types, one is the dissipative error, here the leading neglected term is of odd order.
Now, this also behaves like a viscosity, so you know in basic fluid mechanics viscosity
helps in diffusion. So, this dissipative error, where you are neglecting leading term; and
if the leading term is of odd order, then it functions like numerical viscosity or artificial
viscosity, but that helps in smoothing the problem, and other hand, you may not get very
peak or accurate results. Second type is the dispersive error, where the leading term
neglected leading term is even order term and that results in what is known as a
overshoots or undershoots. So, you may have a solution with vigils.

Now, let us get explanation of these two types of errors with some illustration. So, in this
figure, what you see, there is a there are three curves; now there is a black line which is
going like a step function and that is the expected solution or exact solution obtained by
analytical way. Then if you are solve that equation with leading neglecting term as odd
order, and you mentioned it is a dissipative error and you get a solution, which is
represented by the red line here, so you see here it is smoothens, and you are not able to
get the peak here, or you are not able to get the peak here. It connects very smoothly
without any problem.
Of course, you can increase the leading term, for example, instead of first term, you can
take the second term or third term then you may have a slightly improved solution, but
still it never captures the peak that is the property associated with the dissipative error.
The second error is the dispersive error and that is due to leading even order term, and
the solution obtain will exhibit vigils that is overshoots and undershoots, so you can see
here light blue color and that is the type of solution you will get. So, you can see up and
down then and so on. So, you have a problem either because of the dissipative error or
because of the dispersive error.

(Refer Slide Time: 09:15)

Now, we will try to get the explanation of this from finite difference formula. So, we
already did how to obtain forward differences scheme for the first derivative. And

∂f
without going to the steps in details, we write down the final expression here, so
∂x
is given like this. Now, you have consider only the first term, the remaining terms are not

Δ x1 ∂2 f
consider. So, this is the neglected term
( )
2! ∂ x 2
and so on and followed by many

other terms. So, this is the leading term that is not consider and this is of odd order and
we mentioned, this is the dissipative error.
We also learned how to write the same first derivative by central difference formula, and

∂f
you get after a simplification, we are interested only in the , so we rewrite so
∂x

∂f
equal to like this. And you observe this is the leading term which you
∂x
2
are not consider, and this leading term is of even order Δx is of even order and that
results is what is known as a dispersive error. So, the leading term if it is odd order, it
will be dissipative error; leading term if it is off even order, it will results in dispersive
error. You will get smooth solution, but you will not capture the peak. In the second
case, we will get a vigils, but it may be accurate. So, there is a though why not we
combine both that is you take advantage of forward difference or backward difference
and central difference. So, such a scheme combination of both is what is known as
hybrid scheme, and we will use that also to get solution.

(Refer Slide Time: 11:20)

Next, we go to the analysis of discretized equation. We mentioned there are three


aspects, one is the consistency, second convergence, third stability. Definition of
consistency – it defines the relationship between differential equation and its discrete
formulation. So, we have an original or given PDE then we rewrite or we replace the
PDE with the discretized and we get the discrete formulation. Now, whether the discrete
formulation actually represent the original PDE is the question. And that property or that
condition is what is known as a consistency. So, it is a condition on structure of the
numerical formulation. Second aspect is convergence, which connects the computed
solution to the exact solution of the differential equation, so what scheme you are using
and how it is convergent that information is obtained or analyzed by a property or aspect
called convergence. Third one is the stability, it establishes a relation between computed
solution and the exact solution of the discretized equations. This puts the condition on
behavior of the numerical scheme. So, next few lectures, we are going to get definition
and explanation with a model equation on these aspects, consistency, convergence and
stability.

(Refer Slide Time: 13:04)

There is a particular theorem called Lax equivalence theorem, which connects or relates
all these three aspects consistency, stability and convergence. The theorem reads like
this; for a well-posed initial value problem and a consistent discretization scheme,
stability is the necessary and sufficient condition for convergence. To get some more
explanation on this theorem, for a time-dependent initial value problem, if you analyze
the consistency and if you analyze the stability then convergences need not be analyzed,
it is satisfied automatically. So, when you are analyzing consistency, this leads to the
determination of order of this scheme as well as the truncation error. Similarly, when
you analyze the stability this tells on the frequency distribution of the error. So, if these
two are satisfied or analyzed properly then convergence need not be checked and it is
automatically satisfied by this theorem. The one point that is to be noted all these are
applicable particularly the stability is applicable for a linear problem, but in any practical
situation, all the problems are of non-linear, hence to do analysis on stability of a
particular scheme for a non-linear problem, one can locally linearize and carry out the
stability analysis. Similarly, stability analysis cannot be applied near boundaries.

(Refer Slide Time: 14:57)


Now, let us look at each of this in detail. First we take consistency, which measure
equivalence between original PDE and the finite difference equation, which replaces the
original PDE. So, when you replace the original PDE by a finite difference equation as
we know very well from Taylor series expansion, we consider only few terms and
remaining terms are neglected whatever order of accuracy that you are deciding. So, that
puts the truncation error and if the truncation error goes to zero as a function of Δt or
Δ x , which means if the length Δt and Δx goes to 0, the truncation error also
goes to zero then you recover from the finite difference equation the original PDE. If
such things happens then, the particular scheme is referred as consistent scheme.

So, we know the Taylor series expansion. We take example of one-dimensional

∂T
temperature diffusion equation and it is given here , where T here refers to
∂t

2
∂ T
temperature equal to α ( )
∂x
2
. Now, we know by Taylor series expansion, we can

separately write for time derivative and second order spatial derivative. Any scheme we
can write, we start off with forward in time and central scheme, so which is otherwise
shortly referred as FTCS – forward in time central in space. And for simplification

∂T ∂2 T
purpose, we will take the coefficient α to be one, so it will be only = .
∂t ∂ x 2
So, if you substitute forward in time on left hand side, you get finite difference equation

n+ 1 n
Ti –Ti
as , this is forward in time. And as I mentioned yesterday’s class, subscript i
Δt
or j stands for spatial and superscript n stands for time, so when you say n+1, it is
forward in
time minus n, so you get forward in time. Now, on the right hand side, we said central in
space, but times is at n level, so you can seen in the expression superscript n appears,

n n n
T i−1−2 T i +T i+1
whereas, subscript it is central in space so you get 2
So, this
Δx
expression we know already; independently we have learned by Taylor series expansion,
now we are substituting them together. Now, what we do, we perform Taylor series
expansion for each of these terms that is T in+1 ,T ni−1 , T ni+1 .

(Refer Slide Time: 18:30)

So, if you write the Taylor series expansion for each of the term, I am showing here for
n+1
each of the term up to certain terms for each term. For example, Ti , you can expand
in time – forward in time that is why it is n+1, and I have written up to four terms,
remaining terms are not written; similarly for all other terms that is T in+1 ,T ni−1 . So, all
we have to do, we substitute this expansion in the finite difference equation, in this
equation and we will see how to do that.

(Refer Slide Time: 19:08)


So, if you substitute or rewrite or sum them properly then we get expression like this,

∂T ∂2 T
which is given = and there are so many other terms and these terms are
∂t ∂ x 2
coming from, this additional term what we have considered, because of the expansion.
Now, while writing this also, we have consider only two terms; one corresponds to time,
other corresponds to space, and whatever terms are not consider that decides the leading
error term, so this is of order Δ T square and of order four in space Δ x .

(Refer Slide Time: 19:56)

Now, I put all the things together, so original PDE considered is given here. Discretized
equation is forward in time and central in space is also given here. Then upon Taylor
series expansion for each of the term substituting and rearranging, you get equation like
this. Now, what do we do to understand consistency, consistency definition if ΔT
and Δx goes to zero, then original PDE should be recovered. So, we can understand
that from this. If you make ΔT going to 0 and Δx going to 0, then original PDE

∂T ∂2 T
that is appearing here itself = . We get back the original PDE from the finite
∂t ∂ x 2
difference equation, hence this particular scheme that is forward in time central in space
for this PDE said to be consistent. So, one can analyze any PDE by this way, this is the
very straight-forward procedure.

(Refer Slide Time: 21:11)

Now, we will take the next criteria, what is known as the convergence, so this is a
essential condition for any iterative procedure where to quit the calculation. Let say
usually end up in a algebraic equation, which is given here as A Φ=b , this is set of
equation that we will be solved. A is a coefficient matrix; and Φ is the variable,
which you are interested, and b is the known coefficient, which is on the right hand side.
Let say you are doing iteration then, you get Φ value pervious level, you get Φ
value from the present level. The difference between the two is what is referred here as
epsilon and this is evaluated for the current level, so ϵ n is what for the current level
and based on this, we decide whether to quit the particular iterative procedure. So, one
can setup a equation for residual; if you substitute ϵ into the solution matrix that we
have put, we replace Φ by ϵ n and then you get residue,
residue mean equation is not satisfied some is remaining and that is given by ρ ,
because it is evaluated at nth level superscript n is given.

(Refer Slide Time: 22:52)

There are many ways where you can use ϵ this to decide terminating a calculation. So,
if you take a absolute, so that is what is given here as modulus of ΔΦ which is
evaluated for the case of two-dimensional nodal location that is why it is subscript here
i,j and for the current level superscript n+1 is given. If the modulus of it is less than
specified value, so one can specify error limit, say 10
−5
or −7
10 , some particular
value for ϵ can be said, whenever you are doing such calculations. And once that
difference Δ Φ at the current level n+1 and at all i ,j location is less than convergence
limit of epsilon then you can say we can terminate calculation at that step and proceed
the next stage.

There also other methods, for example, the first one I written here, it is also possible to
write based on summation all the errors absolute errors and you say it is less than some
value prescribed value and such as called L1 norm or you take summation, you take a
summation of the square all the error, so when you do square, there is no minus sign,
automatically everything goes to positive and you take a summation over the entire
domain and then you take a square root of it. And that also can be used as a criteria is
less than prescribed value ϵ and such is called L2 norm. And we will talk about
these convergence criteria later classes also with different explanation. So, convergence
is also decided based on previous value and present value.

So, in today’s class, we talked about numerical analysis, particularly consistency and
convergence with some example. We will see you again with another important aspect of
this numerical scheme.

Thank you.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy