0% found this document useful (0 votes)
28 views10 pages

Lec 2

This document discusses solving fluid flow problems in a rectangular duct using computational fluid dynamics (CFD). It describes setting up the problem by defining the geometry and governing equations. The CFD approach involves discretizing the domain into a grid of points and solving for the velocity at each point numerically rather than using an analytical solution.

Uploaded by

Pramod Kulkarni
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)
28 views10 pages

Lec 2

This document discusses solving fluid flow problems in a rectangular duct using computational fluid dynamics (CFD). It describes setting up the problem by defining the geometry and governing equations. The CFD approach involves discretizing the domain into a grid of points and solving for the velocity at each point numerically rather than using an analytical solution.

Uploaded by

Pramod Kulkarni
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/ 10

Computational Fluid Dynamics

Prof. Sreenivas Jayanti


Department of Computer Science and Engineering
Indian Institute of Technology, Madras

Lecture – 02
Flow in a rectangular duct: Problem formulation

(Refer Slide Time: 00:09)

In the first lesson, we saw the motivation for doing a computational fluid dynamics. We
mentioned that it is possible to get a solution even in irregular geometries not like the
simple geometries like flow in a circular pipe and all that. So, in this lesson, we would
like to see how we go about doing this calculation and what is the CFD approaches, so
that we can get a feel for what is actually involved, and how we are generating a solution
which is not possible analytically. So, in order to illustrate the CFD approach, we take
the relatively simple case of flow through fully developed laminar flow through a duct
type of duct of rectangular cross section.
(Refer Slide Time: 01:15)

So, in this case, we can write down the flow problem like this. We have a duct of
rectangular cross section like this. So, it is a long duct, flow is coming through this. And
we can fix a coordinate system such that this is x, y and z is in this direction. So, you
have a flow, which is going in the z-direction. What we would like to know is how does
the velocity change within this cross section?

If you consider this, then this is a wall; at the wall, we know that the velocity going to be
0; and as you move away from the wall, the velocity increases. In the case of a circular
pipe, it increases in the same way in all directions. So, you have velocity depending only
on the radial distance from the wall. In the case of a rectangular pipe, cross section like
this, you have a certain distance from here, which is different from the distance from the
sidewalls. So, what distance is honored by the distance fluid flow as it is going through
this? So, we would like to say that prima facie in this particular case, the velocity
component in the z-direction w is a function of x and y.

So, if you consider this Cartesian coordinate system associated with each of this, we
have a velocity component u, a velocity component v, and a velocity component w in the
z-direction. And what we are interested in is how does velocity component w change
with x and y.
Given the flow is steady and fully developed. So, when we say fully developed steady
laminar in this kind of thing, in this flow, we can say that the velocity component u is 0
everywhere, and the velocity component v is 0 everywhere. And only w component is
non-zero that the w component is a function of x and y, where x is a distance from this is
an origin, and y is the distance from here. And we can see that for a point which is for
example, located here, it is close to this wall far away from this wall. And something
which is located at the center is at sufficiently far away from here, so that the velocity at
the center would be expected to be different velocity here, and the velocity here is
expectedly different from here and here so that means, that depending on what the x y
location is or the point within this flow domain - rectangular flow domain, the velocity w
component to the velocity is expected to be different at different x and y. Therefore, we
say that w is function of x and y.

But since the flow is fully developed and we have a constant pressure gradient in the z-
direction, there is no velocity in the x-direction, there is no velocity in the y-direction, it
is still a single component of velocity which is nonzero that it is not a one-dimensional
flow, because the velocity is a function of both x and y. So, this is a two-dimensional
study flow with a single velocity component which is nonzero.

Now, if you want to find out this of course, we can make measurements that the idea is to
calculate it. And we will see that the variation of velocity w component velocity is given
by a partial differential equation, which can be written as dou square w by dou x square
plus dou square w by dou y square equal to a constant which is 1 by mu d p by d z,
which is a constant. So, the equation which tells us how w varies is given by this. A
solution of this equation for a specified constant is what we are looking at this is a partial
differential equation so that means that we need to have boundary conditions and initial
conditions. The flow is stead, so it is a boundary value problem and it is also an elliptic
problem, these statements may not need make much sense to you right now, but in a
couple of weeks times, once we have derived the equations with these will make
complete sense. And you will able to see that yes this is the equation which actually tells
us how w varies. Let us take it for granted that at this stage w is given by this equation
subject to the boundary condition that w is equal to 0 on all walls, so this is known as the
no slip boundary condition.
(Refer Slide Time: 07:12)

So, you have an equation 1 and a boundary condition given by 2. So, this can be
considered as a complete specification of the mathematical problem, and the
mathematical problem is that we have a second order partial differential equation dou
square w by dou x square plus dou square w by d y square equal to constant. The value
constant is specified and the boundary condition that w equal to 0 is also specified. So,
with this, we would like to get what is w of x and y. Now we can do this analytically. It is
not as simple as flow through a circular pipe, it can be done analytically, but what we
liked to do is that we solve this problem using the computational fluid dynamic
approach. So, what we mean by computational fluid dynamics approach is that we try to
get a numerical solution to this in a specific way, which we are going to use again and
again which we are going to develop in the rest of the course. And this computational
fluid dynamic approach is very specific, here we make approximations, we know that we
cannot get the exact solution, but the idea of the CFD is that you can get an approximate
solution of virtually whatever accuracy you want to get at least in the simple flow cases.

So, the idea is that we will make approximations, but it possible for us to control the
error which is contained in these approximations to some extent, and therefore, if we
make sure that the error small then we can get an approximate solution to this problem
which should be sufficient for many of our engineering purposes. So, with that kind of
restriction and assumption on what CFD can do will go ahead and try to solve this
problem in the CFD way.

(Refer Slide Time: 09:50)

What we do in CFDs that we have essentially three steps. So, step 1, it introduces the
first approximation. So, the approximation - the first approximation that we are making
is that we are not going to give a solution of this type, where w is a function of x and y;
we are only going to give value of w at certain specific locations, these locations are
essentially what we call as grid points. So, with in this domain, we give the value of w at
many, many points which are spread around this. So, instead of getting a continuous
solution of w, we get a discrete solution of w at pre specified points or grid nodes. So, if
you want to get the velocity at any other point which is not coinciding with one of the
grid points, you have to do interpolation. So, interpolation will bring in some
approximation. So, we are not looking at a continuous solution but at a discrete solution
and that introduce some error.

So, in the first step of CFD solution, we identify the nodes - the grid points at which we
will be getting the solution w; it is in our control. We will see later on that we can make
as many grid points as a possible given all your computed constants. So, we specify the
grid points and that is the first step of the CFD, which we can call as the discretization of
the computational domain or a flow domain. So, let us say this discretization of the flow
domain. So, in this particular case, this is a flow domain, we know the width a and the
height b are given as per the problem and obviously the constant is given for the
problem. And because we are going to do hand calculations, we would like to minimize
the number of points will divide this into say 5 by 5. We draw horizontal lines and
vertical lines like this in this simplest case, and then we put a grid point at the inter
section of this horizontal and vertical lines.

So, we can call this as grid lines and the intersection of x equal to constant, so that is this
line this line this line this line these are all x equal to constant, because all along this line
x which is a distance from the origin horizontal distance in the origin is the same. And
you have y equal to constant line, these things and the intersection of constant values of
coordinate line, lines of constant values of the coordinates x and y here will constitute
the grid points for us. So, these are all the grid points.

So, we are saying that we will be getting a solution at these grid points. And we can put
as many as we like in this if you put more will get more number of grid points. So, as we
increase the number of grid points, we can see that we are getting the solution almost
everywhere within the flow domain, so that is the idea here. If we can, if we know how
to get a solution at this point and is this point this point, then we can choose to have
many more grid points and then get a solution virtually everywhere, so that is the idea
behind this.

So, we identify the grid points by discretizing the flow domain. So, while discretizing it,
we would like to make sure that in the simplest cases, it is a pretty obvious, but we can
see that in more practical problems, it is not so easy to identify at which points we want
to put this grid nodes. That here we make the we put them uniformly, so that you have a
spacing of delta x between two x equal to constant lines and a spacing of delta y between
to y equal to constant lines.

So, if we know the total length a, and if we know how many divisions we have made
these two, we can find out delta x. Similarly, we can find out delta y and this is known as
uniform grid spacing of delta x and delta y. It is not necessary that delta x and delta y be
the same, we are taking this simplistic flow domain for which we will have a simple
discretization to get to the basic idea then we can make it much more complicated. So,
using this, we can identify the grid points at which we like to have the solution w here
and that is completes the first step.

And in the second step, we make one more approximation. So, in the first one, we are
make the approximation that will get solutions only at points which are spread
throughout the domain definitely, but not at any point of your choice, if you want the
velocity, if you want to solution at the point of your choice, you have to interpolate from
the neighboring values which I am going to give you. So, we are introducing some
approximation of discreteness of the solution not at any x and y. So, it is going to be
given at x i and j here; at this point, we can introduce the index notation. So, along with x
here, we introduce index i; and for the in the y-direction, we introduce index j; in the z-
direction, we can introduce k here, but right now we do not need k, because we are
looking at only x and y as the independent variables here. So, we can also put numbers,
we can put this as i equal to 1, 2, 3, 4, and 5, 6.

So, let us just draw this thing. So, we have i equal to 1, 2, 3, 4, 5, 6; and similarly j equal
to 1, 2, 3, 4, 5, 6, so this is j. And i equal to 3, and j equal to 4 corresponds to this point.
So, this is 3, 4; and similarly i equal to 5; and j equal 2 corresponds to this point and so
on like this. So, we can identify any point with the indexes i, j which are numbers which
will be useful for us when we do programming. So, we are converting the problem of w
as a function of x and y into w as the function x i and y j. And in step 2, we look at we
take this equation and then try to write approximate formulas for the derivatives here. So,
in step 2, we are making an approximation that we get this values at the grid nodes not
by solving the exact equation, but by solving an approximate form of equation, so that is
approximate the partial differential equation using in our present case, we are going to
use finite difference approximations for derivatives. So, at this stage, you may not know
what these finite difference approximations are where we are going to do that in a couple
weeks time.
(Refer Slide Time: 20:16)

But let us just assume that we can write an approximation for dou square w by dou x
square, we can write approximately at point i, j. So, the derivative of dou square w by
dou x square at point i comma j here can be approximately written as w i plus 1 j minus 2
w i comma j plus w i minus 1 j divided by delta x square. So, this is an approximation,
which you are going to derive shortly and many of you may already have may be aware
of this from your earlier math courses. So, this is an approximation, and this is also a
second order approximation in case you know about it. So, this allows us to substitute in
this equation this expression here. And similarly, the second order derivative in the y
direction can be approximated by a similar formula can be approximated as w i j plus 1
minus 2 w i j plus 2 w i j minus 1 by delta y square.

So, let us just take a minute to understand what these formulas are so that we can fix
these ideas here. If we come to the first approximation dou square w by dou x square at i
comma j, we are representing the derivative - second derivative in the x-direction at this
point, this is written as w i plus 1 j, so that is this is i i plus 1 will be here. Because it is to
the i if i is equal to 3 then i plus 1 is 4, so this is one point here, and w i j is this and then
w i minus 1 j is this. So, the approximation is expressed the derivative is expressed in
terms of finite differences between involving the point itself, and the point to the right
and point to the left. And similarly, this approximation here for the derivative in the y-
direction is expressed in terms of i j plus 1. So, this is i j point i j, i j plus 1 point is this
and this is 2 i j and this is i j minus 1, so that is point here. So, this approximation
involves these three and this approximation involves these three, this is known as a
central difference formula and this can be easily derived. So, given that these are
approximations approximate formulas which are for the second derivatives. We can now
substitute these approximations in our equation here.

(Refer Slide Time: 23:42)

And what will get is w i plus 1 j minus 2 w i j plus w i minus 1 j divide by delta x square
plus w i j plus 1 minus 2 w i j plus w i j minus 1 divide by delta y whole square.
Although, I am call it as delta y whole square it is not delta square y square delta y is a
value, which is the space in grid spacing 1 centimeter, 1 millimeter or whatever square of
this and this equal to C-constant. What is the difference between equation 1 and let us
put this as 3 here, and this is 4, and this is equation 5.

What is difference between equation 1 and equation 5 is that this is valid at any x, y,
whereas this is valid only at point i, j. So, we can use this approximation only at point i,
j; if you want to write at some other point, we have to change the values here. So, the
difference another difference between this equation 1 and equation 5 is that equation 5
has no derivative and w is a value, value of the velocity. So, it is it is just an algebraic
quantity, it is an unknown as of now all this values are unknowns, but this is an algebraic
equation where as this is a partial differential equation.

So, using finite difference approximations and other type approximations in step 2, we
convert the governing partial differential equation into an algebraic equation, but
whereas this is valid at every x and y this is valid only at specific value of i and j. So, we
write this for every point at which we want to have the velocity.

So, then we get a set of algebraic equations. So, in step 2, we convert we go from one
pde into a set of N algebraic expression, where N is the number of of grid points at which
w needs to be found. So, second step involves conversion of the partial differential
equation into a set of an algebraic equation. And third step is just solving A w equal to b
that is solve the set of algebraic equations and which is relatively we are familiar with
that particular (Refer Time: 27:41).

So, the CFD approach to summarize is that we have a step 1, where we identify the grid
points at which you want to have a velocity. And in step 2, we convert a partial
differential equation into a set of algebraic equations using finite difference
approximations; and these finite difference approximations enable us to substitute the
derivatives with different approximations, which involve the velocities at the grid points
as the variable values. So, we convert this in to a set of N algebraic equations and this set
in of N algebraic equations will be solved in step 3 as metrics equation simultaneous
equations and that will give us the overall solution.

So, these are the three steps there are variants for different cases; that in the next lesson,
we will put some numbers into this and we will derive those set of N algebraic equations
and then will go through the solution. So, in lesson 2, we have looked at how to convert
the partial differential equation into a set of algebraic equations.

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