Research on 3D Modeling System for Heat Exchanger Components Based on AutoCAD Platform
2026-04-06 04:33:02··#1
Heat exchange equipment is widely used in petrochemical, oil refining, fertilizer, power, light industry, metallurgy, nuclear industry and other industrial sectors. With the development of CAD/CAE/CAM technology, two-dimensional planar drawings can no longer meet the needs of design and manufacturing. Three-dimensional models have strong visibility and can accurately reflect the designer's design ideas. For complex structures, two-dimensional graphics cannot accurately express the spatial positional relationship of each component, while three-dimensional solid graphics have a sense of spatial reality and can clearly express the spatial positional relationship of each component, avoiding collisions and interference between components. When designing heat exchange equipment and its components, it is necessary to conduct finite element analysis and optimization design of heat exchange equipment components (especially for non-standard components). First, it is necessary to create a three-dimensional model of the component. According to statistics, the time spent on model creation accounts for 87% of the entire analysis process [1]. Especially in the optimization design process, the three-dimensional model needs to be continuously modified and optimized according to the optimization results, which brings a lot of repetitive trouble to the design and analysis personnel in manual modeling and greatly reduces the efficiency of design and analysis. With the development of CAD technology, drawing software packages for mechanical components have emerged, but their three-dimensional functions are weak. Some large foreign software vendors have also launched 3D software (such as ProE), but the price is high, which makes it unaffordable for general users. Therefore, it is necessary and practical to develop a professional 3D modeling system for heat exchanger components. The well-known finite element analysis software ANSYS can share data with AutoCAD software and accept 3D models established by AutoCAD [2]. For this reason, the author used AutoCAD secondary development technology to develop a 3D modeling system for heat exchanger components. Running the system and inputting the necessary design parameters, the system will automatically and quickly generate accurate 3D models of components, realizing the 3D parametric drawing of heat exchanger components. 1 Development environment of 3D modeling system ObjectARX2000 is a new generation of powerful secondary development tool launched by Autodesk with AutoCAD2000. It uses an object-oriented C++ application development mechanism, shares the address space with AutoCAD in the form of dynamic linking, can directly utilize the AutoCAD kernel code, access the AutoCAD database, graphics system and geometric modeling core [3], expand the AutoCAD classes and protocols, create new AutoCAD commands, and can be directly called by the AutoCAD environment, with high program development and execution efficiency. The message model of the ARX program command is shown in Figure 1. Therefore, using the AutoCAD secondary development technology, in the VC++6.0 and ObjectARX2000 environment, the ARX application was written and the three-dimensional modeling system of heat exchanger parts was developed. The ARX application is loaded in the AutoCAD environment, and the program adds user-defined commands (such as tubesheet) to the AutoCAD command stack. When the command is called, the ARX application will automatically process and generate a three-dimensional solid model. 2 Generation of the basic framework of the ARX program Visual C++6.0 uses a very user-friendly interface—Developer Studio integrated development environment, which integrates multiple functions such as editing, compiling, linking, debugging, and wizards, and provides the MFC (Microsoft Application Foundation Classes) class library, which has now become the industry standard [4]. Running the ObjectARX2000 package can embed ObjectARX into the VC++6.0 programming environment. The library functions, header files and detailed documentation it provides are also embedded in the VC++6.0 environment. In the VC++ integrated development environment, the basic framework of an ARX program can be easily and quickly established through the ARX application wizard (Object ARX 2000 App Wizard). 3 Key Technologies for Developing a 3D Modeling System 3.1 Customization of the 3D Modeling User Interface Using AutoCAD interface customization technology, the menu file acad.mnu of the AutoCAD application is edited. Drop-down menus for heat exchanger components are added to AutoCAD (as shown in Figure 2), and each item in the menu is connected to its respective ARX program path. In this way, clicking the menu will automatically add the user commands defined by the ARX program to the AutoCAD internal command stack. 3.2 Creation of Human-Computer Interaction Interface Microsoft's basic class library MFC is an important resource for VC++ program design. The most obvious advantage of using MFC in ARX programs is that it can fully utilize the various class and control resources provided by the VC++ development environment to achieve visual design of the program interface, greatly improving program development efficiency. Using the MFC development environment, dialog boxes for human-computer interaction of various components are developed (as shown in Figure 3). Users can input or modify design parameters in the dialog box to achieve 3D solid modeling. By modifying the design parameters, the 3D modeling of non-standard components in heat exchange equipment can be completed. 3.3 Methods of 3D Modeling There are three methods for constructing 3D models: wireframe modeling, surface modeling, and solid modeling. Among them, 3D solid modeling has the characteristics of a solid, can display the shape of the part, give people a realistic spatial feeling, and can use sectioning to check the thickness of the walls, whether the holes intersect, etc.; it can also perform calculations of the physical properties of the parts, such as calculating volume, area, center of gravity, moment of inertia, etc. Therefore, solid modeling can comprehensively reflect the physical properties of the parts. For simple solids such as cuboids, cylinders, and spheres, member functions like `virtualAcad::createBox(x,y,z)` in the ACIS (American Committee for International Standards) system, the core of AutoCAD 2000's 3D solid modeling framework, can be used to generate and edit them. For complex 3D solid models, extrusion, rotation, and Boolean operations can be used to generate 3D solids based on 2D objects. 3.3.1 Extrusion Method: First, generate 2D solid objects such as circles (AcDbCircle), ellipses (AcDbEllipse), and closed 2D polylines (AcDbPolyline), and then generate new 3D solids according to the extrusion height or a specified path. In ARX applications, this is achieved by calling the member function `extrudeAlongPath()` of the `AcDb3dSolid` class, whose prototype is as follows: `Acad:extrudeAlongPath(AcDbRegion region, AcDbCurve path)`, where the parameter `region` represents a pointer to the previously generated two-dimensional closed solid region object, and `path` represents the extrusion path. In heat exchanger components, some slender parts such as heat exchange tubes, drain pipes, and oblique bends can be modeled using extrusion. 3.3.2 Rotation Method: First, a two-dimensional solid object is generated, then rotated around a specified axis to generate a new three-dimensional solid. In ARX applications, this is achieved by calling the member function `revolve()` of the `AcDb3dSolid` class, whose prototype is as follows: `Acad::revolve(AcDbRegion region, `AcGePoint3d& axisPoint`, `AcGeVector3d& axisDir`, `doubleAngleOfRevolution`), where the parameter `region` represents a pointer to the previously generated two-dimensional closed solid surface region object, `axisPoint` is a point on the rotation axis, `axisDir` is the direction vector of the axis, and `AngleOfRevolution` is the rotation angle (in radians). Most components of heat exchange equipment are rotating bodies about a rotation axis. Therefore, a symmetrical two-dimensional diagram of the rotating body can be generated using a two-dimensional polyline (Polyline), and then the function `revolve()` can be called to generate a three-dimensional rotating solid. 3.3.3 Boolean Operations For some complex solid models, certain Boolean operations can be used to achieve the desired result based on the three-dimensional solid generated by extrusion and rotation. There are three types of Boolean operations: union, intersection, and difference. In ARX programs, this is achieved by calling the member function `booleanOper()` of the `AcDb3dSolid` class. Its prototype is as follows: `Acad::booleanOper(AcDb::BoolOperTypeoperation, AcDb3dSolid pSolid)`, where the parameter `operation` is the Boolean operation type, Boolean union is `AcDb::kBoolUnit`, Boolean intersection is `AcDb::kBoolIntersect`, Boolean difference is `AcDb::kBoolSubtract`, and `pSolid` represents a pointer to another entity participating in the Boolean operation. Most components in heat exchangers are very complex, requiring the combined use of extrusion, rotation, and Boolean operations to complete their 3D modeling. The following section introduces the specific development process of a 3D modeling system for heat exchanger components by demonstrating the 3D solid modeling of a tube sheet that also serves as a flange. 4. 3D Modeling Example Tube sheets are one of the important components in heat exchange equipment. Finite element analysis of temperature and stress fields is frequently performed on tube sheets, requiring the creation of a 3D model. This model is then continuously optimized and modified based on the analysis results. Manual modeling would significantly increase the workload of design analysts and reduce efficiency. Parametric modeling, however, allows users to quickly create and optimize models. A tube sheet is a circular plate with many tube holes arranged according to the tube layout. The 3D modeling of the tube sheet is achieved through 3D parametric drawing. Inputting the nominal diameter DN of the shell, the outer diameter dh of the heat exchange tubes, the thickness H of the tube sheet, and the tube layout directly generates a 3D solid of the tube sheet. The following example, using a tube sheet with a single-shell, single-tube pass and a square tube layout, where the extended portion also functions as a flange, illustrates the development process of the 3D modeling program for tube sheets. 4.1 Generation of a 2D Tube Sheet Object The tube sheet is structurally a body of revolution; therefore, only half of the tube sheet cross-section needs to be generated, as shown in Figure 4. Establish a coordinate system, provide the coordinates of each point shown in the figure, use the function `AcDbPolyline()` to generate a closed two-dimensional polyline, and generate a two-dimensional graphic domain. Call the function `revolve()` to rotate this two-dimensional graphic domain around the Y-axis to generate a three-dimensional model of the flat plate (without holes). 4.2 Tube Sheet Laying Algorithm: Taking a single-pass tube arrangement with square tubes as an example, a calculation model is established, as shown in Figure 5. The program uses an iterative method to determine the center position of the heat exchange tubes, and the iterative process is as follows. 4.2.1 Determining the Initial Iteration Values: When the center tube arrangement is odd-numbered, the iteration formula is: x = x0, x = x + p; y = y0, y = y + p. When the center tube arrangement is even-numbered, the iteration formula is: x = x0 + p/2, x = x + p; y = y0 + p/2, y = y + p. Where x0 and y0 are the initial iteration values, taken according to the tube pass; p is the center distance of the heat exchange tubes. After iteration, the center coordinates (x, y) of each heat exchange tube orifice can be calculated. 4.2.2 Determining the Center Position of Each Heat Exchange Tube: Based on the tube pass, determine the initial values of x0 and y0. Determine the iteration formula based on whether the center tube arrangement is odd or even-numbered, and perform iterative loops. During each iteration loop, the counter starts to accumulate the total number of heat exchange tubes sum = sum + 1; until y = y + p, proceed to the next iteration. This process is repeated until the iteration ends. At the end of the iteration, the counter is incremented by the total number of heat exchange tubes, sum. In the formula, Dl is the diameter of the tube sheet layout circle, and its calculation formula is referenced in [5]. After determining the center position of the heat exchange tube, the function createFrustum() is called to generate a cylinder with the center of the heat exchange tube as the center and the tube sheet thickness as the height. Boolean difference operation is used to remove each cylinder from the tube sheet solid. Its program flowchart is shown in Figure 6. 4.3 Generating bolt holes and tie rod holes According to the above method, the center position of the flange bolt hole is determined in the extended part, a cylinder is generated, and the bolt hole is generated using Boolean difference operation. The same method is used to generate tie rod holes. At this point, the three-dimensional modeling of the tube sheet is completed. The above method can be used to complete the three-dimensional solid modeling system of other components of the heat exchange equipment. 5 System operation In the VC++6.0 environment, the program is run to obtain a tube sheet design arx dynamic link library program. Launch AutoCAD 2000, click the extended section (also serving as the flange menu item) in the drop-down menu of the 3D modeling system for heat exchanger components. AutoCAD will automatically load the .arx file and simultaneously add the command `tubesheet` for the tube sheet 3D modeling ARX program to the AutoCAD internal command stack. Execute this command, and the tube sheet 3D modeling dialog box will pop up for human-computer interaction. Input the necessary parameters for drawing the tube sheet, and press the "3D Modeling" button to run the program and generate the 3D solid of the tube sheet as shown in Figure 7. 6. Application of the 3D Modeling System The 3D modeling system for heat exchanger components developed based on the AutoCAD platform can directly utilize the AutoCAD kernel code and share the address space of AutoCAD 2000, resulting in high program development and execution efficiency. The system has a very user-friendly interface. Running the system, through human-computer interaction and input of necessary data, it can accurately draw 3D solid graphics of components. By modifying design parameters, the created model can be modified at any time. This system is accurate, convenient, and time-saving, realizing computer-parametric drawing from data to blueprints, playing an important role in the design and finite element analysis of heat exchanger components. 6.1 Convenient and Fast Modeling Manual modeling in the AutoCAD environment requires a significant amount of time and effort, especially when using ANSYS finite element analysis software to optimize the temperature and stress fields of components. This necessitates continuous modification of the 3D model based on the optimization results, making manual modification of some complex 3D models virtually unthinkable. However, this system, by inputting parameters, can generate a 3D model in a very short time. Modifying the optimized geometric parameters allows the system to quickly generate the optimized model. Practice has proven that this modeling system overcomes the inconvenience of ANSYS software for complex 3D solid modeling in pre-processing modeling, greatly saving the time and effort of design analysts and improving design analysis efficiency. 6.2 Spatial Realism of 3D Solids Two-dimensional graphics cannot express the realism of 3D objects, especially for complex components and assembled parts, where designers find it difficult to imagine their spatial relationships based on 2D graphics. For example, the baffle plate device of the novel baffle rod heat exchanger is assembled from heat exchange tubes, tie rods, and groups of baffle plates, which are arranged at 90° intervals, making the structure extremely complex. Using a 3D modeling system, a 3D solid model of the baffle plate device can be generated, as shown in Figure 8. Through the solid model, users can clearly see the structure of the baffle plate device. 6.3 Interference Check of Component Assembly When using the 3D solid model generated by the 3D modeling system for 3D dynamic assembly of heat exchange equipment, interference and collisions between components can be determined by the connection and meshing status between components (e.g., the assembly of tube sheets, cylinders, and baffle plates), thereby modifying the design concept and design model. 7 Conclusion The 3D modeling software system for heat exchange equipment components, developed using VC++ and ObjectARX2000 technology and based on the AutoCAD platform, is convenient, time-saving, user-friendly, and reliable in operation. The system can generate models of both standard and non-standard components, freeing designers from the tedious and laborious process of manual modeling and greatly improving the efficiency of 3D modeling. It replaces the pre-processing modeling steps of ANSYS analysis software, solving the problems of complexity, repetition, and tediousness associated with manual modeling in ANSYS. Practice has proven that the system plays a crucial role in 3D solid modeling, finite element analysis of heat exchanger components, and dynamic assembly of heat exchangers, significantly improving design and analysis efficiency.