• We have implemented the ability to gift someone a Supporting Membership now! When you access the Upgrade page there is now a 'Gift' button. Once you click that you can enter a username to gift an account Upgrade to. Great way to help support this forum plus give some kudos to anyone who has helped you.

Accurate prediction of CO2 content.

Aussie Home Brewer

Help Support Aussie Home Brewer:

Lyrebird_Cycles

Well-Known Member
Joined
10/7/16
Messages
1,439
Reaction score
775
I'm building a little calculator to predict CO2 content, based on some work I did a while back for something else*.

I'm using the Henry's Law coefficients from this paper: https://www.researchgate.net/publication/244342767_Solubility_of_carbon_dioxide_in_binary_and_ternary_mixtures_with_ethanol_and_water.

The basic approach is to model the beer as a ternary mixture, water / alcohol / CO2. I'm thinking that I'm justified in ignoring the contribution of dissolved solids on the following grounds: if the dissolved solids are at say 50 g/l and an assumed average MW of ~630 (obtained by modelling them as equal quantities of maltotriose and maltotetrose) the difference in the mole fraction of water in the presence of solids vs the absence of solids is about 0.2%.

What say the brains trust, is there something I'm missing here?

* I spent a while building thermodynamic models of fermentations as part of the research for a PhD I then abandonned.
 

MHB

Well-Known Member
Joined
1/10/05
Messages
5,646
Reaction score
3,059
Location
Newcastle
I don't know if your missing something, other than a question. It reads as a statement of intent.

The way Alcohol and CO2 are usually worked out is something like this
1/ Measure Apparent Attenuation (OG-FG)/OG*100 = AA
2/ Calculate Real Attenuation (RA=0.82*AA)
3/ Derive the mass of Sugars Fermented
4/ Calculate the mass of CO2 or Alcohol produced from 1gMaltose+.005gAmino Acid produces 0.48g Ethanol + 0.468g CO2 + 0.05g yeast growth + 2.09kJ

As all the fermentable sugars have the same MW there is no need to worry about anything other than mass fermented, nor any need to make allowances for all the other non-fermentable bits in the wort (about 37% of wort solids).
Mark
 

Lyrebird_Cycles

Well-Known Member
Joined
10/7/16
Messages
1,439
Reaction score
775
The calculator is to predict the equilibrium CO2 content of a beer at a given temperature and pressure. I know there are several such online but none of them takes account of alcohol content.


The question is whether there's something obvious I've missed. The two obvious possibilities are dissolved solids and pH but I think I've accounted for them.
 

MHB

Well-Known Member
Joined
1/10/05
Messages
5,646
Reaction score
3,059
Location
Newcastle
OH sorry I thought because you were talking about the Maltose and Maltotriose you were talking about fermentation, the amount of those two left in finished beer approaches zero. Other than water and alcohol most of the unfermented gravity is made up of Dextrins about 80% residuals, the rest being protein, minerals, gums pentoses...

This one used in Braukaiser works very well

Cbeer = (Phead+1.013)*(2.71828182845904^(-10.73797+(2617.25/(Tbeer+273.15))))*10
  • Cbeer - carbonation of the beer in g/l
  • Phead - head pressure in bar
  • Tbeer - temperature of the beer in C
It is based on empirical data for CO2 solubility in finished beer, and is a hell of a lot more accurate than the gauges on most peoples regulators.
Mark
 

Lyrebird_Cycles

Well-Known Member
Joined
10/7/16
Messages
1,439
Reaction score
775
The problems with that one are part of why I'm doing a new one: it uses a coefficient stated to 15 significant figures but ignores the influence of alcohol.

That sort of thing irks me greatly.

BTW the use of the lower MW sugars as dissolved solids is not intended as anything other than a worst case scenario to justify eliminating them from the model
 

Lyrebird_Cycles

Well-Known Member
Joined
10/7/16
Messages
1,439
Reaction score
775
BTW I should add for those who haven't waded through the paper referenced in the OP: CO2 is about 8 times as soluble in ethanol as it is in water so not accounting for alcohol content is a serious source of error.
 

Zorco

Well-Known Member
Joined
10/7/14
Messages
2,006
Reaction score
1,011
Location
Brisbane
There is nothing cooler than persevering towards accuracy.

Please add in the occasional bit of context and emphasis like you did above. It helps the willing soak up the concepts.
 

Lyrebird_Cycles

Well-Known Member
Joined
10/7/16
Messages
1,439
Reaction score
775
MHB said:
Other than water and alcohol most of the unfermented gravity is made up of Dextrins about 80% residuals, the rest being protein, minerals, gums pentoses...
OK and thanks, of those the pentoses are potentially of concern. The references I can find say that Xylose and Arabinose are the major species and they're each present at about 15 mg/l so there are no worries there.
 

MHB

Well-Known Member
Joined
1/10/05
Messages
5,646
Reaction score
3,059
Location
Newcastle
Lyrebird_Cycles said:
The problems with that one are part of why I'm doing a new one: it uses a coefficient stated to 15 significant figures but ignores the influence of alcohol.

That sort of thing irks me greatly.

BTW the use of the lower MW sugars as dissolved solids is not intended as anything other than a worst case scenario to justify eliminating them from the model
I really am in favour of doing research, may be playing the devils advocate.
So you are looking to replace an empirically derived formula (probably resolved on "Standard" beer 4.5-5% ABV 20 IBU give or take) where all the variables are pretty much covered by the fact that it is empirical - with a theoretical construct.
Problem to my mind is divided into 2.
1 - How many of the variables can we measure accurately enough to take their effects/interrelationships into account in a reliable manner, one that gives more accurate results than those empirically derived as above.
2 - How accurate do you think the pressure gauges on the regulator are, I set up a carbonating station for a small brewery recently, the pressure gauge is a calibrated digital one, I can tell you that its rare when a bottle regulator gauge agrees within 20kPa - and how do you know anyway.

When I was working through carbonation a couple of years ago I was using a calibrated gauge (analogue at that time) a set of Sartorius 30kg scales good to 0.1g, a fridge with a very good controller, all referenced against a certified thermometer.

I agree that the equation above probably doesn't need 15 Sig Fig's. But given time to equilibrate I couldn't find any Measurable error across the range of tests I did (up to FG of 1.040)
What I'm really wondering is why you want to make it even more complicated, is their any benefit.
Mark
 

Lyrebird_Cycles

Well-Known Member
Joined
10/7/16
Messages
1,439
Reaction score
775
Yes, I get your concern but the mere existence of the calculator doesn't force anyone to use it.

Re point 1: the only additional measurement is ABV, which is routine anyway. If you just estimate ABV ~= 5% you're back to the original calculator.

Re point 2: hopefully bettter than 10% if you are relying on it for process control. The variation of [CO2] with ABV looks to be around there across a typical range of ABVs for beer.

I've included the ability to take into account the effect of headspace and splashing losses on carbonation, so it's potentially useful there.


FWIW using a first bash at my calculator I get that their "Standard" beer had an ethanol mole fraction of 0.0148, which is an ABV of 4.6%. I think that's pretty good agreement.
 

klangers

Well-Known Member
Joined
10/9/14
Messages
738
Reaction score
301
Why not combine the two approaches and do some statistical analysis - eg multiple linear/exponential/etc regression, n-way ANOVA - to marry the empirical with the mathematical?

Process control pressure gauges are incredibly accurate.

Bottle gauges are incredibly Inaccurate and have a significant variation in response depending on temperature.
 

Lyrebird_Cycles

Well-Known Member
Joined
10/7/16
Messages
1,439
Reaction score
775
Well I don't have the resources or the time, also it isn't necessary: they are both empirical approaches in that they both fit sets of curves to empirical observations.

IMO it is only necessary to check that the intersections of the sets of curves are in the right place.
 

yankinoz

Well-Known Member
Joined
16/2/12
Messages
568
Reaction score
173
What is the purpose of your calculator? By "finished beer" do you mean the level at the end of fermentation or that in bottle or keg?

If the purpose is to predict the effect of dissolved carbon dioxide on taste upon serving (it has one), then you're probably correct to take alcohol into account. Winemakers have done a lot of work on this.

But does the raising of the equilibrium level of dissolved carbon dioxide at any given temperature affect the pressure exerted in bottle or the perceived carbonation after opening? If not, then existing calculators and Palmer's much-used nomogram for calculating sugar additions at bottling are correct in ignoring abv.
 

Lyrebird_Cycles

Well-Known Member
Joined
10/7/16
Messages
1,439
Reaction score
775
yankinoz said:
But does the raising of the equilibrium level of dissolved carbon dioxide at any given temperature affect the pressure exerted in bottle or the perceived carbonation after opening?
Yes it does. The pressure exerted in bottle is in equilibrium with the [CO2] in the beer. The relationship between the two changes with alcohol concentration because CO2 is more soluble in ethanol than in water.

How much change in carbonation is perceptible is debatable, but my former employers insisted on a spec of +/- 0.1 g/l on a beer with 5.35 g/l and presumably this was based on statistical analysis of consumer perception like everything else.

Now that you mention Palmer's efforts, has anyone else noticed the errors in the oft repeated rates of conversion of sugar to CO2? They all say glucose.H20 is 91% fermentable and 50% by weight goes to CO2, giving a conversion of 45.5%. The actual conversion rate is 2 x 44 / 198 = 44.444%. Yes it's only 2% error but again, this kind of thing irks me: if you are going to accept a 2% error why keep quoting 91%?
 

yankinoz

Well-Known Member
Joined
16/2/12
Messages
568
Reaction score
173
Although Palmer is a chemist, he appears to have trusted a lot of cited sources without testing them. I can't blame him for that, and he does give the sources, but there are errors.
 

Zorco

Well-Known Member
Joined
10/7/14
Messages
2,006
Reaction score
1,011
Location
Brisbane
Lyrebird, I'm wishing you well on this.

Science is all about finding new solutions to problems and doing it better whenever possible.

More importantly, you seem to be creating and that is beerworthy.

I only wish I had the knowledge to engage you in this thread!
 

MHB

Well-Known Member
Joined
1/10/05
Messages
5,646
Reaction score
3,059
Location
Newcastle
Ok finished wading through most of the paper, some interesting points.
Its worth noting that the paper is 10 years old, since then I cant find much in the way of commercial interest from the beverage industry.
The experiments were conducted between 15-50oC, there are some novel effects on CO2 solubility in a low alcohol/water system might be interesting. However it appears that the most obvious effects are at high temperatures and pressures, well outside what we as brewers are interested in.
Frankly I cant see much of a deviation from the "standard" models across the range of conditions that will interest brewers, being generous 0-10oC, 0-10% alcohol, 0-250kPa. with over 90% of all the beer made being much closer to 5oC, 5%ABV, 100kPa (give or take not much).
Personally I cant see the point if you are using a common home brewing hydrometer to derive alcohol, the error from that alone would probably exceed the error from the equation used to calculate carbonation conditions.

Mark
 

Lyrebird_Cycles

Well-Known Member
Joined
10/7/16
Messages
1,439
Reaction score
775
I decided to re-jig this as a simple variation on the equation MHB posted earlier:

MHB said:
Cbeer = (Phead+1.013)*(2.71828182845904^(-10.73797+(2617.25/(Tbeer+273.15))))*10
  • Cbeer - carbonation of the beer in g/l
  • Phead - head pressure in bar
  • Tbeer - temperature of the beer in C
A minor rearrangement and simplification yields an equivalent equation:

Cbeer = (Phead+1.013)*(2.71828^(2617.25/(Tbeer+273.15)))*0.000217

basically I've reduced the number of terms by one by pulling the -10.73797 factor out from the exponent, -10.73797 is ln(0.000021705). I've also trimmed off some of the redundant significant figures of e, if you want more you can always look them up. If you check you'll find that the simplification yields less than 0.001% error over the range of usual beer pressures and temperatures.

Modifying this to take account of alcohol is done by substituting the expression 0.05/(234.96-ABV) for the factor 0.00217, so the new equation is:

Cbeer = (Phead+1.013)*(2.71828^(2617.25/(Tbeer+273.15)))*0.05/(234.96-ABV)

This adds a couple of terms to the simplification for a net gain of one term. Again if you sub in a value of 4.6 for the ABV this agress with the previous equation to within 0.001%.
At other ABVs it will yield different results, that being the point. The range of 2 - 10% ABV changes the CO2 level by a bit over 3%: not a critical factor but it's worth being accurate if you can. If anyone's interested I can post up a spreadsheet that spits out a table of [CO2] vs temperature and pressure for any ABV. It can also be used to calculate priming additions taking into account headspace volume and a factor to account for splash losses on filling.
 

Lyrebird_Cycles

Well-Known Member
Joined
10/7/16
Messages
1,439
Reaction score
775
As an addendum to the above, if we work in rational units the whole thing is simpler:


[CO2] = Pabs*e^(2617.25/Tabs)*5/(235 - ABV)


Where Pabs = absolute pressure in kPa, Tabs = absolute temperature in Kelvin.

Note that I've rounded the ABV numbers.
 

MHB

Well-Known Member
Joined
1/10/05
Messages
5,646
Reaction score
3,059
Location
Newcastle
That's a very worthwhile adaption of the equation

For those not familiar with the units
e is a constant, turns up allover the place, the base for natural log - bit like Pi and the Golden Mean, it is just part of describing the world mathematically.
Kelvin (K) its Degrees C + 273.15 so for example 5oC would be 278.15K
Absolute Pressure is Gauge Pressure + Atmospheric Pressure (101.3kPa) so 45kPa Gauge would 146.3kPa Absolute
The answer is in g/L of dissolved CO2, most of the world describes dissolved CO2 in g/L, except the US, who use Volumes, 1g/L = 0.506 Volumes.

Good work
Mark
 
2

Latest posts

Group Builder
Top