Here's an article by Brad Smith (beersmith creator)

Keg Line Length Balancing – The Science of Draft Beer from beersmith.com by Brad Smith

This week we take a look at the science behind designing a good draft beer system for your kegged homebrew. Everyone loves draft beer, and I consider my keg system to be one of the best purchases I’ve made in my brewing career. Kegging makes every-thing easier, and if you want to start kegging, please read my earlier article on how to keg. This week we’re going to look at the more advanced topic of balancing your keg lines.

In my previous article we covered how the temperature of the beer and carbonation level desired in volumes of CO2 drives the overall carbonation pressure – a number you can also calculate easily using BeerSmith. You will need to know your keg pres-sure as a starting point for designing your overall system. However this is not the complete story – as the lines of your keg play a very important role. In general the longer your keg lines are, the lower the serving pressure at the tap. If the tap pressure is too high or too low, the overall system is said to be out of balance and your beer will either foam or be flat.

Line Resistance is Not Futile

So how does one design a draft beer system to maintain proper balance at the tap? The pressure drop depends on resistance in the beer line. Beer lines have two types of resistance – one due to elevation change (i.e. the keg being higher or lower than the tap), and a second due to the beer lines themselves which generate friction as the beer flows through the lines.

Lets look at resistance first to keep things simple. Here are some sample resistance ratings for various popular beer lines:

? 3/16? ID vinyl tubing = 3 psi/ft

? 1/4? ID vinyl tubing = 0.85 psi/ft

? 3/16? ID Polyethylene tubing = 2.2 psi/ft

? 1/4? ID Polyethylene tubing = 0.5 psi/ft

? 3/8? OD Stainless tubing = 0.2 psi/ft

? 5/16? OD Stainless tubing = 0.5 psi/ft

? 1/4? OD Stainless tubing = 2 psi/ft

Generally plastic tube of smaller than 3/16? ID is not recommended – it provides too much resistance for practical use!

So now that we have the resistance factors how to we go about designing a keg sys-tem that is in balance? For the purpose of our example lets assume that you have pressurized your kegging system at a nominal 12 psi, which at a 40F refrigerator tem-perature represents a mid range carbonation level of about 2.5 volumes of CO2 – typi-cal for an average American or European beer.

At the tap end of our balanced keg system we want a slight positive pressure to push the beer out, but not enough to foam. Generally this would be between less than 1 psi. So let’s target a tap end pressure of 1 psi. The math from here is pretty easy to calculate the balanced line length (L):

? L = (keg_pressure – 1 psi) / Resistance

So starting with our example of 12 psi keg pressure, and some typical 3/16? vinyl keg tubing (which loses 3 lb/ft) we get L= (12-1)/3 which is 3.66 feet. So a 12 psi kegging system would provide 1 psi of pressure at the tap with 3.66 feet of tubing.

Note that some authors leave out the 1 psi tap pressure (i.e. use zero tap pressure) and simplify the equation to L= (keg_pressure/Resistance) which makes the math even easier (the simplified equation would give you 4 feet of tubing vs 3.66 ft). The truth is that you can target anywhere between zero and 1 psi at the tap and still be in balance – the difference is relatively small, though a slight positive keg pressure will give you a better flow rate.

The four foot example with 3/16? ID vinyl is great if we only have a few feet to go (i.e. in a fridge) but what if one needs to go further? A simple switch to 1/4? ID vinyl tubing will get us there – looking at the same 12 psi keg system we get: L = (12-1)/0.85 = 12.9 feet. So with the larger tubing we can deliver our beer to just under 13 feet. For other applications we can consider polyethylene or stainless. However if going a long dis-tance one needs to also consider refrigeration – as you don’t want a large volume of warm beer in the lines.

Beer Line Length and Elevation

Changes in elevation also come into play if you design a more complex serving sys-tem. The rule of thumb is that your beer loses 0.5 psi/foot of elevation gain. So if your tap is 1 foot higher than the keg it loses 0.5 psi, and conversely if it is lower than the keg it will gain 0.5 psi per foot of elevation.

So if we roll this into our equation, we get the following for a given height (Height – in feet) of the tap above the keg itself:

? L = (keg_pressure – 1 – (Height/2)) / Resistance

So lets go back to our original example of a 12 psi keg pressure, 3/16? ID vinyl tubing and this time put the tap 2 feet above the keg itself. We get L=(12-1-(2/2))/3 which is 10/3 or a line length of 3.33 feet.

Another example with longer lines: 12 psi keg pressure, 1/4? ID vinyl and a tap four feet above the keg gives: L=(12-1-(4/2)/0.85 which is 9/0.85 or 10.6 feet of line length.