Lecture 32 : Advanced Schemes II

IIT Kanpur July 201
20 followers
1 Video View·Sep 6, 2024
[Music]
hello everyone welcome
back today we will uh look at some more
schemes and two main schemes that we're
going to show you today is the lip frog
scheme and the black F of scheme also uh
we'll briefly see uh another scheme
uh which is proposed by warming and beam
okay beam warming scheme okay so uh in
the lip frog scheme uh as you had
discussed some time back it's because
it's lipping so how do we take a lip so
it's also a variance of the ftcs scheme
so the FTC scheme you have u n is equal
to uh n + 1 is equal to u
n and minus Lambda by
2 u y + 1 N - u y - 1 n
right uh so this is
unstable
okay and this can be written as u n + 1
minus u
n by delta T is equal to
minus uh 1 UI + 1 - UI -
1 by 2 Delta X right delal to c x and
this was forward in time and then Center
in space okay in the leaf pluging what
you do is instead of using forward in
time you use central defensing time okay
Center in time so then this will become
UI one
second ui+
1 u i n + 1 minus u n by 2 delta T we
are using uh Central differencing in the
uh time also is equal to- C UI + 1 N -
UI - 1
n by 2 Delta
X right this two two will cancel out and
you can write this is u i n + 1 equal to
u i
n oh this will be n minus one right
because you're using Central
differencing right minus1
minus this will be Lambda C Del X UI + 1
n minus ui- 1 right so this is our
scheme
okay so why do you we call it Lea
frogging a scheme Okay so so look at the
stencil of this scheme okay this is my n
and this is my n + one okay uh This Is
My Line This is my
I I +
1 this is IUS
one
okay and uh because this goes from N - 1
n + 1 so I have to make another line
okay this is my n -
1 okay now if you want to go to n +1 so
this is my U n+ one right this is my UI
n +
one
okay so uh what are the instances that
are participating in this you can see
this is UI n minus one and then UI + 1 n
and UI minus one n Okay so
this is UI n minus one okay this is UI +
1 n and this is uus n okay so these four
will
participate uh in getting
the value at u i n + one okay and
interestingly you will see
that this one does not participate in
this also so u y
n does not participate
okay uh secondly this is
a three time level
scheme that means you need the if you
want to calculate a value of n + 1 you
need the value of n minus one and
okay and
n+ one right so basically at at a given
time you need three time levels right so
this that that means you have need more
bookkeeping earlier you could just keep
on updating between n and n plus1 and
that will work right now you need n
minus one also so this is a three time
level scheme we'll talk about the
stability uh in
the uh we'll discuss about this shortly
and we'll see that it is also stable for
Lambda less than equal to
1 okay so that is very interesting we
just change the the time stepping from
the forward in time to Center in time
and our spacing also I mean the scheme
entire scheme became stable for Lambda
less than equal to one see this added
stability and I am not going to do that
but if you do this uh modified partial
differential equation analysis you'll
get the error which is dispersive okay
so just I written it here so you'll get
a term this is very easy to do like uh
we have been doing okay just use the T
Series and you'll get an expression
which is basically like this okay and
you can see that the first leading term
that you are getting is uux
XX okay so that is the third order
derivative that means it will give you
the dispersion okay so error is
disperson that means if you have even uh
slight uh uh uh basically difference or
slight perturbation in your initial
condition or slight error that will not
die out okay that will uh basically be
dispersed and that will make the scheme
uh I mean that will give the solution
completely back okay it will Mi up the
solution so that is how the disperson
error acts it will not dissipate any
error in your initial condition okay not
only error but maybe uh something like
something coming out of the machine
right uh so there also if you have some
thing uh that is uh uh getting into your
system that will not be dissipated
okay now let's look at the stability of
this scheme okay so the scheme I have
is u n + 1 is equal to U nus1 minus
Lambda by 2 U + 1 n minus UI - 1 n okay
us our uh for aners so I'll take I'll
cancel this out e to power I uh I 5 on
both the sides so then it can be written
as e n + 1 = g n minus
1- Lambda by 2
GAA I
5 okay minus minus I 5 e i 5us i5
right and this will be to^ n because
this is the n level right now how do we
do the stability analysis of the system
right let's simplify a little bit more n
minus one minus Lambda n what is this
value this is 2 y sin
5
right uh divide the entire thing by g^ n
this is n + 1 and g^ N = to N - 1 by g^
N = - 2 Lambda I sin
5 right now look uh recall the
definition of the amplification Factor
so G is basically g n + 1 by g^ n that
means that simplification factor should
also be equal to g^ n by^ n minus
one right so you can use this definition
here this will become G equal to this is
1 by G minus 2 Lambda I sin
5
right so this will make you give you a
quadratic equation g s
k+ 2 Lambda I sin 5 g - 1 =
zero right so you get a quality equation
let's
try looking at the stability okay so
this is the equation that you're going
to get okay and uh if you do the uh use
the I mean try to find the root of that
equation so the equation is G
² + 2 g i sin
5 okay - 1 Lambda I sin
5 - 1 = 0 g = to minus B which is minus
2
g 2 Lambda I sin
5 I'm solving for
Z plus minus root D so that is b² that
is 4 Lambda
s uh and then I sare 5 so that will
become Sin sare 5us Sin - 4 a c so that
is
4
okay by 2 into a that will be
2 right so uh you can take two here and
two here out so that will become minus
Lambda I sin 5 and that will be plus
minus okay and this will
become- 4 that will be plus right there
a minus sign here okay this will 1us
Lambda s sin
so this is the value of
G now you can uh look at uh this
equation also closely okay and if Lambda
is greater than one
okay see if Lambda is greater than one
then this is l 1 - Lambda squ sin Square
5 Okay this may become less than one
okay you can check for different five
okay uh except zero okay and so it may
become less than one so then this term
will
become uh negative so this is square
root of something minus let's say some
real number so then this is also
imaginary number okay so this term the
entire G will become imaginary term
multiplied by some
Factor okay so then it will become the G
will become
the uh your amplification Vector Factor
will become greater than one okay only
when you have Lambda less than equal to
1 then this 1 - Lambda Square sin S 5
will be real okay this will be a real
number
okay because this term is uh now
positive right and uh then you can do
this GG star okay so if you do the GG
star so this is your real part and this
is your imaginary part okay so square
plus imaginary Square so this will be
your uh GG star okay and you can see
that this will cancel out and this GG
star will become one so that is it will
have no dissipation so your G is equal
to
1 mod G is equal to 1 right that means
this scheme will give you no dissipation
for Lambda less than equal to 1 right
but remember this is a dispersive scheme
so your amplitude will not go down okay
but uh this scheme May quickly become
unstable if you have uh any error or uh
any kind of uh inherent uh disturbance
in the system okay so that is the
property of the leaf frog
scheme
okay and this is the stability plot that
uh you can plot okay so for example if
you have Lambda equal to all the way
from 0.25 to 1.0 so everything will stay
in this region
okay but as you see that if you go to
Lambda equal to 1.25 in some reason so
this is my five okay this angle is my
5 okay so this is 5 = Pi by
2
right so that will become one so let's
work that out square root of 1 - Lambda
squ sin S 5 and Lambda isal to
1.25 okay so uh your first term will
become 1
minus 1.25 p² right and this is an
imaginary
number
okay and because of that imaginary
number you will see that you have this
term becoming greater than one so this
is becoming unstable so any value uh
Lambda greater than uh 1 will give you
the unstable region and that scheme
cannot be used so the scheme is stable
for Lambda equal to uh
uh Lambda less than equal to one right
now we are discussing uh the last scheme
which is the lendr scheme
okay so what we are doing here so if you
look at your ftcs scheme very closely
the MPD of the ftcs scheme okay so what
we had is was it's a convection
diffusion equation
okay and it was like U plus cuu x i n
was minus c² delta T by 2 uxx right this
we derived in the last class also and we
said that because of the negative
diffusion the scheme is
unstable so what LAX and VR did is that
they said that okay we want to use the
central defening scheme but we are
seeing that because of negative
diffusion uh the scheme is becoming
unstable so what if we just make sure
that uh we have zero diffusion okay that
means we'll cancel out this
term okay so then you'll get a scheme uh
which is solving this equation but
canceling out this negative diffusion
term okay so this is what uh uh the
scheme is so now we proposing a
convection uh I mean for the convection
term we are proposing a scheme which
looks like this UT plus so this is in
the uh discretize domain you can call it
okay this is not the PD but this in the
discret equation okay so this is I and
N okay so then uh you can write the time
derivative like this forward in time
Central in space and this Theta is the
diffusion coefficient or diffusion
number which multiply to
your um uxx discr right so if you
compare with this uh ftcs scheme we have
to just balance out this term so your
Theta will become c² delta T by2
right so that is uh if you so finally
your scheme will become like this
okay so this is our scheme for solving
remember we are still solving d by DT
plus c d by DX okay but we are solving
uh in a way that my daily y delt is done
using the forward in time this is done
in Central in space okay and then we
have an additional diffusion term
okay this is my additional diffusion
term which is just making
sure that uh the scheme becomes
stable we look at the stability scheme
very
soon
okay uh so just we replace the Theta by
= to c² delta T by
2 okay and then you worked it out
multiply by delta T and put in this form
you will see that your Theta
becomes Delta square right this for
Theta by 2
okay so this is your LAX V schem this is
called LX scheme and unlike The Lax F
scheme where the order of accuracy
decreased okay uh here the accuracy of
second order so your accuracy remains
maintained okay you you can go back and
do the modified PD analysis and you'll
see that the first term that you're
getting is the disperson term Okay C
Delta x 6 1 Lambda sare uxxx this is
also due to the fact that we are
canceling out this uxx term that is
coming through this additional diffusion
term okay so this is a dispersive
equation okay but uh I mean what you can
do you can drive your own scheme okay so
here instead of Lambda Square you can
use some other value of the diffusion
or and you can check whether the scheme
is stable or not right so this is just
balancing out if you put more than
Lambda Square then what will happen it
will be more dissipative so you'll have
a dissipation error in the leading term
okay if you put your diffusion number
less than Lambda Square then what will
happen the scheme will become unstable
let's see all those things let me go
through
the uh slides itself okay in the
interest of time so uh we are doing the
stability analysis of this
okay so this is my g n + 1 this is n uh
this is e^ I5 this is e minus I5 okay
and then these three terms this is i5-
I5 and-2 right now you use this e I5
minus E minus I5 is basically 2 cos 5
okay and uh here you can see that I have
changed the notation uh to Alpha so for
the Le one scheme we are alpha equal to
Lambda square right as we see you show
in the last slide but we doing a general
Alpha we are trying to see that up to
what uh diffusion number we can use
right can we use lower than this or
greater than this what happens if you
use lower than Lambda squ or greater
than Lambda squ so what happens right so
this is my uh 2 cos 5 and this one if
you look at so if you add this I 5 + e^
- I 5 - 2 that will be 2 I sin 5 - 2
okay
and no this is negative so this is 2 I
okay that's
correct okay so U you can multiply that
with so that will become let me just do
it here now we are adding this right so
this will be cos 5
and you are subtracting this so that
will
be y sin
5 okay so put it there this is 2 y sin 5
and there Lambda is there so this will
become Lambda I sin 5 and this is 2 cos
5 - 2 so that will become Alpha cos 5 -
1 right two will get canceled out and if
you take the uh magnitude of this
amplitude Factor GG star so this is my
real part
and this is my imaginary part okay
Lambda sin 5 okay so you will have this
equation okay real square plus imaginary
square and if you put Alpha equal to Z
okay that means this entire term goes to
zero so this scheme is for Center space
and you'll get the recover the
amplification factor which is 1 + Lambda
squ sin Square 5 which is greater than
one and this is unstable as we know
already
okay now let's analyze when Alpha equal
to just Lambda square right that is your
La V scheme right when Alpha Lambda squ
uh you can put the value here Lambda
Square sin S 5 okay
and then you can basically simplify it
okay and we say that the GG star needs
to be less than one uh for stability so
this entire term should be less than
equal to one so one one will cancel out
expression which is Lambda 4 1 - cos 5 S
- 2 Lambda 1 - cos 5 Lambda sin S 5 take
the 1 - cos 5 out right how we can take
that out because sin Square 5 is 1 - cos
squ 5 which is basically 1 + cos
5 1 - cos 5 okay take the 1 - cos 5 out
so this is Lambda 4 1 - cos 5 - 2 L +
Lambda 1 + cos 5 and that will become
Lambda 4 1 cos 5 and this isus Lambda s
y 1 - cos 5 right so take the 1 - cos 5
again out okay so that you will have
Lambda 4 - Lambda s less than equal to0
or Lambda 4 is less than equal to Lambda
s that means Lambda is less than equal
to 1 okay so this is the stability if
you have a LAX of scheme which is Alpha
equal to Lambda squ okay now if you can
what you can do you can solve for
General Alpha means not X1 Dr nor ftcs
but we are just adding some uh iary
diffusion right and see what is the
value so we'll get a quadratic equation
okay which will be like this and you
have to solve for Alpha okay and you'll
see that this G is stable when Alpha is
greater than Lambda which is obvious
because Lambda s is just the right
amount of
diffusion for to make this scheme stable
right and if you add more than Lambda
Square then scheme will become more and
more dis itive if you add less than
Lambda Square then it will just become
unstable
right so this scheme is stable for
Lambda Square less than equal to Alpha
and less than equal to one so you might
want to add little bit more than Lambda
Square so that the scheme becomes more
and more stable it will have just a
little bit of dissipation in this scheme
right so this is how you can derive this
scheme you can also look at the the
polar plot okay or the argant plot so
basically what we are doing so this is
the expression that that we had earlier
when we derived so G is equal to 1 + so
real part is 1 minus Lambda Square this
two term plus Lambda Square cos 5 and
the imaginary part is Lambda sin 5 right
so when we had like cos 5 minus s i sin
5 okay so then we had the polar plot
which has a circle right with a radius
one right now let's say we have cos
5 1 + cos 5 - I sin 5 so then you will
have basically Circle which is at one
okay and it will become like this right
uh now let let's say that I have 1 + cos
5 - I LDA sin
5 okay then it is an ellipse right which
depends on uh Lambda your radius is one
okay major XIs always one but minor XIs
depends on Lambda right this is my
Lambda and this is one right so here
what we have we have uh in the real term
we have 1- Lambda Square so that is uh
where my real axis will be and zero okay
and what is the radius okay so radius is
Lambda square and Lambda right so this
is my radius of the major axis and this
is the radius of the minor axis so you
can go ahead and plot this okay I think
I plotted it here okay
yeah uh so once again I have something
centered at 1us Lambda Square uh radius
is just let me
see Lambda Square the the right hand
side Lambda Square this is the real
axis okay and the imaginary exis is just
Lambda okay so you can see that uh if
your Lambda is equal to
1.25 okay so your Center is just s of 1
okay this is my 1us Lambda Square okay
and my real AIS is Lambda Square so this
will be smaller than one and this is
just your Lambda so this is value
of25 right you keep on increasing let's
say you go to point five okay so this is
- 1 - Lambda squ and this is minus this
is the value which
is5 and this is5 square right so this is
all ellipse okay similarly you can go
till Lambda equal to 1 so when the
becomes Lambda equal to 1 this becomes a
unit circle because Lambda square and
Lambda both are equal to 1 and this is 1
- 1 0 this is your center right so there
uh radius will be the G will be equal to
1 all other cases your amplification
factor is less than one one right you
can take anywhere here or anywhere here
it's less than one if you go to Lambda
greater than 1.25
okay uh you can see that um now you have
uh regions which are going outside the
stability region outside the circle and
in this case G is greater than one okay
this is again uh cannot be used okay so
uh last scheme that I'm going to
introduce is the beam warming and I will
not have a lot of discussion I want you
to go back and work on this so this is
like the L one of scheme okay but you
will have the second order op in term
for the aders term okay so instead of
using
uh and also the dissipation term also
you will have this up in term so this is
these are all upnd schemes okay you can
see the terms which are I IUS one and I
-2 this is also I IUS one i-2 okay here
in fact there a variant of uh
scheme where you can use just I and IUS
one right so for both the conviction and
the the artificial diffusion that we are
adding Lial defion that we adding okay
uh we are using the upnd scheme okay and
you can verify that the order of the
scheme is delta T Square Delta X squ
okay and the leading error is the
disperson error that also you can verify
just do the MPD analysis modified PD
analysis and uh
uh I mean uh the the one way to derive
it is uh is basically take your uh uh
time derivative equation okay and
replace all your time derivative with
your spatial derivative okay and then
collect these terms right so this is UI
in plus
one is equal to u
n and plus delt t u n and plus Delta t²
by 2 u tt i n okay this will become u i
n minus delta T is minus U Delta X right
minus c u x Delta X okay I N and plus
Delta t² by 2 is basically c² uxx okay
and we are looking for an expression
for so this this this is your B Maring
scheme okay what you need to do is you
find ux I in derivative using suitable
scheme and uxxx I N using suable scheme
so the one hour propos this is the
backward
defening okay with three stencil I i-1
and I -2 here also this is I I -1 and
IUS 2 okay so you can derive this uh BM1
volume scheme okay and one interesting
thing that I will discuss and close the
class today is that for this scheme you
can note that the stability region is up
to Lambda equal to 2 okay for all the
scheme that we have discussed so far the
stability was Lambda less than equal to
1
okay but this scheme is stable up to
Lambda equal to 2 and that you can see
clearly in this polar plot and you can
see there are some overlapping regions
here okay uh so this is basically your
uh Lambda equal
to.5 this is
1.5 okay and this is both for Lambda
equal to 1 and Lambda = to 2 okay this
line okay if you go more than two then
your uh so this is my
Center so this G becomes greater than
one okay so there are some schemes which
has the stability limit greater than one
also this is what we learned from this
uh we can have another variant okay this
is variant two where we are just uh
using uh ui- ui- one uh by Delta X so
this is my first order scheme here and
the point okay so this is the so final
scheme is come Delta t² Delta x square
it also the uxx error and it has the
same stability limit as earlier that
means stable up to Lambda less than
equal to 2 okay so these are the schemes
that we have discussed today okay yeah
leand B Maring and so on and so forth
please go back and derive the stability
limits for all these schemes as well as
derive the modified PD equation I mean
modified partial differential equation
and look at the property of all the all
these schemes in the next class uh we'll
discuss some more schemes for the
nonlinear problems
okay and finally uh we will uh see how
all of these schemes behave for a linear
problem and for your nonl problem okay
so with that we'll stop today thank you
very much
[Music]
[Music]
[Music]
