2.9: Saturated Water in a Rigid Tank

2.9: Saturated Water in a Rigid Tank#

A rigid tank containing m=10kg of saturated water is sitiing at room temperature T=25C. If the volume of the tank is V=1m3, determine the mass of liquid water stored in the tank.

CH2-Q9.jpg

Solution Approach)#

the quality of a saturated mixture is defined as

x=mg/mmix

therfore the mass of liquid would be

ml=(1x)mmix

#import librarier
import CoolProp.CoolProp as CP

#define variables
V = 1   #tank volume in m3
m_mix = 10   #mixture mass in kg
T = 25 + 273.15   #temperature in K

D = m / V   #density in kg/m3 used in CoolProp
fluid = "water"  # define the fluid or material of interest

x = CP.PropsSI("Q", "T", T, "D", D , fluid)   #the quality of the mixture

m_l = (1 - x) * m_mix   #mass of liquid water in kg
print('The mass of liquid fluid is', f"{m_l:.3f}", 'kg')
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Cell In[1], line 9
      6 m_mix = 10   #mixture mass in kg
      7 T = 25 + 273.15   #temperature in K
----> 9 D = m / V   #density in kg/m3 used in CoolProp
     10 fluid = "water"  # define the fluid or material of interest
     12 x = CP.PropsSI("Q", "T", T, "D", D , fluid)   #the quality of the mixture

NameError: name 'm' is not defined