Simulation parameter optimization method, device and equipment based on APDL command stream
By introducing simulation parameter optimization methods based on APDL command flow in the simulation system, integrating global optimization algorithms and automating iterative optimization, the calculation complexity and resource consumption of simulation systems in the existing technology are solved, and a more efficient and flexible simulation process is achieved.
Patent Information
- Application Number
- CN202411731173.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, simulation systems are susceptible to limitations of computational complexity and resource consumption when facing complex designs, resulting in low degree of automation, low computing efficiency and lack of flexibility.
By providing a simulation parameter optimization method based on APDL command stream, using interactive ports to obtain design variables, constraints and objective functions, integrating global optimization algorithms, and automatically generating and updating parameterized simulation models through APDL command streams, realizing automated iterative optimization.
It improves the calculation efficiency and calculation accuracy of the simulation process, solves the problems of low degree of automation and low calculation efficiency, and enhances the flexibility of the simulation process.
Smart Images

Figure CN119578098A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electrical digital data processing, and in particular to a simulation parameter optimization method, device and equipment based on APDL command stream. Background Art
[0002] As the complexity of engineering design continues to increase, simulation technology has become one of the core means of complex system design and verification. In the fields of aerospace, automobile manufacturing, construction engineering, etc., engineers need to optimize models involving multiple design variables to meet different performance, cost and safety requirements. In order to meet this challenge, multi-parameter optimization simulation technology came into being.
[0003] Existing optimization processes and simulation systems are implemented by adjusting design variables and performing simulation tasks multiple times.
[0004] However, in the process of implementing the technical solution of the invention in the embodiments of the present application, the present application found that the above technology has at least the following technical problems: In the prior art, existing optimization processes and simulation systems are easily limited by computational complexity and resource consumption when facing complex designs. Engineers often need to spend a lot of time manually adjusting simulation parameters and performing multiple simulation calculations to obtain ideal results. This makes the simulation process cumbersome and error-prone, affecting design efficiency and simulation accuracy, and thus has problems such as low automation, low computational efficiency, and lack of flexibility. Summary of the invention
[0005] The embodiments of the present application provide a simulation parameter optimization method, device and equipment based on APDL command stream, thereby solving the problems of low automation, low computational efficiency and lack of flexibility in the prior art, and optimizing the computational efficiency and accuracy of the simulation process.
[0006] The embodiment of the present application provides a simulation parameter optimization method based on the APDL command stream, comprising the following steps: obtaining the design variables, constraints and objective functions defined by the APDL command stream through an interactive port, and performing parametric modeling to generate a parametric simulation model; using the design variables as the optimization target object, thereby integrating the global optimization algorithm, and updating the design variables according to the global optimization algorithm, automatically generating a new parametric simulation model with the updated design variables through the APDL command stream, and performing simulation and automated iterative optimization to obtain iterative optimization results; judging according to the iterative optimization results, if the iterative optimization results are converged, terminating the iterative optimization and generating simulation results, and if the iterative optimization results are divergent, performing cyclic iterative optimization until the iterative optimization results are converged; when the cyclic iterative optimization terminates, extracting the key performance indicator data in the simulation results, generating a multi-dimensional analysis report, and displaying the optimal design variable combination and iterative optimization results in the form of visual charts.
[0007] Furthermore, the design variables, constraints and objective functions defined by the APDL command stream are obtained through the interactive port, and parametric modeling is performed to generate a parametric simulation model. The specific steps include: setting the design variables in the simulation through the parameter command in the APDL command stream, and assigning the initial value of each design variable to the parametric simulation model; setting constraints on the design variables and limiting the value range of the variables through the constraint command in the APDL command stream; setting the optimized objective function through the get command in the APDL command stream; and executing the APDL command stream to perform parametric modeling and generate a parametric simulation model.
[0008] Furthermore, the design variables are taken as optimization target objects, thereby integrating the global optimization algorithm, and the specific steps include: obtaining matching rules preset in the database, and automatically selecting the global optimization algorithm according to the preset matching rules according to the design variable values.
[0009] Furthermore, the method of updating the design variables according to the global optimization algorithm and automatically generating a new parametric simulation model with the updated design variables through the APDL command stream specifically includes: according to the global optimization algorithm, taking the design variables in the parametric modeling as the target variables of the global optimization algorithm, randomly generating a set of initial design variable values, and passing them as input to the APDL command stream; performing the initial simulation through the APDL command stream to obtain the initial simulation results, and using them as the first round of optimization feedback values to perform multiple rounds of simulation optimization; in each round of simulation optimization, calculating the simulation fitness according to the simulation results of the previous round using the global optimization algorithm; obtaining a simulation fitness threshold preset in the database, and screening out the design variable combination of the simulation fitness if the simulation fitness is above the simulation fitness threshold, and excluding the design variable combination of the simulation fitness if the simulation fitness is less than the simulation fitness threshold; using the crossover operation to generate a new design variable combination from the screened design variable combination, and retaining the design variable combination if the generated new design variable combination is within the database setting range; performing another simulation by calling the APDL command stream to obtain the simulation calculation results, and generating a new parametric simulation model.
[0010] Furthermore, the execution of simulation and automated iterative optimization to obtain iterative optimization results includes the following specific steps: automatically recording the output key performance data and simulation results of each round of simulation optimization; after the simulation results of each round of simulation optimization are fed back, using a global optimization algorithm to analyze the changing trend of the key performance data, and updating the design variable values in real time accordingly; making a judgment based on the key performance data, if the key performance data of the simulation results exceed the allowable range preset in the database, then inputting the last round of key performance data output by the parameterized simulation model into a new parameterized simulation model as feedback, adjusting the relevant design variables using a global optimization algorithm, and re-executing the simulation and automated iterative optimization, if a certain key performance data of the simulation results is within the allowable range preset in the database, then the global optimization algorithm keeps the design variable unchanged; during the simulation process, the updated design variable values in each round are automatically saved and used to generate the final optimization solution.
[0011] Furthermore, the key performance indicator data in the simulation results are extracted to generate a multi-dimensional analysis report, and the specific steps include: after the automated simulation process is completed, the key performance data and data types in all automated simulation results are automatically extracted; the data type is analyzed to determine whether it meets the preset data type optimization goal, if it meets the preset data type optimization goal, a visual output is performed, if it does not meet the preset data type optimization goal, the global optimization algorithm is re-executed to adjust the design variables; the extracted key performance data is compared with the preset key performance data optimization goal, if the extracted key performance data meets the preset key performance data optimization goal, the design variable combination is recorded as the optimal solution, if the extracted key performance data does not meet the preset key performance data optimization goal, the influence of each design variable on the simulation results is analyzed, and the design variable combination as an alternative solution is output; all simulation data are summarized to generate a multi-dimensional optimization report, and the key performance data is presented in the form of a chart; the optimization report and the design variable combination of the optimal solution are saved and named as the final simulation result file.
[0012] Furthermore, the data type is analyzed to determine whether it meets the preset data type optimization goal. The specific steps include: after the simulation process is completed, automatically generating a corresponding image of key performance data to intuitively display the performance indicators of each round of simulation results; counting the key performance data in each round of simulation, and calculating the mean and variance of the key performance data in each round of simulation to determine whether it meets the preset optimization goal. If the corresponding image of the key performance data shows unevenness, re-execute the global optimization algorithm and adjust the design variables. If the mean and variance of the key performance data both meet the preset optimization criteria, then the design variable combination is recorded as the optimal solution; summarize all design variable combinations that meet the optimization criteria, and display the simulation iterative optimization results in multi-dimensional data charts.
[0013] Furthermore, the optimal design variable combination and iterative optimization results are displayed in the form of visual charts, and the specific steps include: generating a visual interface from the simulation results to display key performance data; if there are multiple groups of optimal solutions and suboptimal solutions, the performance indicators of each group of solutions are displayed in turn; the trend curves of all key performance data are presented in a graphical manner, and the key performance data of the optimal solution and suboptimal solution are saved.
[0014] The embodiment of the present application provides a simulation parameter optimization device based on an APDL command stream, including: a parameterized simulation model establishment module, which is used to obtain the design variables, constraints and objective functions defined by the APDL command stream through an interactive port, and perform parameterized modeling to generate a parameterized simulation model; an optimization algorithm integration module, which is used to use the design variables as optimization target objects, thereby integrating the global optimization algorithm, and updating the design variables according to the global optimization algorithm, automatically generating a new parameterized simulation model with the updated design variables through the APDL command stream, and performing simulation and automated iterative optimization to obtain iterative optimization results; an automated simulation module, which is used to make judgments based on the iterative optimization results, and if the iterative optimization results are converged, terminate the iterative optimization and generate simulation results, and if the iterative optimization results are divergent, perform cyclic iterative optimization until the iterative optimization results are converged; an iterative optimization result analysis module, which is used to extract key performance indicator data in the simulation results when the cyclic iterative optimization is terminated, generate a multi-dimensional analysis report, and display the optimal design variable combination and iterative optimization results in the form of visual charts.
[0015] An electronic device comprises: a processor and a memory for storing instructions executable by the processor; when the processor is configured to execute the instructions, the electronic device implements the above-mentioned simulation parameter optimization method based on APDL command stream.
[0016] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. The present invention provides a simulation parameter optimization method based on APDL command flow, which integrates the global optimization algorithm with the automated simulation process of APDL command flow, so as to efficiently optimize the design variables as the optimization targets, thereby achieving the improvement of the computational efficiency of the simulation process and the optimization of the computational accuracy, and effectively solving the problems of low automation, low computational efficiency and lack of flexibility in the prior art.
[0017] 2. The present invention obtains the design variables, constraints and objective functions defined by the APDL command stream through the interactive port, and combines the simulation results with multi-dimensional analysis, so as to automatically generate and update the parameterized simulation model, and provide real-time feedback on the iterative optimization results, thereby realizing dynamic adjustment of the simulation model and improving the adaptability and flexibility of the simulation process.
[0018] 3. By displaying the optimal design variable combination and iterative optimization results in the form of visual charts, the changing trend of key performance data in the simulation process can be intuitively presented, thereby achieving effective analysis and decision support for the simulation iterative optimization results, and improving the data readability and applicability in the simulation optimization process. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A flow chart of a simulation parameter optimization method based on APDL command stream provided in an embodiment of the present application; Figure 2 A structural diagram of a simulation parameter optimization device based on APDL command stream provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] The embodiments of the present application provide a simulation parameter optimization method, device and equipment based on APDL command stream, which solves the problems of low automation, low computational efficiency and lack of flexibility in the prior art. The design variables, constraints and objective functions defined by the APDL command stream are obtained through an interactive port, and parametric modeling is performed to generate a parametric simulation model. The design variables are used as optimization target objects, thereby integrating a global optimization algorithm, and the design variables are updated according to the global optimization algorithm. A new parametric simulation model is automatically generated by using the updated design variables through the APDL command stream, and simulation and automated iterative optimization are performed to obtain iterative optimization results. A judgment is made based on the iterative optimization results. If the iterative optimization result is converged, the iterative optimization is terminated and a simulation result is generated. If the iterative optimization result is divergent, a cyclic iterative optimization is performed until the iterative optimization result is converged. When the cyclic iterative optimization is terminated, key performance indicator data in the simulation results are extracted, a multi-dimensional analysis report is generated, and the optimal design variable combination and iterative optimization results are displayed in the form of visual charts, thereby optimizing the computational efficiency and computational accuracy of the simulation process.
[0021] The technical solution in the embodiment of the present application is to solve the above-mentioned problems of low automation, low computational efficiency and lack of flexibility. The overall idea is as follows: obtain the design variables, constraints and objective functions defined by the APDL command stream through the interactive port, perform parametric modeling, and generate a parametric simulation model; use the design variables as the optimization target object, thereby integrating the global optimization algorithm, and update the design variables according to the global optimization algorithm, automatically generate a new parametric simulation model through the APDL command stream for the updated design variables, and perform simulation and automated iterative optimization to obtain iterative optimization results; judge according to the iterative optimization results, if the iterative optimization results are converged, then end the iterative optimization and generate simulation results, if the iterative optimization results are divergent, then perform cyclic iterative optimization until the iterative optimization results are converged; when the cyclic iterative optimization terminates, extract the key performance indicator data in the simulation results, generate a multi-dimensional analysis report, and display the optimal design variable combination and iterative optimization results in the form of visual charts, so as to achieve the optimization of the computational efficiency and computational accuracy of the simulation process. In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings in the specification and specific implementation methods.
[0022] like Figure 1 As shown, it is a flow chart of a simulation parameter optimization method based on APDL command stream provided by an embodiment of the present application, the method is applied to a simulation parameter optimization device based on APDL command stream, the method comprises the following steps: obtaining the design variables, constraints and objective functions defined by the APDL command stream through the interactive port, and performing parametric modeling to generate a parametric simulation model; taking the design variables as the optimization target objects, thereby integrating the global optimization algorithm, and updating the design variables according to the global optimization algorithm, automatically generating a new parametric simulation model with the updated design variables through the APDL command stream, and performing simulation and automated iterative optimization to obtain iterative optimization results; judging according to the iterative optimization results, if the iterative optimization results are converged, then terminating the iterative optimization and generating simulation results, if the iterative optimization results are divergent, then performing cyclic iterative optimization until the iterative optimization results are converged; when the cyclic iterative optimization is terminated, extracting the key performance indicator data in the simulation results, generating a multi-dimensional analysis report, and displaying the optimal design variable combination and iterative optimization results in the form of visual charts.
[0023] In this embodiment, it should be noted that this solution can realize automated iterative optimization. For example, in the scenario of wind turbine blade structure optimization, in the design of wind turbines, wind turbine blades are key components, and their structural performance directly affects the power generation efficiency and stability of the entire device. The optimized design of wind turbine blades needs to reduce weight as much as possible, reduce costs, and ensure durability while maintaining structural strength and rigidity. In existing methods, engineers need to perform simulation optimization by gradually adjusting design variables, while the present invention can be used to automate the optimization design process. The present invention transforms the traditional manual debugging optimization process into automated multi-parameter simulation optimization through automated iterative optimization, thereby improving design efficiency and accuracy. Through the optimization analysis report, engineers can quickly obtain blade structural parameters that meet the requirements, and further improve the power generation efficiency and reliability of wind turbines.
[0024] It should be noted that APDL (full name: ANSYS Parametric Design Language) command flow is a programming language used in ANSYS software, which allows users to define design variables, constraints, objective functions, and perform tasks such as parametric modeling, simulation calculations, and post-processing by writing scripts. Global optimization algorithms include: genetic algorithm, neural network optimization algorithm, simulated annealing algorithm, ant clustering algorithm, etc.
[0025] Furthermore, the design variables, constraints and objective functions defined by the APDL command stream are obtained through the interactive port, and parametric modeling is performed to generate a parametric simulation model. The specific steps include: setting the design variables in the simulation through the parameter command in the APDL command stream, and assigning the initial value of each design variable to the parametric simulation model; setting constraints on the design variables and limiting the value range of the variables through the constraint command in the APDL command stream; setting the optimization objective function through the get command in the APDL command stream; and executing the APDL command stream to perform parametric modeling and generate a parametric simulation model.
[0026] In this embodiment, it should be noted that the method of executing the APDL command stream for parametric modeling and generating a parametric simulation model is: using APDL commands for implementation, and some code examples are as follows: "*SET,b,10;*SET,c_root,2;*SET,c_tip,1; / PREP7(;*SET,n_points,10;*DO,i,0,n_points;x=(i / n_points)*b;c=c_roo t-(c_root-c_tip)*(i / n_points);*GET,y,NODE,i+1,Y;NODE,i+1,x,(c / 2),0;NODE,i+1+n_points,x,-(c / 2),0;*ENDDO”.
[0027] It should be noted that APDL commands can be used to set variables and assign initial values to each design variable, such as material properties, geometric dimensions, etc. The initial value setting is to provide a calculation starting point so that the optimization algorithm has a reference basis for subsequent adjustments. Constraints are the definition of the value range or physical limitations of design variables, such as the stress upper limit or size range of materials. Setting these conditions can ensure that the simulation calculation meets the actual working conditions and design specifications, and avoid invalid or unreasonable design parameter combinations. The objective function is an evaluation criterion in the optimization process, which is used to evaluate the advantages and disadvantages of different design variable combinations, such as minimizing material weight or maximizing structural strength. The objective function is the core basis for the optimization algorithm to seek the optimal solution in multiple rounds of iterations. After the above parameters are set, parametric modeling is performed by running the APDL command stream. Here, "APDL command stream" refers to a series of automatically executed instructions, which consists of a piece of code that can generate simulation models step by step, apply design variables, constraints and objective functions. This process does not require manual input, and can directly generate parameterized simulation models, improving simulation efficiency and accuracy. The parameterized simulation model is a model file generated based on the above variables, constraints and objective functions, which can be used for subsequent optimization. The model created through the APDL command stream can be automatically updated as the design variables change. Therefore, the model has high flexibility and can be used repeatedly to support iterative simulation in the global optimization algorithm.
[0028] Using the APDL command stream for parametric modeling, you can quickly define and modify design variables without manually adjusting the model, shortening the modeling time and improving work efficiency. Through parametric definition, you can easily adapt to different design variables and constraints. This allows the optimization process to be flexibly adjusted to find the optimal solution. After the design variables, constraints, and objective functions are defined through the APDL command stream, the optimization iteration can be automated. This reduces manual intervention and improves the reliability and accuracy of the optimization process. Using the APDL command stream for modeling and optimization, you can easily record the entire process. It helps with subsequent analysis and reproduction of results, ensuring the repeatability and traceability of the research. The APDL command stream supports batch operations and can handle a large number of design variables and constraints. This gives it an advantage in large-scale optimization problems and enables efficient finding of the global optimal solution. Through automation and parameterization, the risk of errors caused by manual operations is reduced. It helps to improve the accuracy and reliability of simulation results.
[0029] Furthermore, the design variables are taken as optimization target objects, thereby integrating the global optimization algorithm. The specific steps include: obtaining the matching rules preset in the database, and automatically selecting the global optimization algorithm according to the preset matching rules according to the design variable values.
[0030] In this embodiment, it should be noted that the global optimization algorithm is automatically selected according to the design variable values using the preset matching rules. The steps are: read the value of each design variable from the database, and screen the appropriate optimization algorithm according to the preset rules. For example, for situations involving multi-objective optimization, the genetic algorithm is automatically matched, and the simulated annealing algorithm is selected in the single-objective case. After completing the algorithm selection, the matching result is used as the optimization strategy for the current design variable combination.
[0031] Randomly generating initial design variable values helps to explore a wider solution space during the optimization process and increase the possibility of finding the global optimal solution. At the same time, this also provides a diversified basis for subsequent crossover operations. Through multiple rounds of simulation optimization, the global optimal solution can be gradually approached. Each round of optimization is adjusted based on the results of the previous round. Through iteration, it helps to gradually narrow the scope of the solution space and improve the optimization accuracy. Simulation fitness is an important indicator to measure the quality of design variable combinations. By calculating simulation fitness, the performance of different design variable combinations can be objectively evaluated, providing a basis for subsequent screening and crossover operations. Screening out design variable combinations with simulation fitness above the preset threshold helps to retain solutions with better performance. At the same time, range checking of the generated new design variable combinations can ensure the feasibility of the solution and avoid invalid or illegal solutions. Crossover operation is an important step in global optimization algorithms such as genetic algorithms. By combining the advantages of different design variable combinations, new and potentially better solutions can be generated. Regenerating the parameterized simulation model and calculating the simulation results can further verify the performance of the new solution. Objective function evaluation is a key step to determine whether the iterative optimization results meet the requirements. Through convergence judgment, it can be determined whether the optimization goal has been achieved, thereby deciding whether to terminate the iterative process. This helps to avoid unnecessary computational waste and improve optimization efficiency. This process can improve optimization efficiency, enhance the quality of iterative optimization results, and increase flexibility.
[0032] Furthermore, the design variables are updated according to the global optimization algorithm, and the updated design variables are automatically used to generate a new parametric simulation model through the APDL command stream, specifically including: according to the global optimization algorithm, the design variables in the parametric modeling are used as the target variables of the global optimization algorithm, a set of initial design variable values are randomly generated, and passed as input to the APDL command stream; the initial simulation is performed through the APDL command stream to obtain the initial simulation results, and the initial simulation results are used as the first round of optimization feedback values to perform multiple rounds of simulation optimization; in each round of simulation optimization, the simulation fitness is calculated according to the simulation results of the previous round using the global optimization algorithm; the simulation fitness threshold preset in the database is obtained, if the simulation fitness is above the simulation fitness threshold, the design variable combination of the simulation fitness is screened out, if the simulation fitness is less than the simulation fitness threshold, the design variable combination of the simulation fitness is excluded; the crossover operation is used to generate a new design variable combination from the screened design variable combination, if the generated new design variable combination is within the database setting range, the design variable combination is retained; the simulation is performed again by calling the APDL command stream to obtain the simulation calculation results, and a new parametric simulation model is generated.
[0033] In this embodiment, it should be noted that the principle of the global optimization algorithm is that after an iterative calculation, the stress state, temperature state, and deformation of the model will change. The deformation of the model before and after the deformation is recorded. Part of the command flow is as follows: *DO,I,1,NNODE; E(I)=SQRT((POINT(I,1)-NX(I)-UX(I))**2+(POINT(I,2)-NY(I)-UY(I))+(POINT(I,3)-NY(I)-UY(I))); *ENDDO; *VSCFUN,ME,MAX,E (ME is the calculated parameter. If the parameter does not meet the requirements, this process is repeated until it meets the requirements. Here, ME represents the deformation); when the model quantity meets a certain requirement (this requirement is set according to the actual situation), the iterative calculation is no longer performed.
[0034] It should be noted that the crossover operation refers to a method of generating new combinations of design variables. Generally, there are single-point crossover and two-point crossover. Single-point crossover means: in the initial design variable combination, randomly select a crossover point and exchange the part of the design combination after that point. Two-point crossover means setting an additional random crossover point and exchanging the information in the design combination again.
[0035] It should be noted that according to the global optimization algorithm, the design variables in the parametric modeling are used as the target variables of the global optimization algorithm, which specifically includes: optimizing the combination of design variables according to the characteristics of the algorithm (such as the crossover and mutation operations of the genetic algorithm), adjusting the design variables according to the feedback of the global optimization algorithm in each round of iteration, until the optimal variable combination that meets the requirements of the simulation model is found. The simulation fitness is calculated based on the results of the previous round of simulation using the global optimization algorithm. The specific steps include: performing the initial simulation, recording the output key performance data as the fitness, calculating the fitness change after each round of iteration, and selecting the appropriate design variable combination according to the fitness level to ensure that the optimization process meets the requirements.
[0036] The crossover operation is used to generate new design variable combinations from the screened design variable combinations. The specific steps include: selecting design variable combinations with high fitness, and then splitting and recombining the design variable combinations with high fitness into new combinations. The generated new combinations are verified in the database to see whether they meet the set range, thereby ensuring the validity of the design variable combinations.
[0037] High fitness means that the current optimization target is excellent and meets the target requirements. High fitness refers to the parametric modeling information that is closest to the final model change. The disassembly and reorganization here are similar to the crossover operation described in the previous article. Both are for performing a random shuffling operation to recombine the already excellent prediction targets and then perform simulation operations.
[0038] After each round of optimization iteration, the APDL command stream will dynamically generate a new simulation model file based on the current design variable values. This ensures that the simulation model is consistent with the state of the current optimization iteration, providing an accurate basis for subsequent simulation calculations. When the APDL command is called to perform a simulation task, the generated simulation model file will be loaded and the simulation calculation will be run. After the simulation is completed, the APDL command will extract key performance data such as stress, displacement, and frequency from the simulation output. During the simulation process, all stress and displacement data will be automatically saved. These data are not only used for performance evaluation of the current round, but will also be fed back to the global optimization algorithm as an important reference for updating design variables in subsequent iterations. The entire automated simulation process is a cyclic iterative process. In each round of iteration, a new simulation model will be generated based on the current design variable values, simulation calculations will be performed, key performance data will be extracted, and judgments will be made. If the preset goals are not met, the design variables will be updated and the next round of iterations will continue. This process will continue until a design variable combination that meets the optimization requirements is found.
[0039] Furthermore, simulation and automated iterative optimization are performed to obtain iterative optimization results. The specific steps include: automatically recording the output key performance data and simulation results of each round of simulation optimization; after the simulation results of each round of simulation optimization are fed back, using the global optimization algorithm to analyze the change trend of the key performance data, and updating the design variable values in real time accordingly; judging based on the key performance data, if the key performance data of the simulation results exceed the allowable range preset in the database, then the last round of key performance data output by the parameterized simulation model is input as feedback into the new parameterized simulation model, and the global optimization algorithm is used to adjust the relevant design variables and re-execute the simulation and automated iterative optimization. If a key performance data of the simulation results is within the allowable range preset in the database, the global optimization algorithm keeps the design variable unchanged; during the simulation process, the updated design variable values in each round are automatically saved and used to generate the final optimization solution.
[0040] In this embodiment, it should be noted that the global optimization algorithm is used to analyze the changing trend of key performance data. The specific steps are: analyze the changes in key data according to the results of the previous round of optimization, determine whether the design variables need to be adjusted, and dynamically adjust the design variable values during the simulation process to ensure that the key performance indicators gradually approach the optimal solution. If they are far away from the optimal solution, adjustments need to be made.
[0041] Use the global optimization algorithm to adjust the relevant design variables and re-execute the simulation and automated iterative optimization, including obtaining relevant design variables such as deformation, stress, temperature, etc., and recording and feeding back the relevant design variables to the optimization algorithm for subsequent iterative optimization; analyze the relevant design variables, determine the trend of the relevant design variables, and determine the range of the relevant design variables. If the relevant design variables exceed the preset allowable range, the value of the design variable will be adjusted according to these data. The adjusted value of the design variable will be input into the parametric simulation model, and the simulation calculation will continue. The simulation results will be fed back to the optimization algorithm again, and then the iteration and optimization operations will continue.
[0042] The global optimization algorithm is used to adjust the relevant design variables and re-execute the simulation and automated iterative optimization, including: determining the adjusted design variable combination based on the feedback key data, passing the combination to the APDL command stream to regenerate the simulation model, and performing the next round of optimization calculations until the simulation results converge.
[0043] After each round of simulation results are fed back, the global optimization algorithm will use the recorded key performance data, such as the trend of stress and displacement, to evaluate the performance of the current design variable combination. By analyzing the trend of change, the global optimization algorithm can identify the impact of design variables on performance and analyze whether there is interaction or redundancy between design variables, thereby providing guidance for subsequent design variable updates. If the displacement value of the simulation result is within the allowable range preset in the database, it means that the current design variable combination performs well in terms of structural deformation. At this time, the global optimization algorithm keeps these design variables unchanged to save computing resources and time. By integrating the global optimization algorithm and the automated simulation process, the process can handle complex design variables and constraints and support the solution of complex engineering problems.
[0044] It should also be noted that the global optimization algorithm can identify the impact of design variables on performance and analyze whether there is interaction or redundancy between design variables, including: through round-by-round iterations and fitness evaluation, the global optimization algorithm can identify the impact intensity of each design variable on the optimization target. If a variable is found to have a significant impact on performance indicators in multiple rounds of simulation, the variable is judged to be a key variable and needs to be optimized.
[0045] Furthermore, the key performance indicator data in the simulation results are extracted to generate a multi-dimensional analysis report. The specific steps include: after the automated simulation process is completed, the key performance data and data types in all automated simulation results are automatically extracted; the data type is analyzed to determine whether it meets the preset data type optimization goal. If it meets the preset data type optimization goal, a visual output is performed; if it does not meet the preset data type optimization goal, the global optimization algorithm is re-executed to adjust the design variables; the extracted key performance data is compared with the preset key performance data optimization goal. If the extracted key performance data meets the preset key performance data optimization goal, the design variable combination is recorded as the optimal solution. If the extracted key performance data does not meet the preset key performance data optimization goal, the influence of each design variable on the simulation results is analyzed, and the design variable combination as an alternative solution is output; all simulation data are summarized to generate a multi-dimensional optimization report, and the key performance data is presented in the form of a chart; the optimization report and the design variable combination of the optimal solution are saved and named as the final simulation result file.
[0046] In this embodiment, through multi-dimensional analysis, the changing trend and distribution characteristics of the simulation results, as well as the influence of each design variable on the simulation results, can be fully understood, thereby improving the comprehensiveness and accuracy of the analysis. The final simulation result file provides comprehensive and accurate information support for decision makers, which helps decision makers make scientific and reasonable decisions. Through automated data extraction and analysis, as well as visual output and output of alternative solutions, the time of manual intervention is greatly reduced, and the efficiency and effect of optimization are improved. Through comprehensive analysis and optimization of simulation results, it can be ensured that the engineering design meets the predetermined performance indicators and safety requirements, and the reliability and safety of the engineering design are improved.
[0047] Furthermore, the data type is analyzed to determine whether it meets the preset data type optimization goals. The specific steps include: after the simulation process is completed, automatically generate images corresponding to key performance data to intuitively display the performance indicators of each round of simulation results; count the key performance data in each round of simulation, and calculate the mean and variance of the key performance data in each round of simulation to determine whether it meets the preset optimization goals. If the images corresponding to the key performance data show unevenness, re-execute the global optimization algorithm and adjust the design variables. If the mean and variance of the key performance data meet the preset optimization criteria, then the design variable combination is recorded as the optimal solution; summarize all design variable combinations that meet the optimization criteria, and display the simulation iterative optimization results in multi-dimensional data charts.
[0048] In this embodiment, it should be noted that re-executing the global optimization algorithm and adjusting the design variables specifically include: first analyzing the source of unevenness, such as whether a certain variable has a significant impact or there is a value deviation, and adjusting the value range of related variables or adding constraints during re-optimization to ensure that the simulation results are evenly distributed within the expected range.
[0049] The final impact of design variables on simulation results can be analyzed from the following aspects: slightly adjust the value of the design combination variable to observe which variable in the design variable combination has the greatest impact on the simulation results; analyze the results of the variable combination in the design variable combination to find out the combination with the greatest impact on the results. Some variables may interact with each other. By analyzing the interaction effects between these variables, we can find out which variable combinations cause uneven changes; draw a relationship diagram between design variables and simulation results, and analyze the distribution of simulation results under different variable combinations; test the simulation conditions to ensure that the setting of boundary conditions is in line with the actual situation.
[0050] After the simulation process is completed, stress distribution graphs and displacement field graphs are automatically generated. These graphs show the performance indicators of each round of simulation results in an intuitive way, such as the distribution of stress and the size and direction of displacement. The generation of stress distribution graphs and displacement field graphs is based on key performance data in the simulation results, such as stress values and displacement values. These graphs not only help to quickly understand the overall situation of the simulation results, but also provide a visual reference for subsequent analysis and optimization. The stress values and displacement values in each round of simulation are counted, including statistics such as maximum value, minimum value, and average value. These statistics reflect the distribution characteristics and change trends of stress and displacement in the simulation results. By comparing the statistics of different rounds, we can understand the impact of design variable adjustment on the simulation results, as well as the progress and trend of the optimization process. After counting the stress values and displacement values in each round of simulation, the mean and variance of these values are calculated, where the mean reflects the average level of the simulation results and the variance reflects the degree of discreteness of the simulation results. The calculated mean and variance are compared with the preset optimization target. If both the mean and variance meet the preset optimization criteria, it means that the current design variable combination performs well in performance and can be recorded as the optimal solution. If the mean and variance do not meet the preset optimization criteria, or the stress distribution diagram and displacement field diagram show unevenness, it means that there are performance problems with the current design variable combination, and it is necessary to re-execute the global optimization algorithm, adjust the design variables, and re-simulate. When it is found that the current design variable combination does not meet the optimization goal, re-execute the global optimization algorithm and adjust the values of the design variables based on the key performance data and statistics in the simulation results. The purpose of adjusting the design variables is to gradually approach the global optimal solution and improve the performance of the simulation results. During the adjustment process, multiple factors need to be considered, including the value range of the design variables, constraints, optimization goals, etc.
[0051] During the optimization process, all combinations of design variables that meet the optimization criteria are summarized. These combinations are obtained by adjusting the design variables in different rounds of simulation, and they all meet the preset optimization goals in terms of performance. The simulation iterative optimization results of these design variable combinations are presented in the form of multi-dimensional data charts. These charts include stress distribution diagrams, displacement field diagrams, statistical comparison diagrams, etc., which intuitively show the changing trends and final results of the optimization process. By comparing the simulation iterative optimization results of different design variable combinations, we can further analyze the impact of each design variable on performance, as well as the key factors and laws in the optimization process.
[0052] Furthermore, the optimal design variable combination and iterative optimization results are displayed in the form of visual charts. The specific steps include: generating a visual interface from the simulation results to display key performance data; if there are multiple groups of optimal solutions and suboptimal solutions, the performance indicators of each group of solutions are displayed in turn; the trend curves of all key performance data are presented in a graphical manner, and the key performance data of the optimal solution and suboptimal solution are saved.
[0053] In this embodiment, after the simulation process is completed, a visualization interface is automatically generated based on the optimal design variable combination and the simulation results. This interface is used to intuitively display key performance data, such as stress, displacement, etc. The visualization interface includes a variety of chart types, such as bar charts, line charts, and scatter charts. The specific selection depends on the type of data to be displayed and the characteristics of the design to display the appropriate chart type.
[0054] If there are multiple optimal solutions or suboptimal solutions during the optimization process, the visualization page can display the performance indicators of each solution in turn, helping users compare the pros and cons of different solutions and make more informed decisions. When displaying performance indicators, different solutions are distinguished by using different colors, shapes or marks so that users can easily distinguish them. At the same time, detailed information about each solution group can also be provided, such as the values of the design variables, the statistics of the simulation results, etc., so that users can further understand the characteristics of each solution group.
[0055] like Figure 2As shown, it is a structural diagram of a simulation parameter optimization device based on an APDL command stream provided in an embodiment of the present application. A simulation parameter optimization device based on an APDL command stream provided in an embodiment of the present application includes: a parameterized simulation model establishment module, which is used to obtain the design variables, constraints and objective functions defined by the APDL command stream through an interactive port, and perform parameterized modeling to generate a parameterized simulation model; an optimization algorithm integration module, which is used to take the design variables as the optimization target objects, thereby integrating the global optimization algorithm, and updating the design variables according to the global optimization algorithm, automatically generating a new parameterized simulation model with the updated design variables through the APDL command stream, and performing simulation and automated iterative optimization to obtain iterative optimization results; an automated simulation module, which is used to make judgments based on the iterative optimization results. If the iterative optimization results are converged, the iterative optimization is terminated and the simulation results are generated. If the iterative optimization results are divergent, cyclic iterative optimization is performed until the iterative optimization results are converged; an iterative optimization result analysis module, which is used to extract key performance indicator data in the simulation results when the cyclic iterative optimization is terminated, generate a multi-dimensional analysis report, and display the optimal design variable combination and iterative optimization results in the form of visual charts.
[0056] An embodiment of the present application also provides an electronic device, comprising: a processor and a memory for storing instructions executable by the processor; when the processor is configured to execute the instructions, the electronic device implements a simulation parameter optimization method based on an APDL command stream.
[0057] In summary, this embodiment integrates the global optimization algorithm with the automated simulation process of the APDL command flow, thereby efficiently optimizing the design variables as optimization targets, thereby achieving improved computational efficiency and optimized computational accuracy of the simulation process, and effectively solving the problems of low automation, low computational efficiency and lack of flexibility in the prior art.
[0058] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0059] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0060] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0061] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0062] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0063] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A simulation parameter optimization method based on APDL command stream, characterized in that: The following steps are involved: Obtain the design variables, constraints and objective functions defined by the APDL command stream through the interactive port, perform parametric modeling, and generate a parametric simulation model; The design variables are taken as optimization target objects, and the global optimization algorithm is integrated therefrom. The design variables are updated according to the global optimization algorithm. The updated design variables are automatically generated into a new parametric simulation model through the APDL command stream, and simulation and automated iterative optimization are performed to obtain iterative optimization results. According to the iterative optimization results, if the iterative optimization results are converged, the iterative optimization is terminated and the simulation results are generated. If the iterative optimization results are divergent, the iterative optimization is repeated until the iterative optimization results are converged. When the iterative optimization cycle ends, the key performance indicator data in the simulation results are extracted, a multi-dimensional analysis report is generated, and the optimal design variable combination and iterative optimization results are displayed in the form of visual charts.
2. A simulation parameter optimization method based on APDL command stream as claimed in claim 1, characterized in that: The step of obtaining the design variables, constraints and objective functions defined by the APDL command stream through the interactive port, performing parametric modeling and generating a parametric simulation model specifically includes: The design variables in the simulation are set through the parameter command in the APDL command stream, and the initial values of each design variable are assigned to the parameterized simulation model; Through the constraint commands of the APDL command stream, set constraints on the design variables to limit the range of variable values; Set the optimization objective function through the get command in the APDL command stream; Execute APDL command stream for parametric modeling and generate parametric simulation model.
3. A simulation parameter optimization method based on APDL command stream as claimed in claim 2, characterized in that: The design variables are taken as optimization target objects, thereby integrating the global optimization algorithm. The specific steps include: obtaining matching rules preset in the database, and automatically selecting the global optimization algorithm according to the preset matching rules according to the design variable values.
4. A simulation parameter optimization method based on APDL command stream as claimed in claim 1, characterized in that: The updating of the design variables according to the global optimization algorithm and automatically generating a new parameterized simulation model using the updated design variables through the APDL command stream specifically include: According to the global optimization algorithm, the design variables in the parametric modeling are used as the target variables of the global optimization algorithm, and a set of initial design variable values are randomly generated and passed to the APDL command stream as input; The initial simulation is performed through the APDL command stream to obtain the initial simulation results, which are used as the first round of optimization feedback values for multiple rounds of simulation optimization. In each round of simulation optimization, the global optimization algorithm is used to calculate the simulation fitness based on the results of the previous round of simulation; Obtaining a preset simulation fitness threshold in a database, and if the simulation fitness is above the simulation fitness threshold, screening out the design variable combination of the simulation fitness; if the simulation fitness is less than the simulation fitness threshold, excluding the design variable combination of the simulation fitness; Use the crossover operation to generate a new design variable combination from the screened design variable combination. If the generated new design variable combination is within the set range of the database, then the design variable combination is retained; By calling the APDL command stream to perform simulation again, the simulation calculation results are obtained and a new parameterized simulation model is generated.
5. A simulation parameter optimization method based on APDL command stream as claimed in claim 4, characterized in that: The execution simulation and automated iterative optimization are performed to obtain iterative optimization results, and the specific steps include: Automatically record the output key performance data and simulation results of each round of simulation optimization; After the simulation results of each round of simulation optimization are fed back, the global optimization algorithm is used to analyze the changing trends of key performance data, and the design variable values are updated in real time accordingly; Based on the key performance data, if the key performance data of the simulation result exceeds the preset allowable range in the database, the last round of key performance data output by the parameterized simulation model is input into the new parameterized simulation model as feedback, and the relevant design variables are adjusted by the global optimization algorithm, and the simulation and automated iterative optimization are re-executed. If a certain key performance data of the simulation result is within the preset allowable range in the database, the global optimization algorithm keeps the design variable unchanged; During the simulation process, the updated design variable values are automatically saved in each round and used to generate the final optimization solution.
6. A simulation parameter optimization method based on APDL command stream as claimed in claim 1, characterized in that: The steps of extracting key performance indicator data from the simulation results and generating a multi-dimensional analysis report include: After the automated simulation process is completed, key performance data and data types from all automated simulation results are automatically extracted; Analyze the data type to determine whether it meets the preset data type optimization goal. If it does, perform visualization output. If it does not, re-execute the global optimization algorithm and adjust the design variables. The extracted key performance data are judged against the preset key performance data optimization target. If the extracted key performance data meets the preset key performance data optimization target, the design variable combination is recorded as the optimal solution. If the extracted key performance data does not meet the preset key performance data optimization target, the influence of each design variable on the simulation result is analyzed, and the design variable combination as an alternative solution is output; Summarize all simulation data, generate multi-dimensional optimization reports, and present key performance data in charts; Save the optimization report and the design variable combination of the optimal solution and name it as the final simulation result file.
7. A simulation parameter optimization method based on APDL command stream as claimed in claim 6, characterized in that: The data type is analyzed to determine whether it meets the preset data type optimization target, and the specific steps include: After the simulation process is completed, the corresponding images of key performance data are automatically generated to intuitively display the performance indicators of each round of simulation results; The key performance data in each round of simulation is counted, and the mean and variance of the key performance data in each round of simulation are calculated to determine whether it meets the preset optimization goal. If the corresponding image of the key performance data shows unevenness, the global optimization algorithm is re-executed to adjust the design variables. If the mean and variance of the key performance data meet the preset optimization criteria, the design variable combination is recorded as the optimal solution. Summarize all design variable combinations that meet the optimization criteria and display the simulation iterative optimization results in multi-dimensional data charts.
8. A simulation parameter optimization method based on APDL command stream as claimed in claim 1, characterized in that: The optimal design variable combination and iterative optimization results are presented in the form of visual charts, and the specific steps include: Generate a visual interface from simulation results to display key performance data; If there are multiple sets of optimal solutions and suboptimal solutions, the performance indicators of each set of solutions are displayed in turn; The trend curves of all key performance data are presented graphically, and the key performance data of the optimal solution and suboptimal solution are saved.
9. A simulation parameter optimization device based on APDL command stream, characterized in that: include: The parametric simulation model building module is used to obtain the design variables, constraints and objective functions defined by the APDL command stream through the interactive port, perform parametric modeling, and generate a parametric simulation model; The optimization algorithm integration module is used to take the design variables as the optimization target objects, thereby integrating the global optimization algorithm, and updating the design variables according to the global optimization algorithm. The updated design variables are automatically generated into a new parametric simulation model through the APDL command stream, and simulation and automated iterative optimization are performed to obtain iterative optimization results. The automatic simulation module is used to make judgments based on the iterative optimization results. If the iterative optimization results are converged, the iterative optimization is terminated and the simulation results are generated. If the iterative optimization results are divergent, the iterative optimization is performed cyclically until the iterative optimization results are converged. The iterative optimization result analysis module is used to extract key performance indicator data from the simulation results when the cyclic iterative optimization is terminated, generate a multi-dimensional analysis report, and display the optimal design variable combination and iterative optimization results in the form of visual charts.
10. An electronic device, comprising: a processor, a memory for storing instructions executable by the processor; When the processor is configured to execute the instructions, the electronic device implements the simulation parameter optimization method based on the APDL command stream as described in any one of claims 1 to 8.
Citation Information
Cited By
CAE simulation-based cold runner injection mold optimization system and method
CN121052165A