Lecture 31 : Advanced Schemes I

IIT Kanpur July 201
20 followers
Sep 6, 2024
[Music]
hello everyone welcome
back in today's class we are going to
discuss some of the advanced scheme for
convection as we have been seeing
through the last few classes we did the
stability analysis
we did the modified partial differential
equation uh analysis for many different
schemes mostly ftcs ftps implicit
approach explicit approach and so on and
so forth we also did the error error
analysis and we looked at the
dissipation error as well as dispersion
error and uh what we observed that there
are some schemes which are stable but
they're highly dissipative right for
example ftvs the schemes which are
accurate
for example ftcs are not stable right so
today we'll look at some uh more schemes
which uh basically uh tries to balance
out these errors and also give you the
stability okay so let's start the class
today so this is our linear convection
equation
okay these schemes that we'll be
discussing today is only for the
convection equation
because you know that the diffusion
schemes uh uh it already has that
diffusion okay so that makes them stable
although there are from the stability
analysis we see that there's a criteria
new delta T by delx squ that has to be
less than 0.5
for uh explicity scheme but not that is
normally not a basically uh limiting
point in our simulation the limiting
point in our simulation is basically C
delta T by Delux okay and this has to be
uh basically uh less than equal to one
for ftps and this is and the ftcs is
unstable okay so that we know so far
okay just a quick recap this is our ftps
I IUS one okay uh this is implicit Cal
scheme okay so this is n+1 and n + one
and you can see this is the central
scheme I + 1 and I + 1 I minus one and
similarly we had the crank nson which is
basically average between n and n plus1
okay uh it's not uh I mean instead of
taking either n or n plus1 you take n
and n plus one and take the average of
that
okay now before we get into more schemes
which are basically more popular in the
literature for solving convection
problems uh we see how they are derived
okay so uh the best scheme uh that we
know is the ftcs scheme okay for forward
in time and cter in space uh where you
if you want to get the derivative here
okay so you take this I + 1 and I minus
one these two points okay you can March
from n to n + one right so if you want
to calculate UI n + 1 here you get the
value UI -1 n and UI + 1 n and also UI n
okay that UI n UI + 1 n UI minus n and
get the value there okay and that will
work for all the nodes okay let's say
you have some here that will go like
this this will give you u i -1 n + 1
okay this is u i n + 1 and similarly you
can have going like this and this okay
this is I + 2 that will give you u i + 1
and + one
right uh so when we did the analysis uh
using the modified PD we saw that this
equation is nothing but a convection
diffusion equation
okay and
moreover what we had is the diffusion
term was negative okay minus c² delta T
by 2 and because of the negative
diffusion uh the scheme blows up very
quickly okay uh so uh we also performed
the stability analysis and we found that
uh uh our uh uh
amplification factor is basically higher
than one and that is why it is uh not
dissipative and it is
unconditionally unstable right now let's
look at some Advanced scheme which are
basically derived on the ftcc scheme so
what is our Target we want to use the
characteristic of our ftcs scheme okay
that means uh we do not want too much of
dissipative error but uh we want to make
it stable right so the first way to do
it is uh done by LAX so LAX is a very
famous mathematician he proposed many
schemes okay we just we talked about Lex
equivalence theorem we'll talk about Lex
vend scheme and so many more schemes so
this Lex PX scheme or is also called
laxis scheme okay just also called laxis
scheme
okay uh so this is proposed PX so PX is
uh uh now I think 98 years old when you
are talking in 2024 and is still alive
okay and he has immense contribution uh
uh in mathematics and linear algebra and
development of these kind of schemes
okay so what was his proposal is that uh
uh so you have this uh scheme which is a
central
scheme okay minus C delta T by
DX UI + 1 and minus UI minus one
n okay so said that replace this with
the average of I + 1 and IUS
one okay then it becomes a LX fed scheme
so why we do that we'll shortly see if
you do that then the scheme becomes
stable right so the scheme will be y +1
uus one this is what we replacing the
the first term and the rest all Remains
the Same as this one and this gives you
the U in+ one okay so what are the notes
that are participating in the
calculation of u+1 you make our node
okay this is I this is I + 1 this is IUS
one this is n and we're jumping to n + 1
calculating at n +
1 okay so this okay let me write this
this is Lambda by 2 u i + 1 n minus u i
-1 n okay so we want to get the value at
this point which is u i n + 1 and to get
that you get the values from i- one okay
here and I + 1 here so this does not
participate okay u i
n does not
participate okay we're trying to
calculate n+ 1 but UI n does not
participate okay similarly if you want
to c ui+ 1 n +1 then UI + 1 n will not
participate
okay uh now let's look at the sum of the
properties of this scheme okay so what
we'll do we'll go through our regular
analysis uh uh one is the modified PD
and other is the stability okay let's
look at the stability first
okay so u
n is = half UI + 1 n + u - 1 N - Lambda
by 2 y + 1 n and u -
1 right so uh I'll not go into the
detail I will do it very fast as you
know we're representing u i n as n e the
power I
I because s is the index here GD index
UI + 1 will
become ^
n i i + 1 5 right so use this value okay
this is my n + 1 this is g n + 1 n will
come out everywhere and this is half
E power I I
5 plus e^ minus I
I5 so basically I'm taking this e to^
ei5 common on both the sides the entire
thing is multiply by E to power I5 okay
so this this is not five this is i5 and
minus
I5
okay capital I is the complex number
ofus one and I is the GD index one once
again so that there is no
confusion okay and minus Lambda by 2 e
to power I5 minus minus I I
5
right so we use the I equation so I5
plus minus I I5 will be 2 cos I5 2 cos 5
right because cos 5 plus I 5 I and if
you subtract it
that will be 2 I sin 5 right use this
value and take this n + 1 by g n okay
and call this a g this is simplification
Factor so this will
become cos
5 right
minus Lambda I sin
5 right so how will it look right so uh
if you had a cos 5 - I sin 5 okay then
this is a circle right remember the Aron
diagram okay Circle uh of
radius 1 and
Center 0 0 okay in a complex plan so if
this is your complex plan this is your
uh real versus imaginary okay so this
would become a circle okay do not make a
very nice Circle but but this is how it
is the radius is equal to 1 but what we
have is G = cos
5 -
I sin 5 into
Lambda right that is what we have okay
Lambda I sin 5 so now what will it be
this is an
ellipse okay Center dot because there is
nothing adding here here so
centered at 0 0 and the major axis will
be the cosy the the term multiplying the
real uh number that is Major
exis is 1 and minor
AIS is basically
Lambda right so if you want to plot this
okay so make this as 1 okay let's say
this is 1 and minus one okay and take
the value of Lambda let's say take
Lambda equal to 25 right so if this is
your 025 and this is your 0 25 this is
your
ellipse
okay if you have Lal let's say
0.5 then let's say this is My5
and5 so this is an lipse
okay this is
your this is25 this
is05 and if you have the value as equal
to 1 okay then it will be a complete
circle
okay this
is Lambda equal to 1 and if you have
Lambda greater than one let's say Lambda
equal to 1.25 then you'll see that your
uh this minor AIS or the the imaginary
exis will become bigger and that would
become like
this okay now this is your 1.25 and this
is your
1.25 okay sorry the curve does not look
very good but I'll show you the plot
which I generated using matlb okay so
you can see that uh for all the cases
below one okay take any point that will
be the your amplification Factor so how
do you get the amplification so G is
basically square root of x² + y Square
so from the origin draw a a line and you
can see that anywhere up to one so the
here the G is equal to 1 for Lambda
equal to 1 for all the cles G is less
than one so this is our uh region of
stability right so this is all our
region of stability stability okay and
if you go outside okay uh so if you take
go outside anywhere Beyond uh Lambda
equal to one then this is G is greater
than one so that is unstable so this is
this scheme is
stable for Lambda less than
one right so this is what we saw for the
less than equal to one for the last
fredi scheme okay let me show you the
plot that uh we got it here okay this is
what I was trying to draw okay so entire
this region is our region of stability
up to Lambda equal to one so this is
Lambda equal to one plot okay so this is
all stable and if you go beyond that
okay Lambda = to 1.25 this is green
circle and if you take a line from this
AIS from the center this is G is greater
than one so that is unstable right you
can easily plot this using any uh tool
like matlb or uh maybe python whatever
is you are convenient with okay now
let's discuss a little bit about the uh
the other uh properties of this scheme
right so we want to do this modified PD
analysis okay for this that will be UI n
half
UI + one
n plus UI -1 n and minus Lambda by
2 UI + 1 n -
UI - 1 n okay so how we used to do
MPD if you recall okay so we use the T
Series for both time and space okay so
if you do u n + 1 that u n and then you
will have derivative with respect to
time so Delta t u t i n plus Delta t² by
2 u t i n okay
and similarly if you use this u n + one
n this is u n plus Delta x u x i in plus
Delta X by 2 ux x i
in okay and so on and so forth right if
you have u i - one n that is u i n minus
Delta x ux i plus Delta x² by 2 u xx i n
minus Delta X
Delta X Cube by factorial 3 that is 6 u
xx i n and so on so forth
right so this can be written as u i n
plus Delta t u i
n plus Delta t² by 2 u t t i n okay plus
right hand side I'll use another color
Okay so this if you add this two okay so
what will happen all all this odd
derivatives will cancel out and even
will remain right and the two will
cancel out with this two because U and
plus u that will become 2 i u n so you
can write it
as uh u n okay this is this I'm doing
and plus Delta x² by 2 u xx i n plus
Delta x^ 4 by factorial 4 okay so like
factorial 4 U x i n plus one and so
forth okay now I'll do the this term
Lambda by two uh so now instead of
adding we are subtracting so write
Lambda by 2 as C Delta TX okay so C
delta T by 2 Delta
X
okay and now the OD derivatives will
cancel out and even will remain right
that and two is there the two will
cancel out the because you will add two
this will two Delta X that will cancel
out by when you divide by two so that
will become Delta X so let me remove
this two
here so this is Delta
x ux i
n okay
plus Delta X Cube by factorial
3 okay u x x x i n plus Delta x^ 5
factorial 5
u xx x x i and so on and so forth okay
this is minus
sign okay so what we used to do now uh
so we what we need to do we need to
write in a form which is
basically ut+ u
cux i is equal to something right and
then we are trying to find out what is
my leading tration ER okay that will
give us the modified PD
equation okay so start uh so this UI U
will cancel out okay and uh you have
this Delta I will divide everywhere so
this is u t i
n plus delta T by 2 u t t i
n okay that will be this first time if
you can collect that will be Delta x² by
2 Delta t uxx
i and okay
and uh then you have high other term I'm
not writing those okay and here I'm just
writing the uh the first term okay so
thex will cancel out so c u x i n this
is the first term and possibly the
second term also
minus
C delta T Delta x² so Delta will cancel
out okay so C Delta x²
by factorial 3 that is 6 U XXX I right
and then other terms okay now we'll
collect these two together okay this is
U plus
CX i n okay now I start collecting
similar term so this is now Delta x² by
2 Delta t uxx i and minus delta T by 2
utti okay
and and minus other terms C Delta 6 U
XXX I and and so on and so forth right
now look at this term very closely
okay so uh how did you we convert the T
to time derivative to the uh space
derivative so you know this U equal to
minus CX take second derivative that
will be become uh c² uxx right this is
the trick we have been using to get our
uh first leading or term in terms of
space derivative right so you can write
1X 2 Delta x² by delta T minus this will
become
c² Delta
t u xx I in okay where we converted this
UT I in into c² uxx I
right
minus C Delta x square anyway these
terms that we're preserving is only
space derivative and so on so forth
right now this is an interesting scheme
okay so if you look at this closely
Delta x² by delta T minus c² delta T
okay this is the term that we are trying
to uh observe so this is my
leading truncation error term okay
and this is the diffusion term okay this
is a con diffusion equation but my
leading con term is I can put half here
like this now this is not always a
consistent scheme this is a very
important thing to remember this is not
always a consistent
scheme recall the definition of
consistency okay as Delta x ts to Z
delta T TS to Z okay your leading
tration
error or all the trations rather goes to
should go to zero that means your uh
finite def difference equation should
become the PD exactly okay if you look
at this case
okay if delta T goes to zero this does
not go to
zero right so the only way this scheme
can be become a consistent scheme is
that when Delta X tends to Z delta T
tends to Z okay when goes to zero your
Delta x² by delta T should go to
zero okay so this is a very important uh
aspect that I want you to keep in mind
that for consistency of this
scheme your term Delta by delta T should
go to zero as deltax goes to zero and
delta T goes to zero right so uh if the
scheme is consistent and stable then
only you will get the convergence right
so this we have you have to guarantee
for consistency of this
scheme the other important observation
that you could do is uh basically what
you can do is maybe I
will do this Delta X by two
okay
and this is this become so I'm writing
this term Delta X by delta T
minus c² delta T so probably to take C
also C Delta X by
2 Okay so this will become Delta X by C
delta T and this is C delta T by Delta X
okay this is u xx i n okay if you write
it this is C Delta X by
2 and what is this this is 1 by Lambda
Lambda is c x minus Lambda u xx i n
right so this is our leading uh term in
the convection diffusion equation which
is the modified PD right so the other
interesting thing you can note that this
is a highly diffus scheme right why it
is highly diffusive highly dissipative
is because of the presence of this 1 by
Lambda
term right so let's say that for
stability we know that we want Lambda to
be less than 1 right so if you take
Lambda equal to let's say you take
Lambda equal to 0.1 very small value
okay then when by Lambda becomes 10 okay
and the coefficient of diffus term
becomes 9 okay so 1 by Lambda is 10 -
9.9 this is a very very high dissipation
value okay typically you have Delta x²
and so on and so forth here because of
the presence of this term or maybe
multiply by some Lambda value but
because of presence of this term you are
getting a very very high dissipation
which is coming because of the factor of
1 by Lambda so that's why this Lambda uh
this Lex fedick scheme is very highly
dissipative and I'll show you some
results with Lex fedick in fact I'll
show results with all the schemes okay
that we are discussing and compare with
ft BS ftcs and so on and so forth right
so if you choose a very small Lambda
value also your dissipation is very very
high and then you'll get a value which
is highly dissipative so if you are
starting with this sine wave okay you
will get a solution like this
okay so it is completely dissipated
right so this is another property of the
letic scheme so if you want to use this
scheme use the value where is as close
to one okay so that this 1 by Lambda
value does not go very high okay let's
say 0.9 or 95 or so on so forth
okay uh the other thing that you can
check here is that our the order of a
scheme so because of the fact that we
used V appr x imated uy
n with uy + 1
n and UI minus one and our scheme out of
this this curacy reduces to first order
which is delta T and Delta X Delta as we
saw in the in the last slide when you
look at the MPD okay this
one
okay
uh the this we already discussed the
consistent only and Delta Delta to Z if
stable for Lambda less than one okay and
this has got a very high dissipation so
these are some of the properties of the
Lex F scheme okay so uh what we'll do uh
in the next class we'll look at some
more schemes we'll look at uh uh schemes
like lip frog
scheme okay and a very important scheme
which is LAX VR
scheme okay
uh we have already uh I I think I have
already given you flavor about this
schemes earlier but I'm going into
detail discussions now about the
stability of these schemes and uh uh how
these schemes behave should behave I'll
show you the solutions uh using these
schemes for many different kind of
problems uh in the next coming classes
thank you very much we'll meet you in
the next class
[Music]
[Music]
[Music]
