Run a 24-egg forced-air incubator through the 21-day chicken timeline. A thermostat holds the air near 37.5 °C, Fick diffusion through the shell pores sets the egg-mass loss (target 12–14 % by day 18), turning stops the embryo sticking, and every deviation shows up in hatch timing and hatch rate. Watch the egg in candling or cutaway view.
Each row is a complete incubation with the current settings and one setting changed; the analytic columns come from closed forms.
Compares the code with closed forms: Fick mass loss against an Antoine-equation reference, the thermal steady state against an RK4 integration, the degree-day hatch time, and a 24 h heater energy balance.
The science
Heat balance. The cabinet air (Ca = 5 kJ/K) is heated by the element Qh (lagged, τ = 60 s) and the fan motor, loses heat to the room through the walls, the ventilation air and an open door, and exchanges heat with the 24 eggs:
Ca dTa/dt = Qh + Qfan − UA(Ta − Troom) − N·hA(Ta − Te)
Ce dTe/dt = N·hA(Ta − Te) + N·Qmet(age) − latent loss
UA = wall loss + ρcpV·ACH/3600. hA per egg rises from 0.07 W/K in still air to 0.20 W/K with the fan. The embryo itself becomes a heater (Qmet ≈ 0.12 W per egg near hatching), so a late egg runs warmer than the air — much warmer with the fan off. The thermostat reads the probe through a 40 s sensor lag; the on/off controller therefore overshoots, while the PID (Kp = 0.5 per K, integral time ~14 min, derivative on the measurement) does not.
Embryonic development. Growth is a temperature-driven clock with a physiological zero T0 = 26.7 °C and an optimum of 37.5 °C (21 days):
dθ/dt = (Te − 26.7)/(37.5 − 26.7) [embryo days per day]; hatch when θ = 21
At a constant 36.5 °C this gives 21·10.8/9.8 = 23.1 days; 1 °C cooler costs about 1.5 days. Above the optimum the rate rises only 5 % per °C, but the mortality hazard climbs.
Water loss (Fick). Water leaves through the shell pores by diffusion: eggshell conductance G (mg per day per torr, typical hen egg 15–20) times the vapour-pressure difference between the egg interior (saturated at egg temperature) and the cabinet air:
J = G · (psat(Te) − RH·psat(Ta)) [mg/day per egg]
At 37.5 °C, RH 50 % and G = 18 this is about 450 mg/day, ~13 % of a 60 g egg by day 18 — the usual aim is 11–14 %. The lost water enlarges the air cell at the blunt end (visible in candling). The cabinet vapour balance has the humidifier or water pan as source, the eggs themselves, and ventilation as the sink.
Turning. Until lock-down (day 18) the rack tilts ±45 ° at the chosen rate. The model raises the mortality hazard when turning is rare, most strongly in days 3–7 when the embryo can stick to the shell membrane. After lock-down turning stops and the humidity setpoint rises to the hatching value (~65 %).
Hatch rate. A cumulative hazard H = ∫ h dt with h = hbase + htemperature + hhumidity + hturning + hhatch-RH gives survival exp(−H); hatch rate of set eggs = fertility × exp(−H). The hazard coefficients are illustrative, shaped after the qualitative literature (best hatch at 37.5–37.8 °C, 11–14 % mass loss, several turns a day, ~65 % RH while hatching); they are not measured values for a given breed or machine.
Honest simplifications: all eggs share one temperature and mass, no temperature gradient inside the cabinet, no CO2/O2 model, no egg-age or breed effects, expected-value survival instead of individual eggs, the embryo drawings are schematic. Educational model, not poultry-management advice.
Baked 3D scene. Cabinet, trays, fan, heater coil, eggs and chicks were modelled in Blender 5.2 with baked albedo, normal and ambient-occlusion textures (Draco GLB); Three.js r160 runs the live part.