5.1: Energy balance for Stream in Control Volume#

Problem statement:#

1kg of steam is confined in a space of the size 1m3 with a temoerature of 400C. 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 while the volume does not change. Determine the following:

b) the temperature of steam after heating

c) how much heat is require to do this

d) how would this change if if Cv 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

Pg2=2Pg

and density

D2=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=ΔU+W

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

Q=ΔU=U2U1=m(u2u1)

# 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 Cv and Cp values to calculate changes in enthalpy and internal energy, ideal gas assumption is to be made for steam.

Q=ΔU=mΔu=mCvΔ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