0% found this document useful (0 votes)
52 views20 pages

Lec 7

This document discusses using the Engineering Equation Solver (EES) software to perform thermodynamics calculations on a computer. It explains how to download the demo version of EES and use it to solve sample problems. As an example, the document walks through using EES to determine the pressure of water at 200°C with a specific volume of 0.4 m3/kg. EES returns a pressure value of 530.4 kPa. The document then discusses setting the appropriate units in EES and plotting the sample point on a pressure-volume diagram for analysis.

Uploaded by

Yashwanth yashu
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)
52 views20 pages

Lec 7

This document discusses using the Engineering Equation Solver (EES) software to perform thermodynamics calculations on a computer. It explains how to download the demo version of EES and use it to solve sample problems. As an example, the document walks through using EES to determine the pressure of water at 200°C with a specific volume of 0.4 m3/kg. EES returns a pressure value of 530.4 kPa. The document then discusses setting the appropriate units in EES and plotting the sample point on a pressure-volume diagram for analysis.

Uploaded by

Yashwanth yashu
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/ 20

Concepts of Thermodynamics

Prof. Aditya Bandopadhyay


Department of Mechanical Engineering
Indian Institute of Technology, Kharagpur

Lecture – 07
Use of Computer as Means of Learning Thermodynamics

Hello everyone and welcome to this lecture, in which we will see how with the aid of a
computer, we can make calculations of Thermodynamics. So, for this purpose we will
make use of a software called as EES.

(Refer Slide Time: 00:39)

This is the abbreviation of Engineering Equation Solver. So, you go to


www.fchart.com/ees and then you have a page, where you can download a demo version
of it.
(Refer Slide Time: 00:53)

A demo version of it has various limitations, but for our purpose I mean for what we
intend to do, we intend to make use of various properties and do some calculations. The
idea behind EES is to not have black box, it does not solve everything for you. The thing
is you have to tell what it needs to do, you have to tell what properties it needs to fetch
and then it will look up the database, typically one would read the database from a book.

You have tables of data corresponding to this temperature, this pressure, this energy and
all this things. So, instead of doing that manually the computer does the look up for you
and then what you do on a calculator can be done on this software.
(Refer Slide Time: 01:49)

I mean this software has various other functionalities, I mean abilities, it can do single
variable optimization, it can solve ODEs, it can do non-linear equations and so on. It is a
very robust and flexible software.

(Refer Slide Time: 02:05)

But the demo version which we will use primarily for academic purpose is for learning
various concepts of thermodynamics. So, when we go to the demo we even click on the
demo its inside downloads it opens this page, where you have to do a quick registration
for EES on windows.
(Refer Slide Time: 02:17)

So, we put in the details and you use it for educational purpose, because if you want to
use for professional purposes, you need to buy the software.

(Refer Slide Time: 02:51)

And you click on I am not a robot and then the whole AI business starts. So, download a
working demo click here to download. So, let us click over there. So, then we save it on
our desktop I mean we can save it wherever, then we go to the folder and finally we
install the software that is as easy as this.
(Refer Slide Time: 03:59)

You can change the path of your installation, as you like it is a very flexible software
and then it opens up this screen. So, demonstration version is for evaluation purposes.

(Refer Slide Time: 04:19)

This demonstration version is limited to only 50 equations, but 50 equations as you will
see is a lot of equations. So, first thing is first let us create a new file. So, this is how the
software’s window screen looks like. They have also given us a small example of x2 +y3
= 77.
So, let me try to first increase the font, we go to options preferences, font size, let us
make it 18.

(Refer Slide Time: 04:57)

So, let us create file new and let us paste this. So, the thing is the copy, paste, cut, print
these options have been disabled in the demo version of this EES. Of course, the
complete version of EES does support all these operations, but as a penalty for the user
to use a free software. For the free version of the software they have disallowed us to do
all these things, but anyway let us see how an equation, a non-linear equation can be
solved.
(Refer Slide Time: 05:33)

So, let us say we have this equation

x 2  y 3  5,
x y  2

you have written down the equations in the equation window and then we have to go to
this icon which is solve, calculation is completed, 2 equations in 1 block. And it shows
you that the residual is this, the fact that its showing a residual implies its using some
kind of a non-linear solver, and thus the solution obtained is x = 2.33 or 2.233 and y =
0.2332.

These two are the solutions for this non-linear coupled equations. So, it does not matter
what order you input your variables as, but as long as it has the variable, as long as it has
the equation it will solve it. So, in the case of thermodynamics, it has various in-built
functions.
(Refer Slide Time: 07:05)

Let us try to do a very simple example. Let us try to determine the pressure. So, because
it is a demo version it will not let me save as well the comments can be written in curly
braces.

(Refer Slide Time: 07:17)

So, if you run the program, this thing becomes blue. If you buy the full version of course,
you can save the file. So, we open a comment and then we write the nature of the
problem. It is for us to understand, the more comments you write the better, also it is for
others to understand what you are trying to actually do.
(Refer Slide Time: 07:43)

So, the question is determine the pressure for water at 200 C , with v = 0.4 m3/kg. So, in
this particular problem we have to find the pressure of water for which the temperature is
given and the volume is given.

So if you have to do this by means of the manual tables, you would have to go to the
table and then first you would have a look at what the properties are at 200 C . After
that, one would check if v = 0.4 m3/kg lies between the specific volume of vapour and
liquid.

(Refer Slide Time: 09:07)


Essentially you would check if 0.4 lies between the two particular point representing
pure liquid and pure vapour state, or in other words does it lie somewhere between the
vapour and the liquid, if yes then the fluid is in a two phase region. If no, then we have to
check if the volume is larger than this or smaller than this, if it is larger than the saturated
vapour volume, then we know that the final solution corresponds to a super heated state,
if it is less than the volume of saturated liquid then it corresponds to a sub cooled region.

So, in order to do that, you have to first look up the saturation tables, determine whether
v = 0.4 is actually a saturated property or not. If it is in the super heated zone, you will
then have to make use of the super heated tables and determine the temperature or the
pressure. But here in EES you would simply write

P = pressure (steam, T = 200, v = 0.4)

So, it gives an answer of 530.4, but how do you make sense of anything from the value
obtained, what is the unit of 530.4. So, in order to do that one has to see what the units
are. So, you click over here, it gives you a window which shows the preferences. So, the
unit system is SI units currently. The older books and older systems of engineering,
sometimes they follow English systems pounds, foot and all these things, but we follow
SI units. Specific properties is on a mass basis. See specific volume is the total volume
V
divided by total mass (v = ). So, you can also have specific molar volume, this is the
m

V
total volume divided by total number of moles ( vmolar  ). However, if you select that
n
then it becomes on a molar basis, but now we are working on a mass basis because that is
what we have followed in the theory class. The temperature units is in C , this is a very
important step, ideal gas equations and all this work in Kelvin, but typically for
engineering, one works with C . The pressure units are kept as kPa, again very
important because typically what the pressures are used you will have to report them as
either kPa or MPa. Rarely will you use Pa or bar as a unit. Sometimes we can use bar
also, but usually its kPa or MPa.

For example, the atmospheric pressure is 0.1 MPa or 100 kPa approximately. So, the
energies are also reported in kJ and the trigonometric functions are used in degrees (  ).
So,  C and kPa are the more important things to be noted as of this moment.
(Refer Slide Time: 12:59)

So, this output pressure that we obtain over here is in kPa. So, the answer is: 530 kPa,
but wait, now you want to actually observe where this point lies in the P-V diagram or
the T-v diagram. So, instead of writing T = 200, it was in C that is why we write 200
and we did not convert the temperature into K, because we are naturally using the units
as C . Even in the tables of the book you will use C as the unit.

(Refer Slide Time: 13:35)

So, let us write this as T 1 and let us write this as v1, where we have declared everything
as an array now. P1 is the first element of the P array, T1 is the first element of the T
array, v1 is the first element of the v array. Actually to avoid any confusion, let us write
the names of the arrays as temp, vol and pres i.e-

Pres[1]=pressure(steam, T=Temp[1], v=vol[1]);

See, because pressure is the name of an inbuilt function. Inside the function, steam is the
name of the first keyword. This keyword is what tells that look up the tables of steam,
temp is the keyword which tells the function pressure that look up the steam table whose
temperature I am giving you, see later on we will see that we can use enthalpy, entropy,
internal energy and all these things. So, that is why you need to tell the computer that
which property do you want to use to calculate the pressure.

In this case we will use temperature and volume hence v = vol[1]. So, let’s define

Temp[1] = 200 and vol[1] as 0.4. After running this we obtain an arrays table where we
have the first entry of pressure as 530.4, the first entry of temperature as 200 and the first
entry of volume as 0.4. We can now plot this. We go to plot. Next, we go to new plot
window and we go to xy plot.

In xy plot suppose we want to plot. So, before this we actually need to draw a property
plot, because we want to superimpose this particular point on a property plot. So, we go
to plots. We go to property plots, then we have to select what kind of fluid we want. So,
we will go to water or steam , you are working with steam. So, then we want to select the
type of property plot that we want. So, let us do it in a T-v plot, then additional things
that you have to include or exclude you can choose.

Image(Refer Time: 15:39)

So, these are isentropic lines, and other ones are isobars. In our particular case, let us
draw 1 particular isobar or let us draw 2 particular isobars, 1 at 500 kPa and 1 at 400 kPa,
because we already know that the solution is 530.4. So, let us draw the 2 isobars, it will
help us to understand, where the point lies in a better manner, while we deselect show
lines of constant quality as well.
(Refer Slide Time: 16:57)

So, once we press on ok, it will create the particular figure shown above. So, on the T-v
plot, the isobar corresponding to 400 kPa and the isobar corresponding to 500 kPa are
visible. So, here volume is in a log scale. If you do not do this the plot will look very
odd. We can change the x axis limits from 10-3 to 10, because we do not really bother
about this region. So, let us double click on this, we go to x axis and the maximum we
call it as 1. So, now, it has rescaled the plot for us.

Similarly, on the y axis let us draw it till 400. So, the minimum is 0 and the maximum is
400, let us say that the minimum is also 100. So, this is how the plot looks like. So, this
point is 500 kPa, this is 400 kPa. Now, let us overlay the array points that we had just
obtained. See we have declared everything inside the array. So now, we can choose these
points and plot it on top of this property plot. So that we can know exactly where that
point lies. So, we go to plot. Next, overlay plot and on the x axis, we need the volume.
So, we select vol[i]. On the y axis we have temperature, so we select temp[i] and we
denote the point as a symbol, as a filled square of colour blue, there you go.
So, this corresponds to 540 kPa, it is above the 500 line. So, ideally we should have
plotted another line. So, anyway we can do that. We can do another plot in which we
add, let us add the 540 kPa line as well and let us add 600 kPa line also. We get a new
plot but that old plot window is still over here, we can get rid of it. On this new plot we
quickly readjust the axis. So, the middle line is 540 and then on this plot we can do a plot
overlay plot on the x axis, we have the volume on the y axis and we have the
temperature, we plot the point as a blue square and it lies on the isobar.

So, clearly this point that we sort is corresponding to 200 C and corresponding to a
specific volume of 0.4 m3/kg. We can check ,there is 0.1, 0.2, 0.3, 0.4. It is a log scale
and finally the point lies above 0.4. So, this is how we have obtained the coordinate and
where that point actually lies. The black solid line is the two phase region, anything
inside that is the two phased state and clearly our point lies in the super heated region.

So, the corresponding point is in the super heated region. Now, suppose someone asks
me to find what is the specific volume of vapour corresponding to this particular
temperature.
(Refer Slide Time: 21:33)

So, I want to know what is the specific volume. We have already discussed that if the
pressure is known, then if I want to know the point, I cannot use temperature as the other
property, because temperature and pressure inside the dome are not independent.

(Refer Slide Time: 21:55)

I can only use the volume but I need to know exactly what the volume is but that is what
I am seeking at that particular pressure. Let us comment the above statement first,
because I want to pull up the plot, this was the plot which we had obtained.
So, now that I have found the isobar corresponding to 200 C and 0.4 specific volume, I
want to know what this particular state is. This particular state corresponds to whatever
pressure we have just found. Because this line is an isobar and I want to know what is
this particular volume. And thus I cannot use temperature as a parameter. I know what
the pressure, I do not know what the temperature is and I do not know what the volume
is.

So, how do we do that. We make use of the fact that if it is a vapour then the quality has
to be 1. Let us first find out the saturation temperature. So, I want to know the
temperature of steam corresponding to Pressure equal to pres[1], and x equal to 1. So we
write

Temp[2]=temperature(Steam, P=pres[1], x=1)

Let us run this. So, temperature corresponding to this saturation point is 154 C . So, this
particular point is at 154 C . Now in order to plot this point, I also need to plot the
volume, let us find the volume. So, we need to find the volume of steam. So, volume
here refers to specific volume. So, in thermodynamics we do not do absolute volume
calculations, we do specific volume calculation.

So, it is understood that the function that we have called here corresponds to specific
volume and not total volume. So, to get specific volume of steam at this point we write

vol[2]=volume(Steam, P=pres[1], x=1)

So, naturally we expect that volume to be less than 0.4, because the earlier volume was
0.4 and from the plot we see that this particular volume has to be less than 0.4. Let us see
if it is less than 0.4. In fact, it is 0.3546 and obviously

pres[2]=pres[1]

This is what we have prescribed. We want to know the conditions at the same pressure,
but at saturation.

So, that is all we need to write. So, these are the points. Let us try to plot point 2 so, we
go to plot. Then overlay plot. Now we select on the x axis, we have volume and on the y
axis we have temperature. So, it will plot all the points that it sees over here. It has joined
by a red line, but I mean it does not matter, actually it is not a process. But when you join
two points usually it corresponds to a process. So, thus this point is on the isobar. So,
actually we did not plot the exact isobar. We plotted the 540 kPa isobar, but in reality the
pressure is 530.4. So, it is slightly below this. Obviously, if it is at a lower pressure it will
correspond to a slightly lower point, no problem.

So, this is how we have found this point. Now, suppose someone tells you –okay, all this
is good, but I want to now find out what is the specific volume of liquid at this point. For
this fine we say

vol[3]=volume(steam, P=pres[1], x=0)


Pres[3]=Pres[1]

This is because we are specifying that the pressure has to be constant. Temperature
obviously will be equal, but just for the completeness lets check-

temp[3]=temperature(steam, P=pres[1], x=0)

So, when we solve this, it now leads to a much smaller specific volume, because we
know that water when it is in liquid form, density is 103 approximately, depending on
1
temperature and all these things. So, the specific volume will be . So, it is order of

magnitude 10-3. So, the specific volume is around 10-3.

So, logically its okay. Everything is fine. Then once again we can plot this on the plot.
Now if I attempt to find out the volume at saturation using the pressure and temperature,
it will throw me an error. Suppose I want to find out what the volume of this point is. I
cannot, because at this particular point. on all these points, the temperature and pressure
are constant, because all these points correspond to a zone in which there is latent heat of
absorption.

So, any increase in temperature will not occur in this zone, at a fixed pressure the
temperature will also be fixed during the change of phase. So, I cannot simply obtain a
volume using only P and T. So, let us say

vol[4]=volume(steam, P=pres[1], T=temp[3])


See obviously, pres[1] which is this isobar and temp[3], it is corresponding to this
particular temperature of the line. Because temp[3] was the temperature of steam at x =0.
This obviously means that temp[3] is the saturation temperature. Obviously, both the
quantities that I am supplying to this function are the saturation quantities and this will
throw me an error.

It says: P is the saturation pressure corresponding to the given temperature. Properties


cannot be determined from this information.

So, it throws an error which says that inside this saturation dome, you cannot give me
pressure and temperature as two independent quantities to find out the property.
Obviously, I can then have some other quantity. I can choose either temperature and
pressure and then the quality. Let us write x =0.5 i.e

vol[4]=volume(steam, P=pres[1], x=0.5)

So, it is half liquid and half vapour. Half of the mass is liquid and half of the mass is
vapour. Let us see what the specific volume is. There you go its 0.1778. It is somewhere
in between. This point corresponds to 50 % mass of liquid converted to 50 % mass of
vapour. So, inside the dome what we have seen theoretically is that you have to give two
independent properties, one of which can be temperature or pressure, the other has to be
quality. This is how we do the calculations. Alternately we can also find out the quality.
Now obviously I have to give the function some specific volume which lies between the
two bounds. Let us say it is 10-2, we clearly see that 10-2 specific volume is inside the
dome.

qual[5]=quality(steam, P=pres[1], v=0.01)

So, it will give us some quality which is between 0 and 1 and it is obviously less than
0.5, because 0.5 lies somewhere after that. So, the quality at 5 is 0.02519. Thus even with
the help of volume, we were able to find out the quality. So, volume is also the property.
The specific volume is also the property which we can use inside the saturated dome.
Inside the super-heated dome i.e outside the saturated dome you can use temperature and
pressure, no problem. You can use temperature, pressure, volume, any of this, outside the
saturated dome there is no use of quality because quality does not exist. Everything is a
vapour or liquid completely.
So, obviously if you try to call quality for a point which is outside it will give you some
kind of indication. Let us say

qual[6]=quality(steam, P=pres[1], T=temp[1])

Because, pres[1] and temp[1] corresponds to the first point and thus it is outside the
saturated dome, it is in the super-heated region. And hence, I can give P and T
separately. Let us see what it gives.

It gives us qual[6] = 100. So, 100 indicates to the user that whatever you just gave does
not lie between 0 and 1. It is super-heated. 100 does not mean the quality is 100, it is just
a number which the software has encoded to indicate to you it is an absurd quantity
which is more than one and hence you have to interpret that as super-heated. Similarly if
you give something in the sub-cooled region i.e

qual[7]=quality(steam, P=pres[1], v=1e-3)

So, let us see what is the quality we obtain. It is minus 100 indicating to the user that
whatever point you have just given me is in the subcooled liquid. It is not in the saturated
dome.

So, this is how you have to make use of the software, ideally you would look up the
tables in the olden days, or if you go even further you would look in the Mollier charts.
In the Mollier charts you have all this information. But, now you can look up all these
properties and do some simple calculations by means of a computer. In this case we are
using a software EES. There are other softwares which make use of other
thermodynamic tables. No problem, all these data bases have been made by very
renowned organizations like ASHRAE, NASA and all these things. And, it was meant to
be used with a computer for very fast calculations, for very accurate calculations.
Usually hand calculations may not be so accurate.

So, anyway throughout this course we will make use of this kind of computer aided
means to solve various kinds of problems. So, I suggest you download a demo version of
EES and try to do simple calculations, try to compare the calculations against that of a
book, find out the volumes and all. And hopefully you will appreciate how simple life
becomes. But, one should not forget that whatever we are doing is motivated by our own
understanding of thermodynamics, it is not that the computer is doing something for us.
We are telling the computer that give me this value, give me that value and the computer
is merely a slave for us, it is just a tool which we are using. With this note, I will see you
next time.

Thanks.

You might also like