Home > atmlab > h2o > thermodynamics > water_vapor_density.m

water_vapor_density

PURPOSE ^

WATER_VAPOR_DENSITY calculates water vapor density vd

SYNOPSIS ^

function vd = water_vapor_density(rh, T, p)

DESCRIPTION ^

 WATER_VAPOR_DENSITY calculates water vapor density vd

       water vapor density or absolute humidity is the ratio of 
       the mass of water vapor to the volume occupied by the moist air

 FORMAT   vd = water_vapor_density(rh, T, p)
        
 OUT   vd  density [kg/m3]
 IN    rh  relative humidity [%, rh > 0], it can be a scalar or a tensor
       T   air temperature [K], it can be a scalar or a tensor
       p   air pressure [Pa], it can be a scalar or a tensor
 EXAMPLE:
       vd = water_vapor_density(50, 298, 100000)
       vd = 0.0012

 ACCURACY: WATER_VAPOR_DENSITY calculates vapor density according to 
           thermodynamic functions without any assumptions.

 Reference: A short course in cloud physics (Chapter II, water vapor and
             its thermodynamic effects); 1996, By: R. R. Rogers and M. M. Yau
             page: 18, Eq.: 2.23 and 2.24

 2009-08-15   Created by Isaac Moradi.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

water_vapor_density.m

SOURCE CODE ^

0001 function vd = water_vapor_density(rh, T, p)
0002 % WATER_VAPOR_DENSITY calculates water vapor density vd
0003 %
0004 %       water vapor density or absolute humidity is the ratio of
0005 %       the mass of water vapor to the volume occupied by the moist air
0006 %
0007 % FORMAT   vd = water_vapor_density(rh, T, p)
0008 %
0009 % OUT   vd  density [kg/m3]
0010 % IN    rh  relative humidity [%, rh > 0], it can be a scalar or a tensor
0011 %       T   air temperature [K], it can be a scalar or a tensor
0012 %       p   air pressure [Pa], it can be a scalar or a tensor
0013 % EXAMPLE:
0014 %       vd = water_vapor_density(50, 298, 100000)
0015 %       vd = 0.0012
0016 %
0017 % ACCURACY: WATER_VAPOR_DENSITY calculates vapor density according to
0018 %           thermodynamic functions without any assumptions.
0019 %
0020 % Reference: A short course in cloud physics (Chapter II, water vapor and
0021 %             its thermodynamic effects); 1996, By: R. R. Rogers and M. M. Yau
0022 %             page: 18, Eq.: 2.23 and 2.24
0023 %
0024 % 2009-08-15   Created by Isaac Moradi.
0025 
0026 % set constants
0027 Rd = constants( 'GAS_CONST_DRY_AIR' ); % gass constant for dry air in J.kg-1.K-1
0028 
0029 % calculate mixing ratio
0030 r = water_vapor_mixing_ratio(rh, T, p);
0031 
0032 % calculate water vapor density
0033 Rm =  Rd .* ( 1 + 0.6 .* r);
0034 vd = (p./1000) ./ (Rm .* T);
0035 
0036

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005