Take a look at Henry's Law
Henry's Law
Pressure has very little effect on the solubility of solids or liquids, but has a significant effect on the solubility of gases. Gas solubility increases as the partial pressure of a gas above the liquid increases. Suppose a certain volume of water is in a closed container with the space above it occupied by carbon dioxide gas at standard pressure. Some of the CO2CO2 molecules come into contact with the surface of the water and dissolve into the liquid. Now suppose that more CO2CO2 is added to the space above the container, causing a pressure increase. In this case, more CO2CO2 molecules are in contact with the water and so more of them dissolve. Thus, the solubility increases as the pressure increases. As with a solid, the CO2CO2 that is undissolved reaches an equilibrium with the dissolved CO2CO2, represented by the equation:
CO2(g)⇌CO2(aq)
At equilibrium, the rate of gaseous CO2CO2 dissolution is equal to the rate of dissolved CO2CO2 coming out of the solution.
When carbonated beverages are packaged, they are done so under high CO2CO2 pressure so that a large amount of carbon dioxide dissolves in the liquid. When the bottle is open, the equilibrium is disrupted because the CO2CO2 pressure above the liquid decreases. Immediately, bubbles of CO2CO2 rapidly exit the solution and escape out of the top of the open bottle. The amount of dissolved CO2CO2 decreases. If the bottle is left open for an extended period of time, the beverage becomes "flat" as more and more CO2CO2 comes out of the liquid.
The relationship of gas solubility to pressure is described by Henry's law, named after English chemist William Henry (1774-1836). Henry's Law states that the solubility of a gas in a liquid is directly proportional to the partial pressure of the gas above the liquid. Henry's law can be written as follows:
S1/P1=S2/P2
S1 and P1 are the solubility and the pressure at an initial set of conditions; S2 and P2 are the solubility and pressure at another changed set of conditions. The solubility of a gas is typically reported in g/L.