EES example
Ch
7
7

42 and 7

43 “
Thermodynamics, an
Engineering Approach” 7
th
edition,
Cengal
and Boles
and
EES
http://fchart.com
•
7

42 A heavily insulated piston

cylinder
device contains 0.02 m^3 of steam at 300kPa
and 200C. Steam is now compressed in a
reversible manner to a pressure of 1.2
MPa
.
Determine the work done on the steam
during this process.
H
2
O
300 kPa
200
C
Assumptions
•
1
The kinetic and potential energy changes are
negligible.
•
2
The cylinder is well

insulated and thus heat
transfer is negligible.
•
3
The thermal energy stored in the cylinder
itself is negligible.
•
4
The process is stated to be reversible.
Start a new EES file
•
File

> New
–
Give the file name
Cengal
Prob
7_42
•
Set Preferences
•
Options

> Preferences

>
–
Autosave
every 5 minutes
–
set units automatically when possible
Analysis
•
If the process is both reversible and Adiabatic,
then the entropy is constant. S1=S2
•
Enter
Knowns
into
EES
•
"
Knowns
:"
P_1 = 300 [
kPa
]
T_1 = 200 [C]
V_sys
= 0.02 [m^3]
P_2
= 1200 [
kPa
]
S_2=S_1
Analysis
•
We take the contents of the cylinder as the
system. This is a closed system since no mass
enters or leaves. The energy balance for this
adiabatic closed system can be expressed as
•
•
Type into EES
W_b_in
=
m_sys
*(u_2

u_1)
•
To determine the work, we need:
•
m, u1, u2
•
Mass = volume*density
•
m_sys
=
V_sys
*
rho_1
Thermodynamic
Properites
•
Within EES we can use the command
•
Options

> function info
–
Fill in the table
–
Select paste
–
u[1]=
IntEnergy
(
Steam_IAPWS,T
=T[1],P=P[1]
)
•
Since we are using the same fluid again and
again we can define a string variable
String Variables
•
EES supports both numerical and string
variables. String variable are identified by a $
as
the last
character in the variable name, e.g.,
Fluid$. String constants are enclosed in single
quote marks
.
•
Define the string Fluid$ as
'
Steam_IAPWS
’
Fluid
$='
Steam_IAPWS
’
Steam_IAPWS
•
The note on
pg
187 of the EES manual states
•
Steam_IAPWS
implements high accuracy
thermodynamic properties of water substance
with the
1995 Formulation for the
Thermodynamic Properties of Ordinary Water
Substance
for General
and Scientific Use,
issued by The International Association for the
Properties
of Water
and Steam (IAPWS). This
Thermodynamic Properties
•
In EES type
u_1
= INTENERGY(
Fluid$,P
=P_1,T=T_1)
rho_1 = density(
Fluid$,P
=P_1,T=T_1)
s_1 = entropy(Fluid$,P=P_1,T=T_1)
u_2 = INTENERGY(Fluid$,P=P_2,s=s_2)
T_2_isen = temperature(Fluid$,P=P_2,s=s_2)
Window

> Formatted Equations
Calculate

> Solve
Compare to hand calculation solution
•
“Thermodynamics, an Engineering Approach”
7
th
edition,
Cengal
and Boles
•
7

43 Reconsider Prob. 7

42. Evaluate and
plot the work done on the stream as a
function of final pressure as the pressure
varies from 300
kPa
to 1.2
Mpa
Start a new EES file
•
Save 7_42
•
File

> Save
•
Rename 7_42 as 7_42
•
File

> Save As
–
Type in 7_43 as the new file name
Create a table
•
Since we are
calulating
W as a function of P2,
we need to create a table with P2 and W as
the variables.
•
First, comment out the original P2 definition
"P_2 = 1200 [
kPa
]”
•
Next set the units for P2
Options

> Variable Info
Create a Table
Table

> New Parametric Table
Plot

> new plot

> X

Y Plot
File

> Save
Comments 0
Log in to post a comment