Python-moldflow co-simulation-based intelligent optimization method and configuration for part structure and process parameters of injection molding
By using Python-Moldflow co-simulation and automating the control of Moldflow software, the problems of low efficiency, error-proneness, and repetitive labor in existing technologies are solved. Intelligent optimization of part structure and process parameters is achieved, improving simulation efficiency and accuracy, and making it suitable for a variety of industrial applications.
Patent Information
- Application Number
- PCT/CN2025/104181
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-05-07
- Filing Date
- 2025-06-27
- Publication Date
- 2026-11-12
AI Technical Summary
The current Moldflow simulation process is inefficient, error-prone, involves a lot of repetitive work, and has cumbersome result processing. It lacks automated control and batch simulation capabilities, especially in areas such as parametric modeling of part forming processes, setting of gate positions and angles, setting of some process parameters, batch result export and post-processing.
The Python-Moldflow co-simulation method is adopted, which uses Python scripts to automatically control the Moldflow software to realize parametric modeling of the workpiece, mesh generation, simulation calculation and result processing. It combines machine learning algorithms to optimize process parameters, including modules for parametric modeling, Moldflow startup, mesh generation and process settings, simulation calculation, result analysis and parameter optimization.
It achieves full-process automation, improves simulation efficiency and accuracy, optimizes part structure and process parameters, supports efficient batch simulation, has scalability, and is suitable for various industrial application needs.
Smart Images

Figure CN2025104181_12112026_PF_FP_ABST
Abstract
Description
Intelligent optimization method and configuration of injection molded part structure and process parameters based on Python-Moldflow co-simulation
[0001] Cross-reference to related applications
[0002] This application claims priority to Chinese Patent Application No. 202510582278.2, filed on May 7, 2025, entitled "Intelligent Optimization Method and Configuration of Injection Molded Part Structure and Process Parameters Based on Python-Moldflow Co-simulation", the entire contents of which are incorporated herein by reference. Technical Field
[0003] This invention relates to the fields of injection molding simulation technology and computer software technology, specifically to an intelligent optimization method and configuration for the structure and process parameters of injection molded parts based on Python-Moldflow co-simulation. Background Technology
[0004] Plastic products have long been widely used in the automotive, electronics, and medical device industries. Injection molding has a significant impact on the performance and cost of manufactured parts. Injection molding, also known as injection molding, is a method of heating and melting thermoplastic or thermosetting plastics, injecting them under high pressure into a closed mold cavity, and then demolding them after cooling and solidification to obtain the molded product. Modern injection molding technology is developing towards combining simulation technology and intelligent mold design to further improve accuracy and efficiency. To anticipate potential manufacturing problems during the part design stage and shorten the development cycle, computer-aided engineering (CAE) technology is widely used for the simulation and process optimization of injection molding. Among them, Autodesk Moldflow software, as an industry-leading injection molding simulation tool, can simulate processes such as filling, holding pressure, and cooling during molding, as well as part warpage, helping engineers predict and resolve defects that may be caused by the manufacturing process, such as cavitation, weld lines, shrinkage marks, and deformation.
[0005] However, the current Moldflow simulation workflow mainly relies on manual operation, that is, operation through the software's graphical user interface, which has resulted in the following problems still existing in the entire simulation workflow:
[0006] Inefficiency: When simulating multiple parameter combinations, manually setting the parameters and conditions for each case is both time-consuming and tedious. For example, optimizing process parameters or performing parameter sensitivity analysis may require hundreds or even thousands of simulation runs, and manual operation cannot meet the needs of efficient iteration.
[0007] Error-prone: Manual operation is prone to errors in parameter input, omission of settings, or misoperation due to negligence, which affects the accuracy and reliability of simulation results.
[0008] Repetitive work: For similar simulation cases, engineers need to repeat the same settings and operations. The lack of automation greatly reduces work efficiency.
[0009] The results processing is cumbersome: exporting and analyzing simulation results requires one-by-one operations in a graphical user interface (GUI), which makes it impossible to efficiently process and compare simulation results under different working conditions in batches, and is not conducive to the systematic management and in-depth analysis of data.
[0010] While Moldflow software has some built-in functionality for batch simulation of parameters, it is incomplete and only covers a subset of process parameters. Furthermore, the preferred language for developing the Moldflow Synergy Application Programming Interface (API) scripts is Visual Basic Script (VBS), which has limited functionality, low development efficiency, a lack of rich third-party libraries, and limited extensibility. Therefore, current Moldflow co-simulation still lacks in areas such as parametric modeling of part forming processes, setting gate location and angle, setting some process parameters, batch result export, and post-processing. There is an urgent need for a method that can automatically control Moldflow software, execute simulation tasks in batches, and automatically process simulation results. Summary of the Invention
[0011] To address the shortcomings of current Moldflow co-simulation in areas such as parametric modeling of part molding processes, setting of gate position and angle, setting of some process parameters, batch result export and post-processing, this invention provides an intelligent optimization method and configuration for injection molded part structure and process parameters based on Python-Moldflow co-simulation.
[0012] This invention is achieved through the following technical solution: an intelligent optimization method for the structure and process parameters of injection molded parts based on Python-Moldflow co-simulation, comprising the following steps:
[0013] (1) Parametric modeling of the target part is performed by calling a third-party modeling library using Python, and the structural parameters of the target part and the corresponding first STL (STereoLithography) model file are generated in batches.
[0014] (2) Start the Moldflow main program Moldflow Synergy through a Python script and import the first STL model file generated in step (1);
[0015] (3) Set the mesh generation parameters, save the mesh information as a PAT file, select the material to be used for injection molding, and obtain the default injection molding process parameters;
[0016] (4) Call the Moldflow solver to perform simulation calculations. After the simulation calculations are completed, the Python script automatically exports the simulation results data and saves it as an XML file.
[0017] (5) Extract feature values based on the usage or functional requirements of the target part, and determine the maximum or minimum feature value as the optimal feature value;
[0018] (6) Select the structural parameters corresponding to the optimal eigenvalues as the optimal structural parameters of the target part;
[0019] (7) Generate the corresponding second STL model file based on the optimal structural parameters obtained in step (6), import and divide the mesh, select the same injection molding material as in step (3), continuously change the process parameters, and repeat steps (4) and (5) until a sufficient number of datasets are obtained with the changed process parameters as input and the corresponding feature values as output.
[0020] (8) Use the dataset obtained in step (7) to train a machine learning model and obtain the optimal injection molding process parameters through optimization.
[0021] As a further improvement to the process technology solution of the present invention, in step (1), the third-party modeling library is the Trimesh library.
[0022] As a further improvement to the process technology solution of the present invention, in step (2), the Python script communicates with the Component Object Model (COM) interface of Moldflow by importing the win32com.client module.
[0023] As a further improvement to the process technology of the present invention, in step (3), the injection molding process parameters include injection rate, holding pressure, holding time, mold temperature, melt temperature and cooling time.
[0024] As a further improvement to the process technology solution of the present invention, in step (4), the automatically exported simulation result data is the simulation result data of injection molding quality index.
[0025] As a further improvement to the process technology of the present invention, the injection molding quality index is any one or a combination of several of the following: deformation, shrinkage marks, air pockets, and shrinkage rate.
[0026] As a further improvement to the process technology solution of the present invention, in step (8), the machine learning model is a support vector machine (SVM), a random forest, or a neural network algorithm.
[0027] On the other hand, the present invention provides an intelligent optimization configuration of the structure and process parameters of injection molded parts based on Python-Moldflow co-simulation, including a parametric modeling module, a Moldflow startup module, a mesh generation and process setting module, a simulation calculation module, a result analysis module, a parameter optimization module, and a process optimization module;
[0028] The parametric modeling module is used to call a third-party modeling library via Python to perform parametric modeling of the target part and generate the first STL model file in batches; the Python script uses the trimesh library to perform parametric modeling of the target part.
[0029] The Moldflow startup module is used to start the Moldflow main program Moldflow Synergy via a Python script and import the first STL model file of the target part;
[0030] The mesh generation and process setting module is used to set mesh generation parameters, select materials for injection molding, and obtain injection molding process parameters.
[0031] The simulation calculation module is used to call the Moldflow solver to perform simulation calculations and automatically export simulation result data;
[0032] The result analysis module is used to extract feature values based on the simulation result data;
[0033] The parameter optimization module is used to obtain the optimal structural parameters of the target part based on the feature values, and import the optimal structural parameters of the target part into the parametric modeling module to generate a second STL model file about the optimal structural parameters of the target part;
[0034] The process optimization module is used to optimize injection molding process parameters through a machine learning model. It takes the injection molding process parameters as input and the feature values as output, and obtains the optimal injection molding process parameters through optimization.
[0035] The intelligent optimization method and configuration for the structure and process parameters of injection molded parts based on Python-Moldflow co-simulation provided by this invention have the following advantages compared with the prior art:
[0036] 1) Full-process automation: The Moldflow simulation software is controlled in full-process automation through Python scripts, avoiding the tediousness and error-proneness of manual operation, and greatly improving simulation efficiency and accuracy.
[0037] 2) Optimize part structure and process parameters: Through intelligent optimization algorithms, the structure and process parameters of injection molded parts can be optimized automatically through multiple iterations, ensuring that the final part quality and production efficiency reach the best.
[0038] 3) High-efficiency batch simulation: Simulation cases are generated in batches through automated means and large-scale parameter sensitivity analysis is performed, avoiding the tedious and inefficient problems of manual settings.
[0039] 4) High scalability: The rich extensibility of the Python language allows the method of this invention to be applied not only to various scenarios such as parametric modeling, batch simulation, and result post-processing, but also to the easy integration of other advanced technologies, such as data visualization and deep learning, thereby adapting to different industrial application needs. Therefore, it has broad application prospects. Attached Figure Description
[0040] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 is a flowchart of the intelligent optimization method for the structure and process parameters of injection molded parts based on Python-Moldflow co-simulation as described in this invention.
[0043] Figure 2 is a schematic diagram of a gear component structure with 4 ribs obtained by parametric modeling in an embodiment of the present invention.
[0044] Figure 3 is a schematic diagram of the parametric changes made to the shape of the injection molded gear ribs using the trimesh library of Python in the embodiment.
[0045] Figure 4 is a schematic diagram of the target surface in the embodiment.
[0046] Figure 5 is a schematic diagram comparing the original tooth profile with the tooth profile after deformation in the embodiment. Detailed Implementation
[0047] To better understand the above-mentioned objectives, features, and advantages of the present invention, the solutions of the present invention will be further described below. It should be noted that, unless otherwise specified, the embodiments of the present invention and the features thereof can be combined with each other.
[0048] Many specific details are set forth in the following description in order to provide a full understanding of the invention, but the invention may also be practiced in other ways different from those described herein; obviously, the embodiments in the specification are only some embodiments of the invention, and not all embodiments.
[0049] The specific embodiments of the present invention will be described in detail below. The target part of this embodiment is a gear, in order to optimize the structure of the injection-molded gear and its injection molding process parameters.
[0050] A smart optimization method for the structure and process parameters of injection-molded parts based on Python-Moldflow co-simulation includes the following steps:
[0051] (S1) In the parametric modeling module, Python is used to call a third-party modeling library (trimesh library) to perform parametric modeling of the injection-molded gear shape. Figure 2 shows a schematic diagram of parametric modeling with 3 ribs. As shown in Figures 2(c and d), in this embodiment, the cut-off part of the groove is annular, with an inner radius of R1, an outer radius of R1+L1, and a depth equal to the groove depth. The specific gear part structure obtained by parametric modeling is shown in Figure 3. The gear part structure without ribs is shown in Figure 3(a), the gear part structure with 3 ribs is shown in Figure 3(b), the gear part structure with 4 ribs is shown in Figure 3(c), and the gear part structure with 6 ribs is shown in Figure 3(d). Furthermore, the R1, R2, and depth of each structure are different to compare the influence of different rib numbers, groove depths, and lengths on the injection-molded gear forming. Save it as the first STL model file for easy import into the Moldflow main program before each analysis.
[0052] (S2) In the Moldflow startup module, use the win32com.client.Dispatch method to create a COM object and connect to Moldflow Synergy to achieve automated control. Import the first STL model file generated in step (S1).
[0053] (S3) In the mesh generation and process setting module, set the mesh generation parameters, set the maximum side length of the mesh to 3.5mm, generate the mesh, and save the mesh information as a PAT file, including node numbers and coordinates; set the feed port position and angle; the material used for injection molding is polyetheretherketone (PEEK);
[0054] Obtain default injection molding process parameters, including injection rate, holding time, holding pressure, mold temperature, melt temperature, and cooling time.
[0055] (S4) Start the Moldflow solver using the simulation calculation module and set the solver parameters; use a subprocess to call the solver to run the project file, and the Python script automatically exports the simulation results data of the injection molding quality index and saves them as an XML result file.
[0056] (S5) Based on the usage requirements of the gear components, the external tooth surface bears the main working load, and its geometric accuracy directly affects the transmission efficiency and stability of the gear. It is the most important functional area and plays a crucial role in gear design and performance analysis. Therefore, using the results analysis module, combined with the XML result file (simulation result data) and the PAT mesh file (mesh information), the external tooth surface is selected as the target surface in the program (as shown in Figure 4). The maximum deviation between the node coordinates of the model's external tooth surface and the node coordinates of the external tooth surface after warping deformation (Figure 5 shows a comparison of the tooth profile of the external tooth surface and the tooth profile after deformation) (i.e., the maximum deviation of the target surface deformation) is used as a feature value and extracted, with the goal of minimizing this feature value.
[0057] (S6) The minimum eigenvalue is the optimal eigenvalue, and the corresponding structural parameter is selected as the optimal structural parameter of the gear.
[0058] (S7) Using the parameter optimization module, generate a second STL model file based on the optimal structural parameters of the gear, import and divide the mesh, select the same injection molding material as in step (S3), continuously change the process parameters, and repeat steps (S4)-(S5) until the number of datasets with process parameters as input and feature values as output reaches 4000.
[0059] (S8) Train an Artificial Neural Network (ANN) model using the dataset; optimize the optimal process parameters using a Genetic Algorithm Optimization (GA) with the goal of minimizing the feature values.
[0060] The gear part obtained based on the unoptimized conventional gear shape structure and process parameters had a maximum deviation of 0.81 mm in the eigenvalue target surface. After the first step of structural optimization in this invention (i.e., optimization in steps S1-S6), the optimal model parameter combination of 5 ribs, 8 mm groove depth, R1 of 50 mm, and R2 of 10 mm was selected, reducing the maximum deviation of the eigenvalue target surface to 0.61 mm, a reduction of 24.7%. Next, further optimization was performed using the machine learning algorithm based on process parameters of this invention (i.e., optimization in steps S7 and S8), resulting in the optimal process parameter combination: an injection rate of 60 cm⁻¹. 3 The holding pressure was 110 MPa, the holding time was 25 s, the mold temperature was 200℃, the melt temperature was 380℃, and the cooling time was 140 s. Verification showed that the feature value was further reduced to 0.47 mm, a reduction of approximately 23.0% compared to the first step of structural optimization. Ultimately, through comprehensive optimization of the gear structure and process parameters, this invention reduced the feature value by nearly 42% compared to the initial value (i.e., the unoptimized conventional gear), significantly reducing the tooth profile error on the outer tooth surface of the injection-molded gear, improving tooth profile accuracy, and thus enhancing the overall precision and performance of the gear component.
[0061] Compared to traditional manual optimization methods, this invention eliminates the need for further manual intervention after initial process parameter setting, effectively saving labor costs and ensuring operational accuracy and stability. Furthermore, the optimization method of this invention can quickly obtain a sufficiently large dataset and apply it to machine learning algorithm optimization, thereby significantly improving optimization efficiency and accuracy.
[0062] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the present invention. Although detailed descriptions have been provided with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments, and they should all be covered within the protection scope of the claims.
Claims
1. A method for intelligent optimization of the structure and process parameters of injection-molded parts based on Python-Moldflow co-simulation, characterized in that, Includes the following steps: (1) Parametric modeling of the target part is performed by calling a third-party modeling library using Python, and the structural parameters of the target part and the corresponding first STL model file are generated in batches; (2) Start the Moldflow main program Moldflow Synergy through a Python script and import the first STL model file generated in step (1); (3) Set the mesh generation parameters, save the mesh information as a PAT file, select the material to be used for injection molding, and obtain the default injection molding process parameters; (4) Call the Moldflow solver to perform simulation calculations. After the simulation calculations are completed, the Python script automatically exports the simulation results data and saves it as an XML file. (5) Extract feature values based on the usage or functional requirements of the target part, and determine the maximum or minimum feature value as the optimal feature value; (6) Select the structural parameters corresponding to the optimal eigenvalues as the optimal structural parameters of the target part; (7) Generate the corresponding second STL model file based on the optimal structural parameters obtained in step (6), import and divide the mesh, select the same injection molding material as in step (3), continuously change the process parameters, and repeat steps (4) and (5) until a sufficient number of datasets are obtained with the changed process parameters as input and the corresponding feature values as output. (8) Use the dataset obtained in step (7) to train a machine learning model and obtain the optimal injection molding process parameters through optimization.
2. The intelligent optimization method for the structure and process parameters of injection-molded parts based on Python-Moldflow co-simulation as described in claim 1, characterized in that, In step (1), the third-party modeling library is the Trimesh library.
3. The intelligent optimization method for the structure and process parameters of injection-molded parts based on Python-Moldflow co-simulation as described in claim 1, characterized in that, In step (2), the Python script communicates with Moldflow's component object model interface by importing the win32com.client module.
4. The intelligent optimization method for the structure and process parameters of injection-molded parts based on Python-Moldflow co-simulation as described in claim 1, characterized in that, In step (3), the injection molding process parameters include injection rate, holding pressure, holding time, mold temperature, melt temperature and cooling time.
5. The intelligent optimization method for the structure and process parameters of injection-molded parts based on Python-Moldflow co-simulation as described in claim 1, characterized in that, In step (4), the automatically exported simulation result data is the simulation result data of injection molding quality indicators.
6. The intelligent optimization method for the structure and process parameters of injection-molded parts based on Python-Moldflow co-simulation as described in claim 5, characterized in that, The injection molding quality indicators are any one or a combination of several of the following: deformation, shrinkage, cavitation, and shrinkage rate.
7. The intelligent optimization method for the structure and process parameters of injection-molded parts based on Python-Moldflow co-simulation as described in claim 1, characterized in that, In step (8), the machine learning model is a support vector machine, random forest, or neural network algorithm.
8. An intelligent optimization configuration of injection molded part structure and process parameters based on Python-Moldflow co-simulation, characterized in that, It includes a parametric modeling module, a Moldflow startup module, a mesh generation and process setting module, a simulation calculation module, a result analysis module, a parameter optimization module, and a process optimization module; The parametric modeling module is used to call a third-party modeling library via Python to perform parametric modeling of the target part and generate the first STL model file in batches; the Python script uses the trimesh library to perform parametric modeling of the target part. The Moldflow startup module is used to start the Moldflow main program Moldflow Synergy via a Python script and import the first STL model file of the target part; The mesh generation and process setting module is used to set mesh generation parameters, select materials for injection molding, and obtain injection molding process parameters. The simulation calculation module is used to call the Moldflow solver to perform simulation calculations and automatically export simulation result data; The result analysis module is used to extract feature values based on the simulation result data; The parameter optimization module is used to obtain the optimal structural parameters of the target part based on the feature values, and import the optimal structural parameters of the target part into the parametric modeling module to generate a second STL model file about the optimal structural parameters of the target part; The process optimization module is used to optimize injection molding process parameters through a machine learning model. It takes the injection molding process parameters as input and the feature values as output, and obtains the optimal injection molding process parameters through optimization.
