Die Casting ResourceTechnical guides for die casting buyers, spec writers, and plant managers.
Porosity & Quality

Comparison: X-Ray vs Ultrasonic Inspection for Porosity Detection

Published Updated 8 min read

X-ray and ultrasonic equipment inspecting an aluminum die casting part
Quick answer

X-ray imaging offers a visual, two-dimensional view of internal porosity, making it ideal for complex geometries and audit trails. Ultrasonic testing detects deeper voids and is faster for high-volume production lines. The best choice depends on part geometry, defect size, and audit requirements.

Key takeaways
  • X-ray inspection provides a visual image of internal voids, which simplifies defect classification and supports customer audits.
  • Ultrasonic inspection is often faster and better at detecting deep, subsurface porosity that may not be visible on a flat X-ray view.
  • Part geometry, defect size, and required documentation determine which method should be used for a given die cast part.

How the two methods see porosity

X-ray inspection projects a two-dimensional image of the internal structure of a die cast part. Radiation passes through the part, and the detector records areas where the material is less dense. Shrinkage porosity, gas porosity, and other voids appear as dark spots or clusters on the resulting image. The operator or a software system can measure the size and location of each defect.

Ultrasonic inspection sends high-frequency sound waves into the part. The transducer measures the time it takes for sound to travel through the metal and reflect off an internal boundary. A void, crack, or inclusion creates a difference in acoustic impedance, which appears as a signal on the display. The method does not produce a direct picture. It produces a depth profile, often measured in millimeters or micrometers from the surface.

The difference in output changes how the operator works. With X-ray, you are looking at a photograph of the inside. With ultrasonic, you are listening to the part. One method gives a map. The other gives a depth reading.

Comparison of X-ray and ultrasonic inspection for porosity

Option Best for Limitations
X-ray (radiographic) Complex geometry, visual audit trails, customer acceptance records Slower throughput on high-volume lines; image interpretation depends on part thickness and density
Ultrasonic (pulse-echo) Deep subsurface voids, high-speed production inspection, large solid sections Difficult to calibrate on thin walls or complex shapes; output is not a visual image
Ultrasonic (through-transmission) Detecting whether a void interrupts the sound path across a section Less useful for mapping multiple small defects in one area; requires stable contact
X-ray (CT / tomography) Three-dimensional defect mapping for engineering failure analysis High cost, slower, and usually reserved for lab or prototype work rather than line acceptance

The table above covers the main approaches used in a die casting shop or a quality lab. Most production decisions fall into the first two rows. CT is a powerful tool for root cause work, but it rarely replaces routine acceptance testing.

When X-ray inspection is the better fit

X-ray inspection is the natural choice when the buyer needs a visual record. A customer who is auditing a supplier often wants to see the defect. A dark spot on an X-ray film or digital image is easier to discuss than a peak on an ultrasonic trace. If the defect is near the surface or in a thin section, X-ray usually shows it clearly.

The method also handles complex geometry well. A bracket with ribs, holes, bosses, and varying wall thickness can be placed in a way that reveals internal porosity in multiple views. The operator can rotate the part or take images at different angles. This is useful when porosity is concentrated in a hot spot or a thick section where shrinkage is likely.

For aluminum die castings, X-ray is widely used because the material density is low enough for the radiation to pass through the section without excessive absorption. The contrast between solid metal and a void is usually clear. For zinc or magnesium parts, the physics is similar, but the part size and density may require different settings.

X-ray has a cost profile that favors lower to medium volumes. The equipment is expensive, but the per-part cost is low if the part is inspected once. If a part fails, the image can be archived with the part number, date, and operator. That documentation supports traceability.

When ultrasonic inspection is the better fit

Ultrasonic inspection is often chosen for high-volume production lines where speed matters. A transducer can touch a flat or curved surface and produce a result in seconds. On a large solid section, the sound wave travels through the bulk of the part. A void in the center of that section will create a strong reflection.

The method is particularly useful for deep subsurface porosity. A small gas pore near the surface may not show on an X-ray if it is too small or if the surrounding metal shadows it. An ultrasonic probe can detect a void several millimeters below the surface, provided the surface is flat and the coupling gel is applied correctly.

Ultrasonic is also better for detecting cracks. A crack is not a void filled with gas, but it is an internal discontinuity. The acoustic signal changes when the sound wave hits a crack. For die castings, cracks are less common than porosity, but they can occur during handling, thermal shock, or if the part is damaged in transit.

The main limitation is geometry. A thin wall, a curved boss, or a part with a cavity can make the sound wave scatter or reflect in ways that mask a defect. The operator must know the part well enough to place the probe correctly. If the part is not flat, the measurement can be inconsistent.

How defect size and location affect the choice

The size of the porosity matters. A small gas pore, perhaps only a fraction of a millimeter, is hard to detect with either method. X-ray may show it if it is in a thin section. Ultrasonic may miss it if the wavelength of the sound is too long for the size of the void.

Location matters more than size. A void in the center of a thick rib is easier to find with ultrasonic than a void on the edge of a thin wall. A void near the surface is easier to find with X-ray. If the part has a thick section and the porosity is likely to be in the center of the section, ultrasonic may be the better first choice. If the part is thin and the porosity is scattered, X-ray may reveal more of the pattern.

The type of porosity also influences the choice. Gas porosity is often a cluster of small voids. Shrinkage porosity is often a larger, irregular void. X-ray shows both as dark areas. Ultrasonic may show a cluster of small voids as a noisy signal, while a large shrinkage void may appear as a clear reflection.

Cost, throughput, and documentation

X-ray inspection is slower than ultrasonic. The part must be placed in the X-ray chamber, the exposure must be taken, and the image must be reviewed. If the part fails, a second view may be needed. On a high-volume line, this can become a bottleneck.

Ultrasonic inspection is faster. A probe can be moved across a part in seconds. On a production line, an operator can inspect a large number of parts per hour. The method is also less sensitive to part size. A small part can be inspected quickly, and a large part can be inspected by scanning multiple areas.

Documentation is a different trade-off. X-ray produces an image that is easy to attach to a quality report. Ultrasonic produces a signal trace. The trace can be interpreted by an experienced operator, but a customer who is not familiar with ultrasonic may not understand it. If the buyer requires a visual defect record, X-ray is simpler to provide.

If the shop has a CT scanner, the cost is much higher, and the throughput is low. CT is used for engineering analysis, not routine acceptance. It can map a defect in three dimensions and measure its exact location. For a new part where porosity is a recurring problem, CT can be a valuable tool. For a finished part that must pass a customer audit, X-ray is usually the standard.

How to select the method for a new part

Start with the part drawing and the acceptance criteria. The drawing may specify a maximum number of porosity clusters, or it may require a certain size threshold. If the drawing requires a visual record, X-ray is the default. If the drawing specifies a depth-based criterion, ultrasonic is more appropriate.

Next, consider the production volume. If the part is produced in low quantities, such as prototype runs or small batches, X-ray is easier to manage. If the part is produced in high quantities, such as automotive brackets or housing components, ultrasonic may be needed to keep up with the line speed.

Then, consider the defect history. If the part has a history of deep shrinkage porosity, ultrasonic is a good first check. If the part has a history of gas porosity near the surface, X-ray is a good first check. If the history is mixed, both methods may be needed. Some shops use X-ray for 100 percent of the parts and ultrasonic for a sample, or vice versa.

The final decision is often made by the customer. A supplier may prefer one method over the other, but the customer may require a specific method. If the customer requires X-ray, the supplier must provide X-ray images. If the customer requires ultrasonic, the supplier must provide ultrasonic traces. The supplier should not assume that one method is equivalent to the other.

Common mistakes in choosing a method

A common mistake is to choose a method based on cost alone. X-ray is often more expensive per part than ultrasonic, but it provides a visual record that may be required. Ultrasonic is cheaper per part, but it may not meet the customer’s documentation requirements.

Another mistake is to ignore part geometry. A part with a complex shape may not be suitable for ultrasonic inspection. A part with a thin wall may not be suitable for X-ray if the density is too high or the wall is too thin. The operator must test the part before putting it into production.

A third mistake is to assume that one method is better than the other. Each method has its own strengths and limitations. A good quality control plan may use both methods. For example, X-ray may be used for all parts that fail a visual inspection, and ultrasonic may be used for a sample of parts that pass.

Final thoughts

The choice between X-ray and ultrasonic inspection depends on the part, the defect, and the requirements. X-ray is better for visual records and complex geometry. Ultrasonic is better for deep subsurface voids and high-volume production. The best method is the one that meets the acceptance criteria and fits the production process.

A supplier should evaluate the part before choosing a method. A customer should specify the method in the drawing or the quality agreement. The operator should be trained on the method and the part. The result should be documented in a clear and consistent way.

For die casting porosity inspection, there is no single best method. There is only the method that fits the part and the requirement.

Frequently asked questions

Can X-ray and ultrasonic inspection be used together?

Yes. Many shops use X-ray for all parts that fail a visual check and ultrasonic for a random sample of passing parts. This gives a visual record for failures and a depth check for passes.

Which method is better for small gas porosity?

X-ray is usually better for small gas porosity near the surface. Ultrasonic may miss a small void if the wavelength of the sound is too long for the size of the void.

Does ultrasonic inspection require the part to be flat?

A flat surface is easier to inspect. A curved or complex surface can be inspected, but the operator must place the probe correctly and use the right coupling gel. The measurement can be less consistent on complex shapes.

Can X-ray detect cracks?

Yes, but it is less effective than ultrasonic for detecting cracks. X-ray shows a crack as a thin dark line if the crack is open. Ultrasonic shows a crack as a strong reflection if the crack is closed.

What is the cost difference between X-ray and ultrasonic?

X-ray equipment is usually more expensive than ultrasonic equipment. The per-part cost for X-ray is also usually higher because the process is slower. Ultrasonic is cheaper per part and faster, but it may not meet the customer's documentation requirements.