compute_Rs
def compute_Rs(
pi_FT, # Osmotic potential at full turgor π₀ (MPa). Negative value,
epsilon, # Bulk modulus of elasticity ε of the symplasm (MPa).
psi, # Current water potential ψ of the symplasm (MPa).
): # Relative symplasmic water deficit (dimensionless, 0 to 1).Compute the relative symplasmic water deficit Rs = 1 − RWC.
Inverts the pressure–volume curve (Ruffault et al. 2022, Eq. 43) to obtain the fractional water loss of the symplasm at a given water potential ψ. The function handles both regimes of the p–v curve (above and below the turgor loss point)
Above the turgor loss point (Rs1), Rs is found by substituting RWC = 1 - Rs into Equation 46 (the product form of Eq. 43), yielding a quadratic in Rs:
ε·Rs² + (ψ + π₀ − ε)·Rs − ψ = 0
which is solved with the quadratic formula (minus root).
Derivation of the quadratic solved by compute_Rs()
STEP 1 — Equation 43 (first case): the pressure-volume curve
─────────────────────────────────────────────────────────────
ψ = −π₀ - ε(1 - RWC) + π₀ / RWC
│
│ Multiply both sides by RWC to clear the fraction
▼
STEP 2 — Equation 46: product form
───────────────────────────────────
ψ·RWC + π₀·RWC + ε(1 - RWC)·RWC - π₀ = 0
│
│ Substitute RWC = 1 - Rs
▼
STEP 3 — After substitution
────────────────────────────
ψ(1 - Rs) + π₀(1 - Rs) + ε·Rs·(1 - Rs) - π₀ = 0
│
│ Expand every product
▼
STEP 4 — Expanded form
───────────────────────
(ψ - ψ·Rs) + (π₀ - π₀·Rs) + (ε·Rs - ε·Rs² - π₀) = 0
│
│ Cancel +π₀ and −π₀ , then group by powers of Rs
▼
STEP 5 — Collected by powers of Rs
───────────────────────────────────
-ε·Rs² + (−ψ - π₀ + ε)·Rs + ψ = 0
│
│ Multiply everything by -1
▼
STEP 6 — Standard quadratic form (a·x² + b·x + c = 0)
────────────────────────────────────────────────────────
ε·Rs² + (ψ + π₀ - ε)·Rs - ψ = 0
where a = ε
b = (ψ + π₀ - ε)
c = −ψ
│
│ Apply quadratic formula, take the MINUS root
│ (the plus root gives Rs > 1, physically impossible)
▼
STEP 7 — Quadratic formula (minus root)
────────────────────────────────────────
-b - √(b² - 4ac)
Rs = ─────────────────────
2a
-(ψ + π₀ - ε) - √( (ψ + π₀ - ε)² + 4·ε·ψ )
= ──────────────────────────────────────────────────────
2·ε
Note: the +4·ε·ψ under the square root comes from
-4ac = -4·ε·(−ψ) = +4·ε·ψ
│
│ Direct translation to Python
▼
STEP 8 — Python implementation
──────────────────────────────
Rs1 = (
-1 * (psi + pi_FT - epsilon) # ← −b
- np.sqrt((psi + pi_FT - epsilon) ** 2 + 4 * psi * epsilon) # ← −√(b²−4ac)
) / (2 * epsilon) # ← ÷ 2a
Below the turgor loss point (Rs2), turgor is zero and only the osmotic term remains (Eq. 43, second case: ψ = π₀/RWC), giving:
Rs = 1 − π₀/ψ
Physical analogy: Think of a balloon filled with sugar water. Above TLP the balloon is inflated — both the elastic wall (turgor) and the sugar concentration (osmotic pressure) resist water loss. Below TLP the balloon has deflated — only the sugar concentration matters.
Parameters:
pi_FT: Osmotic potential at full turgor π₀ (MPa). Negative value, e.g. −2.1.
epsilon: Bulk modulus of elasticity ε of the symplasm (MPa). Positive value, e.g. 10.
psi: Current water potential ψ of the symplasm (MPa). Negative value, e.g. −1.5. Corresponds to
psi_LSymorpsi_SSym
Returns:
- Rs: Relative symplasmic water deficit (dimensionless, 0 to 1). Rs = 0 means fully hydrated (RWC = 1). Rs = 1 means completely desiccated (RWC = 0).
Parameters
pi_FT : float Osmotic potential at full turgor π₀ (MPa). Negative value,
epsilon : float Bulk modulus of elasticity ε of the symplasm (MPa).
psi : float Current water potential ψ of the symplasm (MPa).
Returns
Rs : float Relative symplasmic water deficit (dimensionless, 0 to 1).