Skip to content
Tactiverge

Greenhouse through a cold night: experiment bench

Simulation OS · playgroundEducational model, not a digital twin

Greenhouse through a cold night

Keep seedlings between 16 and 24 °C from 18:00 to 08:00 with a heater, a thermometer and a controller, using as little energy as you can.

Your level (shows more controls and deeper equations)
  1. 1. Ask
  2. 2. Hypothesise
  3. 3. Set up
  4. 4. Run
  5. 5. Record
  6. 6. Change one variable
  7. 7. Compare
  8. 8. Interpret
  9. 9. Limitations & save

If I change …, then … will …, because …

3 · Set up the parameters

10–24 °C

The temperature the controller aims for.

0–3000 W/°C

Heater watts per degree below the target.

500–4000 W

The most power the heater can deliver.

0–8 h

An open vent roughly doubles the heat lost to the night air.

0–3000 W/(°C·h)

Builds up heat while the house stays cold.

2 more controls appear at higher levels; until then they stay at the default value.

The seed fixes any random noise. Same parameters + same seed = exactly the same result, every time, on every computer.

6 · Change one variable

Your first run is the baseline. After it, change one thing at a time.

7 · Compare on a graph

Run the model to draw your first curve here.

5 · Run log

No runs yet.

Equations

Lumped thermal model: C·dT/dt = Q_heater + Q_sun − UA·(T − T_out), C = 0.6 MJ/K, so τ = C/UA = 100 min.

PI control: Q = clamp(Kp·e + Ki·∫e dt, 0, Q_max), e = setpoint − reading.

Assumptions (always true in this model)

  • One well-mixed air volume (a single temperature).
  • Heat capacity and loss coefficient are illustrative values for a ~10 m² glass greenhouse, not measurements.
  • Outdoor temperature follows a smooth daily curve (11 °C at 15:00, 1 °C at 03:00).
  • PI controller with conditional-integration anti-windup; heater power is continuous between 0 and its rating.
Text description of what the chart shows

A line chart over the 14 hours from 18:00 to 08:00. The outside temperature falls to about 1 °C at 03:00. The inside temperature starts at 20 °C and falls toward the target, where the controller holds it; opening the vent from 22:00 makes it dip. Heater power rises as the night gets colder.

Did the result support your hypothesis? Use the numbers from the comparison table and link them to an equation.

Which assumptions could change your answer in the real world? For example: No humidity, wind, cloud or plant transpiration; a real greenhouse has temperature gradients and drafts.

Export and save

Exports use the ticked runs (or every run if none are ticked). Your draft saves automatically in this browser only. The Journal is private to you.

Valid parameter ranges

ParameterRangeDefault
Target temperature10 to 24 °C18
Proportional gain Kp0 to 3000 W/°C400
Heater rating500 to 4000 W3000
Vent left open (from 22:00)0 to 8 h3
Integral gain Ki0 to 3000 W/(°C·h)0
Thermometer noise σ0 to 1.5 °C0.4
Moving-average window1 to 10 samples1

Independent reference checks

  • Heater off all night

    Q = Kp·e + Ki·∫e = 0 for Kp = Ki = 0, so no energy is used and the heater never switches.

  • Undersized heater pinned at full power

    Equilibrium T_out + (500 W + sun)/UA stays below 23.8 °C, so Kp·e > 500 W all night: E = 500 W × 14 h = 7 kWh (hand calculation).

Checked automatically on every change to the code. Educational model, not engineering-grade.

Where this model stops being right

  • No humidity, wind, cloud or plant transpiration; a real greenhouse has temperature gradients and drafts.