Learn R Programming

PsychroLib

Overview | Documentation | Installation | How to cite | Contributing | Development | Copyright and license | Acknowledgements

Overview

PsychroLib is a software library to enable the calculation of psychrometric properties of moist and dry air. Versions of PsychroLib are available for Python, C, C#, Fortran, R, JavaScript, Microsoft Excel Visual Basic for Applications (VBA). PsychroLib works in both metric (SI) and imperial (IP) systems of units. For a general overview and a list of currently available functions, please see the overview page.

Documentation

Please see the Python API documentation for the common API across all the supported language implementations. In Python, array support and improved runtime performance can be optionally enabled by installing Numba. In R (1) constants, like ZERO_FAHRENHEIT_AS_RANKINE are not exported (i.e. not directly accessible to users), (2) functions accept a vector, not a scalar (3) bulk calculations, like CalcPsychrometricsFromRelHum return a list.

Examples on how to use PsychroLib in all the supported languages are described in this guide.

Installation

How to cite

When using PsychroLib, please cite the software summary paper and software version using the following Digital Object Identifiers (DOIs) to generate citations in your preferred style:

Software summary paperSoftware version*

*please make sure to cite the same version you are using with the correct DOI. For a list of all available versions see see more on Zenodo.

Contributing

If you are looking to contribute, please read our Contributors' guide for details.

Development

If you would like to know more about specific development guidelines and testing, please refer to our development notes.

Copyright and license

Copyright 2018-2020 The PsychroLib Contributors for the current library implementation.

Copyright 2017 ASHRAE Handbook — Fundamentals (https://www.ashrae.org) for equations and coefficients published ASHRAE Handbook — Fundamentals Chapter 1.

Software licensed under the MIT License.

Acknowledgements

Special thanks to:

For the full list of contributors, please see the contributors page.

Copy Link

Version

Install

install.packages('psychrolib')

Monthly Downloads

319

Version

2.5.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Hongyuan Jia

Last Published

May 29th, 2021

Functions in psychrolib (2.5.2)

GetHumRatioFromTDewPoint

Return humidity ratio given dew-point temperature and pressure.
GetTDewPointFromHumRatio

Return dew-point temperature given dry-bulb temperature, humidity ratio, and pressure.
GetTWetBulbFromRelHum

Return wet-bulb temperature given dry-bulb temperature, relative humidity, and pressure.
GetTWetBulbFromHumRatio

Return wet-bulb temperature given dry-bulb temperature, humidity ratio, and pressure.
GetTCelsiusFromTKelvin

Utility function to convert temperature to degree Celsius (degreeC) given temperature in Kelvin (K).
GetSatAirEnthalpy

Return saturated air enthalpy given dry-bulb temperature and pressure.
GetSatHumRatio

Return humidity ratio of saturated air given dry-bulb temperature and pressure.
GetRelHumFromTWetBulb

Return relative humidity given dry-bulb temperature, wet bulb temperature and pressure.
GetTKelvinFromTCelsius

Utility function to convert temperature to Kelvin (K) given temperature in degree Celsius (degreeC).
GetRelHumFromVapPres

Return relative humidity given dry-bulb temperature and vapor pressure.
GetDegreeOfSaturation

Return the degree of saturation (i.e humidity ratio of the air / humidity ratio of the air at saturation at the same temperature and pressure) given dry-bulb temperature, humidity ratio, and atmospheric pressure.
psychrolib-package

PsychroLib: Psychrometric Properties of Moist and Dry Air
GetHumRatioFromVapPres

Return humidity ratio given water vapor pressure and atmospheric pressure.
GetMoistAirVolume

Return moist air specific volume given dry-bulb temperature, humidity ratio, and pressure.
GetMoistAirEnthalpy

Return moist air enthalpy given dry-bulb temperature and humidity ratio.
GetMoistAirDensity

Return moist air density given humidity ratio, dry bulb temperature, and pressure.
SetUnitSystem

Set the system of units to use (SI or IP).
isIP

Check whether the system in use is IP or SI.
GetTRankineFromTFahrenheit

Utility function to convert temperature to degree Rankine (degreeR) given temperature in degree Fahrenheit (degreeF).
GetVapPresFromTDewPoint

Return vapor pressure given dew point temperature.
GetHumRatioFromTWetBulb

Return humidity ratio given dry-bulb temperature, wet-bulb temperature, and pressure.
GetVaporPressureDeficit

Return Vapor pressure deficit given dry-bulb temperature, humidity ratio, and pressure.
GetStandardAtmPressure

Return standard atmosphere barometric pressure, given the elevation (altitude).
GetTDewPointFromTWetBulb

Return dew-point temperature given dry-bulb temperature, wet-bulb temperature, and pressure.
GetTDewPointFromRelHum

Return dew-point temperature given dry-bulb temperature and relative humidity.
GetSpecificHumFromHumRatio

Return the specific humidity from humidity ratio (aka mixing ratio).
GetVapPresFromHumRatio

Return vapor pressure given humidity ratio and pressure.
GetRelHumFromHumRatio

Return relative humidity given dry-bulb temperature, humidity ratio, and pressure.
GetVapPresFromRelHum

Return partial pressure of water vapor as a function of relative humidity and temperature.
GetRelHumFromTDewPoint

Return relative humidity given dry-bulb temperature and dew-point temperature.
GetStandardAtmTemperature

Return standard atmosphere temperature, given the elevation (altitude).
GetStationPressure

Return station pressure from sea level pressure.
GetSatVapPres

Return saturation vapor pressure given dry-bulb temperature.
GetTDewPointFromVapPres

Return dew-point temperature given dry-bulb temperature and vapor pressure.
GetTDryBulbFromEnthalpyAndHumRatio

Return dry bulb temperature from enthalpy and humidity ratio.
GetSeaLevelPressure

Return sea level pressure given dry-bulb temperature, altitude above sea level and pressure.
GetTDryBulbFromMoistAirVolumeAndHumRatio

Return dry-bulb temperature given moist air specific volume, humidity ratio, and pressure.
GetTFahrenheitFromTRankine

Utility function to convert temperature to degree Fahrenheit (degreeF) given temperature in degree Rankine (degreeR).
GetTWetBulbFromTDewPoint

Return wet-bulb temperature given dry-bulb temperature, dew-point temperature, and pressure.
GetUnitSystem

Return system of units in use.
CalcPsychrometricsFromRelHum

Calculate psychrometric values from relative humidity.
GetDryAirVolume

Return dry-air volume given dry-bulb temperature and pressure.
CalcPsychrometricsFromTWetBulb

Calculate psychrometric values from wet-bulb temperature.
GetDryAirDensity

Return dry-air density given dry-bulb temperature and pressure.
CalcPsychrometricsFromTDewPoint

Calculate psychrometric values from dew-point temperature.
GetHumRatioFromEnthalpyAndTDryBulb

Return humidity ratio from enthalpy and dry-bulb temperature.
GetDryAirEnthalpy

Return dry-air enthalpy given dry-bulb temperature.
GetHumRatioFromRelHum

Return humidity ratio given dry-bulb temperature, relative humidity, and pressure.
GetHumRatioFromSpecificHum

Return the humidity ratio (aka mixing ratio) from specific humidity.