[Go to previous section: 4.1] [Go to next chapter: 5]
[ Go to CENG301 Homepage | CENG301 Notes Table of Contents]



4.2: Mass and Energy Balances of Humid Air


4.2: Mass and Energy Balances of Humid Air

4.2.1 Ratios of Water to Air

Start Humid Air Programs: humidity

This section of the notes on vapor-liquid equilibria will be concerned with air that contains water vapor. We will assume that our air contains only nitrogen, oxygen and water. Other compounds like argon and carbon dioxide will be neglected in this treatment. It would not be difficult to add them to our list, but their effect on humidification is generally small. Since our system always contains the same compounds, it will be convenient to load a workspace set up with just the right compounds in it. The m-file humidity loads the proper workspace and sets Tdeg to 'C'. The m-file lists as:

% humidity   - Humidity m-file
% Loads the proper workspace and sets Tdeg to 'C'.
% Type cnms to see the order of compounds.
clear all
clear global
load dathum
global form StdhkJ StStdh cpv cpl cps Aabc mw
global ns ne TbpK LhslkJ LhlvkJ TmpK stoic cnms Tdeg Gibb
global icpl icpv icps hcpl hcps hcpv
global pdat rcat rhds

 

The Function: molrat

The function molrat calculates the molar ratio of water to dry air for given relative humidity and temperature of the air. The first argument of the function gives the relative humidity and the second one the temperature in the units of Tdeg. The relative humidity is simply the partial pressure water in the air divided by the vapor pressure of water at the specified temperature (i.e.. as used in humidity problems the dry bulb temperature of the air.) The first line of the function determines the mol fraction of water in the air assuming that the total pressure is 1 atmosphere (101.35 kPa). The last line of the function expresses the result as a mol ratio (mols water/mols dry air). Here is our listing of molrat:

function x=molrat(rh,t)
% molrat        - Does a humidity calculation in moles
% function x=molrat(rh,t)
% Argument List:
% Argument   Gives
%    rh     the relative humidity as a fraction.
%    t      the temperature in the units of Tdeg
% x is returned as the molar ratio of water to dry air.
% Ex: humidity
%     molrat(.5 50)
x=rh*vappr(t,3)/101.35;
x=x/(1-x);
 


And here is the way it is used:

>> humidity
>> molrat(.5,50)
ans =
    0.0647

The example shows that the mol ratio of water to air is .06466 for air with a relative humidity of 50% and a temperature of 50°C. The two hidden parameters in the program (compound 3 in cnms and 101.35) could be replaced to determine a similar ratio for another compound in air at another pressure. Water could be replaced by any other compound in our data bank. The total pressure might be put in the argument list for the function if we need to find the ratio for other pressures.

The Mass Ratio Function: masrat

Masrat has the same arguments as molrat. It uses molrat to find the mol ratio of water to air and then converts the result to a mass ratio using 28.85264 for the molecular weight of dry air and 18.016 for the mol weight of water.

function h=masrat(rh,t)
% masrat  - Determine the mass ratio of H2O/dry air
% function h=masrat(rh,t)
% Argument List:
% Argument   Gives
%   rh     the relative humidity as a fraction.
%   t      the temperature in the units of Tdeg.
% h is the mass ratio of water to dry air.
% Ex: humidity
%     masrat(.5,50)
x=molrat(rh,t);
h=x*18.016/28.85264; 

>> humidity
>> masrat(.5,50) 
ans =
    0.0404

The example shows that the mass ratio of water to dry air in 50% relative humidity air at 50°C is .040376. The program could again be modified to be used for other compounds in air at other total pressures.


4.2.2 The Enthalpy and Volume of Humid Air

The Enthalpy of Humid Air Function: humde

The arguments of humde specify the mass ratio of water /dry air and the air temperature in Tdeg units. The mass ratio could be found with masrat if the relative humidity is known. The result is given in kJ/kg of dry air. Note that the result includes the enthalpy of both the water and air relative to their standard states. Here is the program and examples of its use:

function e=humde(mr,t)
% humde  - Gives the enthalpy of air for given mass rat. & t
% function e=humde(mr,t)
% Argument List:
% Argument   Gives
%   mr     the mass ratio of water to dry air.
%   t      the temperature in units of Tdeg.
% e is the enthalpy in kJ per kg of dry air
% relative to dry air and liquid water at 0C.
ns=1000*[[.79 .21]/28.85264,mr/18.016];
hs=HinkJ(t,'v');
hr=[-0.7272 -0.7343 -287.4903];
e=sum(ns.*(hs-hr));

>> humidity
>> humde(.04,50)
ans =
  153.8008
>> humde(masrat(.75,50),50)
ans =
  212.1033

The first example shows that the enthalpy of humid air containing .04 kg water per kg of dry air at 50°C is 153.8 kJ/kg dry air. The second example finds the enthalpy of 75% relative humidity air at 50°C to be 212.1 kJ/kg dry air.

The Volume Function: humdv

Here is a function that finds the specific volume of humid air called humdv:

function v=humdv(mr,t)
% humdv  - Gives the specific volume of humid air
% function v=humdv(mr,t)
% Argument List:
% Argument   Gives
%    mr     the mass ratio of water to dry air.
%    t      the temperature in units of Tdeg.
% v is the volume in cubic meters per kg of dry air.
ns=1000*[[.79 .21]/28.85264,mr/18.016];
v=at(t)*8.3143*sum(ns)/101350;

The first line of calculations finds the number or mols of each compound associated with 1 kg of dry air. The last line is the ideal gas law applied to find the volume as V = nRT/p. The number of mols is simply the sum of the mols found in the first line of the function. The at function is used to get the temperature in K. Here are examples of its use:

>> humidity
>> humdv(.04,50) 
ans =
    0.9777
>> humdv(masrat(.75,50),50)
ans =
    1.0109

 

The first example shows that the volume of air with 1 kg of dry air in it and a humidity of .04 mass ratio water/dry air at 50°C is .9777 m3. The second example finds the volume of 75% relative humidity air at 50°C to be 1.011 m3/kg dry air.

Note: The information available through the use of the Matlab humidity functions is also available through the use of the FORTRAN program humid.


[Go to previous section: 4.1] [Go to next chapter: 5]
[ Go to CENG301 Homepage | CENG301 Notes Table of Contents]

Last modified August 6, 1998.