Automatic runner parameter optimization method and device, electronic equipment and storage medium
By optimizing the flow channel design variable group and preset optimization strategies, and combining the bidirectional communication link of the NX Open API, automated iterative optimization of flow channel parameters is achieved, solving the problem of low efficiency in traditional flow channel design and improving simulation accuracy and design adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-10
AI Technical Summary
In traditional flow channel design, parameter adjustment and simulation operation rely heavily on manual intervention and are limited by personal experience, resulting in low design efficiency. Furthermore, the objective function of flow channel simulation has nonlinear and non-smooth characteristics, leading to poor algorithm adaptability and a lack of systematic management in the iterative process, which is not conducive to subsequent scheme optimization and engineering reuse.
By defining flow channel optimization design variable groups, configuring preset optimization strategies and key parameters, and using the target script interface program to call the NX Open API to establish a bidirectional communication link, the flow channel parameters can be automatically iteratively optimized, adapting to nonlinear and non-smooth black box problems, and supporting flexible adjustment of parameter range and convergence conditions.
It improves the optimization efficiency of flow channel design, ensures the accuracy of simulation results and the reliability of data, simplifies the iteration process, supports the adaptation of different flow channel design scenarios, reduces manual intervention, and improves design efficiency and optimization effect.
Smart Images

Figure CN121835157A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of engineering flow channel design and intelligent optimization technology, and in particular to an automated optimization method, device, electronic device and storage medium for flow channel parameters. Background Technology
[0002] In engineering fields such as mold cooling and equipment heat dissipation, the structural parameters of flow channels (such as diameter and wall distance) directly affect core performance indicators such as heat dissipation efficiency, fluid resistance, and temperature uniformity. In the traditional flow channel design process, engineers need to manually set parameters based on experience, perform a single simulation using simulation software such as NX, adjust the parameters according to the simulation results, and restart the simulation, iterating repeatedly until a solution that meets the requirements is obtained.
[0003] In related technologies, engineers need to manually set flow channel parameters based on experience, perform a single simulation using simulation software such as NX, manually adjust the parameters based on the simulation results, and then restart the simulation. Through multiple iterations, a design solution that meets the performance requirements can be obtained.
[0004] However, in related technologies, parameter adjustment and simulation operation are highly dependent on manual intervention and limited by personal experience, resulting in long processing times and severely impacting design efficiency. Since the relationship between flow channel performance and parameters is often nonlinear and non-smooth, and the derivative of the objective function is difficult to analyze, gradient-based optimization algorithms are difficult to apply directly. Parameter and performance data records during the iteration process usually lack systematic management, which is not conducive to subsequent scheme optimization and engineering reuse, and urgently needs improvement. Summary of the Invention
[0005] This application provides an automated optimization method, apparatus, electronic device, and storage medium for flow channel parameters to address the following issues in related technologies: parameter adjustment and simulation operation are highly dependent on manual intervention and limited by personal experience, resulting in long processing times and severely impacting design efficiency; the objective function of flow channel simulation has nonlinear and non-smooth characteristics, leading to poor algorithm adaptability; and the manual iteration records are not standardized, making it unfavorable for subsequent scheme optimization and engineering reuse.
[0006] The first aspect of this application provides an automated optimization method for flow channel parameters, comprising the following steps: defining a set of design variables for flow channel optimization, configuring a preset optimization strategy, and setting key parameters; calling the NX Open application programming interface based on the target script interface program to establish a bidirectional communication link; iteratively optimizing the flow channel parameters using the bidirectional communication link based on the set of design variables, the preset optimization strategy, and the key parameters until a preset iteration stop condition is reached, and outputting the final flow channel parameters.
[0007] Through the above-mentioned technical means, the embodiments of this application can define flow channel optimization design variable groups, configure preset optimization strategies and key parameters, establish a bidirectional communication link by calling the NX Open API through the target script interface program, and rely on this link to complete the automated iterative optimization of flow channel parameters until the stopping conditions are met and output the final flow channel parameters, thereby realizing automatic parameter iteration, adapting to nonlinear and non-smooth black box problems in engineering simulation, improving optimization efficiency, and thus being able to more comprehensively cover the design space and improve the optimization effect. At the same time, it supports flexible adjustment of parameter range and convergence conditions to adapt to different flow channel design scenarios.
[0008] Optionally, in one embodiment of this application, the target script-based interface program calls the NX Open application programming interface to establish a bidirectional communication link, including: receiving at least one design variable; generating a conformal waterway model based on the at least one design variable; performing NX thermal flux simulation using the conformal waterway model to read performance data, and writing the performance data into a result file in the format required by Dakota for optimization.
[0009] Through the above-mentioned technical means, the embodiments of this application can automate the entire simulation data processing process, including receiving design variables, generating conformal waterway models, driving NX to complete thermal flow simulation, reading performance data, and writing the results into the result file in Dakota format. This avoids human errors in manual modeling, simulation operation, and data recording, improves data reliability, fits the actual engineering scenario, ensures the accuracy of thermal flow simulation results, provides standardized data support for the efficient use of subsequent optimization algorithms, and ensures a smooth connection in the optimization process.
[0010] Optionally, in one embodiment of this application, the step of iteratively optimizing the flow channel parameters using the bidirectional communication link based on the design variable set, the preset optimization strategy, and the key parameters until a preset iteration stop condition is reached, and outputting the final flow channel parameters, includes: reading initial design variables to perform the first round of NX thermal flux simulation to obtain initial objective function values; and during the exploration and movement phase, generating N values around the current point using a symmetrical sampling pattern. For each neighboring point, NX sequentially calculates the objective function value of each neighboring point. If the heat dissipation efficiency of the target neighboring point is better than that of the current point, the current point is updated as the target neighboring point. If none of the neighboring points are better, the step size is reduced by a first preset threshold to regenerate neighboring points for exploration. After a successful exploration move, the difference between the current point and the optimal solution of the previous round is calculated to determine the mode direction. Candidate points are generated along the mode direction with the current step size, and the performance of the candidate points is verified. If the heat dissipation efficiency reaches a preset value, the current point is updated, and the step size is increased by a second preset threshold. If the performance of the candidate points is not better, the exploration move phase is returned until the preset iteration stop condition is met.
[0011] Through the above-mentioned technical means, the embodiments of this application can obtain the benchmark value based on the initial simulation, generate neighborhood points through symmetrical sampling to explore and move, and adjust the dynamic step size for iterative optimization, so as not to derive the derivative of the objective function. This adapts to nonlinear and non-smooth black box problems in engineering simulation. By combining the strategies of "exploration movement + pattern movement", the convergence speed is improved, thereby shortening the overall optimization cycle while ensuring the optimization quality.
[0012] Optionally, in one embodiment of this application, the design variable set includes at least one of the following: flow channel diameter, flow channel wall distance, and set constraint conditions; the preset optimization strategy is a preset Coliny pattern search algorithm; and the key parameters include at least one of the following: initial point, initial step size, shrinkage factor, expansion factor, and convergence judgment condition.
[0013] Through the above-mentioned technical means, the embodiments of this application can provide clear input and constraint boundaries for the optimization process through clear design variable groups and key parameters. The Coliny pattern search algorithm is used as a preset strategy, which does not rely on the derivative of the objective function. It adapts to the characteristic that the derivative of the objective function of the flow channel simulation is difficult to derive, thereby enhancing the flexibility and engineering practicality of the method, and finally realizing reliable and controllable automated optimization for different flow channel design requirements.
[0014] A second aspect of this application provides an automated flow channel parameter optimization device, comprising: a configuration module for defining a set of design variables for flow channel optimization, configuring a preset optimization strategy, and setting key parameters; an establishment module for calling the NX Open application programming interface based on a target script interface program to establish a bidirectional communication link; and an optimization module for iteratively optimizing the flow channel parameters based on the set of design variables, the preset optimization strategy, and the key parameters using the bidirectional communication link until a preset iteration stop condition is reached, and outputting the final flow channel parameters.
[0015] Through the above-mentioned technical means, the embodiments of this application can define flow channel optimization design variable groups, configure preset optimization strategies and key parameters, establish a bidirectional communication link by calling the NX Open API through the target script interface program, and rely on this link to complete the automated iterative optimization of flow channel parameters until the stopping conditions are met and output the final flow channel parameters, thereby realizing automatic parameter iteration, adapting to nonlinear and non-smooth black box problems in engineering simulation, improving optimization efficiency, and thus being able to more comprehensively cover the design space and improve the optimization effect. At the same time, it supports flexible adjustment of parameter range and convergence conditions to adapt to different flow channel design scenarios.
[0016] Optionally, in one embodiment of this application, the establishment module includes: a receiving unit for receiving at least one design variable; a generation unit for generating a conformal waterway model based on the at least one design variable; and a simulation unit for performing NX thermal flux simulation using the conformal waterway model to read performance data and write the performance data into a result file in the format required by Dakota for optimization.
[0017] Through the above-mentioned technical means, the embodiments of this application can automate the entire simulation data processing process, including receiving design variables, generating conformal waterway models, driving NX to complete thermal flow simulation, reading performance data, and writing the results into the result file in Dakota format. This avoids human errors in manual modeling, simulation operation, and data recording, improves data reliability, fits the actual engineering scenario, ensures the accuracy of thermal flow simulation results, provides standardized data support for the efficient use of subsequent optimization algorithms, and ensures a smooth connection in the optimization process.
[0018] Optionally, in one embodiment of this application, the optimization module includes: an acquisition unit, used to read initial design variables to perform the first round of NX thermal flux simulation and acquire initial objective function values; a calculation unit, used to generate N neighborhood points around the current point in a symmetrical sampling mode during the exploration movement phase, and drive NX to calculate the objective function values of each neighborhood point sequentially; a first update unit, used to update the current point as the target neighborhood point if the heat dissipation efficiency of the target neighborhood point is better than that of the current point; if all neighborhood points are not better, the step size will be reduced by a first preset threshold to regenerate neighborhood points for exploration; a verification unit, used to calculate the difference between the current point and the previous round optimal solution after successful exploration movement to determine the mode direction, generate candidate points along the mode direction with the current step size, and verify the performance of the candidate points; a second update unit, used to update the current point if the heat dissipation efficiency reaches a preset value, and increase the step size by a second preset threshold; if the performance of the candidate points is not better, the exploration movement phase will be returned until the preset iteration stop condition is met.
[0019] Through the above-mentioned technical means, the embodiments of this application can obtain the benchmark value based on the initial simulation, generate neighborhood points through symmetrical sampling to explore and move, and adjust the dynamic step size for iterative optimization, so as not to derive the derivative of the objective function. This adapts to nonlinear and non-smooth black box problems in engineering simulation. By combining the strategies of "exploration movement + pattern movement", the convergence speed is improved, thereby shortening the overall optimization cycle while ensuring the optimization quality.
[0020] Optionally, in one embodiment of this application, the design variable set includes at least one of the following: flow channel diameter, flow channel wall distance, and set constraint conditions; the preset optimization strategy is a preset Coliny pattern search algorithm; and the key parameters include at least one of the following: initial point, initial step size, shrinkage factor, expansion factor, and convergence judgment condition.
[0021] Through the above-mentioned technical means, the embodiments of this application can provide clear input and constraint boundaries for the optimization process through clear design variable groups and key parameters. The Coliny pattern search algorithm is used as a preset strategy, which does not rely on the derivative of the objective function. It adapts to the characteristic that the derivative of the objective function of the flow channel simulation is difficult to derive, thereby enhancing the flexibility and engineering practicality of the method, and finally realizing reliable and controllable automated optimization for different flow channel design requirements.
[0022] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the automated optimization method for flow channel parameters as described in the above embodiments.
[0023] A fourth aspect of this application provides a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described automated flow path parameter optimization method.
[0024] A fifth aspect of this application provides a computer program product that stores a computer program that, when executed by a processor, implements the above-described automated optimization method for flow channel parameters.
[0025] This application's embodiments can define flow channel optimization design variable groups, configure preset optimization strategies and key parameters, establish a bidirectional communication link by calling the NX Open API through the target script interface program, and automatically iterate and optimize the flow channel parameters until the stopping conditions are met, then output the final flow channel parameters. This achieves automatic parameter iteration, adapts to nonlinear and non-smooth black-box problems in engineering simulation, improves optimization efficiency, and can more comprehensively cover the design space, improving optimization results. It also supports flexible adjustment of parameter range and convergence conditions to adapt to different flow channel design scenarios. Therefore, it solves the problems in related technologies where parameter adjustment and simulation operation are highly dependent on manual intervention, limited by personal experience, resulting in long processing times and severely impacting design efficiency. Furthermore, the nonlinear and non-smooth characteristics of the objective function in flow channel simulation lead to poor algorithm adaptability, and the lack of standardized manual iteration records hinders subsequent scheme optimization and engineering reuse.
[0026] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0027] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart of an automated optimization method for flow channel parameters provided according to an embodiment of this application; Figure 2 This is a flowchart of an automated optimization method for flow channel parameters according to an embodiment of this application; Figure 3 This is a flowchart illustrating the construction of a Dakota-NX interface according to an embodiment of this application; Figure 4 This is a flowchart of automated iterative optimization provided according to one embodiment of this application; Figure 5 This is a schematic diagram of an automated flow channel parameter optimization device provided according to an embodiment of this application; Figure 6This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application.
[0028] Figure label: 10-Automatic optimization device for flow channel parameters; 100-Configuration module, 200-Establishment module, 300-Optimization module; 601-Memory, 602-Processor, 603-Communication interface. Detailed Implementation
[0029] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0030] The following description, with reference to the accompanying drawings, outlines an automated optimization method, apparatus, electronic device, and storage medium for flow channel parameters according to embodiments of this application. Addressing the issues raised in the background section regarding related technologies, parameter adjustment and simulation execution are highly dependent on manual intervention and limited by personal experience, resulting in lengthy processes and significantly impacting design efficiency. Furthermore, the objective function of flow channel simulation exhibits nonlinear and non-smooth characteristics, leading to poor algorithm adaptability. Inconsistent manual iteration records hinder subsequent scheme optimization and engineering reuse. This application provides an automated optimization method for flow channel parameters. This method defines flow channel optimization design variable groups, configures preset optimization strategies and key parameters, establishes a bidirectional communication link by calling the NX Open API through the target script interface program, and uses this link to perform automated iterative optimization of flow channel parameters until the stopping condition is met, outputting the final flow channel parameters. This achieves automatic parameter iteration, adapting to nonlinear and non-smooth black-box problems in engineering simulations, improving optimization efficiency, and thus providing more comprehensive coverage of the design space and improved optimization results. Simultaneously, it supports flexible adjustment of parameter range and convergence conditions to adapt to different flow channel design scenarios. This solves the problems in related technologies, such as the long processing time caused by the high dependence of parameter adjustment and simulation operation on manual intervention and the limitation of personal experience, which seriously affects design efficiency; the nonlinear and non-smooth characteristics of the objective function of the flow channel simulation, which leads to poor algorithm adaptability; and the lack of standardization in manual iteration records, which hinders subsequent scheme optimization and engineering reuse.
[0031] Specifically, Figure 1 This is a flowchart illustrating an automated optimization method for flow channel parameters provided in an embodiment of this application.
[0032] like Figure 1 As shown, the automated optimization method for flow channel parameters includes the following steps: In step S101, design variable groups for flow channel optimization are defined, preset optimization strategies are configured, and key parameters are set.
[0033] It is understood that the design variable group in the embodiments of this application may include the flow channel diameter, the flow channel wall distance, and the set constraints; the preset optimization strategy may be the Coliny pattern search algorithm, and the preset optimization strategy may be set by those skilled in the art according to the actual situation, without specific restrictions.
[0034] In actual implementation, the embodiments of this application can define a set of design variables for flow channel optimization in the input file (.in) of Dakota through the generate_output module, specifically including: flow channel diameter, flow channel wall distance, and setting constraints.
[0035] Furthermore, the Coliny pattern search algorithm is configured as the core optimization algorithm, and key parameters are set, including: initial point, initial step size, contraction factor, expansion factor, and convergence criteria.
[0036] The embodiments of this application can improve the targeting of optimization by clearly defining the design variable group, focusing on the core influencing parameters, avoiding interference from irrelevant parameters, and setting up the optimization strategy without relying on human experience to set the iteration logic. This provides stable rule support for automated iteration, reduces human intervention, and provides a prerequisite guarantee for full-process automation.
[0037] Optionally, in one embodiment of this application, the design variable set includes at least one of the following: flow channel diameter, flow channel wall distance, and set constraint conditions. The preset optimization strategy is a preset Coliny pattern search algorithm. The key parameters include at least one of the following: initial point, initial step size, shrinkage factor, expansion factor, and convergence judgment condition.
[0038] For example, taking the cooling optimization of conformal water channels in a mold as an example, the objective function is "maximize heat dissipation efficiency", and the constraints are: channel diameter 5-20mm, wall distance 3-10mm, total length ≤500mm. The parameters and initial performance are: channel diameter 10mm, wall distance 6mm, heat dissipation efficiency 65%, fluid resistance 12Pa, and temperature uniformity 82%.
[0039] The design variable group specifically includes: channel diameter: value range 5-20mm (adjustable according to the engineering scenario); channel wall distance: value range 3-10mm (set according to the space constraints of the channel layout).
[0040] Set constraints: Hard constraints: channel diameter ≥ 5 mm and ≤ 20 mm, channel wall distance ≥ 3 mm and ≤ 10 mm; Soft constraints: total channel length not exceeding 500 mm (to avoid excessive fluid resistance).
[0041] Furthermore, the Coliny pattern search algorithm is configured as the core optimization algorithm, and key parameters are set, including: initial point, initial step size, contraction factor, expansion factor, and convergence criteria.
[0042] Specifically, the initial point is set as follows: channel diameter 10mm, channel wall distance 6mm (initial candidate values set based on engineering experience); initial step size is 2mm (used for generating initial neighboring points); shrinkage factor is 0.3 (the proportion by which the step size is reduced when exploration fails); expansion factor is 2.0 (the proportion by which the step size is increased when the pattern moves successfully). Convergence criteria: The iteration stops when both of the following conditions are met: (1) Variable accuracy threshold: the maximum difference between two adjacent rounds of design variables is ≤1e-3mm; (2) Objective function accuracy threshold: the relative error between two adjacent rounds of objective function values is ≤5%; (3) Cubble condition: the maximum number of iterations is 50 and the maximum number of function evaluations is 100 (to avoid infinite iteration).
[0043] The embodiments of this application provide clear input and constraint boundaries for the optimization process through a clear set of design variables and key parameters. The Coliny pattern search algorithm is used as a preset strategy, which does not rely on the derivative of the objective function. This adapts to the characteristic that the derivative of the objective function of the flow channel simulation is difficult to derive, thereby enhancing the flexibility and engineering practicality of the method. Finally, it realizes reliable and controllable automated optimization for different flow channel design requirements.
[0044] In step S102, the interface program based on the target script calls the NX Open application programming interface to establish a bidirectional communication link.
[0045] It is understood that the target script in the embodiments of this application can be a Python script.
[0046] In actual implementation, the embodiments of this application can use the Python script interface program to call the NXOpen API to achieve communication between Dakota and NX.
[0047] This application embodiment can establish a bidirectional communication link by calling the NX Open application programming interface through a script, realizing deep and automated integration of optimization algorithms and commercial simulation software, solving the problem of inefficiency in manual software operation, further improving the automation level of the optimization process, and facilitating the subsequent integration of the communication link into the overall optimization process.
[0048] Optionally, in one embodiment of this application, the interface program based on the target script calls the NX Open application programming interface to establish a bidirectional communication link, including: receiving at least one design variable; generating a conformal waterway model based on the at least one design variable; performing NX thermal flux simulation using the conformal waterway model to read performance data, and writing the performance data into a result file in the format required by Dakota for optimization.
[0049] It is understood that the conformal waterway model in the embodiments of this application can be understood as a three-dimensional flow channel model that conforms to the contour of the workpiece, generated based on the design variable set.
[0050] In actual implementation, the embodiments of this application can receive at least one design variable; generate a conformal waterway model based on at least one design variable; perform NX thermal flux simulation using the conformal waterway model to read performance data, and write the performance data into a result file in the format required by Dakota for optimization.
[0051] Specifically, the interface program periodically monitors the parameter file (param.txt) generated by Dakota, reading the channel diameter and wall distance values. It creates the main channel body using the UF_MODL_create_cylinder function of the NX Open API, and calls the UF_MODL_offset_surface function to adjust the channel position based on the wall distance, automatically generating a conformal waterway model. The NX thermal-fluid simulation is started via a batch command (nxrun -batch -s sim_script.journal). After the simulation is complete, the interface program reads the NX output result file (result.csv) and extracts three core performance indicators: heat dissipation efficiency, fluid flow resistance, and temperature uniformity. The extracted performance data is then written to the result file (results.out) in the format required by Dakota and fed back to the Dakota optimization module.
[0052] This application embodiment automates the entire simulation data processing process, from receiving design variables and generating conformal waterway models to driving NX to complete thermal flow simulation, reading performance data, and writing the results into a standardized Dakota format file. This avoids human errors in manual modeling, simulation operations, and data recording, improves data reliability, aligns with actual engineering scenarios, ensures the accuracy of thermal flow simulation results, provides standardized data support for the efficient use of subsequent optimization algorithms, and ensures a smooth optimization process.
[0053] In step S103, based on the design variable group, preset optimization strategy and key parameters, the flow channel parameters are iteratively optimized using a two-way communication link until the preset iteration stop condition is reached, and the final flow channel parameters are output.
[0054] It is understood that the preset iteration stop condition in this application embodiment can be that the iteration stops when both of the following conditions are met: (1) Variable accuracy threshold: the maximum difference between two adjacent rounds of design variables is ≤1e-3mm; (2) Objective function accuracy threshold: the relative error between two adjacent rounds of objective function values is ≤5%; (3) Cusp condition: the maximum number of iterations is 50, and the maximum number of function evaluations is 100 (to avoid infinite iteration). The preset iteration stop condition can be set by those skilled in the art according to the actual situation, and no specific restrictions are made here.
[0055] In actual implementation, the embodiments of this application can iteratively optimize the flow channel parameters based on the design variable group, preset optimization strategy and key parameters using a two-way communication link. The iterative optimization is automated. When the iteration meets the convergence condition, the optimization stops. The result output module generates a standardized summary report, which includes the optimization round, the design variable values of each round, the performance parameter values of each round and the optimal design scheme.
[0056] This application embodiment achieves fully automated iterative optimization of the flow channel parameters based on preset strategies and bidirectional communication links. It eliminates the need for manual parameter adjustment and repeated simulation restarts, reducing labor costs. The standardized data recording during the iteration process facilitates subsequent solution traceability and engineering reuse, solving the pain point of difficult result traceability in traditional methods. The output standardized report intuitively presents the correlation between parameters and performance, making it easy for engineers to directly implement and apply. At the same time, it supports flexible adjustment of parameter range and convergence conditions to adapt to different flow channel design scenarios.
[0057] Optionally, in one embodiment of this application, based on a set of design variables, a preset optimization strategy, and key parameters, the flow channel parameters are iteratively optimized using a bidirectional communication link until a preset iteration stop condition is met, and the final flow channel parameters are output. This includes: reading initial design variables to perform the first round of NX thermal flux simulation and obtaining initial objective function values; during the exploration and movement phase, generating N neighboring points around the current point using a symmetrical sampling pattern, and driving NX to calculate the objective function values of each neighboring point sequentially; if the heat dissipation efficiency of the target neighboring point is better than that of the current point, then updating the current point as the target neighboring point; if none of the neighboring points are better, then reducing the step size by a first preset threshold to regenerate neighboring points for exploration; after successful exploration and movement, calculating the difference between the current point and the optimal solution of the previous round to determine the mode direction, generating candidate points along the mode direction with the current step size, and verifying the performance of the candidate points; if the heat dissipation efficiency reaches a preset value, then updating the current point and increasing the step size by a second preset threshold; if the performance of the candidate points is not better, then returning to the exploration and movement phase until the preset iteration stop condition is met.
[0058] It is understood that in the embodiments of this application, the first preset threshold can be the step size contraction range when the exploration movement is unsuccessful. The first preset threshold can be set by those skilled in the art according to the actual situation, and no specific restrictions are imposed here. The preset value can be 90%, and the preset value can be set by those skilled in the art according to the actual situation, and no specific restrictions are imposed here. The second preset threshold can be the step size expansion range when the pattern movement is successful. The second preset threshold can be set by those skilled in the art according to the actual situation, and no specific restrictions are imposed here.
[0059] In actual implementation, this embodiment can read the initialization design variables through Dakota, trigger the first round of thermal flux simulation in NX through the interface program, and obtain the initial objective function value. N neighboring points are generated around the current point using a symmetrical sampling mode. The interface program drives NX to calculate the objective function value of each neighboring point sequentially. If the heat dissipation efficiency of a neighboring point is better than that of the current point, the current point is updated to that neighboring point. If none of the neighboring points are better, the step size is reduced, and new neighboring points are generated for exploration. After successful exploration, the difference between the current point and the optimal solution of the previous round is calculated to determine the mode direction. Candidate points are generated along this direction with the current step size. The interface program drives NX to verify the performance of the candidate points. If the heat dissipation efficiency reaches a preset value, the current point is updated, and the step size is increased. If the performance of the candidate points is not better, the exploration phase is returned. This iterative cycle continues until the convergence criteria are met.
[0060] The embodiments of this application can obtain a baseline value based on the initial simulation, generate neighborhood points through symmetrical sampling to explore and move, and adjust the dynamic step size for iterative optimization. This eliminates the need to derive the derivative of the objective function, adapting to nonlinear and non-smooth black box problems in engineering simulation. By combining the "exploration movement + pattern movement" strategy, the convergence speed is improved, thereby shortening the overall optimization cycle while ensuring optimization quality.
[0061] Specifically, it can be combined with Figures 2 to 4 As shown, the working principle of the automated optimization method for flow channel parameters in this application is explained in detail with a specific embodiment.
[0062] like Figure 2 As shown, embodiments of this application may include the following steps: Step S201: Define design variables and constraints.
[0063] In this embodiment of the application, the design variable group for flow channel optimization can be defined in the input file (.in) of Dakota through the generate_output module, specifically including: flow channel diameter, flow channel wall distance, and setting constraints.
[0064] In this implementation, taking the cooling optimization of the mold conformal water channel as an example, the objective function is "maximize heat dissipation efficiency", and the constraints are: channel diameter 5-20mm, wall distance 3-10mm, total length ≤500mm. The parameters and initial performance are: channel diameter 10mm, wall distance 6mm, heat dissipation efficiency 65%, fluid resistance 12Pa, and temperature uniformity 82%.
[0065] The design variable group specifically includes: channel diameter: value range 5-20mm (adjustable according to the engineering scenario); channel wall distance: value range 3-10mm (set according to the space constraints of the channel layout).
[0066] Set constraints: Hard constraints: channel diameter ≥ 5 mm and ≤ 20 mm, channel wall distance ≥ 3 mm and ≤ 10 mm; Soft constraints: total channel length not exceeding 500 mm (to avoid excessive fluid resistance).
[0067] Step S202: Optimize algorithm configuration.
[0068] In this embodiment, the Coliny pattern search algorithm can be configured as the core optimization algorithm, and key parameters can be set, including: initial point, initial step size, contraction factor, expansion factor, and convergence judgment condition.
[0069] Initial point: 10mm channel diameter, 6mm channel wall distance (initial candidate values set based on engineering experience); Initial step size: 2mm (used for initial neighborhood point generation); Shrinkage factor: 0.3 (the proportion by which the step size is reduced when exploration fails); Expansion factor: 2.0 (the proportion by which the step size is increased when the mode moves successfully).
[0070] Convergence criteria: The iteration stops when both of the following conditions are met: (1) Variable accuracy threshold: the maximum difference between two adjacent rounds of design variables is ≤1e-3mm; (2) Objective function accuracy threshold: the relative error between two adjacent rounds of objective function values is ≤5%; (3) Cubble condition: the maximum number of iterations is 50 and the maximum number of function evaluations is 100 (to avoid infinite iteration).
[0071] Step S203: Dakota-NX interface setup.
[0072] In this embodiment, communication between Dakota and NX can be achieved by calling the NX Open API based on the Python script interface program.
[0073] Step S204: Automated iterative optimization.
[0074] Step S205: Termination and Output.
[0075] In this embodiment of the application, when the iteration meets the convergence condition, the optimization can be stopped, and the result output module generates a standardized summary report, which includes the optimization round, the design variable values of each round, the performance parameter values of each round, and the optimal design scheme.
[0076] like Figure 3 As shown, embodiments of this application may include the following steps: Step S301: Design variable reception.
[0077] In this embodiment, the interface program can periodically monitor the parameter file (param.txt) generated by Dakota and read the values of the flow channel diameter and wall distance.
[0078] Step S302: Automatic generation of flow channel model.
[0079] In this embodiment, the flow channel body can be created using the UF_MODL_create_cylinder function of the NX Open API, and the UF_MODL_offset_surface function can be called to adjust the flow channel position according to the wall distance, thereby automatically generating a conformal waterway model.
[0080] Step S303: Simulation triggering and data extraction.
[0081] In this embodiment, simulation triggering and data extraction can be performed: NX thermal flow simulation is started by batch processing command (nxrun -batch -s sim_script.journal). After the simulation is completed, the interface program reads the result file (result.csv) output by NX and extracts three core performance indicators: heat dissipation efficiency, fluid flow resistance, and temperature uniformity.
[0082] Step S304: Data feedback.
[0083] In this embodiment, the extracted performance data can be written into a result file (results.out) in the format required by Dakota and fed back to the Dakota optimization module.
[0084] like Figure 4 As shown, embodiments of this application may include the following steps: Step S401: Initialization.
[0085] In this embodiment, the initial design variables can be read by Dakota, and the first round of thermal flux simulation in NX can be triggered through the interface program to obtain the initial objective function value.
[0086] Step S402: Explore movement.
[0087] In this embodiment, N neighboring points can be generated around the current point in a symmetrical sampling mode. The interface program drives NX to calculate the objective function value of each neighboring point in turn. If the heat dissipation efficiency of a certain neighboring point is better than that of the current point, the current point is updated to be that neighboring point. If none of the neighboring points are better, the step size is reduced and the neighboring points are regenerated for exploration.
[0088] Step S403: Mode shift.
[0089] In this embodiment, after a successful exploration move, the difference between the current point and the optimal solution of the previous round is calculated to determine the mode direction. Candidate points are generated along this direction with the current step size. The interface program drives NX to verify the performance of the candidate points. If the heat dissipation efficiency reaches a preset value, the current point is updated and the step size is increased. If the performance of the candidate points is not better, the exploration move phase is returned.
[0090] Step S404: Iterative loop.
[0091] In this embodiment, the process can be iterative: repeat steps S402-S403 until the convergence condition is met.
[0092] For example, the initial design variables include: diameter 10mm, wall distance 6mm, heat dissipation efficiency 65%, and N is 5 (e.g., diameter 8mm / 12mm / 10mm / 10mm / 10mm, wall distance 6mm / 6mm / 4mm / 8mm / 6mm).
[0093] Iteration process data:
[0094] The 10th iteration satisfies the convergence condition (variable accuracy 0.2mm ≤ 1e-3mm; correction: the diameter difference between the 10th and 9th iterations is 0.2mm, the wall distance difference is 0.1mm, and after multiple iterations, the 20th iteration reaches a variable accuracy of 0.001mm). The final optimal parameters are: channel diameter 15.2mm, wall distance 9.1mm, heat dissipation efficiency 81%, fluid resistance 16.2Pa, and temperature uniformity 91%.
[0095] Compared with the manual optimization method: 1. Optimization time: 20 hours for the manual method, 3 hours for the embodiment of this application, with an efficiency improvement of 85%; 2. Heat dissipation efficiency: 68% for the manual method, 81% for the embodiment of this application, with an improvement of 19.1%; 3. Temperature uniformity: 83% for the manual method, 91% for the embodiment of this application, with an improvement of 9.6%.
[0096] The automated optimization method for flow channel parameters proposed in this application defines a group of flow channel optimization design variables, configures preset optimization strategies and key parameters, establishes a bidirectional communication link by calling the NX Open API through the target script interface program, and completes automated iterative optimization of flow channel parameters until the stopping condition is met, then outputs the final flow channel parameters. This achieves automatic parameter iteration, adapts to nonlinear and non-smooth black-box problems in engineering simulation, improves optimization efficiency, and can more comprehensively cover the design space, improving optimization results. It also supports flexible adjustment of parameter range and convergence conditions to adapt to different flow channel design scenarios. Therefore, this solves the problems in related technologies where parameter adjustment and simulation operation are highly dependent on manual intervention, limited by personal experience, resulting in long processing times and severely impacting design efficiency. Furthermore, the nonlinear and non-smooth characteristics of the objective function in flow channel simulation lead to poor algorithm adaptability, and the lack of standardized manual iteration records hinders subsequent scheme optimization and engineering reuse.
[0097] Next, with reference to the accompanying drawings, an automated optimization device for flow channel parameters proposed according to an embodiment of this application is described.
[0098] Figure 5 This is a schematic diagram of the structure of the automated flow channel parameter optimization device according to an embodiment of this application.
[0099] like Figure 5 As shown, the automated flow channel parameter optimization device 10 includes: a configuration module 100, a setup module 200, and an optimization module 300.
[0100] The configuration module 100 is used to define the design variable group for flow channel optimization, configure the preset optimization strategy, and set key parameters.
[0101] Module 200 is established for the target script-based interface program to call the NX Open application programming interface to establish a bidirectional communication link.
[0102] The optimization module 300 is used to iteratively optimize the flow channel parameters based on the design variable group, preset optimization strategy and key parameters, using a two-way communication link until the preset iteration stop condition is reached, and output the final flow channel parameters.
[0103] Optionally, in one embodiment of this application, the establishment module 200 includes: a receiving unit, a generating unit, and a simulation unit.
[0104] The receiving unit is used to receive at least one design variable.
[0105] A generation unit is used to generate a conformal waterway model based on at least one design variable.
[0106] The simulation unit is used to perform NX thermal flux simulations using a conformal waterway model to read performance data and write the performance data into a result file in the format required by Dakota for optimization.
[0107] Optionally, in one embodiment of this application, the optimization module includes: an acquisition unit, a calculation unit, a first update unit, a verification unit, and a second update unit.
[0108] The acquisition unit is used to read the initial design variables to perform the first round of NX thermal flow simulation and obtain the initial objective function value.
[0109] The computing unit is used to generate N neighborhood points around the current point in a symmetrical sampling pattern during the exploration and movement phase, and drive NX to calculate the objective function value of each neighborhood point in turn.
[0110] The first update unit is used to update the current point as the target neighbor point if the heat dissipation efficiency of the target neighbor point is better than that of the current point; if none of the neighbor points are better, the step size will be reduced by a first preset threshold to regenerate neighbor points for exploration.
[0111] The verification unit is used to calculate the difference between the current point and the optimal solution of the previous round after a successful exploration move, in order to determine the pattern direction, generate candidate points along the pattern direction with the current step size, and verify the performance of the candidate points.
[0112] The second update unit is used to update the current point if the heat dissipation efficiency reaches a preset value, and to increase the step size by a second preset threshold; if the performance of the candidate point is not better, it returns to the exploration and movement stage until the preset iteration stop condition is met.
[0113] Optionally, in one embodiment of this application, the design variable set includes at least one of the following: flow channel diameter, flow channel wall distance, and set constraint conditions. The preset optimization strategy is a preset Coliny pattern search algorithm. The key parameters include at least one of the following: initial point, initial step size, shrinkage factor, expansion factor, and convergence judgment condition.
[0114] It should be noted that the explanation of the above-mentioned embodiment of the automated optimization method for flow channel parameters also applies to the automated optimization device for flow channel parameters in this embodiment, and will not be repeated here.
[0115] The automated flow channel parameter optimization device proposed in this application can define flow channel optimization design variable groups, configure preset optimization strategies and key parameters, establish a bidirectional communication link by calling the NX Open API through the target script interface program, and complete automated iterative optimization of flow channel parameters until the stopping condition is met, then output the final flow channel parameters. This achieves automatic parameter iteration, adapts to nonlinear and non-smooth black-box problems in engineering simulation, improves optimization efficiency, and thus more comprehensively covers the design space, improving optimization results. It also supports flexible adjustment of parameter range and convergence conditions to adapt to different flow channel design scenarios. Therefore, it solves the problems in related technologies where parameter adjustment and simulation operation are highly dependent on manual intervention, limited by personal experience, resulting in long processing times and severely impacting design efficiency. Furthermore, the nonlinear and non-smooth characteristics of the objective function in flow channel simulation lead to poor algorithm adaptability, and the lack of standardized manual iteration records hinders subsequent scheme optimization and engineering reuse.
[0116] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include: The memory 601, the processor 602, and the computer program stored on the memory 601 and capable of running on the processor 602.
[0117] When the processor 602 executes the program, it implements the automated optimization method for flow channel parameters provided in the above embodiments.
[0118] Furthermore, electronic devices also include: Communication interface 603 is used for communication between memory 601 and processor 602.
[0119] The memory 601 is used to store computer programs that can run on the processor 602.
[0120] The memory 601 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0121] If the memory 601, processor 602, and communication interface 603 are implemented independently, then the communication interface 603, memory 601, and processor 602 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0122] Optionally, in a specific implementation, if the memory 601, processor 602, and communication interface 603 are integrated on a single chip, then the memory 601, processor 602, and communication interface 603 can communicate with each other through an internal interface.
[0123] The processor 602 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0124] This application also provides a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described automated optimization method for flow channel parameters.
[0125] This application also provides a computer program product storing a computer program that, when executed by a processor, implements the above-described automated optimization method for flow channel parameters.
[0126] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0127] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0128] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0129] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0130] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, it can be implemented using any one or more of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0131] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0132] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0133] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. An automated optimization method for flow channel parameters, characterized in that, Includes the following steps: Define the design variable group for flow channel optimization, configure the preset optimization strategy, and set key parameters; The target script-based interface program calls the NX Open application programming interface to establish a bidirectional communication link; Based on the design variable set, the preset optimization strategy, and the key parameters, the flow channel parameters are iteratively optimized using the bidirectional communication link until the preset iteration stop condition is met, and the final flow channel parameters are output.
2. The method according to claim 1, characterized in that, The target script-based interface program calls the NXOpen application programming interface to establish a bidirectional communication link, including: Receive at least one design variable; Based on the at least one design variable, generate a conformal waterway model; The conformal waterway model was used to perform NX thermal flow simulation to read performance data, and the performance data was written into the result file in the format required by Dakota for optimization.
3. The method according to claim 2, characterized in that, The process of iteratively optimizing the flow channel parameters using the bidirectional communication link based on the design variable set, the preset optimization strategy, and the key parameters until a preset iteration stop condition is met, and then outputting the final flow channel parameters, includes: Read the initial design variables to perform the first round of NX thermal flow simulation and obtain the initial objective function values; During the exploration and movement phase, N neighboring points are generated around the current point using a symmetrical sampling pattern, and NX is driven to calculate the objective function value of each neighboring point in turn. If the heat dissipation efficiency of the target neighboring point is better than that of the current point, then the current point is updated to the target neighboring point; if none of the neighboring points are better, then the step size will be reduced by a first preset threshold to regenerate neighboring points for exploration. After a successful exploration move, the difference between the current point and the previous round's optimal solution is calculated to determine the pattern direction. Candidate points are then generated along the pattern direction with the current step size, and the performance of the candidate points is verified. If the heat dissipation efficiency reaches a preset value, the current point is updated and the step size is increased by a second preset threshold; if the performance of the candidate point is not better, the exploration and movement phase is returned until the preset iteration stop condition is met.
4. The method according to claim 1, characterized in that, The design variable set includes at least one of the following: flow channel diameter, flow channel wall distance, and set constraint conditions. The preset optimization strategy is a preset Coliny pattern search algorithm. The key parameters include at least one of the following: initial point, initial step size, shrinkage factor, expansion factor, and convergence criterion.
5. An automated flow channel parameter optimization device, characterized in that, include: The configuration module is used to define the design variable group for flow channel optimization, configure the preset optimization strategy, and set key parameters; Establish a module for interface programs based on target scripts to call the NX Open application programming interface to establish a bidirectional communication link; The optimization module is used to iteratively optimize the flow channel parameters based on the design variable group, the preset optimization strategy, and the key parameters using the bidirectional communication link until the preset iteration stop condition is reached, and then output the final flow channel parameters.
6. The apparatus according to claim 5, characterized in that, The establishment module includes: A receiving unit is used to receive at least one design variable; A generation unit is used to generate a conformal waterway model based on the at least one design variable; The simulation unit is used to perform NX thermal flux simulation using the conformal waterway model to read performance data and write the performance data into a result file in the format required by Dakota for optimization.
7. The apparatus according to claim 6, characterized in that, The optimization module includes: The acquisition unit is used to read the initial design variables to perform the first round of NX thermal flow simulation and obtain the initial objective function value; The computing unit is used to generate N neighborhood points around the current point in a symmetrical sampling pattern during the exploration and movement phase, and drive NX to calculate the objective function value of each neighborhood point in turn. The first update unit is used to update the current point as the target neighbor point if the heat dissipation efficiency of the target neighbor point is better than that of the current point; if none of the neighbor points are better, the step size will be reduced by a first preset threshold to regenerate neighbor points for exploration. The verification unit is used to calculate the difference between the current point and the optimal solution of the previous round after a successful exploration move, in order to determine the mode direction, generate candidate points along the mode direction with the current step size, and verify the performance of the candidate points. The second update unit is used to update the current point if the heat dissipation efficiency reaches a preset value, and to increase the step size by a second preset threshold; if the performance of the candidate point is not better, it returns to the exploration and movement stage until the preset iteration stop condition is met.
8. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the program to implement the automated optimization method for flow channel parameters as described in any one of claims 1-4.
9. A non-volatile computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the automated optimization method for flow channel parameters as described in any one of claims 1-4.
10. A computer program product, comprising a computer program, characterized in that, The computer program is executed to implement the automated optimization method for flow channel parameters as described in any one of claims 1-4.