5.1: Energy balance for Stream in Control Volume#

Problem statement:#

1kg of steam is confined in a space of the size \(1\:m^3\) where the thermometer measures \(400 ^{\circ} C\). Using CoolProp as a tool to extract thermodynamic properties, determine:

a)the pressure reading on a pressure gauge at atmospheric pressure

the steam is then heated to double the pressure reading while the space is kept from expanding. Determine the following:

b)the temperature of steam after heating

c)how much heat is require to do so

d)what would be the answer if \(C_v\) is used instead of CoolProp? What assumptions are made?

Solution Approach for a)#

Density \(D\) and temperature \(T\) are the two known parameters that can be used to extract properties.

\(D=m/V\)

#importing the required library
import CoolProp.CoolProp as CP

# define the given inputs:
T = 400 + 273.15 #temperature in K
D = 1 / 1 #density in kg/m3
P = CP.PropsSI('P', 'D', D, 'T', T, 'Water') #calculating pressure using coolprop Pa
P_g = P - 101325 #gauge pressure in Pa
print('The gauge pressure of steam at the given initial properties is',f"{P_g:.1f}",'Pa')
The gauge pressure of steam at the given initial properties is 208099.6 Pa

Solution Approach for b)#

The known parameters from the secondary state are pressure

\(P_{g2} = 2 P_g\)

and density

\(D_2 = D\)

since the mass and the volume of the space remains constant

# define the inputs:
P_g2 = P_g * 2 #gauge pressure in secondary state in Pa
P_2 = P_g2 + 101325 #absolute pressure in secondary state in Pa
D_2 = D #density in the secondary state in kg/m3
T_2 = CP.PropsSI('T', 'D', D_2, 'P', P_2, 'Water') #calculating secondary temperature using coolprop in K
T_2C = T_2 - 273.15 #temperature at secondary state in C
print('The temperature of steam at the secondary state is',f"{T_2C:.1f}",'C')
The temperature of steam at the secondary state is 849.0 C

Solution Approach for c)#

Given the first law of thermodynamics,

\(Q=\Delta U + W\)

and \(W = 0\) since the boundaries of the space are fixed. Therefore,

\(Q=\Delta U=U_2 - U_1=m(u_2-u_1)\)

# define the inputs using coolprop:
m = 1 #steam mass in kg
u_1 = CP.PropsSI('U', 'D', D, 'T', T, 'Water') #calculating initial internal energy in J/kg
u_2 = CP.PropsSI('U', 'D', D_2, 'P', P_2, 'Water')  #calculating secondary internal energy in J/kg
Q = m * (u_2 - u_1) / 1000 #heat required in kJ
print('The heat required to double the gauge presure is',f"{Q:.1f}",'kJ')
The heat required to double the gauge presure is 790.8 kJ

Solution Approach for d)#

To use \(C_v\) and \(C_p\) values to calculate changes in enthalpy and internal energy, ideal gas assumption is to be made for steam.

\(Q=\Delta U=m\Delta u=mC_v\Delta T\)

#define the constants
C_v = 1.4108 #C_v of steam in kJ/kg.k
Q = m * C_v * (T_2 - T) #heat required in kJ
print('The heat required to double the gauge presure is',f"{Q:.1f}",'kJ','using C_v')
The heat required to double the gauge presure is 633.5 kJ using C_v