Computational Fluid Dynamics Prof. Dr. Suman Chakraborty Department of Mechanical Engineering Indian Institute of Technology, Kharagpur
Computational Fluid Dynamics Prof. Dr. Suman Chakraborty Department of Mechanical Engineering Indian Institute of Technology, Kharagpur
Computational Fluid Dynamics Prof. Dr. Suman Chakraborty Department of Mechanical Engineering Indian Institute of Technology, Kharagpur
Now, here we are considering a case where it is a one-dimensional variation, first of all
we consider the z direction to be large, so that there is no variation along z. And it is
axially symmetric, so that there is no variation with respect to theta. So, only there is
variation with respect to r. The governing differential equation becomes 1 by r d dr of r k
dT dr plus S equal to 0. So, this is the equation that we are now interested to discretized.
Now, what is the first step in the finite volume method? We integrate the governing
differential equation over an elemental control volume. So, what is an elemental control
volume? Say if it was a two-dimensional system or a three-dimensional system, then if
you consider that, there is a radial coordinate r, and you have an element of width dr, and
let us say this angle is theta. So, what is the dimension of this element? So, one one of
the lengths; so, we are talking about this element. One of the length is dr, the other length
is r d theta. So, you have the total length or rather the total area of this shaded region as
dA is equal to r d theta dr, because for small dr this is approximately like a rectangle.
If you consider an elemental length of dz along the other direction, then the elemental
volume r d theta dr into dz. Now, in our case we do not have variations with respect to
theta and z, but (( )) if you consider that it will remain in consequential. So, in our case
what is that which varies? So, if you consider this dv it has three parts; one is r dr which
is due to variation in r, then d theta, then dz. So, integrating the governing equation over
the elemental control volume is as good as multiplying this equation by r dr. Because
there is no theta or the variation or even if it is there it cancels form all the terms equally.
There is no specific variation. So, what we do is, we multiply by r dr and integrate it with
respect to r. Again we consider the radial direction say this one, whether grid points are
P, E, W, phases of the control volume are small e and small w. So, we integrate it from r
small w to r small e which is the control volume, and the length of the control volume we
say is delta r.
So, what we can see here is a very interesting thing that because of this multiplication by
the r dr term, when we evaluate the integral this 1 by r singularity of the governing
differential equation goes away. This is one of the intrinsic advantages of the
discretization using the finite volume method. See in any other method you have to
bother about what is 1 by r at r equal to 0; you have to treat it in a special way, because it
at r equal to 0 it is singular. But here you do not have to care about what happens at r
equal to 0. As if you are starting with r tends to 0 plus and in that condition no matter
whatever the value of r is beyond 0 plus, you can cancel 1 by r and r, so that the effect of
1 by r does not remain. So, with that understanding you can integrate this term. So, let us
integrate this term.
(Refer Slide Time: 08:01)
So, integral of that becomes r k dT dr from small w to small e plus... Let us assume that
is is a constant or at least S is a function of temperature where the temperature dependent
term is given by S c plus S p into T, S p into T is the temperature dependent term, and for
that we assume a constant temperature over the control volume. So, we can write this as
S c plus S p into T p integral of r dr. In the next step we have to make a profile
assumption for dT dr. A profile assumption for T to evaluate dT dr. So, what can be an
acceptable profile assumption for T? Piecewise linear between the grid points. So, let us
make that choice. So, if you do that we can write this as r e k e into T p minus T E by
delta r e, let us mark the dimensions, this is delta r w, this is delta r e. So that sorry this is
T E minus T p by delta r e minus r w k w T p minus T w by delta r w plus integral r dr is
r square by 2. So, r e square minus r w square by 2 equal to 0.
You can organise this equation in the following form, a p into T p is equal to a E into T E
plus a w into T w plus b; where what is a E? r e k e by delta r e, a w r w k w by delta r w,
a p is equal to a E plus a w minus S p into r e square minus r w square by 2 and b is S c
into r e square minus r w square by 2. So, the purpose of casting the equation in this form
is to show that eventually you get the same form of the discretizing equation. No matter
which coordinate system you use, just the coefficient change depending on the
coordinate system. If it was a spherical coordinating system it would have been 1 by r
square d dr of r square k dT dr, and then you have to multiply it by r square dr instead of
r dr, considering the elemental volume in a spherical coordinating system.
Now, let us move further ahead, we have till now discussed about steady state problems,
but we are also interested about unsteady state problems and many interesting unsteady
state problems occur in physical reality. So, let us try to discretize or see the
discretization of the diffusion type of problems considering the unsteadiness of the
governing equation.
(Refer Slide Time: 13:57)
So, now we will move on to one-dimensional unsteady state diffusion problems And we
are still considering the finite volume method for the discretization, so finite volume
method for one-dimensional unsteady state diffusion problems. Let us start from the
general governing differential equation.
So, this is the governing differential equation. Now, it is a diffusion type of problem. So,
the fluid flow velocity is not there. That means this term is 0, for there because it is onedimensional, this will become d dx of k dt dx, not d dx, but partial derivative. Now,
because T is now a function of both x and time. So, we can write the simplified
governing differential equation as
With consider an example with S is equal to 0; just for simplification, because our
objective is not to show how to discretize the source term that we have already shown
through the examples of steady state problems. Now, our objective is to specifically
show that how to take care of this new term, which has appeared because of unsteadiness
of the problem. So, the first step will be what? We have now two terms in the equation;
one is an unsteady term, another is the conduction term. So, what will be the first step?
Integrate the governing differential equation over the domain - elemental domain. Now,
here the domain involves the specification of two coordinates - time and x. So, when you
integrate it over an elemental volume in the domain space, the domain space will have
elemental time also dt and dx.
So, we have to remember that it is not a physical volume that we are talking about. We
are integrating the governing differential equation over the domain. If the domain is a
physical volume then that is all right, but even if the domain is not a physical volume, it
is the elemental space in the domain that we are considering. So, we have a time space,
we have a we have a time coordinate and a space coordinate. So that elemental time into
elemental space is the sort of element in the domain over which we are integrating the
governing differential equation. That means we multiply it by dt dx and integrate; now, it
is a double integral.
Since it is continuous, it does not matter whether you integrate with respect to x first or
with respect to t first. So, according to the convenience of the terms, we either first
integrate it with respect to x or integrate it with respect to t. So, what are the limits? The
limits of time or from time t to time t plus delta t where delta t is the time step; so, just
like we have divided the x domain into a number of sub domains. Similarly, we are
dividing the time domain into a number of sub domains starting from time equal to 0 to
then delta T, 2 delta T, 3 delta T like that. So, each small step is delta T where delta T
itself may be a variable. So, one particular time steps start from time equal t and ends at
time equal to t plus delta t. So, that is the elemental time domain.
What is the special domain? Let us keep in mind the discretization P, E, W, small e,
small w. So, what is the x domain? From small w to small e; right hand side x domain
small w to small e, time domain t to t plus delta t. Let us treat these two terms separately;
so that we consider this as term 1 and this as term 2.
So, term 1, the term 1 has two integrals, and we can split that effort therefore, into two
parts; first we calculate the integral in this red box and then calculate the remaining
integral which is there in the green box. So, when we first calculate the integral in the red
box, we consider the time to be a variable keeping the space coordinate unaltered; that is
called as partial integration just like opposite of partial differentiation. So, if we do that
then this comes out to be rho C p T then del of that one, so rho C p T at time t plus delta t
minus rho C p T at time t, then integral of this one.
Now, here appears terms of the form integral of T dx that is temperature dx. To evaluate
that we must have a profile assumption that how temperature varies with x. What can be
the simplest profile assumption? Constant - piecewise constant within each control
volume, because you do not have to evaluate any derivative. So, you can make such
piecewise constant profile assumptions. So, this will imply. So, when T is a constant you
can call it as T at p for each control volume. So, rho C p, let us consider rho into C p as a
constant, it could also be a function of position and you you just have to integrate it by
considering some profile. But for simplicity let us assume that rho into C p is a constant,
if that is so that times. So, this entire thing becomes a constant not a function of x times
integral of dx from small w to small e. So, that time delta x.
(Refer Slide Time: 24:43)
Next let us consider the term 2. To calculate term 2 again we have to calculate two types
of integrals; first in this red box where we calculate the integral with respect to x, and
then the remaining in the green box. So, when we calculate it with respect to x what does
it become? So, the term two becomes k into del T del x at e minus k into del T del x at w
times dt integral of that from t to t plus delta t. So, we require a profile assumption for T
to evaluate the terms k dt dx type of terms. What profile assumption? We can take
piecewise linear between the grid points. So, we can see that for different terms we can
easily take different types of profile assumptions. We have earlier discussed that why we
can do it, because at the end this history of profile assumption is loss once you evaluate
the integrals. So, the profile assumption is surely for evaluation of the integrals, you do
not require this for any further interpolation or any other calculation. And therefore, you
have the flexibility of using different profile assumptions for different terms in the
governing equation.
Now, you can write this as k e T E minus T p by delta x e minus k w into T p minus T w
by delta x w where delta x e and delta x w are shown in this figure. Now, integral of this
with respect to t. Now, here comes the important question. Here you have to evaluate
terms of the form of the form capital T dt integral of that. So, there are four such terms;
first two from this one T E minus T p and then second two from T p minus T w. So,
basically you require evaluation of terms of the form integral T E dt integral T p dt and
integral T w dt. So, these types of things are required.
(Refer Slide Time: 28:56)
So, essentially your question is that you want to evaluate terms of the form integral of T
dt from t to t plus delta t. So, how to do it? It requires again a profile assumption for
temperature over time. Just like you require a profile assumption for temperature over
space to evaluate integral T dx; similarly, you require profile assumption of temperature
over time to evaluate integral of T dt. So, standard profile assumption towards this is
written in terms of a parameter f which is a fraction as follows.
So, it is f is a weight and it is considered to be some weighted combination of
temperature at t and temperature at t plus delta t, if this is p. So, in general if forget about
the subscript p, it can be temporarily at any point. So, we do not write p, it depends on
which point, if it is p we call it p, we if it is e we will call it e or w like that. So, this is an
intuitive profile assumption where we are dumping some weight on the temperature at t,
some weight on temperature at t plus delta t. Remember these are the two discrete points
at which we know the temperature temperatures or rather we have to determine the
temperatures. So, the entire temperature variation within the time step from t to t plus
delta t is considered to be a weighted combination of something that has to do with the
temperature at t, and some other things that has something to do with the temperature at t
plus delta t, some weighted combination where f is a weight. So, this depending on the
value of this weight we can have different schemes. So, let us try to write the general
form of the scheme, and then we will assign different values of f, and see physically
what it interprets.
(Refer Slide Time: 31:54)
So, even for the unsteady state problem, we are able to write or discretize the equation in
a form a p T p equal to a E T E plus a w T w plus a p 0 T p 0 plus b, where now a new
neighbour has appeared. Earlier the neighbour was the neighbours were e and w, now
there is a time neighbour.
So, there are two types of neighbours now; one is a special neighbour, so for the point p
you have the special neighbours as point e and point w, but for the same point p at time t
plus delta t there is also a time neighbour which is that at time t. So that is given by this
one, this term. So, it is a effect of the time neighbour, time neighbour at time t. And only
one time neighbour we are considering, because whatever is at t plus delta t that is going
to be influenced by what has happened at time t, but not what will happen at time t plus 2
delta t right. That is why you can see that there are two space neighbours, but only one
time neighbour. Once you have this one time neighbour, you have to find out its
implication that we will find out, and the implication of the time neighbour it depends on
what is a p 0. Before doing that let us consider some special cases for different values of
f.
(Refer Slide Time: 44:05)
So, we next discuss the choices of f. Let us try to make a sketch of the variation of
temperature with time between time t to time t plus delta t depending on what value of f
we choose. Let us say that the values of the temperature at the instants of these two
times; at T 0 at time t and T 1 at time t plus delta t. In between, how it varies? So, now
look into this formula. First let us consider f equal to 0, remember here f lies between 0
to 1, so f equal to 0 and f equal to 1 are some special cases, f is a weight. So, any weight
that can be assigned to either of these temperatures is either a 0 weight or a 1 weight or
something in between, but nothing less than 0 or nothing greater than 1.
So, the limiting case, let us consider what is the consequence when f equal to 0. So, when
f equal to 0, you see that there is no contribution of T 1; there is only contribution of T 0.
So, then integral T dt becomes T 0 times delta t. So, what is the implication? Physical
implication is we have considered a profile as if the temperature has been throughout T 0
over the time interval from t to t plus delta t. So, it is throughout T 0, but at the end it has
to jump and match with T 1, because that has to be satisfied. So, this is f equal to 0. It is
clear? f equal to 0 means the throughout the time interval the temperature is T 0, but of
course it has to assume a new value of T 1 at the end. So, it suddenly jumps from T 0 to
T 1 at the end. That is the profile. f equal to 1: f equal to 1 is the other thing that it means
that throughout the interval, the temperature becomes T 1. So, what it does is? Suddenly
it jumps from T 0 to T 1 and then remains T 1 throughout. So, this is f equal to 1. If you
have a f equal to half as an intermediate example, then it is 50-50 combination of T at 0
and T at 1, and in between it can be interpolated linearly, so that this is f equal to 0.5.
These schemes... So, you can see that accordingly you can design different time
integration schemes depending on what value of f you choose. What value of f you
choose is your method is your method of designing the discretization problem. It is it is
your headache, but we have to see that how to fix it up or what are the plus and minus
points of choosing different values of f. But once you have chosen it you have to use that
particular f for your discretization, and there are different limiting cases that we have
identified, and accordingly there are different names of the schemes. If f equal to 0 this
time discretization scheme is known as fully explicit scheme or in simple words just
explicit scheme. If f equal to 1 it is called as implicit scheme, and if f equal to half it is
known as Crank-Nicolson scheme. Let us try to figure out first the coefficients
corresponding to different values of f, and see that what is the consequence of such
coefficients.
So, f equal to 0, if f equal to 0 you can readily see that a E equal to 0, a w equal to 0, a p
is rho C p delta x by delta T that is the... p 0 is rho C p delta x by delta T minus k e by
delta x e minus k w by delta x w, b is equal to k e by delta x e T E 0 plus k w by delta x
w T w 0. So, you can write for that case a p T p is equal to a p 0 T p 0 plus b. So, T p you
can explicitly express in terms of T at the previous time step. So, you can see that here in
this T p 0 you have temperature at the point p at the beginning of the time step. That is at
the end of the previous time step. In b you have T E 0 and T w 0. So, what what what do
you infer from here? That the temperature at the point p at the current instant of time that
is at the end of the time step, you can express explicitly as a function of the temperature
at the same point at the beginning of the time step plus at the neighbouring points at the
beginning of the time step; so that T p is a function of T E 0, T p 0, T w 0 expressed in
an explicit form.
This essentially implies that if you know what is the temperature at a particular time, you
can just match with time and find temperature at any other point at the subsequent time
by explicitly expressing the equation as the value at the current time, as an explicit
function of the value at the neighbouring points at the same point at the end of the
previous time. And in this way you can just match ahead with time. So, you need not
solve a system of linear algebraic equation. You can just consider one algebraic equation
from that you can you can calculate temperature at that grid point, then the next algebraic
equation the corresponding temperature at the corresponding grid points. So, you need
not consider them to be coupled as a system. So, you can treat individually equations,
and from individual equations you can obtain the corresponding values of the
temperatures. Now, that is one of the very important advantages.
(Refer Slide Time: 53:24)