summaryrefslogtreecommitdiff
path: root/3845/CH13/EX13.12/Ex13_12.sce
blob: 0f28fe8edcc9aeb15fd18979dad0c59a7fb21494 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//Example 13.12
T=20;//Temperature (C)
T=T+273;//Temperature (K)
P=2.33*10^3;//Vapor pressure of water at 20 deg C (Pa), See Table 13.5
R=8.31;//Ideal gas constant (J/mol.K)
M=18;//Molecular mass of water (g/mol)
//From ideal gas law, n/V=rho=P/(RT)
//n=number of moles, V=volume (m^3), rho=density (mol/m^3)
rho=P/(R*T);//Density (mol/m^3)
rho=rho*M;//Density (g/m^3)
printf('Density of water vapor = %0.1f g/m^3',rho)
sat_rho=17.2;//Saturation vapor density, See Table 13.5 (g/m^3)
//Here it is found that rho=sat_rho
x=abs(rho-sat_rho);//Difference (g/m^3)
if (x<0.1)//For a maximum difference of less than 0.1 g/m^3 (assumed)
     printf('\nDensity of water vapor calculated is equal to the saturation vapor density found in Table 13.5')
    end
//Openstax - College Physics
//Download for free at http://cnx.org/content/col11406/latest