Lecture 26 : MPDE, Lax Theorem I

IIT Kanpur July 201
20 followers
Sep 6, 2024
[Music]
hello everyone welcome
back the last class we started uh dering
the modified partial differential
equations and as we discussed basically
when you apply a numerical scheme to a
differential equation uh you get a
discretized equation and then uh if you
look at the discreation closely
basically the leading transation error
and uh if you put the temporal form into
the spal form you would see that the
equation that we are solving using the
numerical scheme is actually different
from what uh we intend to solve
basically the physical differential
equation all the mathematical model
so today we'll continue that discussion
we'll look at the modified partial
differential equation or MPD for some
more equations and try to find out what
basically the MPD tells us about the
stability of the scheme okay so we had
started with the discussion with the
consisteny of the equation and we had
said that uh if the difference uh if the
the tration errors go to zero as your
delta T and the Delta X basically the
time steps and the spal grid size goes
to
zero then it's a consistent scheme that
also means that my uh partial
differential equation and my final
difference approximation to that scheme
are basically consistent okay so let me
just uh uh I mean just uh revise this
for you briefly okay so we have we
looking at the convection schemee d by
DT plus c d by DX equ Al to Z so this is
my
pde okay and let's say if you're using
an ftcs scheme okay so
then this will
become u i n + 1 minus u i n by Delta t
+ C UI + 1 n minus u i - n - n by Delta
X is equal to Z so this is my finite
difference scheme equation okay so this
is my partial differential
equation
equation and this is your finite
differenti
equation equation or discretize
equation right by using the approach
which is ftcs you apply the ftcs scheme
ftcs is our numerical scheme you apply
that scheme to our PD that want to solve
and what we get is a final difference
equation right so the consistent of the
scheme says yeah that as the delta T and
Delta X goes to zero your finite
difference equation should lead to the
partial differential
equation right that is what the
consisteny says that as you decrease the
Del Del T and Delta x uh all the way to
zero right your final difference
equation should basically become the PD
or approximate to PD right so you know
to see that what you can do you can take
the difference between fde minus
pde right so this is my
fde and this is my
pde right and as we know from our
earlier classes that difference between
the two is called the truncation
error
right so uh let's let's look at the FD
okay so uh remember
our uh T Series expansions u n + 1 is
equal to u n plus Delta t u t i n +
Delta t² factorial 2 U u t t i n and
plus delta T Q by factorial 3 u t t t i
n plus all high the terms okay where UT
U represents the derivative with respect
to time and similarly u i + 1 n will be
u i n so we are basically you may have
so this is your I and this is your n
right so this is your I and N okay you
may have points above points below left
and right but we are expanding all of
them with respect to I and N right so
this is basically UI n Delta x ux i
n plus Delta x² factorial to u xx i n
plus Delta xq by factorial 3 u
xx x i n okay and similarly we'll have
ui- 1
n equal to u i n
- Delta x ux i n plus Delta x² factorial
2 uxx i n minus Delta X
Cub by factorial 3 u xx x i n right and
plus
terms right so our FD is what FD is UI n
+ 1 minus UI n by Del Delta t + c u i +
1 N - UI -1 n by Delta X right so use
these relations so what we'll do we'll
take these two left right left minus
right and divide by delta T that will
give us this term and then we
substract uh this minus this okay I +
1us IUS one and divide by Delta X that
will give us this term okay so let's
start writing those terms I'll write the
the temporal in red and uh spal in blue
we write it here so that will
become uh UTI so I'm dividing it
substracting this Min this uh n delta T
so that will become u t i
n okay and plus delta T by 2 factor is
basically anything but two
UT I
n right and plus s terms not writing the
other terms and then the special term
will be
C and UI + 1 and u i minus one and
divide Delta X so this will cancel out
okay when you subtract that this will
cancel out and basically this one also
will cancel
out
okay and this will be 2 Delta X
okay because this a central defening
scheme okay so once you do that this
will become c u x i
n and then you'll have this term coming
up okay so if you this will be 2
factorial 3 that will be 1X 3 right so
this will be plus Delta X CU by 3 u x x
x i and and plus you will have order
Delta x to the power
4
right that will
be this is will be Delta x² because
you're already dividing by Delta X and
this entire thing will be equal to so
this is our FD definition right so you
can rearrange it okay and if you
rearrange it this will become UTI
I Plus cxi
okay I've collected this term and this
term and then plus will be delta
T by two UT I
in and
plus you will have terms which are
basically order Delta t² and Delta x²
right this all I'm clubbing as Delta x
square
right so now our task is to get the
truncation error so let's represent it
by Epsilon T so the Epsilon T is nothing
but fde minus pde
right so this is your PD so if you
substract that that will become
basically uh so this FD minus PD if you
do that will become delta T by 2 u t i
n plus order Delta t² Delta
x²
right and and uh as delta T goes to zero
and Delta X goes to zero this Epsilon T
goes to
zero that means this equation is
consistent right so your uh ftcs scheme
is consistent there's no problem as far
as consistency is cons concerned but
that is not enough let's look at the
other property let's look at the
MPD so how do we get MPD so we have
discussed last time that uh right now
your FD is equal to this so this one is
my
fde
right so when we are solving using a
numerical scheme we are basically this
solving this problem on the computer
right so we are solving fde equal to Z
in our computer right so FD is basically
identically zero in our computer that's
what we are solving that means what we
are solving is
basically U plus
CX i n so this is basically uh this
one uh is equal to minus delta T by 2 u
tt i n and plus order Delta t² Delta
x² right now we'll look at the uh lowest
order term in the truncation error okay
in this case this is the delt term which
is the lowest order term because as we
have been discussing that is what is our
main concern uh in terms of accuracy and
also we will see here stability right so
we use utt is equal to c²
uxx right this have derived many times
there's nothing but the extension of UT
plus = Z you take the derivative with
respect to time and rearrange the X and
time derivatives and you'll get this
relation right so this will become minus
delta T by 2 c²
uxx okay
plus the order Delta t² Delta x² right
so your MPD becomes so take all these
things together this is at n okay d by
DT plus C Del by DX equal to minus c²
delta T by 2 u xx or in full form it is
Del to u byx
s
right so this is our modified
differential equation so we are trying
to use uh solve this this PD using this
FTC scheme but this uh the equation that
you're solving is not the equation that
is uh supposed to be uh that is the PD
but a equation right and this equation
is a convection diffusion equation and
with the the diffusion term negative
right because minus C squ delta T C squ
is positive Delta is positive that's why
that term is negative that means
your scheme will become unstable because
it has got negative diffusion that means
the viscosity is negative right so
that's why this scheme is not suitable
for the conviction problem so that's
where we stopped in the last class okay
so now let's look at this scheme uh for
another problem okay which is the
ftvs okay so your PD is d by DT plus c d
by DX equal to Z but this is your
PD apply this scheme as will lead to
your differential equation which is
basically UI n + 1 minus UI n by delta T
plus
C UI + 1 n minus sorry BS so this is i n
and i-1
n u i n- u i -1
n by Delta X = to
0 okay so this is my final differential
equation
right so uh on the left hand term which
is the FD we'll write exponent of the T
Series and write that so this uh we have
already written the T Series here okay
so we can make use of this this and this
right to get the uh the terms okay so
this will be nothing but uh same as the
ftcs first term so that will be u t
i
n and
plus let me just see what are the ter
plus delta T
utti Delta t u t t i n and plus all high
terms okay n plus
C and this will be UI - UI -1 n so all
you need to do is that in this equation
let me write it here okay UI -1 n will
be u i n minus Delta x u i
n plus Delta x² factorial 2 u x x x i
n minus Delta x q by factorial
3 okay U XXX i
n right so you can rearrange it and
write U minus i - 1- u i n by Delta
X okay I'll take the negative of that
because that's what we want to put here
okay so that will become UI
okay minus Delta X by 2 U
xxi and plus Delta x²
by
uh so that factorial
3 u x x x i n right so put all of this
here this will become c ux i minus Delta
X by 2 u xx i
n and
plus Delta
x² by factorial
3 U XXX i n and plus HMS right this is
my FD we will rearrange it okay so one
will
be D by DT plus c d by
DX i
n plus the other term will be the Delta
t u tt i n minus C Delta X by 2 uux x i
n and then there'll be higher the terms
okay so that will be order of Delta t²
and Delta x² okay as I told you that uh
plus minus this does not matter all we
looking at the order of the term okay
so uh if you look at this equation okay
so this is my uh
PD okay and this is my FD so as delta T
goes to
zero and Delta X goes to zero okay your
all the trans terms so this is my trans
error Lambda T Epsilon t Okay so that
goes to zero as delta T Delta X equ to Z
so my ftvs scheme is also consistent
scheme is
consistent okay now let's look at the
what exact PD that numerical scheme is
solving okay that is the modified PD so
how do we do that we'll say that my fde
basically identically equals to
zero
right that means you can write d by DT +
C D by
DX i n will be equal
to minus Delta t u t t i
n
minus plus C Delta X by 2 uxx i
n plus order Delta t² Delta
x² right use the same that we had U = to
c²
uxx right so this will
become
minus
c² delta
T okay
uxx
and okay I have to be little bit careful
here okay so that I do not make any
mistake
here and uh this is
C Delta X by 2 uxx i n okay I'm getting
a factor of two
somewhere okay just let me work this
out okay so if I take this C Delta X out
this will
become 1 minus C delta T by Delta x u XX
so that is what I want to get okay but
I'm getting a Delta X by 2 uh extra so
let me just work this out okay just give
me a minute so mine is ui- one n the ui-
UI - one n so that will give you uh the
Delta
X is getting down okay and this is Delta
X by 2
okay there's a delta T by2 also here so
that's what I was missing okay so this
is Delta 2 by 2 this is delta T by 2
okay c² delta T by 2
okay so that will become C Delta X by 2
1- C delta T okay so this Factor okay so
uh this is also now in a convection
diffusion equation form okay if you can
write it d by DT plus C by DX okay I'm
removing this Inn so this is also now an
MPD
okay remove this other part so this is
my
MPD okay just let me see if I um not
missing in term okay this is for the
differential
equation h MPD that is for ftcs and if
you go to the
FBS okay so that will be minus 1us C Del
X okay so there is one negative sign
which will come here okay so 1- C delta
T by
DX okay so this is correct
okay okay so for this uh so this is now
in the form UT plus CX is equal to uxx
right with multiply by Alpha
right for this scheme to work for this
scheme to become stable your diffusion
term should be positive right so this
means you will have this thing positive
C Delta X by
2 1 minus C delta T by D X okay should
be 1 right and this is nothing but your
Quran number Lambda right so that is
basically if C is positive
if C is positive okay then basically 1us
Lambda okay
so equal to 1 so that means should
Lambda should be less than one
right so that is what we have been
saying that when we are trying to solve
uh our equation uh using that F DBS
scheme the linear convection equation
the criteria is your Quant number or uh
the term which is C Del X should be less
than equal to one okay this will be less
than equal to sign okay so Lambda should
be less than equal to one if Lambda goes
greater than one then the scheme will I
mean solution will blow up right and we
have talked about the physical region
also that means that the distance of
Delta X and your covering C delta T for
a given time you're covering some
distance C delta T and if the C delta T
is basically greater than Delta X that
means you are jumping over the grid Cs
and you are not honoring the physical
phenomen that is happening inside that
cell and then in those conditions it is
most likely that it's going to blow up
right the same thing that we're seeing
from our uh modified PD also where we
see that uh it will only work when the
Lambda is equal to or less equal to 1
okay so these are the some information
that you get from MPD okay the modified
partial differential equation so the
modified partial differentiation
equation is basically the exact solution
of the numerical scheme it is not the
exact solution of the maical
mathematical model or the partial
differential equation but this is the
exact solution of the numerical scheme
and it is different from our PD okay it
is not in this particular case for
example it is not a convection equation
it's a convection diffusion equation
both in the case of ftcs or fdbs okay
for the ftcs this scheme is unstable
because of the negative diffusion and if
you go to
the uh FBS okay forward time and
backward space this would uh is stable
only when Lambda or here Sigma basically
C delta T by delx is basically less than
one and C is
positive
okay so that is the criteria this is
called Quant criteria or the CFL
criteria
CFL basically there three scientist
names are included here C is for Quant F
is for Fredick you remember the Le fed
scheme that we've discussed and L is for
Levi okay so that's called these three
people came together to or basically
derived this criteria and that's why
it's called the CFL
criteria okay now uh before going I also
want to do one MPD which is for the
basically the diffusion equation okay
although this will not give you uh
the uh stability criteria because this
scheme if you see that if new is
positive okay then it will already
basically uh you assume that it's going
to be stable but we have seen that this
also becomes unstable when new delta T
by D
x² is
basically greater than 0.5 right but
that we will not be able to see for that
we will go to another criteria which is
called the one Amon stability criteria
we will discuss that in the next class
but right now just try to get the MPD
for this particular equation yeah so MPD
is not made for basically getting your
stability criteria although it reveals
for certain conviction equations uh what
is the stability limit and what is the
what are the constants for the scheme to
be stable uh but a more formal Criterion
that tells you whether the scheme will
be stable or not is your stability
Criterion and that we'll discuss in the
next class okay so just try to get the
MPD for this equation and we have
discussed so many other equations like
Lex fic equation uh Leap Frog uh scheme
Lex fic scheme and so many other
equations right so Le band of scheme uh
then you have the conect nson implicit
schemes you can go back and basically
try getting your uh PD for those schemes
okay so delt you okay if I use this ftcs
here okay so this will become UI + 1 n
minus u i n by delta T is equal to new
UI + 1 N - 2 u i n + UI - 1 n by Delta
x²
right and uh we will do the same thing
so this would
become this is our PD so I'll what I'll
do I'll put everything on the left hand
side minus new equal to Z because this
is our
FD
right so then uh what we can do you can
write it so this will become
u i
n and uh minus delta T by
2
okay uh UT I in and plus high order
terms
okay right I have just derived
that let me just see
okay plus Delta 22 notus Delta 2 by2
okay and minus new and if you use this
expression for UI + 1 UI minus one and
okay just let me write it quickly UI + 1
n is UI n + Delta x ux i n plus Delta x²
factorial 2 uxx I n plus Delta xq
factorial 3 u x x i n and so on and so
forth and UI -1 n will be u i n minus
Delta x ux i
n and uh plus Delta x² factorial 2 u xx
I
nus Delta X CU factorial 3 u xx x i n I
write one one more term Delta x 4 by
factorial 4 U XXX I four fourth power
fourth derivative okay and this will be
Delta x 4 to^ factorial 4 by u x x x i
n
right so I want to get this term uh this
term so this will be UI + 1 N - 2 UI n +
UI -1 n by Delta
x² right so this term
would if I add a and b okay we are doing
a plus b right and then you'll get this
term so this would get canceled out the
third will get canceled out and that's
why I had to return the fourth
derivative
okay and Delta x² will get canceled out
and this is 2 multip by factorial 2 that
will become one so that will become
uxx i n and and then there will
be Delta
x² by 2 by factorial 4 so into two
effect P that will become 12 okay this
is u x x x i n and then there will be
high other terms right so then this is
basically uxx I N plus Delta x² by
12 u x x x i n and plus plus you will
have H term so the fifth term will also
cancel so this will be Delta x^ 6 so let
us for four right by some Factor here
okay and this will be Del 6 U by D x² D
X6 okay so this is order Delta X to
power 4 okay and this is order Delta x
square okay so rearrange it this will
become u t i and n minus new uxx i n
right this is our PD and uh uh you can
write all other terms on the right hand
side
okay so that will become
your minus delta T by 2 u tt i n and
minus that will plus new Delta x² by 12
u x x x i n plus
order Delta t² Delta x to^
4 right now we'll use this relation u t
equal to so U is equal to new
uxx right if you do UT that will be
basically uh new u
xx and then divided by UT right so that
will become new sare uxxx
right so we have to basically represent
uh the lowest order derivative into
theal derivative to get the MPD right so
this will become
minus new s delta T by 2 and then I'm
collecting all those fourth order term
plus new Delta x² by
12 u xx XX
i n right and plus order Delta t² Delta
x² right so here also you can see that
as the delta T goes to Z Delta X goes to
0 you get your uh this scheme uh the
left side so your FD goes to PD so it's
a consistent
scheme right and this is your MPD okay d
by
plus minus new D to U by
x² is equal to this okay this is your
MPD you can take away your I in N
here okay now you can do one you can see
one interesting thing okay so what I'm
going to do I'm going to take this uh
new Delta
x² okay
outside okay so that will
become and maybe take two also right so
that will uh become 1X 6 minus
new delta T by delx
squ please uh when you see please uh
take care that the signs are proper okay
so uh one thing you may note here one is
that uh you cannot decide about the
stability of this scheme directly
because this is the fourth order
disspation term and this is the second
order disspation term right so you
already have the disspation from your
secondary distribution term so even if
this term uh uh goes negative okay still
your dation term May basically overcome
and to give you stability right but what
you can say from this equation this is
your MPD modified PD is that let's say
if you use uh your delta T such that
delta T is equal to Delta x² by 6 new
suppose you select your delta T such
that your uh it is the value is Delta X
by 6 new then this term will get
cancelled out okay and you'll get a
basically a equation which is
uh in the special disc this is order of
Delta x 4 right so you'll get an
equation which is uh d u by DT equal to
new Delta U by D x² plus order Delta t²
and Delta X2 power 4 right so you get
the fourth order accuracy in your spal
scheme if the delta T is equal to Delta
x² 6 new and let's say if new equal to 1
then basically Delta is equal to Delta
x² by 6
okay it does not give us the criteria
that we wanted that basically new delt T
by delx S is less than 0.5 okay that we
have seen while trying to solve the
problem right so that we'll get from the
stability Criterion the formal stability
analysis but now you know the approach
that how to get your modified partial
differential equation so the modified
par differential equation is basically
the exact solution of the numerical
scheme that you are trying to solve and
the approach to get it is basically use
the T Series put the values in your
finite difference equation and uh
basically make that final deficient
equation goes to zero and collect all
the terms of the PD on the left on the
right hand side you will have the
truncation error now look at the lowest
derivative of the tration error okay uh
and that will be typically a Time
derivative convert that time derivative
into the special derivative and you'll
get an equation uh which will give you
the form of the modified percent
so for the ftcs and fdbs we had seen
that we have got the numerical diffusion
the diffusion is not present in your PD
but that comes because of the numerics
because of the choice of your numerical
scheme okay so with that we'll stop here
today and in the next class we'll
discuss about uh uh basically uh what
are the criterian to decide our
numerical scheme for a particular
problem thank you very much
[Music]
[Music]
[Music]
