You can imagine my glee when my good friend Andrew asked me a great fluids problem this weekend: He just built a new beer tap system converted from an old chest freezer. He wants to have nice head on his beer, so he doesn't want it coming out of the tap to quickly. He was also unsure about the pressure to keep his keg under. Basically his question was How to balance your kegging system?

So I made this calculator by combining the Bernoulli, Darcy Weisbach, and Swamee-Jain equations to help you calculate your perfect kegerator hose length. Simply **plug in the parameters for the beer you'd like to serve, and it'll spit out a hose length for the perfect pour!** Keep reading for more science about how to choose your CO2 pressure, or the background behind this calculator.

What an awesome problem! There are many empirical formulas out there that will give you a length... but I've had a lot of feedback that this equation gives vastly **better** results than other formulas out there. I guess I'm not surprised: It's based on science and not empiricisms so read on for the perfect pour.

## Carbonation: Selecting Temperature and Pressure

First: Every beer has a specific amount of carbonation that the brewer meant for it to have. As a general rule, darker, maltier beers are usually less carbonated that lighter beers. Here are your **first decisions:** What **temperature** will you serve your beer at? Then, using a carbonation chart, **determine what pressure** to set your CO2 regulator at so the beer is **properly carbonated for flavor.** Generally speaking, the colder and more pressure you put your beer under, the more CO2 it will absorb. Also note: You'll need to add about **0.5 psi for every 1000' elevation** you'll be keeping the beer at for proper carbonation.

## Hose Length: Selecting Tubing and Flow Rate

You may be tempted to run any hose you have from your keg to your tap, but realize this: The beer is under a lot of pressure! **The only tool you have to lose this pressure is frictional losses along the length of the hose**. This is where the fun fluids come in! The energy in a pipe system can be described by the **Bernoulli Equation** for conservation of energy with the **Darcy Weisbach** equation for frictional losses:

if the tube diameter does not change in the system, then the equation can be re-arranged to look like:

Here, you have **two decisions to make:** what **diameter tubing** you want to use and **what flow rate** you want for your beer. For most home kegerator systems, or systems with a short (<8') distance to travel: **3/16" tubing is pretty standard.** If your beer will be traveling further, you may consider using a larger diameter tubing (1/4") but don't forget to keep your beer line chilled so the beer doesn't go bad or flat in the tubing. Next is flow rate. It seems to me, **10 seconds is a perfect amount of time to pour a pint**, although super beer snobs might have a specific pour time depending on the type of beer being served.

The friction factor is normally based on the type of pipe material, the diameter of the pipe, and the reynolds number of the flow within the pipe. From these factors, the friction factor can be read on a Moody diagram or estimated using something like the Swamee-Jain equation.

I should note that I included a number of assumptions in this calculation:

- There are no minor losses at the keg, the tap, or in the coil of hose (In reality there
*will be*some minor losses, and so you can get by with a slightly shorter hose length). - The viscosity of beer is an unchanging 0.00003279 lb/ft^2 sec
- The roughness of vinyl tubing is e=0.000016 [ft]
- The pressures are gauge pressures, so no elevation correction is needed.

Return to my, my hose-length calculator!

**Alternate: Set Pressure/Temperature based on Hose Length**

I should note that this whole process can easily be reversed, although the result is less optimal. You can set your Pressure/Temperature based on a pre-existing tube length. This is less ideal, because you might be serving slightly warmer or less than ideally carbonated beer. However, this may be more practical if you're changing what beer you have on tap, and don't want to change your tube length or CO2 pressure with each new keg.

The Bernoulli w/ Darcy-W equation looks like:

If you **decide what flow rate you want** you can back out what your pressure change needs to be, and then using the carbonation table, you can determine what temperature would be a good serving temperature for the right carbonation. On the second page of my spreadsheet, i've set it up for the reverse input:

Then, head over to the carbonation chart, and try to determine the optimal temperature to serve your beer at.

Mike, I love this problem. It would make a great challenge for a college fluids class! Good job.

Awesome site. Thanks for posting this! Here's my question: If I were to run 20 feet or so of 3/8 tubing and then reduce to 5 feet of 1/4 inch tubing, do I ignore the resistance of the 3/8 tubing? It seems I should, since the 'bottleneck' would be at the 1/4" tubing. Or do I need to add the resistance of the 5' of 1/4" and the 20' of 3/8" together for total resistance? (I'm running the 3/8" to try to overcome a 12' rise from the basement).

Thanks,

Steve

Great question Steve. You'll need to account for both losses (so add the 20 ft of 3/8" plus the 5' of 1/4"). Also, i'm not sure, but the contraction from 3/8" to 1/4" tubing might make the beer foamy. It seems you might be better off running 3/8 tubing the whole way.

Alternatively, you might run the minimum length of 1/4" tubing possible and set your pressure and temperature accordingly based on the chart. Don't forget to chill your line! 25 ft of tubing is more than a pint of beer sitting in your line.

This is fantastic! I've always read that one should take the head pressure, subtract 1, and divide by 3 to find the line length (at 3/16") to find the proper line length for serving beer. Lived experience (=empirical test) showed that this was completely wrong; the tap lines in my keggerator are 6' and don't deliver the beer slowly enough!

I plugged the values for my keg system into your spreadsheet and the results are much closer to my own experience (you need about 8-10' of 3/16" hose, depending on your desired head pressure, height, etc.) to deliver beer in a homebrew setting. You also need a few plastic zip ties to contain all that hose! You can now say that informal experiments confirm your results.

Thanks so much for this.

Thanks for the comment, and glad you liked the post!

Pingback: Kegging Calculations - Home Brew Forums

Pingback: Keg line lengths? There are diff opinions. - Home Brew Forums

Thank you so much for putting this together. This is the only calculator I've seen that allows the user to adjust the flow rate. Most of them calculate the line length that results in a 1gal/min flow rate (~7.5 sec pint fill). That usually works in commercial settings where the beer is stored very cold, the carbonation levels are close to 2.7 vol, and the lines/shanks/faucets are kept cold. A slower flow rate is required to prevent foaming with warmer serving temps or higher carb levels though, and since most homebrewers prefer slightly warmer serving temps, they tend to find those traditional commercial equations useless.

Pingback: Keg Line Lengths & Testing Your CO2 Levels - Home Brew Forums

Pingback: Switching to Bev-seal ultra - Home Brew Forums

I love this calculator, Mike! Question though re: the "Tap Height" factor - my run will be from my basement, up and over to my kitchen, and not straight-up-and-down.

Are there considerations for the length/resistance/etc. when portions of my tubes are running horizontally? How should I figure my "Tap Height" factor?

Thanks for your advice!

Great question. The

tap heightisvertical distance only. Although the suggestedLine Lengthaccounts for verticalandhorizontal line length.just remember if you have a long line to refrigerate it. 10 ft of 3/8" tubing can hold almost 2 pints of beer!!

Also - "Specific Gravity" - is that the Original Gravity of the batch, of the Final Gravity? I'm assuming "Final", however the initial value in your spreadsheet is 1.09, which would be pretty high for a final. Just want to be sure. Thanks again.

It should be the

Final Gravity. And you're correct the value is high. Only one other person has called me out on that: One of my students when i put a question related to this on their final exam 🙂It was obviously Final gravity, but you also easily could see that. However, rarely are beers ever under 1.010. i.e. 85% of beers have probably F.G's higher than 1.010 albeit the lagers and pilsners which have less, are however, on the contrary, 85-90 % of beers consumed I guess. Anyway, he did intend surely 1.009 which was the point originally ,p

Thanks so much for this!

I went down the rabbit hole with Wikipedia while trying to figure out how all the other formulas were derived. (They weren't working for me.)

Really appreciate you taking the time to share your knowledge and expertise, I got about as far as "Darcy-who?" before stumbling across this.

Nick,

Glad you like it!

Pingback: Kegerator/keezer notes for future analysis » Landis Vinchattle

You're clearly educated, but loose != lose. Please fix (and be appropriately shamed by) this typo:

"The only tool you have to

loosethis pressure is frictional losses along the length of the hose"Thanks for the catch!

Any chance this wonderful tool could be enhanced with a "choker" option?

Is a "choker" a constriction in tube size? If so, yes, you can use this equation to solve for your change in pressure, although it's not as easy.

However; the constriction itself could result in a large pressure drop which could develop foam in the line, which makes all the math go to hell.

I'm confused about the 'measuring to center of keg' calculation. Do you mean to the center of the top of the keg, or the center of the length of the keg?

What you want is a change in height, Δz, between the fluid surface and the nozzle exit. So really, it should be to the top of the beer level in the keg.

When it's full, this would be the top of the keg, and when it's near-empty it should be to the bottom of the keg. I took the average and suggested the center of the length of the keg.

Horizontal distance traveled does not play into this measurement.

Just wondering, the beer from my keg always comes from the bottom. It is where the diptube in the outflow track is sitting. Should I measure from the bottom with this scenario?

The diptube should always be in the bottom of the keg (otherwise you wouldn't be able to enjoy all the delicious beer in there!).

If you stick a straw in a drinking glass, you'll notice the water level in the straw is the same as the water level outside the straw, regardless of where the bottom of the straw is (as long as it's submerged).

So you'll always want to measure to the fluid surface, which in this case is at the top of the keg when full and the bottom of the keg when empty, or in the middle of the keg on average.

I spent the morning doing these same calculations and came to a similar conclusion. I have had terrible trouble with my kegerator getting a proper carbonation level while also dispensing foam-free beer. I am embarrassed that it has taken me so long to finally break this down into a fluid mechanics problem, considering that I am a mechanical engineer. Anyway, the often repeated rule-of-thumb, 3 psi/ft for 3/16" tube, is completely wrong. I think this rule-of-thumb may be a misinterpretation of a more appropriate headloss rate of 3-ft of headloss per ft of length (i.e. 3 ft/ft) instead of 3 psi/ft. This more appropriate rule-of-thumb results in a pressure headloss rate of 1.3 psi/ft (3 ft/ft * 0.43 psi/ft). The implication of using a headloss rate 1.3 psi/ft is that kegerator systems should be supplied with tubes that are 12-ft to 15-ft long (based on ~15 psi, ~10 sec/pint, 3/16" dia tube). The local brew store where I bought my kegerator system supplied a 5-ft long tube, which sounds like the typical length and is consistent with the erroneous rule-of-thumb 3 psi/ft. We should all try to spread the word that 3 psi/ft is WRONG!

I see your assumptions includes a statement about elevation correction not being required. Is this accurate? I live at ~8,000' so the gauge pressures are increased (0.5psi / 1,000'). Wouldn't the lower ambient pressure increase the flow rate?

Thanks for the calculation

Another way to think about this: When your CO2 tank runs out of CO2 at 8000', the gauge should read "0 PSI" and not "-3.9 PSI." Your beer pressure is going from the reading on the gauge to atmospheric pressure, and so no elevation correction is needed when calculating line length.

You might need to adjust your CO2 pressure in the carbonation table to get proper carbonation at 8k ft; however, the gauge reading should be accurate for calculating the hose length.

-----------------------

Some side notes: If you took your empty CO2 tank to get refilled at sea-level, suddenly your gauge pressure would read -3.9 PSI.

This now makes sense. Thanks again.

What if you are using non-vinyl tubing such as this? http://morebeer.com/products/ultra-barrier-silver-antimicrobial-pvc-free-beer-tubing-316-id-foot.html

I have no idea what the properties of the tubing are, though I've emailed the manufacturer so hopefully will have more info.

Under Technical Specifications they give a loss/ft of 2.2 psi/ft, but they don't explain the flow rate this was measured at, which makes the value somewhat useless...

But not entirely. Assuming they measured it at a similar flow rate to the to the old 3psi/ft rule of thumb, then we can assume this hose has lower friction and will need a longer length to relieve the pressure. How much longer? My guess is multiply the calculated value by 1.36 (i.e., 3/2.2) for a rough guesstimate.

But this comment is all based on handwavey assumptions, so try it out and get back to me! If you tell me all the other variables (CO2 pressure, length of tubing, height difference between tap and keg, and time to fill up x volume of beer) we can back out a better assumption!

I have been looking through your work. It's great. I was wondering if temperature comes into play at all?

Absolutely. Beer is mostly water and the viscosity and density of water changes dramatically with temperature (see http://www.engineeringtoolbox.com/water-dynamic-kinematic-viscosity-d_596.html and http://www.engineeringtoolbox.com/water-density-specific-weight-d_595.html).

I picked a constant viscosity to plug into the calculator, although it'd be interesting to try to tweak the equations to take into account the serving temperature.

mrsoltys, I would love to figure out a way to incorporate serving temp into this equation. I want to serve my beer at the correct temp, which for most beers is around 50F. I'm not asking you to reprogram anything but if we could come up with an equation that I could apply on my own I would be grateful. What I've been thinking is this: If you want a beer carbed to 2.5 vols at 38F it requires 12 psi. 2.5 vols at 50 F is 18 psi. So to get a rough estimate could I just change the psi from 12 to 18 in the calculator? For my setup it suggests 11 ft for 12 psi and 16 ft for 18 psi. Would that apply here? All other things being equal a 38F beer would need 11 ft and a 50F beer would need 16 ft?

Aaron,

The short answer is Yes. The longer answer is no. I've made an assumption on the viscosity of beer that is somewhat arbitrary. Really, the viscosity of the beer can change significantly based on what type it is (e.g., pilsner vs a stout vs. a Doppelbock).

In addition to this, as I mentioned to @jakepopevadermajeski:disqus , the viscosity of the beer will also change with temperature. From 38F to 50F there is about a 20% change in the viscosity of water, and because beer is mostly water, I assume this change is about the same. This 20% increase could mean an additional 5 inches of hose for the warmer beer. An extra 5" on a 16' hose is less than 3% error, So I'll say that change is pretty insignificant.

What might be more significant is the viscosity of the beer variety. If you want to get this exactly right, I'd be happy to help you measure the viscosity of beer. Just mail me a growler.

thanks for working this out for us. One question: is the flow rate seconds/pint an imperial pint or US pint? the difference for my pressure is 4 feet of line.

Hi Mike,

Wonderfull calculator!

However, don't know If you ever read the "Draft Beer Concept" of Erdinger (in their website they have the files to download and a calculator) http://www.erdinger.de/en/erdinger-weissbier-products/quality/beer-serving.html

Is quite the opposite of what we are doing here. Wierd

Luis,

For many Bars/Restaurants they have a long, fixed, refrigerated line running from the kegs to the taps. It is often too difficult to change out the lines for every different style of beer you're serving, and so adjusting the pressure for your line length is more optimal in this situation.

It is more ideal to figure the correct carbonation pressure and serving temperature, and adjust your hose length accordingly. This works especially well if you don't rotate out beers on tap.

Hi Mike,

100% agreement.

However, I still don't understand why they recommend adding extra pressure to the Keg to overcome the resistance of the draught system. As an example, a keg at 38F under 14PSI pressure; a 5 foot line (3/16"); a faucet at 2 feet height. Thee German's recommend adding to the 14PSI all the restriction (pressure loss) of the system, in this case, approx. 14 plus 12 PSI

I have a problem with foamy beer. I typically set my pressure to 2-3psi to compensate but the pour time is up there. My beer line is 3/16" x 6 feet. The top of the keg to tap is 1.5 feet. I tap IPA/DIPA exclusively (Stone Ruination, Seeing Double). The keggerator is set to about 46F. Would a longer beer line help in this situation? Should I bring the temp up or down?