The Mechanism Behind Each Defect Type
Shrinkage porosity forms during solidification. As molten aluminum transitions from liquid to solid, its density increases - aluminum shrinks approximately 6.6% by volume during solidification. In sections where liquid metal cannot flow in to compensate for this volume reduction, a void forms. The result is characteristically angular, dendritic in texture under X-ray CT, and typically located in the last region to solidify: thick sections, intersections, and areas remote from the gate.
Shrinkage cavity is the macroscopic version of the same mechanism - a large pipe or depression visible at the surface or just below it when solidification is highly directional. Shrinkage porosity is the dispersed, microscopic form distributed through the affected zone. Both are thermodynamic consequences of inadequate feeding, insufficient packing pressure in the case of HPDC, or poor gating design.
Gas porosity has a fundamentally different origin. Dissolved hydrogen - present in the melt from moisture in the furnace charge, on tooling, or in the atmosphere - comes out of solution as the metal cools and solidification front advances. It also forms from air entrapment during high-velocity die filling. Gas pores are spherical or near-spherical in morphology, appear smooth-walled under CT, and can be distributed more uniformly through the casting cross-section rather than concentrated in thermal hot spots.
Why They Look Different Under Inspection
The morphological difference matters practically for detection. Under X-ray CT, shrinkage porosity produces irregular, branching void structures with high surface-area-to-volume ratios. Gas porosity produces discrete, rounded features. A detection model trained primarily on gas porosity images will have elevated false-negative rates on shrinkage porosity because the texture signatures are distinct.
For in-line vision inspection - which operates on surface images rather than cross-sectional CT data - the challenge is different. Neither shrinkage porosity nor gas porosity is directly visible on a finished casting surface unless the void intersects the surface during machining. What vision inspection can detect are the surface expressions and precursors: surface sink (a shallow depression indicating underlying shrinkage), micro-porosity clusters visible under structured light illumination, and mold release film disruption patterns that correlate with subsurface void location.
Multi-spectral imaging adds capability here. Illuminating a casting at multiple wavelengths - visible, near-infrared, and UV - reveals subsurface void signals not visible under standard white light. The depth of penetration varies by wavelength and alloy, but near-infrared can reach 0.5-2mm below the surface in aluminum alloys, enough to flag shrinkage porosity in thin wall sections before machining exposes the void.
The Process Variable Signatures
From a process control standpoint, the two defect types point to different upstream variables. This is the practical reason the distinction matters: knowing which type you have tells you where to look in your process data.
Shrinkage porosity in HPDC correlates most strongly with intensifier pressure (second-phase pressure), gate velocity, and die temperature distribution. Insufficient intensifier pressure during solidification - the pressure that compensates for shrinkage by forcing additional metal into the die - produces shrinkage porosity in pressure-remote areas. Die temperature gradients affect solidification sequence; a hot spot that solidifies last without a feed path will shrink and void.
Gas porosity correlates with melt hydrogen content, which itself traces back to charge material moisture, melt holding time, degassing practice, and die lubricant application. In high-pressure die casting, turbulent fill (high gate velocity, thin gates, long fill paths) entraps air that cannot vent before the die closes. The correlating process variables are shot velocity profile, vent design adequacy, and lubricant volume applied per shot.
A process correlation engine that does not distinguish defect type will find spurious correlations. If your castings have a mix of shrinkage and gas porosity and you report them aggregated, the statistical model linking defect rate to process variables is analyzing a mixed signal. You may find a weak correlation with intensifier pressure (driven by the shrinkage component) and a weak correlation with shot velocity (driven by the gas component) - neither strong enough to act on - when each type would show a clear correlation if analyzed separately.
Detection Approaches by Defect Type
For shrinkage porosity, thermal imaging during die filling and early solidification provides earlier warning than post-casting inspection. Thermal cameras can map die surface temperature before each shot. Sections running hot relative to nominal - indicating inadequate cooling or elevated cycle time - predict shrinkage porosity risk in the associated casting areas before the part is ejected.
Post-casting, structured light scanning identifies surface sink depressions associated with shrinkage below. The relationship between surface sink depth and subsurface void volume varies by alloy, section thickness, and wall thickness-to-void-depth ratio. ForgePuls builds alloy-specific correlation models from X-ray CT ground truth data to translate surface measurements into subsurface risk estimates.
Gas porosity detection relies more on X-ray CT for subsurface characterization in critical automotive and aerospace applications. For in-line inspection, the proxy signals are surface pinholes (gas pores intersecting the as-cast surface), blistering during heat treatment (dissolved hydrogen expanding), and statistical correlation with melt hydrogen readings if the foundry has an in-line hydrogen measurement system such as Alspek or ABB's Prefil.
Practical Classification in Production
Most production foundries do not have in-line CT on every casting. The practical workflow is to classify a sample of rejects under CT, build correlation models between CT-confirmed defect type and the process variables and surface signals that preceded them, and then apply those models to in-line inspection data for real-time classification.
This is the approach ForgePuls uses in the process correlation engine. The initial deployment requires a calibration phase where CT-confirmed castings build the classification baseline. After sufficient data, the system classifies new rejections into probable shrinkage or probable gas origin based on surface signatures and correlated process variables - not with CT certainty, but with enough confidence to direct process corrective action to the right variable set.
As we discussed in our article on billet temperature variance and defect correlation, the upstream variable identification is only as useful as your ability to isolate individual variables. Combined porosity - castings showing both types - requires careful disaggregation to avoid sending corrective action in conflicting directions simultaneously.
What This Means for Your QC Reporting
The minimum improvement most foundries can make today costs nothing: stop reporting "porosity" as a single defect code in your non-conformance system. Require macroscopic classification - shrinkage or gas - at the point of reject tagging. Even without CT characterization, an experienced quality technician can identify the probable type from fracture surface appearance and location on the casting.
Separate process control charts (Cpk, SPC) for each defect type immediately clarify which process variables are in or out of control. The investment in better classification at the reject desk pays back in faster root cause identification for any defect excursion.
For foundries processing safety-critical parts where porosity acceptance criteria are defined by ASTM E505 (aluminum casting radiography) or customer-specific CT acceptance standards, proper defect classification is not optional - the acceptance criteria differ by defect type and location.
Learn how ForgePuls classifies defect types in-line: Product Overview