To understand how the magma behaves rising to the surface, the role of "solubility" within the magma must be known. An empirical law has been used for different magma-volatiles combination. For instance, for water in magma the equation is n=0.1078 P where "n" is the amount of dissolved gas as weight percentage (wt%), "P" is the pressure in megapascal (MPa) that acts on the magma. The value changes for example for water in rhyolite where n=0.4111 P and for the carbon dioxide is n=0.0023 P.