Ecosystem Terrarium: Closed Jar Carbon, Oxygen and Water Cycle

A sealed glass sphere modelled in Blender: plants draw CO2 down by day, respiration refills it at night, the pond evaporates and the cooler glass gives the water back as condensation. Everything stays inside the jar.

Switch to 2D

Presets

Playback

Parameters

Camera

Layers

Quality

Model check

The science

A sealed jar as a miniature planet. Nothing enters or leaves a closed terrarium except light and heat, so every atom of carbon and every gram of water is bookkept inside the glass. The simulation tracks carbon in three pools (CO2 gas, plant matter, soil organic matter), oxygen in the gas, and water in four places (pond, vapour, a film on the glass, drips). The glass sphere is 300 mm across, the Blender model is at real scale and the gas volume is measured from the mesh.

Carbon and oxygen. Photosynthesis moves CO2 to plant carbon: P = p_m B f(I) g(c) (1 - B/B_max) f_T(T), with a saturating light response f = I/(I + I_k), a CO2 response g = (c - G)/(c - G + K_c) that vanishes at the compensation point G = 50 ppm, a crowding term and a broad temperature optimum. Plants and soil respire, R_p = r_p B Q10^((T-20)/10) and R_s = r_s S Q10^((T-20)/10), with Q10 = 2; litter falls from plants to soil at a rate lambda B. One mole of O2 is released or consumed per mole of CO2 (carbohydrate stoichiometry), so CO2 + O2 and CO2 + B + S are both conserved exactly. The headspace holds only about 0.5 mol of gas, so CO2 swings by thousands of ppm over a day, which is what real sealed jars show; O2 changes by only a fraction of a percent.

Water cycle. The saturation vapour pressure follows the Magnus formula e_s(T) = 0.61094 exp(17.625 T/(T + 243.04)) kPa. The pond and the leaves evaporate towards e_s(T_air) with a conductance that grows with light and plant mass; the glass condenses water towards e_s(T_glass) where the glass is cooler than the air (it loses heat by radiation at night). The vapour pressure e relaxes between the two with rate (g_e + g_c)/C where C = V M/(R T) is the vapour capacity of the headspace; the update is exact for constant coefficients so the water is conserved to rounding error. Glass film water drips back at a rate k_d W_g.

What is simplified. One temperature for the whole jar with a sinusoidal day cycle and a day-night glass offset; no spatial gradients of CO2 or humidity; no soil water storage separate from the pond; plant growth is one lumped pool with a logistic crowding limit (no individual plants, no leaf area, no stomatal control); microbes are folded into the soil pool; nutrients are not limiting, so the long-term decline of soil carbon is slow. The rate constants are chosen to give a plausible, bounded jar, not fitted to a particular terrarium, and the sliders are not a prediction for yours. The trees and ferns are decorative: their size follows the plant carbon (cube root), nothing else.

Numerical checks (run on load): conservation of carbon and of CO2 + O2 after the start-up run, the Magnus formula against published tables, the gas volume and ideal-gas amount from the Blender glass mesh, conservation of water over 120 simulated hours, and the soil carbon equation against its closed form.

Loading model...
Loading Blender model...
CO2 in the jar over the last three days
Relative humidity and condensate on the glass
Plant and soil carbon pools
Made with 🟠 Blender · Three.js