Metal casting is a fundamental manufacturing process that supports global industries. Among various casting methods, sand casting foundry operations are widely used due to their flexibility and cost-effectiveness. However, the quality of sand casting foundry products is often compromised by shrinkage porosity and shrinkage cavities, which are among the most common and severe internal defects. These defects directly reduce mechanical properties, pressure tightness, and service life of castings. To achieve high-quality castings in a sand casting foundry, it is essential to predict and analyze defects before actual production. Computer numerical simulation of the solidification process offers a powerful means to forecast the formation of shrinkage porosity and cavities, thereby enabling process optimization. This paper presents the design and development of a specialized defect prediction and analysis system tailored for sand casting foundry applications. The system is built on a commercial finite element analysis platform, with a three-layer architecture, and incorporates expert system technology, parameterized design, graphical interfaces, and modular functions. The primary focus is on the numerical simulation of the solidification temperature field, followed by defect prediction using the temperature gradient method and the Niyama criterion. In addition, a defect analysis subsystem based on expert system principles is developed to provide reasoning, explanations, and suggestions for defect prevention. A case study on a high-chromium cast iron hammer head demonstrates the practical applicability of the proposed system in a sand casting foundry context.
1. Introduction
The casting industry is a critical component of manufacturing, and sand casting foundry processes are especially important for producing large and complex parts. However, the solidification of molten metal in sand molds is accompanied by volumetric shrinkage, which often leads to shrinkage defects. In a sand casting foundry, the control of these defects is vital for reducing scrap rates and improving product reliability. Traditional trial-and-error methods are time-consuming and costly. Therefore, computer-aided engineering (CAE) techniques have been increasingly adopted. Numerical simulation of the casting solidification process allows engineers to visualize temperature distributions, identify hot spots, and predict defect locations. The ultimate goal is to optimize gating and risering designs to produce sound castings.
In recent years, significant progress has been made in casting simulation. The development of general-purpose finite element software has provided a foundation for secondary development. However, these tools often require specialized knowledge of both casting technology and the software itself. To make simulation more accessible and effective for foundry engineers, a professional system that integrates casting principles, numerical methods, and knowledge-based analysis is necessary. This study aims to develop such a system, with a strong emphasis on shrinkage porosity and cavity prediction. The system is designed to be used in a sand casting foundry environment, supporting process engineers in defect prediction and analysis.
2. Theoretical Basis of Temperature Field Simulation
2.1 Heat Transfer Modes
During the solidification of a casting in a sand mold, heat transfer occurs via conduction, convection, and radiation. The thermal conduction between the casting and the mold is the dominant mode. In numerical simulation, the heat conduction is governed by the Fourier equation. For a transient three-dimensional case with phase change, the differential equation can be written as:
$$ \rho c \frac{\partial T}{\partial t} = \frac{\partial}{\partial x} \left( k_x \frac{\partial T}{\partial x} \right) + \frac{\partial}{\partial y} \left( k_y \frac{\partial T}{\partial y} \right) + \frac{\partial}{\partial z} \left( k_z \frac{\partial T}{\partial z} \right) + \dot{q}_L $$
where \(\rho\) is the density, \(c\) is the specific heat, \(T\) is temperature, \(t\) is time, \(k_x, k_y, k_z\) are thermal conductivities in the coordinate directions, and \(\dot{q}_L\) is the latent heat release rate per unit volume.
2.2 Solid Fraction Models
To account for the latent heat released during solidification, the concept of solid fraction \(f_s\) is introduced. For alloys with a freezing range, the solid fraction is a function of temperature between the liquidus temperature \(T_L\) and solidus temperature \(T_S\). In this system, two models are considered: the linear distribution and the parabolic distribution.
The linear distribution is expressed as:
$$ f_s = \frac{T_L – T}{T_L – T_S} $$
The parabolic distribution is given by:
$$ f_s = \left( \frac{T_L – T}{T_L – T_S} \right)^2 $$
For pure metals and eutectic alloys, a temperature recovery method is used. For alloys with a wide freezing range, the equivalent specific heat method or enthalpy method is applied. The enthalpy method defines the enthalpy \(H\) as:
$$ H = \int_{T_0}^{T} c \, dt + L (1 – f_s) $$
where \(L\) is the latent heat. The enthalpy approach is adopted in this system to handle the latent heat release in a robust manner.
2.3 Shrinkage Characteristics of Casting Alloys
The volume contraction of a metal from liquid to solid state consists of three stages: liquid contraction, solidification contraction, and solid contraction. The liquid contraction is given by:
$$ \varepsilon_L = \alpha_L (T_{pour} – T_L) $$
where \(\alpha_L\) is the liquid contraction coefficient, \(T_{pour}\) is the pouring temperature, and \(T_L\) is the liquidus temperature. The solidification contraction for pure metals and eutectic alloys is a fixed value, while for alloys it depends on the solidification temperature range. Shrinkage porosity forms when the contraction during solidification cannot be compensated by liquid metal feeding.
3. Overall System Structure and Function
The proposed system is designed as a comprehensive tool for sand casting foundry engineers. It consists of four main subsystems: (1) casting process CAD subsystem, (2) solidification temperature field simulation subsystem, (3) shrinkage porosity defect prediction subsystem, and (4) defect analysis subsystem. The overall architecture is shown in the following tree structure, which emphasizes modularity and integration.
| Subsystem | Function |
|---|---|
| Casting Process CAD | Design parting line, shrinkage allowance, machining allowance, draft angle; design riser, gating system, chills, molds; construct 3D models. |
| Temperature Field Simulation | Set material thermophysical properties, mesh generation, initial and boundary conditions; perform transient thermal analysis. |
| Defect Prediction | Apply temperature gradient method and Niyama criterion to predict shrinkage porosity and cavities. |
| Defect Analysis | Provide an expert system for defect classification, cause analysis, countermeasures, and knowledge base maintenance. |
The data flow begins with the CAD module, where the 3D geometry of the casting, gating system, and mold is created. Then the simulation module calculates the temperature field throughout solidification. The prediction module post-processes the temperature data to identify potential defect regions. Finally, the defect analysis module offers explanations and corrective actions based on the predicted defect type and location. This integrated workflow is essential for efficient process optimization in a sand casting foundry.
4. Development Principles and Technologies
4.1 Expert System Concepts
The defect analysis subsystem is built on the principles of expert systems. An expert system consists of a knowledge base, inference engine, working memory, knowledge acquisition facility, explanation facility, and user interface. The knowledge base stores domain-specific rules, while the inference engine applies these rules to solve problems. In the context of a sand casting foundry, the expert system can capture the expertise of experienced foundry engineers, making it available to less experienced personnel.
A typical rule for identifying shrinkage cavity is:
IF defect is a hole AND the shape is irregular open or closed AND the wall is rough with dendrites AND located at hot spots or last solidifying regions AND the hole is large and concentrated THEN the defect is shrinkage cavity (confidence factor 0.9)
4.2 Development Tools
The system is developed using the ANSYS finite element program as the platform. The internal development tools include APDL (ANSYS Parametric Design Language) and UIDL (User Interface Design Language). For database and external applications, Visual Basic 6.0 is selected as the external development tool, and Microsoft Access is used as the backend database. The system runs on the Windows operating system. This combination provides a robust and flexible development environment, allowing for both numerical simulation and knowledge-based reasoning.
The architecture is divided into three layers: application layer, tool layer, and system layer. Such a structure improves scalability, maintainability, and interoperability, which are important for a system intended to evolve with emerging needs in sand casting foundry operations.
5. Shrinkage Porosity Prediction Methods
5.1 Temperature Gradient Method
The temperature gradient method is a widely used criterion for predicting shrinkage porosity. It is based on the principle that a sufficient temperature gradient toward the riser ensures directional solidification and proper feeding. When the temperature gradient is small, the feeding channel is narrowed and eventually cut off, leading to porosity. In this system, the temperature gradient is evaluated at the moment when the solid fraction reaches a critical value \(f_{s,cr}\). The critical gradient \(G_{cr}\) depends on the alloy, casting geometry, and cooling conditions.
The algorithm for the temperature gradient method implemented in this system is as follows:
- Perform temperature field simulation and obtain temperature data for all nodes.
- For each element, calculate the solid fraction according to the linear or parabolic model.
- Determine whether the solid fraction has reached the critical solid fraction.
- If yes, compute the temperature gradient \(G\) at that time.
- Compare \(G\) with the critical gradient \(G_{cr}\). If \(G < G_{cr}\), the element is marked as a potential defect.
The implementation also allows the user to choose the entire load step history or a specific sub-step for prediction, thus providing flexibility in analyzing the evolution of defects.
5.2 Niyama Criterion
The Niyama criterion, proposed by Niyama et al., is an empirical parameter defined as \(G/\sqrt{\dot{T}}\), where \(G\) is the temperature gradient and \(\dot{T}\) is the cooling rate. A defect is predicted when this parameter value falls below a critical threshold \(G/\sqrt{\dot{T}} < C_{Ny}\). The critical value is often taken as 1.1 for steel castings, but it may vary with casting size and alloy. For high-chromium cast iron, the applicability of the Niyama criterion is questionable because the solidification of cast iron involves both austenite formation (contraction) and graphite precipitation (expansion), making the shrinkage behavior more complex.
The flowchart for both methods is presented in the system. The prediction results are displayed as colored contour plots, clearly indicating the locations and severities of potential defects.
6. Defect Analysis Expert System
6.1 Defect Classification
Accurate defect classification is the first step in defect analysis. The system adopts the classification system of the International Committee of Foundry Technical Associations (ICFTA), which divides defects into categories based on physical appearance and further subdivides them. Each defect is assigned a four-digit alphanumeric code. For example, the code “1420” represents a hot tear. This classification facilitates database management and retrieval.
In addition, the defects are classified according to the physical fields that dominate their formation. The main categories are shown in the table below:
| Physical Field | Defect Types | ICFTA Code |
|---|---|---|
| Flow field | Cold shut, entrainment, slag inclusion, sand erosion | Multiple |
| Temperature field | Shrinkage cavity, shrinkage porosity | 2000 series |
| Stress/strain field | Hot tear, cold crack, distortion | 3000 series |
| Coupled flow-thermal | Misrun, cold shut | 4000 series |
6.2 Knowledge Base and Inference
The knowledge base of the defect analysis subsystem contains defect descriptions, causes, and countermeasures. The causes are organized according to production process steps, such as casting design, pattern making, molding, core making, melting, pouring, and solidification. The inference engine uses backward chaining to determine the plausible causes based on user inputs. A confidence factor is attached to each rule to handle uncertainty.
The system provides an interactive interface where the user first selects the defect type, then the casting material and process parameters. The system then lists all possible causes and corresponding preventive actions. The knowledge base is open and can be expanded through the knowledge acquisition module, allowing the system to learn from real foundry experience in sand casting foundry environments.
7. Case Study: High-Chromium Cast Iron Hammer Head
7.1 Casting Process and Simulation Setup
The developed system was applied to a high-chromium cast iron hammer head used in a crusher. This casting is a rectangular block with a central cavity and is produced in a sand casting foundry. The material composition includes chromium, manganese, silicon, and other alloying elements. The original process utilized a pouring system as a riser, and chills were placed in the mold to promote directional solidification. The thermophysical properties of the casting and mold materials are summarized in the table below.
| Material | Density (kg/m³) | Specific heat (J/kg·K) | Thermal conductivity (W/m·K) |
|---|---|---|---|
| High-Cr cast iron | 7600 | 510 | 28 |
| Carbon steel chill | 7800 | 480 | 40 |
| Green sand mold | 1600 | 1050 | 0.8 |
| Resin sand core | 1500 | 1000 | 0.6 |
The initial temperature of the casting and gating system was set to 1400 °C, while the mold was initially at 20 °C. The interface between the casting and the mold was assumed to be perfect contact, and the exterior surfaces of the mold were subject to convective heat transfer with an adjusted heat transfer coefficient to account for radiation. The finite element model was created using the system’s CAD module. A screenshot of the geometric model is shown below.

7.2 Temperature Field Simulation Results
The solidification process was simulated for the original process. The temperature field at 1200 seconds is shown in the system display. It was observed that hot spots exist near the inner corners of the cavity, and the feeding channels are blocked. These regions are consistent with the actual defect locations reported in the foundry. This demonstrates the capability of the system to predict shrinkage defects in a sand casting foundry.
7.3 Shrinkage Porosity Prediction
For the temperature gradient method, the critical temperature gradient value was determined using a forward method, which compares simulation results with experimental observations. After several iterations, a critical gradient of 0.15 °C/mm was established for this alloy. The predicted defects using the temperature gradient method are shown in the middle cross-section. The results indicate that the pouring system experiences primary shrinkage, with secondary shrinkage underneath, and shrinkage porosity appears in the thick sections of the casting. These predictions agree well with the foundry statistics.
For the Niyama criterion, the critical value was initially set based on literature data. However, the prediction results did not match the actual defects, confirming that the Niyama criterion is not well suited for high-chromium cast iron because it does not account for the unique expansion behavior due to graphite precipitation. This finding highlights the importance of selecting appropriate criteria for different alloy systems in a sand casting foundry.
7.4 Process Optimization
Based on the defect analysis, the process was optimized by increasing the riser modulus. The original rectangular riser was replaced with a square riser of the same volume, which provides a larger modulus and longer solidification time. Additionally, padding was added to the side walls of the casting to improve feeding. The optimized process was simulated, and the defect prediction showed that no shrinkage defects remain. The temperature field at 1200 s and 2400 s demonstrated that the riser remains molten while the casting solidifies, ensuring adequate feeding. The optimized design improves the internal soundness of the casting, demonstrating the effectiveness of the developed system as a tool for sand casting foundry process improvement.
8. Conclusions and Future Work
In this paper, a shrinkage porosity defect prediction and analysis system was designed and developed for sand casting foundry applications. The system integrates numerical simulation of the solidification temperature field with defect prediction algorithms and expert system-based defect analysis. The main conclusions are as follows:
- The system provides a complete workflow from CAD modeling to thermal simulation and defect prediction. The modular structure allows for flexible and efficient operation.
- The temperature gradient method was successfully implemented with a solid fraction-based triggering criterion. The method proved to be effective for high-chromium cast iron hammer heads.
- The Niyama criterion was not suitable for high-chromium cast iron because it ignores the expansion caused by graphite precipitation.
- The defect analysis subsystem, based on expert system technology, offers a practical means to identify causes and recommend countermeasures, while allowing continuous knowledge advancement.
- The case study demonstrated that process optimization using the system can eliminate shrinkage defects, thus improving casting quality and reducing production costs.
Future work should focus on expanding the knowledge base and improving the prediction accuracy for other alloy systems. Additionally, coupling the temperature field simulation with stress and flow field simulations will provide a more comprehensive solution. The system can also be enhanced by incorporating machine learning techniques for automatic defect classification and parameter optimization. With these developments, the system will become an even more essential tool for modern sand casting foundry operations.
