No? What about spherical cows? Here’s one of many from the Wikipedia article:

Milk production at a dairy farm was low, so the farmer wrote to the local university, asking for help from academia. A multidisciplinary team of professors was assembled, headed by a theoretical physicist, and two weeks of intensive on-site investigation took place. The scholars then returned to the university, notebooks crammed with data, where the task of writing the report was left to the team leader. Shortly thereafter the physicist returned to the farm, saying to the farmer, “I have the solution, but it only works in the case of spherical cows in a vacuum”.

The point of the joke is to mock over-simplified scientific models. And in the spirit of the joke, I’d like to work through an overly simplified model of greenhouses.

The question I’d like to answer is: what’s the best shape and size for a greenhouse? There’s a little problem with this question, which is that we need to define best. Is it the greenhouse that produces the maximum daytime temperatures, nighttime temperatures, or something else? I’m going to assume that the point of a greenhouse is to raise nighttime temperatures.

Next question: what affects the minimum temperature in a greenhouse during the night? There are at least three things that spring to mind:

- Temperature inside at the beginning of the night
- Temperature outside during the night
- Rate at which warmth leaks out of the greenhouse

So here’s where the greenhouse gets metaphorically spherical. The temperature at nightfall is going to be affected by the shape and orientation of the greenhouse during the daylight hours. But that makes things tricky, so I’m going to assume that all greenhouse shapes are exactly the same temperature at nightfall and ask which one leaks heat most slowly.

How can we measure the rate at which a greenhouse leaks heat? I’m not going to do an exact calculation, but it should be proportional to the area through which heat can be lost, the surface area of the greenhouse. But you also need to factor in the amount of heat which there is to be lost, which for a given temperature should be proportional to the volume of air inside the greenhouse. So what really matters is the amount of surface area per amount of air for each greenhouse shape.

Final caveat: I’m going to exclude the bottom, since the ground tends to have a more stable temperature than the air.

## Cubes first

[latexpage]

Let’s take a cuboid (i.e. without a sloped roof) greenhouse as an example. If $w$ is the width, $l$ is the length, and $h$ is the height, then we have:

$Volume = w \times l \times h$

$Surface Area = 2 \times l \times h +2 \times w \times h + l \times w$

$\dfrac{Surface Area}{Volume} = \dfrac{2}{w} + \dfrac{2}{l} + \dfrac{1}{h}$

Let’s assume we fix the height $h$ of the greenhouse, and we fix the volume $V$. Then we have:

$l = \dfrac{V}{w \times h}$

$\dfrac{Surface Area}{Volume} = \dfrac{2}{w} + \dfrac{2 \times w \times h}{V} + \dfrac{1}{h}$

We want to find the width that minimises surface area. If we differentiate to find the extreme points we get:

$-\dfrac{2}{w^2} + \dfrac{2 \times h}{V} = 0$

And then finally we unsurprisingly get $w = l$, i.e. that a greenhouse with a square base is best. That shouldn’t be shocking really, since by symmetry a square is the only place a minimum could be.

There’s something else to note here. What happens if we take out square-based greenhouse and make it bigger? The formula when $w = l$ is now:

$\dfrac{Surface Area}{Volume} = \dfrac{4}{w} + \dfrac{1}{h}$

Here’s the point: *if we increase w and make the greenhouse bigger, the surface area per unit volume decreases*. This is why the mini-greenhouses from Wilkos are so useless, because they have a large surface area compared to their volume, so they heat quickly and bake during the day, and then lose heat quickly at night, and on the other hand why your conservatory or polytunnel will probably have a higher minimum temperature than a (smaller) greenhouse will. It turns out the size matters after all.

## And now the spheres…

What about other simple shapes? Here’s a list giving, for a fixed volume $V$ and/or height $h$, the ratio of surface area to volume for different shapes.

**Cuboid **

$\dfrac{Surface Area}{Volume} = \dfrac{4}{\sqrt{\dfrac{V}{h}}} + \dfrac{1}{h}$

**Cube**

$\dfrac{Surface Area}{Volume} = \dfrac{5}{V^{\dfrac{1}{3}}} $

**Half-Sphere**

$\dfrac{Surface Area}{Volume} = \dfrac{3}{(\dfrac{3 V}{2 \pi})^{\dfrac{1}{3}}}$

**Half-Cylinder (i.e. Polytunnel)**

$\dfrac{Surface Area}{Volume} = \dfrac{\pi h^2}{V} + \dfrac{2}{h} $

Note that this formula implies that the best height / width for a polytunnel with a given volume is:

$ h = (\dfrac{V}{\pi})^{\dfrac{1}{3}} $

For a small polytunnel with a volume of 85 cubic meters, this would give an ideal height of 3m to minimise heat loss.

**Worked Example**

Let’s stick with our 85 cubic meter greenhouse, and let’s assume a height of 2m for shapes where $h$ is variable. That gives the following numbers:

Shape |
Surface Area / Volume |

Cuboid |
1.11 |

Cube |
1.14 |

Half-sphere |
0.87 |

Half-cylinder |
1.15 |

Note the two odd ones? Firstly, why does the cuboid have a smaller number than the cube? The answer, after much checking and scribbling on bits of paper, is because I didn’t deliberately didn’t count the face of the shape that sits on the ground. Because a height of 2m in this case means that the top has a bigger surface area than the sides, the cuboid comes in ahead because of that uncounted face.

The second odd one is the sphere, which has a value well under any of the others. The sphere is the shape with the smallest surface area per unit volume. You can’t do better. It’s just unfortunate that it doesn’t scale up well, since for large structures much of the volume will be up high where it’s not usable, and the floor space will be smaller than for shapes with a limited height (e.g. the cylinder).

## Where’s my pitched roof?

As a final exploration of greenhouse math, let’s do the traditional greenhouse shape, with a pitched roof. We’ll have a width $w$, a length $l$, and a height $h$ just like for the cuboid, but add an extra parameter $p$ to specify where the pitched roof starts. If $p = 0$ then it starts at the bottom and the greenhouse has a triangular cross-section, and if $p = 1$ then it’s a cuboid. The following picture illustrates the idea:

Now, in this case the formulas are a bit messier, but if we work it all through we get:

$Volume = (wph + \dfrac{1}{2} w (1 – p) h) l$

$SurfaceArea = 2 (w p h + \dfrac{1}{2} w (1 – p) h) + 2 l p h + 2 \sqrt{\dfrac{w^2}{4} + (p – 1)^2 h^2} l$

A bit of a mess, but if we assume that $l = w$, i.e. the greenhouse is square, and that $V$ and $h$ and $p$ are fixed, then we get:

$w = \sqrt{\dfrac{V}{h (p + \dfrac{1}{2}(1 – p))}}$

$\dfrac{SurfaceArea}{Volume} = \dfrac{2}{w} + \dfrac{2 p}{w (p + \dfrac{1}{2}(1 – p))} + \dfrac{2 \sqrt{\dfrac{1}{4} w^2 + (p – 1)^2 h^2}}{w h (p + \dfrac{1}{2}(1 – p))}$

So let’s take our 85 m3 volume again, and vary p. If we do that, we get something that looks like the following graph:

In this case, we get the lowest surface area to volume ratio if the pitched roof starts around 84% of the way up.

Anyway, that’s enough math for today I think. Hopefully I didn’t make any mistakes – if I did, let me know!