Headspace calculations

This is a follow-up from the post on Priming. There’s also a calculator based on this work.

Carbonating beer is normally done by either priming with sugar or force carbonation. Force carbonation is actually just a short cut of priming. Sugar is fermented, generating CO2, which pressurises the headspace, forcing CO2 to be dissolved into the beer.

Force carbonation uses a high pressure cylinder that keeps the head pressure constant thus carbonating the beer to a pre-determined level. Existing priming calculators assume that the head space is so small (in relation to the volume of beer) that the amount of CO2 left is negligible compared to the amount dissolved into the beer. However, this assumption becomes less and less true as the volume of the head space increases.

My new approach should work for arbitrary sized head spaces (e.g. 10L of beer in a 25L barrel) but there are limits. As volume of beer decreases proportionately more sugar is required and at some point it’ll start to noticeable increase the ABV of the beer. Also the required head pressure may exceed the capabilities of a simple plastic barrel.

So, down the detail:

First work out how many moles per litre of CO2 are required in your beer:

    \[ C_a = \frac{L}{22.4} \]

where Ca is the concentration of CO2, L is the number of volumes per litre required (technically the number of litres of CO2 at 1 atm and 273.15K) and 22.4 is the number of litres of gas in one mole (at STP). CHECK!

From this we can work out the mass of dissolved CO2:

    \[ M_{diss} = 44 C_a V_{beer} \]

Ca from before, Vbeer is the volume of the beer in litres. 44 is the number of grams of CO2 in one mole (the atomic weight).

Then work out Henry’s Constant for CO2 at the temperature at which the beer is to be stored. Henry’s constant is per gas and not as constant as you might think. We use Van’t Hoff’s equation to work out the constant at a particular temperature because Henry’s Constant is defined to be at 298.15K.

    \[ H_{cp} = 0.034 e^{2400 ( \frac{1}{T_{store}} - \frac{1}{298.15})} \]

Where 0.034 is Henry’s Constant at 298.15K, 2400 is Van’t Hoff’s coefficient for CO2.

Next step is to work out the head space pressure that would correspond the amount of dissolved CO2 that we require. We can work this out using Henry’s Law that gives the relationship between concentration of dissolved gas and the pressure of the gas above it.

    \[ P_{head}^{Atm} = \frac{C_a}{H_{cp}} - 1 \]

Phead is the head pressure in atmospheres, Ca is the concentration from above and Hcp is Henry’s constant at the storage temperature. Subtract one because this pressure is in addition to atmospheric pressure.

Conversions from atmospheres to Pascals and PSI:

In Pascals:

    \[ P_{head}^{Pa} = 101325 P_{head}^{Atm} \]

In PSI:

    \[ P_{head}^{PSI} = 14.7 P_{head}^{Atm} \]

Now we use the Ideal Gas equation (PV = nRT) to work out the mass of CO2 in the head space:

    \[ M_{gas} = \frac{P_{head}^{Pa}V_{head}}{188T_{store}}\]

Mgas is the mass of gas in grams, Phead is the head pressure in Pascals, Vhead is the volume of the head space in litres, temperature is the beer temperature in K and 188 is the value of Ideal Gas Constant for CO2 (it replaces the R component and converts moles to grams).

Now we now the total amount of CO2 required Mgas + Mdiss. However, there’s one thing overlooked: any CO2 that is already dissolved in the beer from the fermentation process. This can be calculated using the same set of equations and assuming atmospheric pressure and using the temperature that the beer was fermented at (or kept at prior to priming).

    \[ H_{cp} = 0.034e^{2400(\frac{1}{T_{beer}} - \frac{1}{298.15}) }\]

    \[ C_a = 1 H_{cp} \]

    \[ M_{exist} = 44 C_a V_{beer} \]

So now we have all the masses necessary:

    \[ M_{total} = M_{gas} + M_{diss} - M_{exist} \]

This mass of CO2 is the amount which we need to add to ensure that the right amount is dissolved in the beer and the right amount of head pressure is present. In the standard calculators Mgas is assumed to be << Mdiss and is left out.

Now to work out the amount of sugar (glucose) required to generate this amount of CO2. Chemistry tell us that 1 mole of Glucose generates 2 moles of CO2. So, working backwards:

    \[ M_{glu} = 180.16\frac{M_{total}}{2*44} \]

Additionally, we can use all this information to work out something else. Some people want to force carbonate using just one additional of CO2 i.e. pressurise it to well above the standard pressure and, once the CO2 has dissolved, it’ll drop down to the ‘normal’ pressure thus maintaining the right level of carbonation.

Firstly, we calculate the number of moles of CO2 we need to provide:

    \[ Mol_{CO_2} = \frac{M_{total}}{44} \]

Then we use the Ideal Gas equation to work out the pressure of that amount of CO2 at Storage Temperature for that head space

    \[ P_{CO_2} = \frac{0.08205 Mol_{CO_2} T_{store}}{V_{head}} \]

where Pco2 is the head pressure in atmospheres, Molco2 is the above, Tstore is the storage temperature in K and Vhead the head space in litres.

However, this is less useful than it might appear. You might think “Let’s just fill a keg, pressurise it to this level and leave it.” but for small head spaces the pressure required can get silly quickly. For 2 vol at 14C for 20L with a head space of 5L the required pressure is 85PSI, which exceeds typical CO2 cylinders.

Try with 18L in a 18.9L Corny keg (0.9L head space) and you’ll have to pressurise it to in excess of 370PSI. No chance. Look at it this way: 18L beer means 36L of CO2, the ratio of gaseous to aqueous CO2 is about 40:1. That means about 1500L of CO2 in a space of less than 1L.