Learn R Programming

tealeaves (version 1.0.6)

.get_dwv: d_wv: water vapour gradient (mol / m ^ 3)

Description

d_wv: water vapour gradient (mol / m ^ 3)

Usage

.get_dwv(T_leaf, pars, unitless)

Value

Value in mol / m^3 of class units

Arguments

T_leaf

Leaf temperature in Kelvin

pars

Concatenated parameters (leaf_par, enviro_par, and constants)

unitless

Logical. Should function use parameters with units? The function is faster when FALSE, but input must be in correct units or else results will be incorrect without any warning.

Details

Water vapour gradient: The water vapour pressure differential from inside to outside of the leaf is the saturation water vapor pressure inside the leaf (p_leaf) minus the water vapor pressure of the air (p_air):

$$d_\mathrm{wv} = p_\mathrm{leaf} / (R T_\mathrm{leaf}) - RH p_\mathrm{air} / (R T_\mathrm{air})$$

Note that water vapor pressure is converted from kPa to mol / m^3 using ideal gas law.

SymbolRDescriptionUnitsDefault
\(p_\mathrm{air}\)p_airsaturation water vapour pressure of airkPacalculated
\(p_\mathrm{leaf}\)p_leafsaturation water vapour pressure inside the leafkPacalculated
\(R\)Rideal gas constantJ / (mol K)8.3144598
\(\mathrm{RH}\)RHrelative humidity%0.50
\(T_\mathrm{air}\)T_airair temperatureK298.15
\(T_\mathrm{leaf}\)T_leafleaf temperatureKinput

Examples

Run this code

# Water vapour gradient: 

leaf_par <- make_leafpar()
enviro_par <- make_enviropar()
constants <- make_constants()
pars <- c(leaf_par, enviro_par, constants)
T_leaf <- set_units(300, K)
T_air <- set_units(298.15, K)
p_leaf <- set_units(35.31683, kPa)
p_air <- set_units(31.65367, kPa)

d_wv <- p_leaf / (pars$R * T_leaf) - pars$RH * p_air / (pars$R * T_air)

Run the code above in your browser using DataLab