In modern foundry industry, the design of casting process has been greatly transformed by computer-aided design (CAD) and computer-aided engineering (CAE). For steel castings, the feeding system is a critical part of the casting process, which directly affects the soundness and quality of final products. This paper presents my work on developing a dedicated feeding system for steel castings based on Unigraphics (UG) platform using secondary development tools. The system integrates parameterized modeling, database management, assembly technology, and CAE feedback to assist process engineers in designing risers, riser seats, feeding allowances, chills, and sand boxes. A special emphasis is placed on side riser design and automatic generation of side riser seats for steel castings with complex geometric shapes. The developed system has been applied in a real foundry company, significantly improving design efficiency and reducing manual errors.
1. Introduction and Research Background
The manufacturing industry is a key pillar of national economy. In the field of casting, especially for steel castings, the production cycle traditionally involves pattern design, mold making, pouring, solidification, and finishing. The use of CAD technologies has greatly shortened the product development cycle. However, most commercial 3D CAD systems are generic and do not provide dedicated tools for casting process design. Casting process engineers often need to repeat many tedious operations, such as looking up standards, calculating modulus, designing riser seats, and positioning chills. This reduces design efficiency and may lead to inconsistent designs depending on individual experience.
To address these issues, many researchers and companies have developed specialized CAD systems based on generic 3D modeling software. In China, universities and research institutes have been actively exploring casting CAD and CAE. For example, the casting simulation software “HuaZhu CAE” has been widely used. However, the integration between CAD and CAE is often loose. In this project, I cooperated with a foundry company to build a complete feeding system for steel castings based on UG. The company mainly produces large steel castings with complex curved surfaces, and they need side risers and side riser seats to feed the hot spots. Traditional manual design of these features is time-consuming. Therefore, I developed a parametric and template-based system that automates the design of risers, riser seats, feeding allowances, chilling blocks, and sand boxes.

2. System Architecture and Related Technologies
2.1 Overall System Design
The developed casting feeding system follows the actual workflow of casting process design. The main modules include engineering initialization, part information extraction, parting surface creation, sand box design, machining allowance, draft angle, feeding allowance design, riser seat design, riser design, chill design, and CAE integration. The data flow is shown in the following conceptual diagram:
Data flow: import part model → extract part properties → set parting surface → design sand box → apply draft → compute local modulus → design feeding allowance → design riser seat → select and place riser → add chills → export STL → CAE simulation → optimize feeding scheme.
All modules are implemented as dynamic link libraries (DLLs) that can be loaded into the UG process. The database stores riser standard dimensions, modulus values, sand box specifications, and chill parameters. The system supports both industry standards and company-specific standards, making it flexible and practical.
2.2 UG/Open API and Development Environment
UG provides a powerful secondary development toolkit called UG/Open. The main components include UG/Open API, UG/Open MenuScript, UG/Open UIStyler, and UG/Open GRIP. I used UG/Open API extensively to create custom features, manipulate the part model, compute physical properties, and assemble components. The development environment was Visual Studio 2010 with C++ programming language. The compiled DLL files were placed in the application folder, and menu scripts were placed in the startup folder. The system environment variable UGII_USER_DIR was set to enable automatic loading.
2.3 Parameterized Modeling
Parameterized design is essential for a standard parts library. I used three main approaches:
- Direct programming: All dimensions are variables controlled by program code. This offers maximum flexibility but requires more effort for complex geometries.
- Dimension-driven design: The model is created with expressions. The program updates these expressions based on user input, and UG regenerates the model automatically.
- Interactive design: Users modify design variables directly in the UG environment. This method is intuitive but not efficient for repetitive tasks.
For the feeding system, I adopted a hybrid approach. Standard risers and chills were modeled once and stored as templates. The system imports them and adjusts their dimensions by modifying expressions. For special features like side riser seats, the geometry is generated algorithmically based on the hot spot circle and user parameters.
2.4 Virtual Assembly Technology
In UG, assembly is used to position components in the assembly space. The position and orientation of a component is defined by a 4×4 transformation matrix P:
$$[P] = \begin{bmatrix}
V_{x}^{X} & V_{y}^{X} & V_{z}^{X} & S_{x} \\
V_{x}^{Y} & V_{y}^{Y} & V_{z}^{Y} & S_{y} \\
V_{x}^{Z} & V_{y}^{Z} & V_{z}^{Z} & S_{z} \\
0 & 0 & 0 & 1
\end{bmatrix}$$
where V represents the direction vectors of the component coordinate system and S is the origin position. The movement from one position to another is achieved by a transformation matrix T:
$$[T] = \begin{bmatrix}
T_{x}^{X} & T_{y}^{X} & T_{z}^{X} & M_{x} \\
T_{x}^{Y} & T_{y}^{Y} & T_{z}^{Y} & M_{y} \\
T_{x}^{Z} & T_{y}^{Z} & T_{z}^{Z} & M_{z} \\
0 & 0 & 0 & 1
\end{bmatrix}$$
Using UG/Open API functions such as UF_ASSEM_add_part_to_assembly() and UF_ASSEM_reposition_instance(), I implemented component placement and repositioning. For riser placement, after importing the riser part, I allowed users to specify the target point and orientation. The system then calculates the required transformation matrix to relocate the riser correctly.
2.5 Database and Dynamic Link Library Technology
The system stores parametric data in Microsoft Excel files accessed via OLEDB. This approach is lightweight and convenient for small-scale industrial data. The OLEDB connection string uses the provider Microsoft.ACE.OLEDB.12.0 for Excel files. For Excel 97-2003 files, the extended property is Excel 8.0; for newer versions, it is Excel 12.0 Xml.
Dynamic linking is used to separate the core application from the modules. The database operations are encapsulated in a DLL named AdoExcel.dll. When a module needs to query riser dimensions, it calls the functions exported by this DLL. The import library AdoExcel.lib is linked at compile time, and the DLL is loaded at runtime. This architecture reduces code duplication and simplifies maintenance.
3. Development of Core Feeding Modules for Steel Castings
3.1 Riser Design Principles and Methods
Steel castings are prone to shrinkage defects due to the solidification contraction of molten steel. Risers are used to feed liquid metal to the solidifying casting to compensate for volume reduction. The classical Chvorinov rule states that solidification time t is proportional to the square of the module M:
$$t = K M^2$$
where K is a constant depending on mold material and casting conditions. The module M is defined as the ratio of volume V to cooling surface area S:
$$M = \frac{V}{S}$$
For the riser to be effective, the riser module Mr must be greater than the module of the casting section being fed Mc. In practice, the following condition is used:
$$M_r = f \cdot M_c$$
where f is an expansion factor, typically between 1.1 and 1.2 for steel castings. Additionally, the riser must contain enough liquid metal to satisfy the shrinkage requirement. This can be expressed as:
$$\varepsilon_v (V_c + V_r) \le \eta V_r$$
where Vc and Vr are casting and riser volumes, εv is the solidification shrinkage ratio, and η is the feeding efficiency of the riser.
The position of risers is crucial. Risers should be placed above or beside the hot spots of the steel castings. They should not be placed at highly stressed sections. In this system, I implemented a local modulus calculation module that helps designers determine the required riser size based on the geometry of the steel castings.
3.2 Process Yield Calculation
The process yield (also called casting yield or recovery) is an important economic indicator. It is defined as:
$$\delta = \frac{G_c}{G_c + G_r + G_g} \times 100\%$$
where Gc, Gr, and Gg represent the weights of steel castings, risers, and gating system respectively. The system dynamically calculates the yield after each riser is added. It finds all solid bodies tagged with riser attributes using the function find_objs_with_riser_attrs(), then computes their mass via UF_MODL_ask_mass_props_3d(). This real-time feedback helps designers avoid using oversized risers, which would reduce yield and increase cost.
3.3 Sand Box Design
Sand boxes are essential for supporting the mold during pouring. The company provided a list of standard sand box sizes. I built a database with dimensions, quantities, pattern plate specifications, and frame types. The sand box design module automatically reads the bounding box of the steel castings using the function UF_MODL_ask_bounding_box_aligned(). The user can select an appropriate sand box from the list. A simplified rectangular box is created for the upper and lower parts, separated by the parting surface. The module allows showing, hiding, deleting, and adjusting transparency of the sand box.
| Box Size (mm) | Quantity | Pattern Plate | Bottom Frame |
|---|---|---|---|
| 500×700×300 | 2 | 700×1000 | 40-A |
| 600×700×350 | 2 | 800×1000 | 40-A |
| 700×900×300 | 20 | 900×1200 | 60-A |
| 800×1100×400 | 1 | 1000×1400 | 60-B |
| 900×900×350 | 4 | 1100×1200 | 60-A |
| 1000×1000×400 | 5 | 1200×1300 | 60-A |
| 1000×1200×500 | 4 | 1200×1500 | 60-A |
3.4 Side Riser Seat Design
For steel castings with complex curved surfaces, a side riser cannot be placed directly on the casting. Therefore, a side riser seat is used. The design of the side riser seat is based on the hot spot circle obtained from the intersection of the parting surface and the casting surface. The process involves two major steps:
3.4.1 Geometry of the Side Riser Section Curve
The user first selects or creates a reference plane that passes through the hot spot region. The system computes the section curve of the casting with that plane. Then the user draws a circle tangent to the section boundaries (hot spot circle). The radius of the hot spot circle r is captured. The side riser section curve consists of an outer circle (riser seat circle) of radius R whose center is offset by a distance L from the hot spot circle center, plus two common external tangent lines. The relationship between the tangency angle θ, radii r, R, and center distance L is given by:
$$\sin\theta = \frac{r}{R + L}$$
derived from the congruent right triangles formed by the centers and tangent points.
In the UG environment, the hot spot circle is an arc object. I used the function UF_EVAL_ask_arc() to obtain its center, radius, and the local x and y axes. The x-axis corresponds to the reference angle of 0°, and the y-axis to 90°. The user can specify a rotation angle φ to orient the riser seat circle. The new direction vector ox’ is computed by solving the system:
$$\begin{cases}
x \cdot x’ = \cos\varphi \\
y \cdot x’ = \cos(90^\circ – \varphi) \\
z \cdot x’ = 0
\end{cases}$$
where x, y are the original axes, and z = x × y. After computing both x’ and y’, the center of the riser seat circle is placed at a distance L from the hot spot center in the direction of x’. The tangent lines are created with UF_CURVE_create_line(), and the section curve is trimmed with UF_CURVE_create_trim() to obtain the closed boundary of the side riser seat profile.
Then the system extrudes the trimmed profile along the selected axial direction (usually Z or negative Z) with a draft angle. The user specifies the height of the lower part (below the parting surface) and the offset between the riser seat bottom and the section curve. The final solid is obtained by Boolean operations with the casting. The side riser seat profile generation is fully automatic, reducing design time from several hours to a few minutes for steel castings.
3.4.2 Side Riser Seat Solid Generation
The side riser seat solid is generated by extruding the trimmed section curve. The dialog allows the user to choose the extrusion direction (X, Y, or Z) and set the height parameters. A typical side riser seat has a vertical wall on the casting side and a top platform where the riser can rest. The current implementation does not include fillets at the junction with the casting, which is acceptable for preliminary process design. The generated solid can be further modified by direct editing or repositioning.
3.5 Riser Standard Part Library and Database
I built a parametric library of common risers used for steel castings, including cylindrical top risers (open and blind), cylindrical side risers, and waist-shaped risers. The company uses atmospheric pressure blind risers extensively. For cylindrical blind risers, there are 24 standard sizes, from φ60×90 to φ380×570. For waist-shaped blind risers, there are 30 sizes with widths from 60 to 350 mm.
| Riser No. | Diameter D (mm) | Volume V_r (mm³) | Module M_r (dm) |
|---|---|---|---|
| φ60×90 | 60 | 226194.671 | 1.1429 |
| φ100×150 | 100 | 1047197.551 | 1.9048 |
| φ140×210 | 140 | 2873510.081 | 2.6667 |
| φ180×270 | 180 | 6107256.119 | 3.4286 |
| φ220×330 | 220 | 11150559.525 | 4.1905 |
| φ280×420 | 280 | 22988080.644 | 5.3333 |
| φ340×510 | 340 | 41159052.552 | 6.4762 |
| φ380×570 | 380 | 57461824.029 | 7.2381 |
The database stores the critical dimensions and the corresponding module for each riser size. In the riser design module, after the user inputs the local modulus of the steel castings, the system calculates the recommended range of riser modulus. The user selects a riser type and a module value from the list. The system queries the database and displays the full dimensions. The riser part is then imported at the specified position and orientation.
3.6 Riser Placement and Adjustment
Riser placement is performed with UF_PART_import(), which requires a target coordinate system (origin, x-axis direction, y-axis direction). I built a dialog that lets users select a placement point and define the plan direction. The system then computes the proper transformation matrix to position the riser. After placement, the riser can be repositioned using translation, rotation, and point-to-point movement. The functions uf5943() and uf5945() provide translation and rotation matrices, respectively.
For riser size adjustment, I assigned attributes to all objects that belong to a specific riser, including sketches, datum planes, and the solid body. The program finds the expressions that control the riser dimensions and displays them in an edit dialog. Users can change the diameter or height, and the model updates accordingly. This feature is very convenient when the preliminary riser size needs to be modified after CAE simulation.
3.7 Feeding Allowance and Chill Design
Feeding allowance (also called padding) is used to extend the effective feeding distance of a riser. I developed a module based on both empirical formula method and rolling-circle method. The module allows importing standard feeding allowance blocks and editing their dimensions. For steel castings with complex geometry, the system provides a “conformal allowance” that follows the shape of the casting surface, which is particularly useful for curved sections.
Chills are used to accelerate solidification in hot spots. The company provided three standard chill types: fan-shaped, arc-shaped, and crescent-shaped chill. Their parameters include inner radius r, outer radius R, and height H. I built a chill library and a user-friendly interface. Additionally, a conformal chill module was developed for ring-like castings. The user can select an outer or inner surface, specify the angular range and height, and the system creates a chill block that matches the curvature of the surface.
| Type | r (mm) | R (mm) | H (mm) |
|---|---|---|---|
| 8-150/300 | 120 | 200 | 38 |
| 10-150/300 | 140 | 230 | 40 |
| 12-150/300 | 160 | 250 | 40 |
| 14-150/300 | 180 | 300 | 42 |
| 16-150/300 | 210 | 320 | 46 |
| 18-150/300 | 220 | 340 | 50 |
| 24-150/300 | 593 | 743 | 55 |
4. Application Example
The developed feeding system was experimentally used for a steel casting component produced by the partner foundry. The component has a ring-like structure with several thick sections that require side risers. I describe the complete workflow below.
4.1 Engineering Initialization and Part Information Extraction
First, the user creates a new engineering project and loads the 3D model of the steel casting. The system displays the model path and allows adding other components if needed. Then, the “Extract Part Information” module is invoked. The user selects the material type (e.g., cast steel), then clicks on the casting solid. The system automatically computes the bounding box, volume, mass, and initial yield (default 0.6). These values are stored as attributes for later use.
4.2 Local Modulus Calculation
To design a side riser for a specific thick section, I used the “Modulus Calculation” module. Since the casting has four symmetrical thick sides, one sector was cut for local modulus evaluation. The “Sector Truncation” method was chosen. Three datum planes were created to cut the casting: two horizontal planes and one radial plane at an angle of 60°. The resulting truncated body represents the local hot spot region. After removing the non-cooling surfaces (the cut faces), the system calculated the volume and effective cooling surface area, yielding the local modulus:
$$M_c = \frac{V_{local}}{S_{effective}}$$
The result was displayed in the dialog, and the recommended riser modulus range was automatically computed using the factor f = 1.1 to 1.2.
4.3 Side Riser Seat Generation
In the “Hot Spot Circle” module, the user selects the horizontal plane that passes through the center of the ring segment. The program obtains the section curve and the user manually creates an inscribed circle (hot spot circle) on the section. Then the hot spot radius is measured. Next, the side riser section curve parameters are set: the distance between centers L, the riser seat circle radius R, and the rotation angle φ. The system generates the section curve automatically. After trimming, the system extrudes the profile to create the side riser seat solid. The generated seat is accurately connected to the casting and provides a flat platform for the riser.
4.4 Riser Selection and Placement
Using the computed local modulus, I selected a cylindrical atmospheric blind riser with a modulus of 2.0952 dm, which corresponds to the standard size φ110×165. The riser was imported at the top center of the side riser seat. The system oriented the riser along the seat axis. After placing the riser, the process yield was displayed and found to be acceptable. Multiple riser seats and risers can be added around the casting by repeating the same procedure for other hot spots.
4.5 CAE Simulation and Optimization
After completing the full feeding process design (including casting, risers, side riser seats, chills, and gating system), I exported the components to STL files. The STL files were imported into the HuaZhu CAE software for solidification simulation. The simulation results showed that most shrinkage porosity was confined to the risers and riser seats, while the steel casting itself remained sound. This indicates that the feeding system is properly designed. If defects were found, the user would return to the UG environment, modify the riser size or position, and re-run the simulation. This loop continues until a satisfactory process is obtained.
5. Conclusion and Future Work
I have developed a complete feeding system for steel castings based on UG secondary development. The system incorporates parameterized design, database technology, and virtual assembly to automate the design of risers, side riser seats, feeding allowances, chills, and sand boxes. Key achievements include:
- Established a modular workflow that closely follows practical casting process design for steel castings.
- Built a parametric standard part library for risers, chills, and feeding allowances based on company standards.
- Implemented an automatic side riser seat generation algorithm based on geometric construction of section curves.
- Integrated a database management system for storing and modifying riser dimensions and modulus values.
- Provided real-time process yield feedback during riser placement.
- Successfully migrated the entire system from 32-bit to 64-bit Windows platform, improving compatibility.
- Enabled seamless export to CAE software for simulation-based validation and optimization.
The system has been used in real production for designing feeding systems of steel castings. It significantly reduces design time and enables engineers to focus on process optimization rather than repetitive geometry creation. In the future, several improvements are possible. First, the side riser seat design could be further extended to automatically create fillets and more complex shapes. Second, automatic riser placement based on hot spot detection would greatly improve efficiency. Third, a tighter integration with solidification simulation inside the same environment could eliminate manual file conversions and enable true integrated CAD/CAE optimization. With the rapid development of intelligent manufacturing, the proposed system can be enhanced with knowledge-based and rule-based reasoning to become a more intelligent assistant for casting process engineers.
