Technical Reference

Scientific Methods & References

Equation set, numerical methods, assumptions, and annotated bibliography for the VPD Studio application.

1. Definitions & Symbols

SymbolMeaningUnits
\(T\)Air temperature°C
\(T_\ell\)Leaf temperature \(= T + \Delta T\)°C
\(\Delta T\)Leaf–air temperature difference°C
\(RH\)Relative humidity%
\(e_s(T)\)Saturation vapor pressure over water at \(T\)kPa
\(e(T,RH)\)Ambient water vapor partial pressurekPa
\(VPD\)Vapor Pressure DeficitkPa
\(P\)Station (ambient) pressurekPa
\(h\)Geopotential height (altitude)m
Unit policy. All calculations are performed internally in SI (°C, kPa). Display allows °C or °F. Saturation pressure and VPD are reported in kPa throughout, consistent with FAO-56 and ASHRAE conventions.

2. Saturation Vapor Pressure Models

The app uses a Magnus–Tetens–type expression (FAO-56 form) for saturation vapor pressure over liquid water:

\( e_s(T) = 0.6108 \; \exp\!\left( \dfrac{17.27\,T}{T + 237.3} \right) \qquad\) [kPa]

This parameterization (Allen et al., 1998, FAO-56) is standard in agronomy and evapotranspiration modeling. Alternative high-accuracy formulations include Buck (1981, 1996) and Sonntag (1990). For horticultural VPD ranges \(T \in [0, 40]^\circ\mathrm{C}\), the FAO-56 expression tracks these within ~0.1–0.3 %, well below sensor and environmental variability in grow environments.

2.1 Alternative formulations (cross-check)

3. Vapor Pressure Deficit (Air & Leaf)

Ambient water vapor partial pressure is \( e(T,RH) = \frac{RH}{100}\,e_s(T) \). Following standard definitions (FAO-56; Jones, Plants and Microclimate), VPD is the difference between saturation at a reference surface and the ambient vapor pressure.

3.1 Air VPD

\( VPD_{\mathrm{air}}(T,RH) = e_s(T)\,\Bigl(1 - \dfrac{RH}{100}\Bigr) \)   [kPa]

3.2 Leaf VPD (with leaf–air ΔT)

When a leaf is warmer than the surrounding air by \(\Delta T\), the evaporative demand at the leaf surface is modeled as:

\( VPD_{\ell}(T, \Delta T, RH) = e_s(T+\Delta T) - \dfrac{RH}{100}\,e_s(T) \)   [kPa]

This assumes (i) the leaf surface is near saturation at \(T_\ell\), and (ii) ambient vapor pressure is governed by air \(T\) and \(RH\). It captures the first-order effect described in plant microclimate literature (Monteith & Unsworth; Jones). In high-advection or boundary-layer-limited regimes, canopy models add aerodynamic resistances; the app intentionally uses the simpler diagnostic definition for speed and clarity in grow-room use.

Leaf VPD is primary. As of v1.4, heatmaps, band evaluations, and widget displays all use Leaf VPD rather than Air VPD. This reflects that target bands in horticultural practice are defined for the leaf surface, where transpiration actually occurs. Air VPD remains available as a secondary readout.

4. Dew Point & Absolute Humidity

4.1 Dew point (August–Roche–Magnus form)

With \( a = 17.27 \) and \( b = 237.3^\circ\mathrm{C} \) (Alduchov & Eskridge, 1996 / FAO-style), define \( \gamma(T,RH) = \ln(RH/100) + \dfrac{aT}{b+T} \).

\( T_d = \dfrac{b\,\gamma(T,RH)}{a - \gamma(T,RH)} \)   [°C]

4.2 Absolute humidity

Using ideal-gas relationships with \(R_d/R_v \approx 0.622\) yields a convenient engineering form for absolute humidity (mass concentration of water vapor):

\( \rho_v = 216.7 \, \dfrac{e\;[\mathrm{hPa}]}{T\;[\mathrm{K}]} \)   [g m\(^{-3}\)]

Here \(e\) is vapor pressure in hPa (1 kPa = 10 hPa) and \(T\) is absolute temperature in Kelvin. The constant 216.7 follows from the universal gas constant and molecular weights (WMO/ASHRAE tables).

5. Station Pressure & Altitude

For reference, the app computes an approximate station pressure from altitude using the US Standard Atmosphere barometric formula:

\( P(h) = 101.325 \,\Bigl(1 - 2.25577\times10^{-5}\,h\Bigr)^{5.2559} \)   [kPa]
Pressure scaling removed from VPD (v1.4.2). In classical thermodynamics, saturation vapor pressure over a plane water surface is primarily a function of temperature, with only minor dependence on total pressure over the altitude range of interest. As of v1.4.2, the app no longer applies a pressure-correction factor to \(e_s\) in VPD calculations. The vpd_kPa function accepts an altitude parameter for API compatibility but does not use it. The barometric formula is retained for psychrometric display and informational purposes only.

Earlier versions (pre-1.4.2) multiplied \(e_s\) by \(P(h)/101.325\) as a heuristic scaling factor. This was removed after review confirmed it is not required by the standard VPD definition and introduced a small, unnecessary bias at higher elevations.

6. Analytic Solvers & Numerics

6.1 Solve RH for a target VPD (fixed T)

From \( VPD = e_s(T)\,(1 - RH/100) \) it follows directly that \( RH = 100\,\bigl(1 - VPD/e_s(T)\bigr) \).

6.2 Solve T for a target VPD (fixed RH)

There is no closed form for \(T\) in the Magnus expression. The app uses a stable bounded search on \(T\in[5,45]^\circ\mathrm{C}\) with a small step for widget responsiveness. A Newton–Raphson variant was profiled but the bounded sweep is more robust on-device and avoids rare divergence at extreme RH.

6.3 Numerics & stability

7. Visualization & Color Mapping

Heatmaps use the perceptually uniform Viridis palette with green near the active stage's ideal band midpoint. The app computes a band-relative signed distance:

\( s = \dfrac{VPD - \text{mid}}{\text{half}} \in [-2,2] \)

and maps \(s\) into Viridis parameter \(t\) such that \(t\approx 0.72\) (green) at \(s=0\), shifting toward indigo (\(s\ll0\), too humid) and yellow (\(s\gg0\), too dry).

Heatmaps render Leaf VPD. As of v1.4, the heatmap grid evaluates vpdLeafCalc(T, RH, deltaT) at each cell rather than Air VPD. This ensures the color map reflects the plant's actual transpiration environment, including the configured leaf–air temperature offset. Air VPD heatmaps were used in versions prior to 1.4.

The heatmap image is pre-rendered to an off-screen RGBA buffer once per size/stage/ΔT combination (not every frame). Isolines (every 0.2 kPa) and the cursor halo are vector overlays drawn cheaply on top.

Why Viridis? Unlike rainbow maps, Viridis is near-perceptually-uniform in lightness and color, improves readability for color-vision-deficient users, and preserves ordinal structure (van der Walt & Smith, 2015).

8. Validation Strategy

9. Limits & Uncertainties

10. Code Mapping

Traceability from equation to implementation. Function names refer to the shared helpers in the widget and app targets.

ConceptEquationCode
Saturation vapor pressure \(e_s(T)=0.6108\exp\!\bigl(\frac{17.27\,T}{T+237.3}\bigr)\) es_kPa(T)
Station pressure from altitude \(P(h)=101.325(1-2.256\!\times\!10^{-5}h)^{5.256}\) pressureFromAltitude_kPa(h)
Air VPD \(e_s(T)(1-RH/100)\) vpd_kPa(T, RH, alt)
Leaf VPD \(e_s(T\!+\!\Delta T) - (RH/100)\,e_s(T)\) vpd_leaf_kPa(Tair, RH, Tleaf, alt)
Leaf VPD (widget heatmap) Same as above vpdLeafCalc(T, RH, deltaT)
Dew point \(T_d=\frac{b\,\gamma}{a-\gamma}\) VPDCalc.dewPointC(T, RH)
Absolute humidity \(\rho_v=216.7\,e[\mathrm{hPa}]/(T[\mathrm{K}])\) VPDCalc.absoluteHumidity_gm3(T, RH)
Solve RH for target VPD \(RH=100(1-VPD/e_s(T))\) VPDCalc.solveRH_for(...)
Solve T for target VPD Bounded search on \(T\) VPDCalc.solveTemp_for(...)
Isoline plotting \(RH(T)\) inversion per target VPD VPDChart.drawIsolines(...)
Viridis mapping Band-relative \(s\mapsto t\) viridisCentered(s)
Notable changes (v1.4.x). The widget helper functions vpd_kPa and vpd_leaf_kPa are now separate implementations. vpd_kPa no longer applies pressure correction (altitude parameter retained for signature compatibility). vpd_leaf_kPa takes (Tair, RH, Tleaf, alt) with distinct air and leaf temperature arguments. The altitude override was removed from the widget configuration intent in v1.4.4.

11. References