graph TD
A[Start with your problem] --> B{Need a full humid-air property from 3 known inputs?}
B -- Yes --> C[Use HA_PROPS_SI]
B -- No --> D{Need water saturation pressure only?}
D -- Yes --> E[Use IAPWS92_PSAT]
D -- No --> F{Need temperature sensitivity of saturation pressure?}
F -- Yes --> G[Use PSYCHRO_DPSATDT]
F -- No --> H[Need internal humid-air model terms or diagnostics?]
H -- Yes --> I[Use HA_PROPS_AUX]
H -- No --> C
Psychrometrics
Overview
Introduction Psychrometrics is the engineering science of moist air: the thermodynamic behavior of dry air mixed with water vapor. In practice, it connects temperature, pressure, humidity, enthalpy, and specific volume so that engineers can design and operate HVAC systems, dryers, clean rooms, compressed-air lines, and thermal process equipment. A concise public reference is the Wikipedia psychrometrics article, but production workflows usually depend on equation-of-state software rather than manual chart reading.
From a mathematical perspective, psychrometrics is a constrained multivariable state problem. Humid air has one gas mixture phase in most operating conditions, and three independent state variables are needed to fully determine the rest of the properties. Common independent sets include (T, P, R), (T, P, W), and (T, P, T_{dp}), where T is dry-bulb temperature, P is total pressure, R is relative humidity, W is humidity ratio, and T_{dp} is dew-point temperature.
Boardflare’s psychrometrics category exposes this workflow through four functions:
- HA_PROPS_SI: the primary state solver for humid-air properties via CoolProp’s humid-air model.
- HA_PROPS_AUX: low-level auxiliary terms (virial coefficients, enhancement factor, saturation pressure term, and related internals) used in real-gas humid-air calculations.
- IAPWS92_PSAT: saturation pressure of water using the IAPWS-92 vapor-pressure correlation.
- PSYCHRO_DPSATDT: first derivative dP_{sat}/dT from the same IAPWS-92 model.
Under the hood, these tools rely on CoolProp humid air documentation and the chemicals.air module documentation. This pairing is powerful: CoolProp provides robust state solving for engineering properties, while chemicals supplies direct, transparent saturation correlation functions and derivatives useful for sensitivity analysis.
Why this matters in business terms: psychrometric errors multiply quickly. A small humidity ratio or dew-point mismatch can mis-size coils, distort latent load estimates, increase energy costs, or cause quality failures in humidity-sensitive products. Reliable property functions reduce spreadsheet approximation risk and make models auditable and repeatable across teams.
When to Use It Use this category whenever the job is “quantify moist-air state and its thermodynamic consequences” rather than “estimate conditions by chart lookup.” Typical use cases involve either (1) solving for unknown humid-air properties from measured field inputs, or (2) evaluating how close a process is to condensation, comfort limits, or drying targets.
One common scenario is HVAC design and commissioning for commercial buildings or data centers. Teams often measure dry-bulb temperature, static pressure, and relative humidity at air-handling units, then need enthalpy, humidity ratio, dew point, and specific volume for load decomposition and economizer logic. HA_PROPS_SI is ideal here because it maps any supported three-property specification to the output variable needed for control, capacity checks, or psychrometric plotting.
Another scenario is moisture-critical manufacturing (food, pharma, paper, textiles, battery rooms). The operational question is often not only “what is the current state?” but also “how fast does risk change near a threshold?” In these cases, IAPWS92_PSAT gives vapor-pressure baselines and PSYCHRO_DPSATDT quantifies sensitivity to temperature. That derivative is particularly useful around dew-point control logic, where a small \Delta T can materially shift condensation risk.
A third scenario is thermodynamic model development or validation. Engineers building internal simulators may need to inspect non-ideal interaction terms directly rather than only high-level outputs. HA_PROPS_AUX supports this by exposing terms like B_{aa}, B_{aw}, C_{aaw}, enhancement factor f, and water saturation term p_{ws} used in real humid-air formulations. This is valuable for debugging, cross-validating with published references, and understanding when ideal-gas simplifications begin to drift.
These tools are also useful in operations analytics:
- Energy teams comparing latent versus sensible performance over weather bins.
- Reliability teams tracking compressed-air dew-point excursions.
- Process engineers optimizing drying setpoints for throughput and yield.
- Facility managers validating outside-air reset sequences under seasonal humidity swings.
In short, use this category when decisions depend on physically consistent moist-air properties, not just rough comfort-chart estimates.
How It Works At the core, humid air is treated as a mixture of dry air and water vapor with non-ideal corrections. A high-level statement of state closure is:
ext{Given } (x_1, x_2, x_3),\quad y = f(x_1, x_2, x_3)
where three independent inputs determine all other properties. In HA_PROPS_SI, this becomes a practical API call with one desired output key and three name-value input pairs.
For many workflows, humidity ratio and water mole fraction are central transforms:
W = \frac{m_w}{m_a}, \qquad \psi_w = \frac{W}{\varepsilon + W}, \qquad \varepsilon = \frac{M_w}{M_a}
Relative humidity links to the saturation mole fraction through enhancement factor f:
\phi = \frac{\psi_w}{\psi_{w,s}}, \qquad \psi_{w,s} = \frac{f\,p_{w,s}}{p}
where p_{w,s} is pure-water saturation pressure and p is total pressure. The enhancement factor captures the effect of air on saturation behavior; this is one reason real-gas humid-air calculations outperform simplistic ideal approximations in broader ranges.
CoolProp’s humid-air implementation (used by HA_PROPS_SI and HA_PROPS_AUX) follows ASHRAE RP-1485-based formulations and includes virial corrections. Conceptually, pressure-volume behavior can be expressed with a compressibility correction:
p\,\bar v = \bar R T Z
with Z derived from temperature-dependent virial combinations (for example B_{aa}, B_{aw}, B_{ww}, C_{aaw}, C_{aww}, C_{www}). Those coefficients appear directly in HA_PROPS_AUX, which is why that function is useful for diagnostics and advanced modeling.
For water saturation pressure, IAPWS92_PSAT evaluates the IAPWS-92 correlation in closed form, commonly represented as:
P_{sat}(T) = P_c \exp\left(\frac{T_c}{T}\sum_i a_i\tau^{n_i}\right), \qquad \tau = 1 - \frac{T}{T_c}
Its derivative with respect to temperature, returned by PSYCHRO_DPSATDT, is:
\frac{dP_{sat}}{dT}
which is critical for sensitivity, Jacobian-based solvers, and uncertainty propagation. If a sensor has temperature uncertainty \sigma_T, a first-order vapor-pressure uncertainty estimate is:
\sigma_{P_{sat}} \approx \left|\frac{dP_{sat}}{dT}\right|\sigma_T
This makes PSYCHRO_DPSATDT especially relevant in control design and instrumentation QA.
Library context and assumptions:
- CoolProp solves humid-air properties as a real mixture requiring three independent inputs.
- chemicals.air provides direct IAPWS-92 saturation and derivative routines.
- Inputs and outputs are SI-based in this category.
- Property validity depends on model ranges and physically consistent state combinations.
Operationally, this means engineers should always validate that chosen inputs are independent and physically realizable (for example, relative humidity in [0,1] for unsupersaturated definitions, and pressure/temperature combinations within model applicability).
Practical Example Consider a make-up air unit serving a packaging line where condensation control is critical. The engineer receives these field readings every minute:
- Dry-bulb temperature: T = 299.15\,K (26°C)
- Pressure: P = 101325\,Pa
- Relative humidity: R = 0.62
The business requirement is to keep coil outlet conditions above a condensation-risk margin while minimizing reheat energy. The workflow can be structured in five steps.
Step 1: Solve the current state from measured inputs.
Use HA_PROPS_SI with (T, P, R) to compute humidity ratio W, dew point T_{dp}, and enthalpy H. This creates a thermodynamically consistent baseline instead of independently estimated values.
Step 2: Translate properties into control-relevant metrics.
From the HA_PROPS_SI results, the controls engineer can track latent load trends through W and energy implications through H. If T_{dp} approaches known cold-surface temperatures in ducts or coils, the system is entering risk territory.
Step 3: Quantify saturation behavior near operating temperature.
Use IAPWS92_PSAT at the operating T (and nearby points) to build a local view of vapor-pressure behavior. This helps interpret how aggressively moisture-driving potential changes with temperature drift.
Step 4: Evaluate sensitivity for robust setpoints.
Use PSYCHRO_DPSATDT at the same temperature to estimate how quickly saturation pressure shifts for a \pm0.2\,K sensor wobble or a control deadband. If |dP_{sat}/dT| is high, a small temperature perturbation can produce disproportionate humidity-control effects, suggesting tighter control or revised safety margins.
Step 5: Debug or validate non-ideal behavior if results look unusual.
If results deviate from legacy spreadsheets or a BAS approximation, inspect HA_PROPS_AUX outputs such as f, p_{ws}, and virial terms. This often reveals why simplified formulas diverge, particularly at elevated humidity ratios or non-standard pressures.
This process is more reliable than traditional chart interpolation because it is reproducible, scriptable, and traceable. In Excel-like workflows, teams can still use the Boardflare calculators directly, but with physics-consistent backend equations. In engineering governance terms, that means fewer hidden assumptions, cleaner peer review, and better alignment between design, controls, and operations teams.
How to Choose Use the function that matches your immediate decision question, not just the one that seems most general.
| Function | Best for | Inputs required | Returns | Strengths | Limitations |
|---|---|---|---|---|---|
| HA_PROPS_SI | Main psychrometric state solving | Output code + three independent property pairs (e.g., T, P, R) | Any supported humid-air property (e.g., H, W, T_{dp}, V) | Most versatile; direct fit for design/controls workflows | Requires valid independent inputs and correct property codes |
| HA_PROPS_AUX | Deep diagnostics and model internals | Auxiliary key + T, P, W | Virial and auxiliary terms (e.g., B_{aa}, C_{aaw}, f, p_{ws}) | Exposes non-ideal corrections for validation and advanced analysis | Not a substitute for full state solving in routine workflows |
| IAPWS92_PSAT | Saturation pressure of water vs temperature | T | P_{sat} | Fast, direct, transparent correlation output | Single-purpose; does not solve full humid-air state |
| PSYCHRO_DPSATDT | Sensitivity and derivative-based analysis | T | dP_{sat}/dT | Essential for uncertainty propagation and control tuning | Derivative only; typically paired with saturation/state functions |
A practical selection pattern is:
- Start with HA_PROPS_SI for any operational or design state calculation.
- Add IAPWS92_PSAT when you need explicit saturation-pressure tracking.
- Add PSYCHRO_DPSATDT when stability, margin, or sensitivity matters.
- Use HA_PROPS_AUX when you need to explain differences between simplified and real-gas models, or when validating internals.
In other words: HA_PROPS_SI is the production workhorse, IAPWS92_PSAT and PSYCHRO_DPSATDT are focused thermodynamic primitives, and HA_PROPS_AUX is the advanced inspection layer. Together they support both day-to-day engineering decisions and deeper model governance.
HA_PROPS_AUX
This function exposes CoolProp’s auxiliary humid-air property evaluator, which provides low-level coefficients and thermophysical terms used internally by psychrometric calculations.
It evaluates an auxiliary property as a function of dry-bulb temperature, pressure, and humidity ratio:
y = f\left(o, T, p, w\right)
where o is the requested auxiliary output code, T is temperature in kelvin, p is pressure in pascals, and w is humidity ratio in kg water per kg dry air.
Excel Usage
=HA_PROPS_AUX(output_name, temperature, pressure, humidity_ratio)
output_name(str, required): Auxiliary output code for humid-air calculations.temperature(float, required): Dry-bulb temperature (K).pressure(float, required): Total pressure (Pa).humidity_ratio(float, required): Humidity ratio (kg/kg dry air).
Returns (float): Auxiliary humid-air property value.
Example 1: Saturated vapor pressure at standard conditions
Inputs:
| output_name | temperature | pressure | humidity_ratio |
|---|---|---|---|
| p_ws | 298.15 | 101325 | 0.01 |
Excel formula:
=HA_PROPS_AUX("p_ws", 298.15, 101325, 0.01)
Expected output:
3169.75
Example 2: Enhancement factor near ambient condition
Inputs:
| output_name | temperature | pressure | humidity_ratio |
|---|---|---|---|
| f | 300 | 101325 | 0.012 |
Excel formula:
=HA_PROPS_AUX("f", 300, 101325, 0.012)
Expected output:
1.00433
Example 3: First virial air-air coefficient
Inputs:
| output_name | temperature | pressure | humidity_ratio |
|---|---|---|---|
| Baa | 295 | 101325 | 0.008 |
Excel formula:
=HA_PROPS_AUX("Baa", 295, 101325, 0.008)
Expected output:
-0.00000874799
Example 4: Molar saturated volume of water vapor
Inputs:
| output_name | temperature | pressure | humidity_ratio |
|---|---|---|---|
| vbar_ws | 310 | 101325 | 0.015 |
Excel formula:
=HA_PROPS_AUX("vbar_ws", 310, 101325, 0.015)
Expected output:
0.000018136
Python Code
Show Code
import CoolProp.CoolProp as CP
def ha_props_aux(output_name, temperature, pressure, humidity_ratio):
"""
Compute auxiliary humid-air properties from CoolProp.
See: https://www.coolprop.org/apidoc/CoolProp.CoolProp.html
This example function is provided as-is without any representation of accuracy.
Args:
output_name (str): Auxiliary output code for humid-air calculations. Valid options: Baa, Caaa, Bww, Cwww, Baw, Caww, Caaw, beta_H, kT, vbar_ws, p_ws, f.
temperature (float): Dry-bulb temperature (K).
pressure (float): Total pressure (Pa).
humidity_ratio (float): Humidity ratio (kg/kg dry air).
Returns:
float: Auxiliary humid-air property value.
"""
try:
value, _units = CP.HAProps_Aux(output_name, temperature, pressure, humidity_ratio)
return float(value)
except Exception as e:
return f"Error: {str(e)}"Online Calculator
HA_PROPS_SI
This function evaluates a humid-air property using CoolProp’s psychrometric solver from three independent state inputs. It supports common variables such as dry-bulb temperature, pressure, relative humidity, humidity ratio, enthalpy, and dew-point temperature.
Humid air state evaluation is represented as a multivariable mapping:
y = f\left(o,\; n_1, v_1,\; n_2, v_2,\; n_3, v_3\right)
where o is the requested output property code, each n_i is an input property code, and each v_i is its SI value.
Excel Usage
=HA_PROPS_SI(ha_psi_out, ha_psi_name_one, value_one, ha_psi_name_two, value_two, ha_psi_name_three, value_three)
ha_psi_out(str, required): Desired property code (e.g., ‘H’, ‘W’, ‘Vda’).ha_psi_name_one(str, required): Name of first input (e.g., ‘T’).value_one(float, required): Value of first input.ha_psi_name_two(str, required): Name of second input (e.g., ‘P’).value_two(float, required): Value of second input.ha_psi_name_three(str, required): Name of third input (e.g., ‘R’, ‘W’).value_three(float, required): Value of third input.
Returns (float): Calculated property value in SI units.
Example 1: Enthalpy of standard air (25C, 1atm, 50% RH)
Inputs:
| ha_psi_out | ha_psi_name_one | value_one | ha_psi_name_two | value_two | ha_psi_name_three | value_three |
|---|---|---|---|---|---|---|
| H | T | 298.15 | P | 101325 | R | 0.5 |
Excel formula:
=HA_PROPS_SI("H", "T", 298.15, "P", 101325, "R", 0.5)
Expected output:
50423.5
Example 2: Humidity Ratio (W)
Inputs:
| ha_psi_out | ha_psi_name_one | value_one | ha_psi_name_two | value_two | ha_psi_name_three | value_three |
|---|---|---|---|---|---|---|
| W | T | 298.15 | P | 101325 | R | 0.5 |
Excel formula:
=HA_PROPS_SI("W", "T", 298.15, "P", 101325, "R", 0.5)
Expected output:
0.00992574
Example 3: Dew Point Temperature
Inputs:
| ha_psi_out | ha_psi_name_one | value_one | ha_psi_name_two | value_two | ha_psi_name_three | value_three |
|---|---|---|---|---|---|---|
| Tdp | T | 298.15 | P | 101325 | R | 0.5 |
Excel formula:
=HA_PROPS_SI("Tdp", "T", 298.15, "P", 101325, "R", 0.5)
Expected output:
287.017
Example 4: Volume per unit dry air
Inputs:
| ha_psi_out | ha_psi_name_one | value_one | ha_psi_name_two | value_two | ha_psi_name_three | value_three |
|---|---|---|---|---|---|---|
| Vda | T | 303.15 | P | 101325 | R | 0.8 |
Excel formula:
=HA_PROPS_SI("Vda", "T", 303.15, "P", 101325, "R", 0.8)
Expected output:
0.88837
Python Code
Show Code
import CoolProp.CoolProp as CP
def ha_props_si(ha_psi_out, ha_psi_name_one, value_one, ha_psi_name_two, value_two, ha_psi_name_three, value_three):
"""
Calculate humid air properties using CoolProp psychrometrics.
See: https://coolprop.org/coolprop/HighLevelAPI.html#hapropssi-function
This example function is provided as-is without any representation of accuracy.
Args:
ha_psi_out (str): Desired property code (e.g., 'H', 'W', 'Vda'). Valid options: Temperature (T), Pressure (P), Humidity Ratio (W), Relative Humidity (R), Dew Point (Tdp), Wet Bulb (Twb), Enthalpy (H), Entropy (S), Mixture Volume (V), Dry Air Volume (Vda), Viscosity (M), Conductivity (K).
ha_psi_name_one (str): Name of first input (e.g., 'T'). Valid options: Temperature (T), Pressure (P), Humidity Ratio (W), Relative Humidity (R), Dew Point (Tdp), Wet Bulb (Twb), Enthalpy (H).
value_one (float): Value of first input.
ha_psi_name_two (str): Name of second input (e.g., 'P'). Valid options: Temperature (T), Pressure (P), Humidity Ratio (W), Relative Humidity (R), Dew Point (Tdp), Wet Bulb (Twb).
value_two (float): Value of second input.
ha_psi_name_three (str): Name of third input (e.g., 'R', 'W'). Valid options: Temperature (T), Pressure (P), Humidity Ratio (W), Relative Humidity (R), Dew Point (Tdp), Wet Bulb (Twb).
value_three (float): Value of third input.
Returns:
float: Calculated property value in SI units.
"""
try:
# CoolProp.HAPropsSI(Output, Name1, Prop1, Name2, Prop2, Name3, Prop3)
result = CP.HAPropsSI(ha_psi_out, ha_psi_name_one, value_one, ha_psi_name_two, value_two, ha_psi_name_three, value_three)
return float(result)
except Exception as e:
return f"Error: {str(e)}"Online Calculator
IAPWS92_PSAT
This function evaluates the saturation pressure of water from temperature using the IAPWS-92 formulation.
The saturation-pressure model is of the form:
P_{sat} = P_c \exp\left(\frac{T_c}{T} \sum_i a_i\tau^{n_i}\right)
where \tau = 1 - T/T_c, and the coefficients are defined by the IAPWS-92 standard for vapor-pressure calculations.
Excel Usage
=IAPWS92_PSAT(temperature)
temperature(float, required): Temperature for saturation-pressure evaluation (K).
Returns (float): Saturation vapor pressure of water (Pa).
Example 1: Saturation pressure near boiling point
Inputs:
| temperature |
|---|
| 373.15 |
Excel formula:
=IAPWS92_PSAT(373.15)
Expected output:
101418
Example 2: Saturation pressure at moderate temperature
Inputs:
| temperature |
|---|
| 325 |
Excel formula:
=IAPWS92_PSAT(325)
Expected output:
13532.1
Example 3: Saturation pressure at elevated temperature
Inputs:
| temperature |
|---|
| 450 |
Excel formula:
=IAPWS92_PSAT(450)
Expected output:
932203
Example 4: Saturation pressure at low positive temperature
Inputs:
| temperature |
|---|
| 280 |
Excel formula:
=IAPWS92_PSAT(280)
Expected output:
991.759
Python Code
Show Code
from chemicals.air import iapws92_Psat as chemicals_iapws92_psat
def iapws92_psat(temperature):
"""
Compute saturation vapor pressure using the IAPWS-92 correlation.
See: https://chemicals.readthedocs.io/chemicals.air.html
This example function is provided as-is without any representation of accuracy.
Args:
temperature (float): Temperature for saturation-pressure evaluation (K).
Returns:
float: Saturation vapor pressure of water (Pa).
"""
try:
return chemicals_iapws92_psat(temperature)
except Exception as e:
return f"Error: {str(e)}"Online Calculator
PSYCHRO_DPSATDT
This function computes the first temperature derivative of saturation pressure from the IAPWS-92 vapor-pressure model.
The derivative describes psychrometric sensitivity of vapor pressure with respect to temperature:
\frac{dP_{sat}}{dT}
and is evaluated using the closed-form IAPWS-92 correlation at the specified temperature.
Excel Usage
=PSYCHRO_DPSATDT(temperature)
temperature(float, required): Temperature for derivative evaluation (K).
Returns (float): First derivative of saturation vapor pressure with respect to temperature (Pa/K).
Example 1: Derivative near boiling point
Inputs:
| temperature |
|---|
| 373.15 |
Excel formula:
=PSYCHRO_DPSATDT(373.15)
Expected output:
3619.22
Example 2: Derivative at moderate temperature
Inputs:
| temperature |
|---|
| 325 |
Excel formula:
=PSYCHRO_DPSATDT(325)
Expected output:
662.795
Example 3: Derivative at elevated temperature
Inputs:
| temperature |
|---|
| 450 |
Excel formula:
=PSYCHRO_DPSATDT(450)
Expected output:
21774.7
Example 4: Derivative at low positive temperature
Inputs:
| temperature |
|---|
| 280 |
Excel formula:
=PSYCHRO_DPSATDT(280)
Expected output:
68.1526
Python Code
Show Code
from chemicals.air import iapws92_dPsat_dT as chemicals_iapws92_dpsat_dt
def psychro_dpsatdt(temperature):
"""
Compute temperature derivative of saturation pressure using IAPWS-92.
See: https://chemicals.readthedocs.io/chemicals.air.html
This example function is provided as-is without any representation of accuracy.
Args:
temperature (float): Temperature for derivative evaluation (K).
Returns:
float: First derivative of saturation vapor pressure with respect to temperature (Pa/K).
"""
try:
derivative, _psat = chemicals_iapws92_dpsat_dt(temperature)
return derivative
except Exception as e:
return f"Error: {str(e)}"Online Calculator