Hydrogen gas porosity is an aluminium casting defect in the form of a porosity or void in an aluminium casting caused by a high level of hydrogen gas (H) dissolved in the aluminium at liquid phase. The solubility of hydrogen in solid aluminium is much smaller than in liquid aluminium. As the aluminium freezes, some of the hydrogen comes out of solution and forms bubbles, creating porosity in the solid aluminium.
Aluminium foundries want to produce high-quality aluminum castings with minimum porosity. Hydrogen porosity can be reduced by reducing the amount of hydrogen in the liquid aluminium alloy, by degassing or sparging. (Sometimes a small hydrogen concentration is intentionally maintained; some very fine hydrogen porosity can be preferable to internal voids caused by shrinkage.) Directional solidification can drive impurities to one end of the casting.