Gas (CO2 and sometimes N2) is a normal ingredient in beer. Gas is also the method we use to push beer from the keg to the glass. The right balance of gases will keep the dissolved gas levels perfect and the wrong balance will damage the beer by changing dissolved gas levels in the beer. Any change in gas levels will affect the flavor and appearance of the beer. The primary concern is gas content change and the key elements at work are pressure and temperature.
Pressure is the force of gas molecules hitting the walls (and floor and ceiling) of a container. The amount of force (pressure) depends on the number of molecules hitting the surfaces and the speed at which they hit. For the explanation we'll start with the following example. Imagine an empty beer keg with 15 psig of CO2 sitting in a cooler, not connected (without a coupler).
Our keg contains an unchanging number of molecules of CO2. If you take the keg into the sun and let it warm up those molecules will move faster, hit the walls harder and exert more pressure. Put our keg into the freezer and the molecules will slow down, hit the walls with less speed and force and the pressure will drop.
Take the keg out of the freezer and back into the cooler. Magically, let's fill it half full of beer. Our keg now has the same number of CO2 molecules but in half the space. The number of molecules remains the same, the speed remains the same, but they are hitting less wall (more often) so there is more force on each part of the wall and the pressure increases.
Pressure changes if we change temperature, volume or the number of molecules.
Under normal beer dispensing conditions gas molecules are constantly going in and out of solution in the beer. Gas Molecules hit the surface and dive in while dissolved molecules hit the surface and break out.
If we increase the pressure, the gas molecules hit the surface of the liquid faster, and/or more often. After a pressure increase, more molecules are going in than are going out. This process continues until equilibrium is reached. At equilibrium, enough molecules are absorbed that the same number of molecules are leaving as are entering.
When the temperature rises, the dissolved molecules move faster, hitting the surface harder and more often, causing more of them to break out. As it gets colder the opposite is true . . . So colder beer temperatures keep more gas in solution if the pressure remains constant. Warmer temperatures require more pressure to keep the same amount of gas in solution.
If the keg is filled with more than one type of gas molecule (N2 and CO2 for example) each gas acts independently. If there were enough CO2 molecules in a keg to generate 15 psi of CO2 and you added enough N2 to bring the total pressure to 25 psi you still have 15 psi worth of CO2 molecules hitting the surface and entering solution. If the CO2 was in equilibrium before adding the N2 it will stay at equilibrium after adding the N2: Adding enough N2 to take the total pressure to 1000 psi will not change the number of CO2 molecules or the force with which they strike the surface or the amount of CO2 dissolved in the beer.
For the most part, we all live at one atmosphere of pressure. One Atmosphere is 14.7 (15) psi above a complete vacuum. Absolute pressure (PSIA) starts at complete vacuum (no gas molecules at all). Gauge Pressure (PSIG) is always indicated from one atmosphere which changes with altitude and barometric pressure. When we think of gas dissolved in beer it is necessary to think in terms of absolute (PSIA) pressure since to get all of a gas out of a liquid at normal temperatures it is necessary to expose it to a vacuum. A keg half full of beer and half full of CO2 at 0 PSIG still has 15 PSIA worth of CO2 molecules doing their thing.
The illustrations below are intended to clarify the principals discussed above. The critical point is that the correct partial pressure of CO2 is required to maintain the beer quality at least as far as CO2 content is concerned. When CO2 content changes beer quality and taste change and beer is wasted. Beer comes from the brewery perfect; whenever the CO2 content changes, quality goes down and costs go up.
One thing which is hard to show is that the gas exchange process takes place at the surface of the beer and moves down slowly through the rest of the keg or tank. As a result, most gas related problems and/or changes show up near the end of a keg. The key to diagnosing gas problems is that the problems are greatest at the end of the keg.