Chapter 1#

Question 10: Steam and Air#

Consider a rigid tank composed of two seperate partitions. Partition A contains \(m_A=260\:g\) of air at a pressure of \(P_A=100\:kPa\) and a temperature of \(85\:^{\circ}C\). Partition B contains \(m_B=3\:kg\) of steam at a pressure of \(P_B=10\:kPa\) and a temperature of \(T_B=250\:^{\circ}C\). Calculate,

a) the volume of the tank

b) total internal energy of the tank

CH1-Q10.jpg

Solution Approach for a)#

density is defined as

\(D=m/V\)

therefore volume is calculated

\(V=m/D\)

and the total volume is

\(V=V_A+V_B\)

#define variables
m_A = 0.26   #mass of A in kg
P_A = 100E+3   #pressure in A in Pa
T_A = 85 + 273.15   #temperature in A in K

m_B = 3   #mass of B in kg
P_B = 10E+3   #pressure in B in kg
T_B = 250 + 273.15   #temperature in B in K

#importing the required library
import CoolProp.CoolProp as CP

#for A
fluid = 'air'
D_A = CP.PropsSI("D", "T", T_A, "P", P_A , fluid)   #density of A in kg/m3
V_A = m_A / D_A   #volume of A in m3

#for B
fluid = 'water'
D_B = CP.PropsSI("D", "T", T_B, "P", P_B , fluid)   #density of B in kg/m3
V_B = m_B / D_B   #volume of B in m3

V = V_A + V_B   #total volume in m3

print('Total volume of tank is:', f"{V:.1f}", 'm3')
Total volume of tank is: 72.7 m3

Solution Approach for b)#

specific internal energy is defined as

\(u=U/m\)

therfore

\(U=m\times u\)

and the total internal energy

\(U=U_A+U_B\)

#for A
fluid = 'air'
u_A = CP.PropsSI("U", "T", T_A, "P", P_A , fluid)   #specific internal energy of A in J/kg
U_A = m_A * u_A   #internal energy of A in J

#for B
fluid = 'water'
u_B = CP.PropsSI("U", "T", T_B, "P", P_B , fluid)   #specific internal energy of B in J/kg
U_B = m_B * u_B   #internal energy of B in J

U = U_A + U_B   #total internal energy of tank in J

print('Total internal energy of tank is:', f"{U/1000:.1f}", 'kJ')
Total internal energy of tank is: 8307.6 kJ