Home > atmlab > physics > airdensity.m

airdensity

PURPOSE ^

=============================================================

SYNOPSIS ^

function rho = airdensity(p,t);

DESCRIPTION ^

=============================================================
 vmr = mixr2vmr(mixr,molm)

 Calculates air density by trivial application of the
 ideal gas law 
  
 Input:    p      atmospheric pressure [Pa]
           t      absolute temperature [K]

 Output:   rho    air density  [Kg/m3]

 Carlos Jimenez 2014-02-12
=============================================================

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

airdensity.m

SOURCE CODE ^

0001 %=============================================================
0002 % vmr = mixr2vmr(mixr,molm)
0003 %
0004 % Calculates air density by trivial application of the
0005 % ideal gas law
0006 %
0007 % Input:    p      atmospheric pressure [Pa]
0008 %           t      absolute temperature [K]
0009 %
0010 % Output:   rho    air density  [Kg/m3]
0011 %
0012 % Carlos Jimenez 2014-02-12
0013 %=============================================================
0014 
0015 
0016 function rho = airdensity(p,t);
0017 
0018 Rsp = constants('GAS_CONST_DRY_AIR');  % Jkg^{-1}K^{-1}
0019 
0020 rho = p ./ ( Rsp * t );   %
0021 
0022 return

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