1. Introduction
The foundry industry is a vital component of the manufacturing sector, and its role in national economic development cannot be overstated. China, with its long history of casting production, now ranks second globally in annual casting output. However, casting technology has traditionally relied heavily on manual experience, and only in recent decades, with rapid scientific progress and the development of production mechanization, has it gradually evolved into a formal engineering discipline. The casting process is an extremely complex physical and chemical procedure, involving multiple disciplines such as physics, fluid mechanics, heat transfer, metallurgy, and mechanics. Scientific analysis of the casting process requires both experimental observation and mathematical analysis tools, which are still not fully developed, and a rigorous theoretical system remains to be established.
In today’s globally competitive environment, particularly after China’s accession to the WTO, the domestic market has become part of the international market. To remain competitive, the domestic manufacturing industry must focus on rapid response to market changes. In short, this means having the shortest product development cycles, optimal product quality, and the lowest manufacturing costs. Facing unpredictable and rapidly changing markets, enterprises must achieve high levels of agility and flexibility in their operations. Faced with these opportunities and challenges, the foundry industry must pursue technological innovation and development.
The advent of computers has caused a profound revolution in science and technology. The application of computers in casting production has received increasing attention. With enhanced computing power, logical reasoning capability, and artificial intelligence capabilities, computers can be used to detect and control casting process parameters, casting equipment, and production processes. They can also be employed for the optimized design of casting processes and tooling, enabling “computer trial casting”, predicting casting defects, and thus effectively ensuring casting quality, shortening trial production cycles, and reducing production costs. The application of computers in casting has become an essential condition for producing high-quality castings and represents a major direction in foundry modernization.
This thesis focuses on the development of a system for predicting shrinkage cavity and porosity defects and analyzing casting defects, specifically targeting sand casting defects. The system is built upon the finite element analysis platform ANSYS, utilizing a three-tier development architecture and employing techniques of graphical operation, parameterized design, and modular functionality. The ultimate goal is to provide engineers with a scientific tool for predicting and analyzing sand casting defects.
2. Theoretical Foundations of Solidification Simulation
2.1 Fundamentals of Heat Transfer Analysis
The temperature field simulation of the casting solidification process is a typical transient thermal analysis. According to the first law of thermodynamics, the energy balance equation for a closed system can be expressed as:
$$Q – W = \Delta U + \Delta KE + \Delta PE$$
For most engineering heat transfer problems, the kinetic and potential energy changes are negligible, and the work term is zero, simplifying the equation to:
$$Q = \Delta U$$
The transient heat balance equation in matrix form is given by:
$$[C(T)]\{T’\} + [K(T)]\{T\} = \{Q(T)\}$$
where:
- $[K]$ is the conduction matrix, including thermal conductivity, convection coefficients, radiation rates, and shape coefficients
- $[C]$ is the specific heat matrix, accounting for the increase in system internal energy
- $\{T\}$ is the nodal temperature vector
- $\{T’\}$ is the time derivative of temperature
- $\{Q\}$ is the nodal heat flow rate vector
2.2 Heat Transfer Modes
During the solidification of a casting, three primary heat transfer mechanisms operate between the casting/mold system and the environment:
- Conduction: Heat transfer through direct contact, governed by Fourier’s law: $q = -k \cdot dT/dx$
- Convection: Heat exchange between a solid surface and the surrounding fluid, described by Newton’s law of cooling: $q = h(T_s – T_f)$
- Radiation: Heat transfer via electromagnetic waves, quantitatively described by the Stefan-Boltzmann equation: $Q = \epsilon \sigma A F (T_1^4 – T_2^4)$
In the modeling of sand casting defects, the radiation effects are often converted into equivalent convection coefficients to simplify calculations and reduce computational cost.
2.3 Mathematical Model for Heat Conduction
The transient heat conduction differential equation for a casting during solidification, considering the release of latent heat, is:
$$\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 material density, $c$ is the specific heat, $k_x$, $k_y$, $k_z$ are the thermal conductivities in different directions, and $\dot{q}_L$ is the latent heat release rate per unit volume.
2.4 Solidification Shrinkage Characteristics
The solidification process involves three stages of volume shrinkage: liquid shrinkage, solidification shrinkage, and solid shrinkage. For pure metals and eutectic alloys, the solidification shrinkage is solely due to the phase change, while for alloys with a broad solidification range, the shrinkage involves both phase change and temperature reduction.
The liquid shrinkage rate is given by:
$$\varepsilon_L = \alpha_L (T_{pour} – T_{liquidus})$$
where $\alpha_L$ is the liquid shrinkage coefficient, $T_{pour}$ is the pouring temperature, and $T_{liquidus}$ is the liquidus temperature.
The solid shrinkage rate is:
$$\varepsilon_S = \alpha_S (T_{solidus} – T_{room})$$
where $\alpha_S$ is the solid shrinkage coefficient and $T_{solidus}$ is the solidus temperature.
2.5 Fraction of Solid Phase
The fraction of solid phase is a critical concept in numerical simulation. For practical multi-component alloys, the relationship between the mass fraction of solid ($f_s$) and temperature can be determined using the liquidus temperature ($T_L$) and solidus temperature ($T_S$). I proposed two distribution models:
Linear distribution:
$$f_s = \frac{T_L – T}{T_L – T_S}$$
Parabolic distribution:
$$f_s = \left(\frac{T_L – T}{T_L – T_S}\right)^2$$
The linear distribution model was successfully implemented in the system for predicting sand casting defects. Table 2.1 summarizes the methods for treating latent heat.
Table 2.1 Methods for Treating Latent Heat
| Method | Application | Description |
|---|---|---|
| Temperature Recovery Method | Narrow crystallization range (ΔT ≤ 15°C) | Utilizes the increment of solid fraction Δfs instead of the latent heat release Δq |
| Equivalent Specific Heat Method | Broad crystallization range (ΔT > 15°C) | Converts latent heat of solidification into equivalent specific heat |
| Enthalpy Method | General application | Defines the enthalpy of the casting as a function of temperature to account for latent heat |
3. System Architecture and Functions
The developed system follows a tree-like structure comprising several distinct subsystems, each fulfilling specific roles in the overall analysis and prediction workflow for sand casting defects. The primary decomposition of the system is illustrated in Table 3.1.
Table 3.1 System Hierarchy and Modules
| Subsystem | Main Function | Key Features |
|---|---|---|
| Casting Process CAD | Design of casting, risers, mold, and gating system | Parameter determination, CAD model construction, database access |
| Solidification Simulation | Finite element analysis of temperature field | Material property database, meshing, solver setup, post-processing |
| Defect Prediction | Shrinkage cavity and porosity prediction | Temperature Gradient Method, Shinyama Criterion Method |
| Defect Analysis | Expert system for defect diagnosis | Knowledge base, inference engine, maintenance tools |
3.1 Casting Process CAD Subsystem
This subsystem provides computer-aided tools for designing key components of the casting process. The design of the casting itself involves determining the parting line, pouring position, shrinkage allowance, machining allowance, and draft angle, culminating in the creation of a 3D model. The riser design module includes functionality for selecting riser types, calculating riser modulus, and performing feeding capacity checks. The mold design subsystem handles the selection of molding materials, cores, chills, and coatings. The gating system design module calculates critical parameters such as sprue cross-sectional areas and gating ratios.
3.2 Solidification Simulation Subsystem
The core function of this subsystem is to simulate the cooling and solidification of the casting after the mold is filled. This requires specifying the initial temperature field, boundary conditions, and material properties. The solution is then computed iteratively over time steps. The post-processing capabilities allow for visualization of temperature distributions as colored contour maps, generation of temperature history curves, and animation of the solidification sequence.
3.3 Defect Prediction Subsystem
This is the central component of the system, which employs two primary criteria for predicting shrinkage cavity and porosity defects:
Temperature Gradient Method: This criterion is based on the principle that insufficient temperature gradients during solidification hinder the feeding capability of risers. The algorithm workflow, as detailed in Table 3.2, involves extracting temperature field data, calculating the solid fraction for each element, and comparing the local temperature gradient against a critical value.
Shinyama Criterion Method: This method, also known as the G/T1/2 method, is derived from empirical studies. When the value of G/√T’ for a unit falls below a critical threshold, the unit is identified as a potential defect location. My implementation of this algorithm also allows for flexible extraction of data from the entire simulation or from specific load steps.
Table 3.2 Comparison of Defect Prediction Criteria
| Criterion | Physical Basis | Prediction Condition | Advantages | Disadvantages |
|---|---|---|---|---|
| Temperature Gradient Method | Feeding channel expansion angle during solidification | Gradient < Critical Gradient | Simple, practical | Critical value varies with casting shape and composition |
| Shinyama (G/√T’) Method | Evaluation of feeding capability of interdendritic liquid | G/√T’ < Critical Value | Critical value independent of cooling rate | May not be suitable for cast iron; only predicts shrinkage porosity |
3.4 Defect Analysis Subsystem
The defect analysis subsystem functions as an expert system. It is built upon a knowledge base derived from the “International Atlas of Casting Defects” and “Casting Defect Analysis” handbooks. The system’s purpose is to aid engineers in identifying the causes of defects, offering prevention strategies, and providing a tool for knowledge base maintenance. The overall workflow of the system connects the CAD design phase, the numerical simulation phase, the defect prediction phase, and the defect analysis phase in a sequential and iterative manner.
4. System Development Principles and Technologies
4.1 Expert System Principles
The defect analysis subsystem is rooted in expert system technology. An expert system is a computer program that simulates the decision-making process of a human expert. Its core components include a knowledge base, an inference engine, a working database, a knowledge acquisition mechanism, an explanation mechanism, and a user interface. In contrast to traditional programs, expert systems separate knowledge from the control logic, allowing for flexible and transparent reasoning. Table 4.1 presents a comparison between traditional programs and expert systems.
Table 4.1 Traditional Programs vs. Expert Systems
| Aspect | Traditional Program | Expert System |
|---|---|---|
| Program structure | Data + Algorithm | Knowledge Base + Inference Engine |
| Knowledge representation | Embedded in code; not modifiable | Explicit in knowledge base; easily modified |
| Problem-solving | Algorithmic, deterministic | Heuristic, deals with uncertainty |
| Application scope | Well-defined problems | Ill-structured, complex problems |
Knowledge in the system is represented using production rules. For example, a rule for identifying shrinkage cavities might be:
IF (defect is a hole type) AND (irregular shape) AND (rough walls with dendrites) AND (located in hot spots) THEN (defect is shrinkage cavity) with CF = 0.9
The inference engine employs a combination of forward and backward chaining. Forward chaining starts from known facts and applies rules to derive conclusions, while backward chaining starts from a hypothesis and seeks evidence to support it. This hybrid approach enhances efficiency and accuracy.
4.2 Development Tools and Architecture
The system leverages the ANSYS finite element analysis software as the core simulation engine. ANSYS provides two main internal development tools: APDL (ANSYS Parametric Design Language) and UIDL (User Interface Design Language). APDL is a scripting language used for automating tasks, building models, and performing parametric design. UIDL allows for customization of the graphical user interface, including menus and dialogs.
For external development, the system utilizes Delphi as the rapid application development tool, with Microsoft SQL Server serving as the backend database. The three-tier development architecture is described in Table 4.2.
Table 4.2 Three-Tier Development Architecture
| Layer | Components |
|---|---|
| Application Layer | Cast defect prediction and analysis system |
| Tool Layer | APDL, UIDL, Delphi, SQL Server, ANSYS database |
| System Layer | Operating system (Windows) |
5. Research and Software Development for Shrinkage Prediction
5.1 Classification and Mechanisms of Shrinkage Cavity and Porosity
Shrinkage cavities are holes that form in the last-solidifying regions of a casting due to volumetric contraction of the alloy. They can be broadly classified into two categories:
- Shrinkage Cavity: Large, concentrated void
- Shrinkage Porosity: Fine, dispersed voids
The formation mechanisms involve complex interactions between fluid flow, pressure changes, and solidification. One key mechanism is the pressure drop due to flow resistance in the mushy zone. As solidification progresses, the solid fraction increases, making it harder for liquid metal to flow and feed the shrinkage. This behavior can be described by Darcy’s law:
$$v = -\frac{K}{\mu f_l} (\nabla P + \rho g)$$
where $K$ is the permeability, $\mu$ is the dynamic viscosity, $f_l$ is the liquid fraction, and $\nabla P$ is the pressure gradient. When the solid fraction reaches a critical value ($f_{sc}$), flow becomes practically impossible, and shrinkage defects form.
5.2 Critical Solid Fraction
The critical solid fraction is a vital parameter for predicting sand casting defects. Table 5.1 lists the critical solid fraction values for various alloys.
Table 5.1 Critical Solid Fraction Values for Various Alloys
| Alloy | Critical Solid Fraction fsc | Remarks |
|---|---|---|
| Al-Cu alloy | 0.98 | Calculated using Scheil equation |
| Al-Si alloy | 0.85 | Measured value |
| Al-Mg alloy | 0.70-0.85 | Free solidification, measured |
| Carbon steel | 0.70 | Based on cylinder tests |
| Cast steel | – | No clear basis provided |
| Cast iron | 0.55-0.65 | Calculated using Scheil equation |
5.3 Implementation of the Temperature Gradient Method
In my implementation, the temperature gradient is determined at the moment when the solid fraction of a casting element reaches the critical solid fraction. The system allows the engineer to choose between analyzing the entire set of load steps or a specific load step. The software flow is as follows:
First, the user inputs the liquidus temperature ($T_L$), solidus temperature ($T_S$), critical solid fraction ($f_{sc}$), and critical temperature gradient ($G_c$). The program then iterates over all elements in the chosen load steps. For each element, the temperature and temperature gradient are extracted. If the solid fraction exceeds $f_{sc}$, and the gradient is less than $G_c$, the element is flagged as a potential defect location.
5.4 Implementation of the Shinyama Criterion
The Shinyama criterion requires the calculation of the temperature gradient ($G$) and the cooling rate ($T’$). The value of $G/\sqrt{T’}$ is calculated for each element. If this value is below the critical value, the element is identified as a defect. Critical values reported in the literature range from 0.7 to 1.5 for large and small castings, respectively.
6. Expert System for Casting Defect Analysis
6.1 Defect Classification System
Correct identification of casting defects is the first step in analysis. I have studied various classification systems. The Chinese standard classifies defects into five major categories based on appearance. The International Committee of Foundry Technical Associations (CIATF) classification system is more detailed, with defects divided into 7 main categories, 19 groups, 49 subgroups, and 146 specific defects, each with a unique 4-character alphanumeric code. Table 6.1 illustrates this coding scheme.
Table 6.1 CIATF Defect Coding System
| Coding Position | Meaning | Example for Code “4100” |
|---|---|---|
| 1st Character (Letter) | Defect Category | “B” represents Crack Defects |
| 2nd Character (Digit) | Defect Group | “1” represents Cracks due to Internal Stress |
| 3rd Character (Digit) | Defect Subgroup | “0” represents Stress Hot Tear |
| 4th Character (Digit) | Specific Defect | “0” represents Hot Tear |
In addition to the standard systems, I proposed a novel classification method based on the physical field that causes the defect. This approach facilitates the direct integration of defect analysis with numerical simulation results, as demonstrated in Table 6.2.
Table 6.2 Defect Classification by Physical Field
| Physical Field | Associated Defects | Corresponding CIATF Code |
|---|---|---|
| Flow Field | Cold Shut, Gas Entrapment, Slag Inclusion, Mold Erosion | Various codes under “D” and “G” |
| Temperature Field | Shrinkage Cavity, Shrinkage Porosity | Codes under “C” |
| Stress/Strain Field | Hot Tear, Cold Crack, Deformation | Codes under “B” |
| Coupled Flow/Thermal | Misrun, Cold Shut | Codes under “D” |
6.2 System Architecture and Workflow
The defect analysis subsystem consists of several functional modules: a defect query module, a cause analysis module, a countermeasure module, and a knowledge base maintenance module. The workflow begins with the user selecting a defect type. The system then guides the user through identifying potential causes by considering various process parameters and analysis factors. Finally, the system outputs relevant countermeasures. The knowledge base is designed with an open architecture, allowing for continuous updates and refinement.
I developed the system using a combination of forward and backward reasoning. The backward reasoning strategy helps to confirm a hypothesized defect class based on user input. The system can answer queries regarding the appearance, location, and nature of the defect to narrow down the possibilities. For instance, a series of questions about the shape of a cavity, its wall characteristics, and its location will guide the system to infer whether it is a gas hole, shrinkage cavity, or other defect types. The related countermeasures are presented for each identified cause.
7. Case Study: High Chromium Cast Iron Casting

The practical application of the system was tested on a high chromium cast iron hammerhead, a wear-resistant component used in crushers. The casting is rectangular with a central cavity. Its chemical composition is listed in Table 7.1.
Table 7.1 Chemical Composition of High Chromium Cast Iron
| Element | C | Si | Mn | Cr | Mo | Cu |
|---|---|---|---|---|---|---|
| Content (%) | 2.8-3.2 | 0.3-0.8 | 0.5-0.8 | 18-22 | 0.3-0.5 | 0.5-0.8 |
7.1 Temperature Field Simulation
I conducted a transient thermal analysis to simulate the solidification process of the casting. Table 7.2 summarizes the initial conditions and material properties.
Table 7.2 Material Properties and Boundary Conditions
| Component | Material | Density (kg/m³) | Specific Heat (J/kg·°C) | Conductivity (W/m·°C) | Initial Temp (°C) |
|---|---|---|---|---|---|
| Casting and Riser | High Cr Iron | 7800 | 500-700 | 20-35 | 1280 |
| Chill | Medium Carbon Steel | 7850 | 486 | 45-50 | 20 |
| Sand Mold | Green Sand | 1700 | 1050 | 0.8-1.2 | 20 |
| Core and Pad | Resin Sand | 1500 | 1050 | 0.5-0.8 | 20 |
The simulation results pinpointed high-temperature and low-temperature-gradient regions located at the inner corners of the casting cavity. Although some areas of the riser and gating system remained hot, their feeding channels were already blocked. These locations corresponded well with the actual locations of sand casting defects observed in production.
7.2 Defect Prediction Results and Discussion
To determine the critical threshold values for the prediction criteria, I proposed two methods: the forward method and the reverse method. The forward method was applied in this case, which involves adjusting a preliminary critical value and comparing the simulation results with experimental data.
For the temperature gradient method, after several iterations, I found that a critical temperature gradient of 0.06 °C/mm produced defect predictions that closely matched the experimental results. The predicted defects, which were primarily secondary shrinkage and dispersed porosity in the thicker sections of the casting, aligned well with the statistical data from the foundry.
While the temperature gradient method performed well, the Shinyama criterion method did not yield satisfactory predictions for this high chromium cast iron part. This discrepancy can be attributed to the complex solidification behavior of cast iron, which involves the precipitation of both austenite (causing contraction) and graphite (causing expansion). The Shinyama criterion, which was primarily developed for steel castings, does not account for this unique contraction-expansion behavior in sand casting defects related to cast iron.
7.3 Process Optimization and Validation
Based on the initial analysis, the original process was modified. The aim was to enhance directional solidification by increasing the modulus of the riser and adding padding to the casting wall. The original rectangular riser with dimensions of 60×100×130 mm (modulus: 16.5 mm) was changed to a square riser of 85×85×85 mm (modulus: 18.9 mm), while maintaining the same volume. Additionally, padding of 10 mm thickness was added to the casting’s thick walls.
This optimized process was then simulated. The results, as displayed in the temperature field and gradient field plots at both 500 seconds and 5000 seconds, demonstrated a significant improvement. Even when the casting had completely solidified, the riser still contained a substantial liquid region, ensuring an effective feeding path and allowing the riser to compensate for the volumetric shrinkage of the casting. The defect prediction simulation for the optimized process confirmed that no defect elements were present within the casting, indicating a superior process design for minimizing sand casting defects.
8. Conclusions and Future Work
8.1 Principal Conclusions
In this thesis, I have successfully developed a specialized system for the prediction and analysis of sand casting defects, specifically focusing on shrinkage cavity and porosity. The key contributions and findings are summarized below:
- The system architecture, based on a modular design of four interacting subsystems, provides an integrated workflow for casting design, simulation, defect prediction, and analysis.
- The defect prediction subsystem effectively implements two criteria: the temperature gradient method and the Shinyama criterion. The flexible load step selection enhances usability.
- I proposed a defect classification system based on physical fields, which complements existing standards and facilitates a direct link between simulation results and defect analysis, leading to a more systematic root-cause analysis.
- The expert system for defect analysis successfully integrates a structured knowledge base with an inference engine to provide defect identification, cause analysis, and corrective suggestions.
- A forward method was proposed to determine critical criterion values efficiently. For the high chromium cast iron case, the critical temperature gradient was determined to be 0.06 °C/mm, a valuable reference for future applications.
- The numerical simulation and defect prediction were validated against experimental data. The Shinyama criterion proved unsuitable for this specific cast iron alloy, highlighting the need for alloy-specific prediction criteria.
The development of the system demonstrates the potential of integrating numerical simulation with artificial intelligence to provide a powerful tool for foundry engineers. It enhances the move from traditional “trial-and-error” methods towards a “science-based” approach for quality control and defect prevention in sand casting defects.
8.2 Future Research Directions
While this system provides a solid foundation, there is always room for improvement, and several potential research directions have emerged from this work:
- Expansion of Defect Prediction Criteria: The accuracy of prediction could be further enhanced by implementing additional criteria, such as the solid fraction gradient method, pressure gradient method, or direct simulation approaches. This would allow users to analyze sand casting defects from multiple perspectives, including quantitative predictions.
- Refinement of Critical Values: As the critical threshold values are dependent on various factors, future research should aim to establish a more comprehensive database and possibly a method for grading the severity of predicted defects.
- Advancement of the Expert System: The expert system can be further developed by expanding its knowledge base and enhancing its inference engine to handle more complex relationships. A more robust learning mechanism would also increase its practical value.
- Improvement of the User Interface: Future development should focus on creating a more intuitive and interactive user interface, perhaps with a tree-shaped navigation panel, more graphical parameter inputs, and enhanced online help features.
