Physics::Psychrometry - Perl extension for calculating Psychrometric measures for moist air
use Physics::Psychrometry; my $db = 24.6; # C my $rh = 0.68; # RH 0.0 to 1.0 my $p = 102; # kPa my $e = Physics::Psychrometry::dbrh2e($db, $rh); my $dp = Physics::Psychrometry::e2dp($e); my $wb = Physics::Psychrometry::dbdp2wb($db, $dp, $p); my $w = Physics::Psychrometry::e2w($e, $p); my $h = Physics::Psychrometry::dbw2h($db, $w); my $es = Physics::Psychrometry::t2es($db); my $v = Physics::Psychrometry::dbw2v($db, $w, $p); my $ws = Physics::Psychrometry::es2ws($es, $p); my $ds = Physics::Psychrometry::rhws2ds($rh, $ws); my $da = Physics::Psychrometry::wv2da($w, $v); my $q = Physics::Psychrometry::w2q($w); my $x = Physics::Psychrometry::wv2X($w, $v);
Calculates a variety of Psychrometric values for moist air Blah blah blah.
None by default.
Convert dry bulb (C) and Relative Humidity (0.0 to 1.0) to vapor pressure (kPa)
my $e = Physics::Psychrometry::dbrh2e($db, $rh);
Convert vapor pressure (kPa) to Dewpoint (C)
my $dp = Physics::Psychrometry::e2dp($e);
Convert dry bulb (C), Dewpoint (C) and airpressure (kPa) to wet bulb (C)
my $wb = Physics::Psychrometry::dbdp2wb($db, $dp, $p);
Convert vapor pressure (kPa) and airpressure (kPa) to humidity ratio
my $w = Physics::Psychrometry::e2w($e, $p);
Convert dry bulb (C) and humidity ratio to enthalpy (kJ/kg)
my $h = Physics::Psychrometry::dbw2h($db, $w);
Convert dry bulb (C) to saturated vapor pressure (kPa)
my $es = Physics::Psychrometry::t2es($db);
Convert dry bulb (C) and humidity ratio to specific air volume (m3/kg)
my $v = Physics::Psychrometry::dbw2v($db, $w, $p);
Convert saturated vapor pressure (kPa) to saturated humidity ratio
my $ws = Physics::Psychrometry::es2ws($es, $p);
Convert Relative Humidity (0.0 to 1.0) and saturated humidity ratio to degree of saturation (0.0 to 1.0)
my $ds = Physics::Psychrometry::rhws2ds($rh, $ws);
Convert humidity ratio and specific air volume (m3/kg) to density of moist air (kg/m^3)
my $da = Physics::Psychrometry::wv2da($w, $v);
Convert humidity ratio to specific humidity (ratio)
my $q = Physics::Psychrometry::w2q($w);
Convert humidity ratio and specific air volume (m3/kg) to absolute humidity (kg/m3)
my $x = Physics::Psychrometry::wv2X($w, $v);
Based on http://www.bae.uky.edu/gates/psych/PTM/dbrh2al.c
Mike McCauley, <mikem@airspayce.com>
Copyright (C) 2007 by Mike McCauley
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.
To install Physics::Psychrometry, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Physics::Psychrometry
CPAN shell
perl -MCPAN -e shell install Physics::Psychrometry
For more information on module installation, please visit the detailed CPAN module installation guide.