Registered StackHub users may elect to receive email notifications whenever a new package version is released.
There are 7 watchers.
Computes dew-point temperature given ambient pressure and humidity ratio. Ported from Dew_point
VBA function in Eric Kozubal's psychrometrics spreadsheet.
Dew-point temperature (°C)
Computes dry air density given dry bulb temperature, humidity ratio, and ambient pressure. Ported from Dry_Air_Density
VBA function in Eric Kozubal's psychrometrics spreadsheet.
Dry air density (kg/m³)
rho_moist_air = rho * (1 + w)
in which w is the humidity ratio.
kg_dry/m³
, the (more ambiguous) unit kg/m³
is used instead.dryAirDensity(tDB, w, p).as(1) * 1kg.to(1lb) / 1m³.to(1ft³)
This gets you the custom unit _lb/ft³
.
Computes humidity ratio given dry bulb temperature, wet bulb temperature, and ambient pressure. Ported from Hum_rat
VBA function in Eric Kozubal's psychrometrics spreadsheet.
Humidity ratio (unitless)
gH₂O/kgAir
; to convert the output of this function to gH₂O/kgAir
multiply by 1000.Computes humidity ratio given dry bulb temperature, relative humidity, and ambient pressure. Ported from Hum_rat2
VBA function in Eric Kozubal's psychrometrics spreadsheet.
Humidity ratio (unitless)
gH₂O/kgAir
; to convert the output of this function to gH₂O/kgAir
multiply by 1000.Computes moist air density given dry bulb temperature, humidity ratio, and ambient pressure. Adapted from Greg Barker's Rho_MoistAir_TandPandW_kgPm3
function for Campbell Scientific data loggers.
Moist air density (kg/m³)
moistAirDensity(tDB, w, p).as(1) * 1kg.to(1lb) / 1m³.to(1ft³)
This gets you the custom unit _lb/ft³
.
Computes moist air specific enthalpy given dry bulb temperature and humidity ratio. Ported from Enthalpy_Air_H2O
VBA function in Eric Kozubal's psychrometrics spreadsheet.
Moist air specific enthalpy (kJ/kg)
h = 1.006*tDB + w * (2501 + 1.86*tDB)
in which
The equivalent IP calculation is:
h = 0.240*tDB + w * (1061 + 0.444*tDB)
in which
Because SI specific enthalpy is referenced to 0°C and IP specific enthalpy to 0°F, there is the IP quantity is offset from the SI quantity by approximately 17.8 kJ/kg (7.66 BTU/lb). (Note that this offset drifts slightly between the SI and IP approximations depending on the temperature.) To convert the output of this function to IP units, use the approximation:
(moistAirEnthalpy(tDB, w) + 17.8kJ/kg).to(BTU/lb)
kJ/kg
) and energy per unit mass of dry air (e.g. kJ/kg_dry
). The SI units are the same, but the interpretation is different. The ASHRAE Fundamentals Handbook, SI Edition, specifies enthalpy kilojoules per kilogram of dry air. Therefore, SkySpark output units are kJ/kg_dry
.Computes the specific heat of moist air given humidity ratio.
Specific heat of moist air (J/(kg_dry·K))
kg_dry
. This allows direct use in the various ASHRAE Standard 37 capacity equations._J/kg_dry/K
.Computes water vapor partial pressure given ambient pressure and humidity ratio. Ported from Part_press
VBA function in Eric Kozubal's psychrometrics spreadsheet.
Water vapor partial pressure (kPa)
Computes relative humidity given dry bulb temperature, wet bulb temperature, and ambient pressure. Ported from Rel_hum
VBA function in Eric Kozubal's psychrometrics spreadsheet.
Relative humidity (%RH)
Computes relative humidity given dry bulb temperature, humidity ratio, and ambient pressure.
Ported from Rel_hum2
VBA function in Eric Kozubal's psychrometrics spreadsheet.
Relative humidity (%RH)
Computes water vapor saturation pressure given ambient temperature. Ported from Sat_press
VBA function in Eric Kozubal's psychrometrics spreadsheet.
Water vapor saturation pressure (kPa)
Computes standard atmospheric pressure given elevation. If no elevation is specified, sea level is assumed. Ported from STD_Press
VBA function in Eric Kozubal's psychrometrics spreadsheet.
Standard atmospheric pressure (kPa)
Computes standard atmospheric temperature given elevation. If no elevation is specified, sea level is assumed. Ported from STD_Temp
VBA function in Eric Kozubal's psychrometrics spreadsheet.
Standard atmospheric temperature (°C)
Approximates the density of pure liquid water as a function of temperature. Models are fit from reference data in Table 13.2 of Wagner and Pruß (2002) and are valid within 0.1% for all temperatures between freezing and boiling and pressures between 50 and 1000 kPa.
Water density (kg/m³)
waterDensity(t).as(1) * 1kg.to(1lb) / 1m³.to(1ft³)
This gets you the custom unit _lb/ft³
.
Approximates the specific heat of pure liquid water as a function of temperature. Models are fit from reference data in Table 13.2 of Wagner and Pruß (2002) and are valid within 0.1% for all temperatures between freezing and boiling and pressures between 50 and 1000 kPa.
Water density (kg/m³)
Computes wet-bulb temperature given dry bulb temperature, relative humidity, and ambient pressure. Uses Newton-Raphson (NR) method to converge to correct wet bulb temperature, typically within 2-3 iterations. Ported from Wet_bulb
VBA function in Eric Kozubal's psychrometrics spreadsheet.
The following control options are supported:
maxIter
: Maximum Newton-Raphson iterations (Default = 5)tol
: Relative tolerance target; applied to calculated humidity ratios (Default = 1E-5)delta
: Delta for computing derivative (Default = 0.001Δ°C)checked
: Governs action if tolerance is not met: if true, throw exception; if false return NA (Default = false)Wet bulb temperature (°C)
tol
or after maxIter
iterations, whichever comes first.checked
to true to throw an exception if the function does not terminate with the two humidity ratios within the specified tolerance. The default value of checked:false
causes the function to return NA if the humidity ratios do not match within tolerance.See documentation for humidityRatio and humidityRatio2.