• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

Calling all math geeks: Force carbonation math!

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Mark_

Well-Known Member
Joined
Feb 12, 2013
Messages
170
Reaction score
11
Hey everyone,

First off, if you don't like math your eyes will probably glaze reading this. Sorry. This is just a fun thought I had. (My idea of fun is somewhat questionable at times.)

I am trying to figure out force carbing from a mathematical angle and wondered if any of you mathy folks, such as myself, have ever thought about it or has someone else already done this.

Right now I am starting basic and trying to see if this works.

Anecdotally it seems that when people keg and pressurize at their serving pressure it takes approximately 2 weeks to get the carbonation to equalize. That is 14 days X 24 hours = 336 hours.

Now let's say you factor in your pressure.

335 * 10 = 3360

Let's call that PSI hours.

So without taking anything else into consideration it takes 3360 psi hours to carbonate a keg to roughly it's proper volume of CO2 at 10psi.

(I am assuming 38 degrees F for 2.4 vols of CO2.)

So now I want to really force carb.

If I carb at 30psi for 36 hours that equals 30 X 36 = 1080psi hours
If I then carb at 20psi for 24 hours thats 480 psi hours.

1080 + 480 = 1560 psi hours.

We need 3360 psi hours so 3360-1560 = 1800 psi hours left.

If I want to finish at 10 psi that would be 1800 / 10 = 180 hours or 7.5 days. So using this schedule you could properly carb your keg in about 10 days instead of 14.

Using that same math: 3360 / 30 / 24 = 4.7 days at 30 psi constant

OR

3360/60/24 = 2.333 days at 60 psi constant.

This is just "back of the napkin" math but the numbers don't look too wild.

What do all you math geeks think?
 
I think that assumes the relationship between rate of CO2 absorption and pressure is linear, right? Hope I'm using the right term. At any rate, in practice 4.7 days at 30 psi is going to be way overcarbed so there's clearly more to it. I think you need a physics geek. :)
 
Because the carbonation involves some chemical reactions, the lasting carbonation will be dependent on the enthalpy of the carbonation reactions and the mole ratios of the balanced reactions - as well as the pH of the beer being carbonated since the reactions will involve H+ ions.
 
Because the carbonation involves some chemical reactions, the lasting carbonation will be dependent on the enthalpy of the carbonation reactions and the mole ratios of the balanced reactions - as well as the pH of the beer being carbonated since the reactions will involve H+ ions.
Well that escalated quickly
 
Because the carbonation involves some chemical reactions, the lasting carbonation will be dependent on the enthalpy of the carbonation reactions and the mole ratios of the balanced reactions - as well as the pH of the beer being carbonated since the reactions will involve H+ ions.


I have no idea as to the veracity of any of that, but it sure sounds smart, so I believe it. :p All hail the Nerd King!


Sent from my iPad using Home Brew
 
I have no idea as to the veracity of any of that, but it sure sounds smart, so I believe it. :p All hail the Nerd King!


Sent from my iPad using Home Brew


I poked around for a bit in some scientific journals to try to find some results, because surely with all the drinking scientists do- someone has tested this. :mug:

So far, this is the closest I've found.

http://pubs.acs.org/doi/abs/10.1021/ie50281a014 The comparison of the gaseous CO2 pressure is helpful, but the solution they study is not analogous to our precious beer.

http://pubs.acs.org/doi/abs/10.1021/ja01861a033 Similar, but the pressures they study are huge in comparison to our kegs. (1 atm = ~15psi)
 
I love the math and the idea OP, but as has been stated above - almost 5 days at 30psi seems like a really solid recipe for over-carbonation. I've thought about these exact calculations myself though and agree that it would be cool if someone figured this one out.

Fairly confident it's not going to be me though.

Cheers.
 
It was just a fun exercise I went through while bored at work;) I wasn't trying to convince anyone it was the right thing to do!

Love the ideas! I think if we/I could prove/disprove a linear relationship between existing pressure and ambient/atmospheric pressure we could probably guesstimate something and try it in a scientific way. I just wondered if anyone had thought of this before or played around with it!

To drewsk, I agree completely. And since the concentration of H+, and accordingly the PH of solution due to carbonic acid, will change as the carbonation volume increases IN solution this will most assuredly not be a linear equation, as chickypad alluded to, but more of an integral formula on a "sliding scale."

Awesome, you have given me ideas. Thanks everyone!
 
I don't have the time to get into this further but the reason why the initial assumption is going to fail badly is that the rate of carbonation between T=0 and T=3 weeks is on a logarithmic scale and not linear. This is because the rate of absorption is based on the partial pressure delta between the head space and the liquid. I'm not smart enough at math to figure out your formula unfortunately.
 
I don't have the time to get into this further but the reason why the initial assumption is going to fail badly is that the rate of carbonation between T=0 and T=3 weeks is on a logarithmic scale and not linear. This is because the rate of absorption is based on the partial pressure delta between the head space and the liquid. I'm not smart enough at math to figure out your formula unfortunately.
good answer.

I found this thread while looking for a formula for amount of co2 in solution, by time, at a controlled constant temperature and pressure (always easier to do chemistry when you can control those two :D )

In short, if you can control the temperature (38F) and the pressure of gas over solution (30PSI, 40PSI, etc), and you know the surface area of the liquid/gas contact in your keg, how fast can you force carbonate to your target volumes.

If this formula is out there, it would make it relatively simple to get to within 0.1 or 0.2 volumes of where you want to be with relative speed and simplicity -- 40PSI for x hours, then turn down to your serving pressure for the last few tenths of volumes -- and you are able to serve and drink it at that point because you are so close.

I took a fair amount of chemistry a long time ago, but my math skills have wilted since then.
 
I think you should start thinking empirically rather that mathematically.

Carb one keg at serving (say 12 psi) and see exactly how long it takes.

Carb others at 20, 30, 40, 50, and 60 psi and see exactly how long those take.

From there you can create a graph which will represent fairly close on how long it takes at different pressures. This graph can then be mutated for different temps/pressures. This doesn't need super precision so one could just shift the curve of the graph up or down vertically, accordingly.

The other issue that this wouldn't take into account is headspace in keg or the shaking of a keg to get the co2 to dissolve quicker


Sent from myPhone
 
Head space should be irrelevant since there is constant pressure applied from the co2 system, presuming no agitation.

How would I measure when a keg is ready? Sounds pretty subjective for experimental attempts, though lacking an equation you may be right that it is the best we can do.
 
Rig up a pressure gauge to a ball/pin lock on the gas side. Should tell you the pressure in the keg which should match the pressure your shooting for.

May need to let the keg normalize a bit after detaching the gas tho? If you attach the pressure gauge to the keg just let it stay on there for an hour or so and the keg should normalize and the pressure should read as the pressure of the beer.

I agree about the headspace thing now too after thinking about it

I'd be willing to experiment with you on this on my next beer that needs carbing :)


Sent from myPhone
 
One factor that is being overlooked here is the solubility of the CO2.
Like Bobby mentioned it is not a linear relationship, but rather a logarithmic one.
The solubility is greater initially, but as the amount of dissolved gas increases, the rate at which it dissolves decreases because the solution begins to get saturated.

The type of beer also would play a role in this, ie.) a blonde ale would carbonate at a different rate as say a big hearty porter or stout.




Sent from my iPhone using Home Brew
 
One factor that is being overlooked here is the solubility of the CO2.
Like Bobby mentioned it is not a linear relationship, but rather a logarithmic one.
The solubility is greater initially, but as the amount of dissolved gas increases, the rate at which it dissolves decreases because the solution begins to get saturated.

The type of beer also would play a role in this, ie.) a blonde ale would carbonate at a different rate as say a big hearty porter or stout.




Sent from my iPhone using Home Brew


I agree that's why I was thinking we could face the issue with more of an empirical approach.

Tho I didn't know different beers carbonate at diff paces. I've never noticed this before, but also haven't thought to look for it either. Is it really enough to make a difference?


Sent from myPhone
 
One factor that is being overlooked here is the solubility of the CO2.
Like Bobby mentioned it is not a linear relationship, but rather a logarithmic one.
The solubility is greater initially, but as the amount of dissolved gas increases, the rate at which it dissolves decreases because the solution begins to get saturated.

The type of beer also would play a role in this, ie.) a blonde ale would carbonate at a different rate as say a big hearty porter or stout.




Sent from my iPhone using Home Brew

Seems to me it's a dilution problem, which is textbook 1st order differential equations. Mixing rate is dependent on partial pressures which is dependent on time.

If I was better at chemistry I'd take a stab at it. My youngest boy is doing rates of reactions in Chem 2 right now in college, but I don't think he knows anything about gasses.
 
I don't have the math to support it but I agree with what Bobby said. Set & forget at 10 PSI and your beer comes to equilibrium with the amount of dissolved CO2 you want; you can leave it at 10 PSI indefinitely. Set at 30 PSI & allowed to come to equilibrium and it will far overshoot your goal. The higher the pressure you force carb at, the steeper the section of the curve you want to intercept where dissolved CO2 is optimum and the more critical time becomes. A general rule like 30 PSI for 24 hours might be close enough in most cases, however. Unless I did a side by side taste test I doubt if I could distinguish between 2.4 volumes & 2.6. Once you get it in the neighborhood & reduce to serving pressure the beer will equilibrate eventually anyway. :mug:
 
Rig up a pressure gauge to a ball/pin lock on the gas side. Should tell you the pressure in the keg which should match the pressure your shooting for.

May need to let the keg normalize a bit after detaching the gas tho?

Sent from myPhone

Yes exactly. Just like you can have 10psi partial pressure in the headspace and 2 psi worth dissolved in your beer while you are actively carbing, the same can be true while you're trying to measure carbonation. You would want to watch the gauge over time to see if it changes. If you measure 10 psi, wait 8 hours and still measure 10psi, it's probably the right pressure.
 
Head space should be irrelevant since there is constant pressure applied from the co2 system, presuming no agitation

As long as interfacial surface area is constant (and it should be pretty close), I think you're right in that headspace volume doesn't matter.

One factor that is being overlooked here is the solubility of the CO2.
Like Bobby mentioned it is not a linear relationship, but rather a logarithmic one.
The solubility is greater initially, but as the amount of dissolved gas increases, the rate at which it dissolves decreases because the solution begins to get saturated.

The type of beer also would play a role in this, ie.) a blonde ale would carbonate at a different rate as say a big hearty porter or stout.

The actual solubility is linear with pressure, not logarithmic. It's just proportional to the Henry's law constant (assuming a given temperature). You're right in that the rate of dissolution would be logarithmic. For gas dissolving into liquid, with no agitation, you'd be mostly looking at diffusion.

You can think about this using Fick's law, where the rate of diffusion is proportional to the concentration difference. As more CO2 is in solution the rate of diffusion is going to slow down, and if you solve the differential equation you'll find a logarithmic relationship with time. But it's not that simple by any means because you aren't mixing the beer. So you may reach a saturation level in the top inch of beer rather quickly, and then the limiting factor is going to be the diffusion of the CO2 from that top layer down into the bulk solution. Still diffusion, but now a different system.

So an empirical study is the way to go for sure. Or you can model the thing in some type of CFD program like Fluent.

And of course, as pointed out we aren't working with pure water. As the sugar and alcohol content in the beer is altered things are going to change.

:cross:
 
I'm not math geek, but I do know a thing or two about boyles law from scuba diving. Seems to me there's something there you should look into. Also, I used the magical space aged google machine and found another site that seemingly has it all figured out.

http://www.chm.davidson.edu/vce/gaslaws/index.html

http://www.brainlubeonline.com/GasLawsBeer.html

Enjoy!

Boyle's law is part of the ideal gas law; not too relevant here. That second link says nothing about the rate of CO2 absorption which is what we're talking about in this thread.
 
Here is some math, though it needs some empirical testing to validate...any takers?

General equation is: P(t) = P+(Pa-P)*K*t

t is time (in hours)
K is a constant with units of 1/hours
P is current "pressure" on the beer (assume zero to start)
Pa is the Pressure applied by the CO2 tank

Anecdotal evidence suggests that K ~ 0.0140/hours (results may vary)

This is based on: at 1 week at 10psi will result in carbonation equivalent to forever at 9psi and at 2 weeks 9.9 psi.

At 20psi you will reach 10 psi in 2 days
At 30psi you hit 10 psi in 28 hours.

The K value will vary slightly from system to system and temperature will affect the rate slightly as well...but this is a good starting point.

Set up a spreadsheet that computes the P(t) for each time step (in hours) starting with t=0 and P=0 and use the previous P(t) to seed the next.

[I'm having trouble attaching the excel file...any tips on what version to save as?]
 
About the discussion on empirical testing, you could check if a keg is carbed to the proper level by measuring how much off gassing you get. Carbonation of 1 volume CO2 is about 2g/L, so if you have a scale with resolution to 0.01g or even 0.1g, with a capability of 1000 to 1500g, you should be able to pull a sample, weigh it, decarbonate by shaking, weigh again and repeat until you get no more change.

And I agree that surface area will play into it as well. Which is why shaking is an effective method for speeding up the process. More bubbles = more surface area. Motorized carbonators use reservoirs that look like propane tanks on their side and are set to always be about 1/2 full to maximize surface area.
 
For anyone wishing to experiment I suggest this method:

1. Set your regulator at 30 psi (or whatever you’re comfortable with) and attach to keg for 24 hours.
2. After 24 hours close the supply valve on the tank (or if you have a check valve in the gas line remove the regulator and attach a pressure gauge) and bleed the headspace in the keg until the pressure in the keg is about 10psi. Then let the keg sit for an additional 24-48 hours undisturbed.
3. After the 24-48hour rest, the pressure/solubility should be close to equilibrium…take a reading of the pressure in the keg and use a table to determine the solubility (volumes) of CO2.
4. Use a spreadsheet to adjust the K value until the pressure you read on the gauge matches the 24 hour pressure calculated by the spreadsheet.

Since the rate of gas transfer will vary with: starting temperature of the beer, temperature of the space in which you are carbonating, starting volumes of CO2, and a bunch of other variables; your K will vary from batch to batch…but for practical purposes this should get you in the 2.2 to 2.6 volumes range of accuracy which – I think – is the point
 
Here is some math, though it needs some empirical testing to validate...any takers?

General equation is: P(t) = P+(Pa-P)*K*t

You're missing an e in your equation. Yours is a linear relationship so it will never reach equilibrium. How about this:

P(t) = Pa - (Pa - P)*e^(-Kt)

With this equation, P(0) = P and P(infinity) = Pa.
 
Yes, this natural log (e) version is good for solving at any time point (t) in a single run. Thanks for adding that.

The version I posted is the iterative approach where you must compute each time step starting with t=0, then t= 1...as so forth (insert summation sign from t = 0 to t = n; yadda, yadda) since the next step is dependent on the previous.

I believe that the constant (K) is still approximately 0.014 for either form.
 
So to answer the question about calculating volumes of CO2 based on Pressure, Temperature, and time...

Volumes (Pa,T,t) = [(0.17*Pa*(1-e^(-0.014*t)))+3.04]*e^[(0.0006*Ln(Pa*(1-e^(-0.014*t)))-0.02)*T]

Pa is gauge pressure in psi
T is Temperature in F
t is time in hours

*Assumptions: you are starting with beer from your primary or secondary at 0.8 to 1.2 volumes, in a 5 gallon corney keg, and no shaking.

Sanity check...at 30psi and 40F you should hit ~2.1 volumes in 24 hours or 2.4 volumes in 36 hours.
 
So to answer the question about calculating volumes of CO2 based on Pressure, Temperature, and time...

Volumes (Pa,T,t) = [(0.17*Pa*(1-e^(-0.014*t)))+3.04]*e^[(0.0006*Ln(Pa*(1-e^(-0.014*t)))-0.02)*T]

Pa is gauge pressure in psi
T is Temperature in F
t is time in hours

*Assumptions: you are starting with beer from your primary or secondary at 0.8 to 1.2 volumes, in a 5 gallon corney keg, and no shaking.

Sanity check...at 30psi and 40F you should hit ~2.1 volumes in 24 hours or 2.4 volumes in 36 hours.
Thanks!
for anyone wanting to copy and paste a spreadsheet formula, that's:

B2: e, aka, "=exp(1)" or 2.718281828
B3: PSI of regulator
B4: time in Hours
B5: temperature in F

=((0.17*B3*(1-B2^(-0.014*B4)))+3.04)*B2^((0.0006*LN(B3*(1-B2^(-0.014*B4)))-0.02)*B5)


It appears that the formula is presuming 1.15 vols starting. If i were better at math I'd modify the formula for that as a variable -- though it may not really matter significantly given the type of curve.
 
So to answer the question about calculating volumes of CO2 based on Pressure, Temperature, and time...

Volumes (Pa,T,t) = [(0.17*Pa*(1-e^(-0.014*t)))+3.04]*e^[(0.0006*Ln(Pa*(1-e^(-0.014*t)))-0.02)*T]

Pa is gauge pressure in psi
T is Temperature in F
t is time in hours

*Assumptions: you are starting with beer from your primary or secondary at 0.8 to 1.2 volumes, in a 5 gallon corney keg, and no shaking.

Sanity check...at 30psi and 40F you should hit ~2.1 volumes in 24 hours or 2.4 volumes in 36 hours.
@KegWrangler , not sure if you're still monitoring this forum, but I just found this and am intrigued. Could you show us all the derivation of this equation? I was getting ready to attempt to derive something like this on my own, but I'm a big fan of shortcuts.

Brew on :mug:
 
Back
Top