Monte Carlo Method for Thermal Radiation-II

IIT Roorkee July 201
61 followers
1 Video View·Dec 4, 2023
Monte Carlo Method for Thermal Radiation-II
Prof. Ankit Bansal
Department of Mechanical & Industrial Engineering
IIT Roorkee
Hello friends, in the last lecture we discussed the Monte Carlo method. We discussed the random
number relations for point of emission, point of direction and wavelength for radiative
exchange between surfaces. In today lecture we will see how the Monte Carlo method may
be applied to solve radiative heat transfer problem in participating media. That means,
now the plates or the surfaces are bounded by an absorbing, emitting and also scattering
gas.
So, we will discuss as before, the point of emission, direction of emission, absorption
and scattering. And mainly what complicates this is wavelength of emission. And we will
see how the gas radiation in participating media is much more complicated from wavelength
selection point of view as compared to the flat surfaces. We emphasize this point in
the previous lecture that, if the plate is not isothermal, then the relationship between
random cumulative probability distribution and the location x and y may be difficult
to invert. However, for isothermal isotropic surfaces the relationship can easily be inverted.
And we were able to calculate x as simply a random number times the dimension in x direction
and y as random number times the total length in the y direction. Now, same thing is true
for point of emission in a volume zone or a 3-dimensional medium. So, now let us say
we have a volume of gas with dimensions x, y and z. Now, in CFD problems we assume that
the temperature inside the volume or this finite volume is uniform.
The concentration of gas is uniform. So, when we do that, the temperature and concentration
when we assume uniform in this cell, the absorption coefficient or the properties of the gas will
be uniform in this gas. So, under that assumption, we can find out point of emission as simply
x is = x times R x, y is = y times R y, z is = z times R z. If you do not assume that,
then it will be a complicated function of R x and we will have to invert it.
But under the assumption that the volume is isothermal and absorption coefficient is uniform,
x will be simply = capital X R x, y will be simply = capital Y R y and z will be = capital
Z R z. Where R x, R y, R z are 3 random numbers. So, we have to pick 3 random numbers uniformly
distributed. Capital X, Y, capital Z are the length of this finite volume in the 3-dimentionals.
And the relationship is linear and we can easily calculate this.
Now, under the assumption of thermodynamic equilibrium, where emission is isotropic,
all the directions are equally likely. That means we have picked the point of emission
in the space. All directions are equally likely in which the photon will be emitted. And we
can calculate this as per the following relations which we have already demonstrated. But now,
the psi, the solid angle, the azimuthal angle will be 2 pi R psi. We have to pick a random
number R psi.
And it will be = 2 pi R psi. The polar angle is obtained from the same similar relation.
The only thing is from the flat surface the polar angle basically 0 to pi by 2. While
in the medium, the polar angle varies from – pi by 2 to pi by 2. Because, within the
gas, photon may be emitted either in the upward direction or in the downward direction. So,
earlier, the relation we obtained for surface laws are theta is = sin square theta.
But in this case, we obtain R theta is = half 1 – cos theta. Which is nothing but; 1 – cos
theta you can solve it. Basically, what you get is sin square theta by 2. Okay. So, the
dependence is relatively changed from flat surface to gas. But, all you have to pick
is 2 random numbers, R psi and R theta. And the direction theta and psi can be obtained
for point of emission and direction of emission within the gas volume.
Now, absorption within the gas zone. So, we define, this is our gas zone or volume. Let
us say we have some intensity ray or ray coming from this with intensity I nought. And this
is the intensity of the outgoing ray. Now, we know that this will be subjected to attenuation
by absorption as well as scattering. So, we define absorptivity of this layer as 1 – exponential
– 0 to l K. Thickness of the layer is l K.
We have used subscript l K, because different volumes will have different absorption coefficient.
Here we are talking about single volume. So, this subscript is used for l K. And kappa
lambda ds. So, this absorptivity may also depend on wavelength. So, this is the amount
of radiation that is absorbed by this gas layer of thickness l K and absorption coefficient
kappa lambda. Now, what is transmitted?
The transmitted radiation is nothing but exponential – 0 to l K and kappa lambda ds. Okay. So,
this is the amount of radiation transmitted. So, amount of radiation transmitted basically
is the fraction of energy that penetrates through this layer of thickness l K and actually
reaches the other end. So, this transmissivity of the gas layer is related to the random
number cumulative distribution function we defined.
R K is = exponential – 0 to l K kappa lambda ds. Where 0 to l K we have taken, because
we are taking a general case where absorption coefficient may actually vary over the path
length. So, absorption coefficient may vary over the path length, so we are taking integral.
If the absorption coefficient does not vary, this will be simply = exponential – kappa
lambda S. So, this will be = l K. So, if the kappa lambda is not varying over the path
length, this will be simply = exponential – kappa lambda l k.
And we have related this transmissivity of the gas layer with the cumulative distribution
function. And we define it as a random number. So, if this random number is > this transmissivity
value, that means the energy is transmitted. Otherwise, the photon will be absorbed. So,
R k is basically the fraction of energy bundles transmitted from gas layer. So, we have related
this transmissivity to the function.
Now, we have to invert this relation. Okay. So, if absorption coefficient is uniform,
we can easily invert this relation. And we get l K is = 1 upon kappa lambda ln 1 upon
R k. So, what is this l K represents? So, l K represents basically the path of gas layer
a photon is able to penetrate for given value of R K or R kappa. So, if the random number
R kappa is chosen, then the, what is the maximum length a photon can penetrate? That is basically
given by this relation. So, l K is the maximum thickness of the gas layer the photon can
penetrate before it is absorbed for this given value of R kappa.
If kappa lambda is not constant, then we have to split this integral kappa lambda ds into
summation. So, we can have a gas layer. We can divide this gas layer into multiple layers.
The total path length is i K or l K, sorry. So, the total path length is l K. And each
of these layers k is = 1, k is = 2, k is = 3 and so on. We have to take a summation. Over
each layer, the absorption coefficient is same.
So, we represent 0 to s kappa lambda ds as nothing but summation over the k kappa lambda
k. Kappa lambda k is basically uniform absorption coefficient of layer k. So, within the layer,
the absorption coefficient is uniform. And we have to write this integral as a summation.
Now, the bundle is not absorbed. As I said, if 0 to s kappa lambda ds is = 1 ln 1 upon
R K. That means; if you look at this relation, kappa lambda l K, then the photon is not absorbed
if this relation is satisfied.
That means, 0 to s kappa lambda ds is = ln 1 upon R K. That means, if the path length
is < the maximum path a photon can travel, then the photon will not be absorbed, photon
will be able to transmit. So, the maximum length photon can travel is l K. And if the
distance travelled by the photon s is < this value l K, then the photon will not be absorbed,
it will be transmitted. And this relation will be used to find out whether the photon
is absorbed within a cell or not.
Same thing, we can extend to scattering. So, a photon is attenuated by scattering, out-scattering,
if 0 to s sigma s lambda, where sigma s lambda is the extinction, or sorry, the scattering
coefficient. Sigma s lambda ds is < ln 1 upon R sigma, where R sigma is another random number
chosen to determine whether the photon is scattered out and attenuated within the gas
layer or not.
Now, after the scattering, the photon may go into any direction given by the scattering
phase function. So, probability that a scattered bundle travelling in a cone of solid angle
in a direction s is scattered in a direction d omega prime, this probability distribution
will be given by the scattering phase function. So, scattering phase function is in a sense
itself a probability function.
So, the probability of scattering from a given direction s into a given direction s cap prime
is given by the phase function itself. If it is isotropic, that means, we have a gas
layer, a photon travels into this gas layer. The distance travelled by this layer is > l
K. So, it will be scattered. Now, if it is isotropic scattering, then the photon may
be scattered in any direction. And isotropic scattering is nothing but same as fresh emission.
So, if the photon is scattered isotropically, what we can do is, we can absorb that radiation
photon in that at that particular point. And we can make a fresh emission. So, it will
be taken as fresh emission. And all the rules of emission will be basically take place for
this photon. So, we close the history of this photon in Monte Carlo, and a new photon is
emitted in a similar fashion as fresh emission.
The last part is the wavelength selection and which is the most complicated part of
the Monte Carlo method. And it requires significant resources also. For flat surfaces also it
was difficult, but because the emittance of flat surfaces does not vary abruptly, it is
relatively easy to find out wavelength selection by using the tables of f lambda T for the
flat surfaces. We discussed this in the previous lecture, how from the tables of f function;
that is, fraction of black body emissive power, the wavelength selection can be done.
However, the picture is not simple for the gas radiation. The definition of probability
function, cumulative probability function is same. We defined R lambda as amount of
energy, fractional amount of energy emitted over a wavelength range 0 to lambda divided
by total amount of energy emitted. Where total amount of energy depends on sigma T power
4, where T is the temperature of the medium or the gas and kappa is the Planck mean absorption
coefficient.
So, kappa p is the Planck mean which we will introduce in a later lecture; is Plank mean
absorption coefficient. Now, what makes this relation very difficult to invert as opposed
to wavelength selection from a surface is the variation of kappa lambda. On this picture,
what you see is the variation of kappa lambda. Of course, here the picture is taken from
the book, the textbook which has units of wavelength or the color is represented by
wavenumber rather than wavelength.
But the context remains the same. That means, the absorption coefficient varies significantly
over small wavelength or wavenumber range. And the variation is very erratic. You see
that the absorption coefficient of the gas goes up and down very rapidly. And this rapid
variation makes this integral 0 to lambda kappa lambda I b lambda d lambda very difficult
to invert. You cannot easily invert this relation.
And for that, we have to apply special techniques. Now, how do we identify this special techniques
depends on how do we understand gas radiation. We will discuss gas radiation in detail, in
a different lecture. But, to summarize, gas radiation basically comes from molecules in
the gas, such as carbon dioxide, water vapor and other gases. These gases have many degrees
of freedom like vibration, rotation.
And these degrees of freedom of the gas leads to what we called vibrational rotation bands.
And these bands have very erratic nature. The absorption coefficient varies very rapidly
over wavenumber or wavelength. There may be thousands of such lines. That means, these
peaks may be thousands or millions in number. Such peaks may be 1000 millions of number.
And if you want to follow a uniform distribution, that means all wavelengths equally likely,
then you should have a knowledge of this spectrum at a very fine resolution.
You have to represent this spectrum using many many million points, if you want to invert
this function. So, kappa lambda should be known. As is seen in this picture, you have
to represent each single line with very fine resolution. And the dots that you see on this
picture basically represents those fine resolution. So, this spectrum needs to be represented
with points, because ultimately, we cannot sample continuously, because we do not have
a function for this, analytical function for this.
So, we have to use a discrete function, discrete sampling only. So, we have to represent this
function, this wavelength or absorption coefficient function with discrete wavelength or discrete
points. And the resolution has to be very fine, And that makes the method very expensive.
Now, how we do it? So, I was just quickly summarize you. Because the topic in itself
is a very complicated. How do we sample wavelength for gas? Now, the gas may be single gas, let
us say H 2 O.
Or it may be a mixture of gases, that is H 2 O, C O 2, maybe carbon monoxide and so on.
So, first thing that we need to do is, find out which gas is going to emit radiation.
So, that is the first thing that we need to do. Find out which gas is going to emit. Okay.
So, let us say gas number s is going to emit. So, what we do is, we pick a random number,
find out the total amount of energy emitted by each gas.
Let us say this is total energy emitted by each gas. This is independent of wavelength.
We can find this function easily using any property database. We can find out at a given
temperature and concentration, how much each gas radiate in total. So, epsilon i represents
total amount of energy emitted by gas i in all the wavelength range. This can be calculated.
Now, let us say we have total number of gases from i is = 1, i is = 2 and so on.
Total number of gases is n s. So, we take a fraction. So, what is the fraction of energy
for i is = 1 to j – 1? And divide by total amount of energy absorbed by emitted by all
the gases. So, the left-hand side represents the fraction of energy emitted by let us say
2 gases out of 3. And the right-hand side represent the total amount of energy emitted
by all the gases. So, based on this, we compare the random number R lambda.
And this gives you s is = j. If this random number happens to be the, in between these
2 values, then we select that gas number j is going to emit a photon. Once we have decided
which gas is going to emit, we have to find out the wavelength of the photon. So, the
random number needs to be rescaled. So, we have picked a random number R lambda which
represents the fraction of energy emitted by a total amount of energy emitted by a particular
gas.
So, R lambda represent the total amount of energy emitted by a particular gas. Now, we
want to see how much of that fraction will be basically emitted in a given wavelength
range, 0 to lambda. So, we have to rescale the random number R s R lambda. And we rescale
it. We represent R s lambda is = R lambda summation i is = 1 to n s epsilon i – i
is = 1 j – 1 epsilon i upon epsilon j.
Where epsilon j is total energy emitted of selected gas. So, if gas number j is selected,
then epsilon j is the total amount of energy selected gas. Okay. R s lambda is fraction
of epsilon j in 0 to lambda range. So, now we are taking fraction with respect to that
particular gas. Okay. R lambda is total energy fraction of a gas. So, first we compared the
energy of different gases with total amount of energy emitted.
And now, we rescale the random number R lambda, to find out how much energy for a given gas
is emitted in the wavelength range 0 to lambda. As I said, this is not going to be easy, because
of the complicated spectrum that we have. The variation of absorption coefficient with
wavenumber or wavelength, it is called spectrum. And because of this complicated variation
in the spectrum, we cannot invert this relation easily. So, what we do we do?
The answer to this problem lies in the random number database. So, what is random number
database? Random number database is pre-calculated table. So, on the 1 side we have lambda. Lambda,
let us say starting from 1000 micron or whatever units, 1001, 1002, and so on. So, on this
table we have wavelength. And on the right-hand side, we have the fraction of energy of a
particular gas in a wavelength range.
That is a cumulative distribution. 0 to lambda epsilon s lambda d lambda divided by epsilon
i or epsilon s. So, this will vary from 0 to 1. Because this is a cumulative distribution.
So, what we have done is, we have pre-calculated this distribution and we have saved it in
a table. And from this table, we will do our sampling. Now, how do we sample? We pick a
random number R s lambda. Let us say R s lambda comes out to be 0.6 or whatever.
We look at the value of R s lambda from this table and corresponding wavelength we will
see. And based on this table values, we will select the wavelength. So, all basically it
means is that, we cannot invert this function. But, what we have done is, we have calculated
this function for a large number of wavelength and stored in a table. And all we are doing
is, we are inverting the function by just looking at the table. And this table is basically
called random number database.
We have to move the photon. Now, energy bundle initially was emitted at a location r e. Finally,
it is moving in direction s cap. So, we can find out, let us say the photon is moving
in this direction. This is the point of emission. And the photon is moving towards the surface.
So, the total distance before it hits the surface is let us say D. And this vector is
r. Okay. This vector is r e. This is, let us say origin.
So, point of emission was r e. In vector form, point of intersection with the surface is
r. And the distance travelled by the photon in this direction s cap is D. So, we can write
down using this vector notation, r is = r e + D times s cap. And by some vector algebra,
we can solve for the distance travelled D in terms of the direction vector s cap dotted
with the 3 coordinates i, j and k. Where v 1, v 2; so here, v 1 and v 2 basically are
parameters that define the surface.
We will understand this parameters with the help of an example. But ultimately, this is
a purely vector algebra. So, v 1, v 2 represents the surface of this geometry. And they are
parameters that defines this geometry.
So, now we will solve. So, we have this problem. Where the surface is represented by z is = a
r square – r nought square. So, this is the surface. And a is = 1 upon 2 r nought.
So, we have this nozzle or diffuser kind of geometry. The base radius of this geometry
is r nought. And at any location, the radius is r. And the distance, vertical distance
between these 2 points; that is, where the radius is r and where the radius is r nought
is given by this relation, z is = a times r square – r nought square.
So, we have a, a photon is emitted. Now, photon is emitted with direction 0.8 i + 0.6 k. That
means, in the plane, x-z plane. So, photon is emitted in x-z plane. Okay. And the direction
of this plane is given as 0.8 i cap + 0.6 k cap. And this photon hits this geometry
at this location. Okay. Now, we have to find out whether the photon will be absorbed or
scattered before it hits this surface.
Now, there may be many many photons emitted, but we will take 2 special photons, a special
photon with random numbers R kappa is = 0.2. That is, random number for the absorption
is 0.2. And the number for the scattering is 0.082. So, we have to find out whether
the photon will be absorbed or scattered before it hits the surface. The properties of the
gas are given. So, this is the gas property for the problem. So, let us solve this problem.
So, photon is emitted in x-z plane. Okay. So, photon is emitted in the x-z plane. So,
we need to find out whether the photon hits the surface or not. So, we will first represent
the geometry of the problem. So, this is the geometry of the diffuser at any location.
The radius is r. And at the bottom, the radius is r nought. They are separated by distance
z. And z is given as a r square – r nought square. Okay.
So, this is the equation that is given. And any cross-section of this diffuser, will be
basically a circle, as is shown here. So, this is a, the cross-section is a, the circle.
And then, this diffuser has z variation given by z is = a r square – r nought square.
But the cross-section of this is a circle. So, we represent this circle, we can easily
represent using r and phi coordinate. So, looking at this geometry, we will use this
relation.
So, this relation for D, we will use to find out the point where the photon will be intersecting.
So, we have, a photon is emitted in this direction. This direction is given as s cap is = 0.8
i cap + 0.6 k cap. So, whether we see what is the coordinate of this point, we have to
find out. Let us call this point as P. So, we use this relation D is = r; r is the radius
of point P; cos phi, phi is the angle. Now, because the plane, the photon is emitted
in is x-z plane, so phi will be = 0. Okay. If you look at the projected area of this;
this is the origin. It is at; the photon is emitted in this direction. So, the phi is
0. So, again r cos phi upon the direction s dot i cap is = r sin phi, that is y coordinate;
upon s dot j cap is = the z coordinate which is now a r square – r nought square and
s dot k cap. Okay.
Now, the photon is emitted in x-z plane. So, this, we are not interested in. So, we get
D is = r, phi is = 0. s dot i cap is nothing but 0.8. And this will be = a times r square
– r nought square. And s dot k cap is 0.6. Okay. So, from this, we can calculate the
distance D. As well as we can calculate the radius r. So, we solve this first for r. Now,
we get r square – r nought square, – 0.6 upon 0.8 r is = 0.
So, this is a quadratic equation which we need to solve. And we get after solving this
equation, r is = 2 times r nought. So, solving this equation, we get r is equal to 2 times
r nought. Now, we can solve D is = r upon 0.8. And we get the distance travelled by
the photon before it hits the surface as r upon 0.8. So, 2 times r nought by; so, we
get 2 times r nought by 0.8 or this will be = 20 by 8 r nought. Okay.
So, we have calculated the distance travelled by the photon before it hits the surface.
Now, we are interested finding whether the photon will be absorbed or not before it hits
the surface. So, we will find out l kappa. l kappa is = the value of r nought. So, we
will use this relation. Let me just show you the relation. So, we have to use this relation,
ln 1 upon R kappa to find out whether the photon is absorbed or not.
So, l K, l kappa is = 1 upon kappa, ln 1 upon R kappa. This relation we have to use to find
out whether the photon is absorbed before it hits the wall or not. So, this will be
= l kappa is = r nought, because 1 upon kappa is r nought; ln 1 upon 0.2. So, l kappa is
= r nought ln 1 upon 0.2. And this will be = 1.61 r nought. So, l kappa is = 1.61 r nought.
And we get similarly, l sigma.
That means, the distance, maximum distance the photon can travel before scattering is
= r nought by 2 ln 1 upon 0.082, that is the random number. And this distance comes out
to be 1.25 r nought. Okay. So, the distance needed by a photon before it undergoes absorption
is 1.61 r 1 r nought. And the distance photon travels before it undergoes scattering is
1.25 r nought. While the total distance travelled by the photon before it hits the surface is
20 by 8 r nought, which is much larger than these values. So, what we find this from this
is that definitely the photon will undergo absorption and scattering because the distance
travelled by the photon before it hits the surface is large.
So, since D is > l kappa > l sigma, photon will undergo absorption and scattering. So,
photon will undergo absorption and scattering. Now, how it will go under absorption and scattering?
So, we see that the value of l kappa is = 1.61 r nought. And l sigma is = 1.25 r nought.
As we have already calculated, 1.61 r nought, 1.25 r nought. So, the photon will undergo
absorption first and then it will go under scattering.
So, the maximum distance a photon can travel before absorption is 1.651 r nought, which
is larger. And the maximum distance photon can travel before scattering is 1.25 r nought.
So, photon will undergo; so, photon will undergo scattering first. Okay. So, the photon will
be undergoing the scattering. After the scattering, the photon may go under undergo absorption
or again scattering.
So, photon will undergo scattering. Let us say it undergoes scattering. So, 1.25 r nought.
And the distance left is l kappa – l sigma, which is basically = 0 point; so, we have
a; now this distance is left. Now, within this distance, the photon may again undergo
scattering and absorption. So, in this example what we see is, basically we have calculated
the total distance the photon can travel before it undergoes absorption and scattering.
Using 2 random numbers, we calculated the distance, maximum distance photon can travel
before it undergoes absorption or scattering. And we find that, because the distance is
less, so photon will undergo absorption and photon will undergo scattering before hitting
the surface. And it may undergo multiple scattering as well. So, this is the end of the Monte
Carlo method. In the next lecture we will study the properties of gases, molecular and
atomic gases. And we will see how the properties of gases strongly depend on wavelength. Thank
you.
