Run one glasshouse day. Roof vents, screens, heating and CO2 dosing fight over the same air: opening vents cools and dries the crop but throws the enriched CO2 out of the roof. Find the settings that give the best profit per square metre.
Replays this whole day eleven times with the vents held fixed at 0…100 %, keeping your other controls, and compares each outcome. The last column checks the simulated midday CO2 against the analytic steady-state CO2 = outside + (dose − net uptake) / ventilation flow.
Six tests against closed forms, an independent solver and budget closure.
The science
Air heat balance (per m² of floor, one lumped air node plus a floor/substrate heat store):
ρcph · dTa/dt = (1−fm)τI + hm(Tm−Ta) + Qpipe − U(Ta−To) − ρcpΦ(Ta−To) − λE + λEcond
τI is solar radiation through the glass (and screens), U the cover loss (thermal screen cuts it ~45 %), Φ the ventilation flow in m³ per m² per s, λE the latent heat taken by transpiration, and the last term is latent heat released when vapour condenses on the cold roof.
Ventilation (Boulard–Baille / de Jong form, wind plus buoyancy, plus leakage):
Φvent = Cd · (Av/2) · √( Cwu² + g H · |Ta−To| / T̄ )
air changes per hour = 3600 Φ / h
A glasshouse volume holds about 4.5 m³ of air per m² of floor, so fully open vents give roughly 30–60 air changes per hour in a light wind.
Transpiration (Penman–Monteith type, Stanghellini 1987 for greenhouse crops):
λE = [ ΔRn + 2 LAI ρcp D / rb ] / [ Δ + γ(1 + rs/rb) ]
rs = 82 (R+4.3)/(R+0.54) · (1+0.023(T−24.5)²) · (1+6.1×10−7(C−200)²)
D is the vapour-pressure deficit (VPD). Note the last factor: more CO2 closes the stomata, which cuts transpiration while raising photosynthesis. Humidity: h dx/dt = E − Φ(x−xo) − Econd.
Photosynthesis: each leaf follows a rectangular hyperbola P = εI·Pm/(εI+Pm); light is absorbed exponentially down the canopy (Beer–Lambert, k = 0.7, LAI = 3), which integrates in closed form:
Pc = (Pm/k) · ln[ (Pm+εI) / (Pm+εI·e−k LAI) ]
Pm and ε both rise with CO2 (a saturating, Michaelis-type curve with a compensation point Γ = 50 ppm) and peak near 26 °C. Maintenance respiration has Q10 = 2. CO2 balance: h dC/dt = dose − (Pgross−R) − Φ(C−Cout).
Yield and money: net CO2 × 30/44 g CH2O per g CO2 × 0.8 growth efficiency × 60 % to fruit ÷ 6 % dry matter = fresh fruit. Prices are invented round numbers (fruit 1.50 EUR/kg, heat 0.08 EUR/kWh of fuel, CO2 0.12 EUR/kg) to make trade-offs readable.
Honest simplifications: one well-mixed air volume (real houses have gradients), no leaf-temperature or boundary-layer model beyond a fixed rb, constant LAI and no fruit-load feedback, no pest or disease, a synthetic day (sinusoidal temperature, sine-power sunshine, fixed dew point), crop temperature taken as air temperature, and parameters tuned to plausible greenhouse magnitudes rather than fitted to one real house. Treat the numbers as teaching values.
Baked 3D scene. The Venlo glasshouse, hinged vents, screens, pipes, tomato plants and yard come from Blender 5.2 (named parts, Cycles-baked albedo and normal maps, baked plant ambient occlusion, Draco GLB); Three.js r160 animates them from the model.