Gas porosity is the formation of bubbles within the casting after it has cooled. This occurs because most liquid materials can hold a large amount of dissolved gas, but the solid form of the same material can not. So the gas forms bubbles within the material as it cools. Gas porosity may present itself on the surface of the casting as porosity or the pore may be trapped inside the metal. which reduces strength in that vicinity. Nitrogen, oxygen and hydrogen are the most encountered gases in cases of gas porosity. In aluminum casting, hydrogen is the only gas that dissolves in significant quantity, which can result in hydrogen gas porosity. For casting that are a few kilograms in weight the pores are usually 0.01 to 0.5mm in size. In larger casting they can be up to a millimeter in diameter.
To prevent gas porosity the material may be melted in a vacuum, in an environment of low-solubility gases, such as argon or carbon dioxide, or under a flux that prevents contact with the air. To minimize gas solubility the superheat temperatures can be kept low. Turbulence from pouring the liquid metal into the mold can introduce gases, so the molds are often streamlined to minimize such turbulence. Other methods include vacuum degassing, gas flushing, or precipitation. Precipitation involves reacting the gas with another element to form a compound that will form a dross that floats to the top. For instance, oxygen can be removed from copper by adding phosphorus, aluminum or silicon can be added to steel to remove oxygen.