loading...
Run "Solar potato farm" for 60 sols, then try the dust storm (energy and growth collapse), the reactor with LED lights, and a poorly insulated dome (the heater eats the power). The balance line in the readout tells whether the farm is self-sufficient.
running...
How to use
The picture shows the sun crossing a Martian sky, an insulated glazed dome with the crop, the solar panels or reactor and a power bar. Choose a preset, then change the site, the dome, the lights and the power plant. Graphs show the daily light curve, crop biomass and cumulative energy. Press Harvest to collect the edible part and start again. Space pauses, R resets.
The science
Sunlight on Mars. At 1.52 AU the top-of-atmosphere flux is S0 = 589 W/m2. On a horizontal surface at hour angle h, latitude phi and declination delta, cos z = sin phi sin delta + cos phi cos delta cos h. Dust attenuates the direct beam as exp(-tau / cos z); a smaller scattered share survives as diffuse light and vanishes in a global storm (tau above about 4). A sol is 88775 s.
Canopy and growth. The canopy absorbs 1 - exp(-k LAI) of the photosynthetically active radiation (PAR, 45 % of sunlight times glazing transmission; LED light adds 40 % of electric power as PAR), with k = 0.7 and LAI = 0.012 x biomass (g/m2), capped at 5. Dry-matter growth follows radiation-use efficiency:
dB/dt = RUE x PAR_absorbed x f(T) x f(CO2), RUE = 3 g DM per MJ
f(T) is a parabola that is 1 at 20 C and 0 at 5 and 35 C; f(CO2) saturates with concentration (1 at 1000 ppm). Seventy percent of the dry matter is taken as edible tuber at 3.8 kcal/g.
Heat. The dome has envelope area 3.2 times its floor, insulation U and an outside temperature T_out = T_mean + A cos(h - 0.35). The heater supplies U S (T_set - T_out) minus the solar gain through the glazing (60 % of transmitted light). Mars is so cold (mean -63 C) that insulation, not sunlight, decides the energy bill: halving U halves the heater power.
Power. Panels give I A_p eta f_dust, a reactor gives a constant output; the farm uses heater + LED + pumps. A balance below zero means the colony must import energy.
Honest simplifications. Constant radiation-use efficiency; no phenology, water or nutrient limits, perchlorate soil, or pests; air temperature is held exactly at the set-point; no thermal mass, so night heating spikes are too sharp; diffuse light and dust are crude; energy storage is not modelled (generation is compared with demand in total, not hour by hour). The numbers show orders of magnitude, not a design.
Checks run in the page. Daily-mean insolation against the closed-form hour-angle integral; layer-by-layer canopy absorption against Beer-Lambert; heater energy over a sol against U S dT t; LED-only growth rate against RUE x absorbed PAR.