Parameter optimization method and device, computer device and storage medium

CN118016208BActive Publication Date: 2026-08-21TSINGHUA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410059665.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-16
Publication Date
2026-08-21
Estimated Expiration
2044-01-16

AI Technical Summary

Technical Problem

[0004]然而,目前的近似方法中,由于近似方法在将原始数据进行近似简化,会导致信息丢失或数据变化误差的问题,且建模工具操作复杂,进而导致参数优化的效果较差

Benefits of technology

[0068]上述参数优化方法、装置、计算机设备、存储介质和计算机程序产品,获取预设网格数量、目标脚本数据和预设建模工具;所述目标脚本数据包含环境构建脚本和参数设置脚本;根据所述预设网格数量、所述环境构建脚本和所述预设建模工具构建流域和网格,根据所述参数设置脚本获取流体特征参数,并根据所述流体特征参数、所述流域和所述网格构建目标仿真模型;所述网格包括目标微结构网格;基于所述目标仿真模型和预设优化算法,对所述目标仿真模型中的目标微结构网格对应的结构参数进行优化,得到优化完成的目标参数。采用本方法,通过预设网格数量将需要仿真处理的数据进行限制,并保证预设网格数量对于建模仿真的效果,通过脚本数据和预设建模工具对原始参数进行仿真,得到目标仿真模型,能够降低构建目标仿真模型的操作复杂度,该目标仿真模型能够准确反映微结构在目标仿真模型中的影响,使仿真结果更加准确地反映实际的微结构行为,进而通过预设优化算法对目标微结构网格对应的结构参数进行优化,提高优化完成的目标参数的效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118016208B_ABST
    Figure CN118016208B_ABST
Patent Text Reader

Abstract

The application relates to a parameter optimization method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: obtaining a preset grid quantity, target script data and a preset modeling tool; the target script data comprises an environment construction script and a parameter setting script; a flow domain and a grid are constructed according to the preset grid quantity, the environment construction script and the preset modeling tool; a fluid characteristic parameter is obtained according to the parameter setting script; and a target simulation model is constructed based on the fluid characteristic parameter, the flow domain and the grid; the grid comprises a target microstructure grid; structure parameters corresponding to the target microstructure grid in the target simulation model are optimized based on the target simulation model and a preset optimization algorithm, so that the target parameters are obtained after optimization. The method can improve the parameter optimization effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of microstructure simulation and optimization technology, and in particular to a parameter optimization method, apparatus, computer equipment, storage medium, and computer program product. Background Technology

[0002] With the development of microstructured materials, applications of drag reduction based on solid-liquid interfaces using microstructures are becoming increasingly common. However, microstructures have multiple parameters, and determining appropriate parameters is necessary to improve the drag reduction effect of solid-liquid interfaces.

[0003] In traditional simulation parameter optimization techniques, due to the large number of grid cells, dimensionality reduction is typically achieved through approximation methods, or Fourier transform is used for periodic problems to process the collected data and optimize parameters. Specifically, for dimensionality reduction, methods such as principal component analysis can be used to reduce the dimensionality of high-dimensional data to lower-dimensional data; for Fourier transform, time-domain data is converted to frequency-domain data. Then, based on the lower-dimensional or frequency-domain data, modeling and simulation are performed using modeling tools to obtain a simulation model, and the simulation parameters are optimized based on this model.

[0004] However, current approximation methods suffer from problems such as information loss or data variation errors due to the simplification of the original data, and the complex operation of modeling tools leads to poor parameter optimization results. Summary of the Invention

[0005] Therefore, it is necessary to provide a parameter optimization method, apparatus, computer device, computer-readable storage medium, and computer program product to address the aforementioned technical problems.

[0006] Firstly, this application provides a parameter optimization method, including:

[0007] Obtain the preset number of grids, target script data, and preset modeling tools; the target script data includes environment construction scripts and parameter setting scripts.

[0008] The watershed and grid are constructed according to the preset number of grids, the environment construction script, and the preset modeling tool. Fluid characteristic parameters are obtained according to the parameter setting script, and a target simulation model is constructed based on the fluid characteristic parameters, the watershed, and the grid. The grid includes a target microstructure grid.

[0009] Based on the target simulation model and the preset optimization algorithm, the structural parameters corresponding to the target microstructure mesh in the target simulation model are optimized to obtain the optimized target parameters.

[0010] In one embodiment, the environment construction script includes a watershed construction script and a grid partitioning script;

[0011] The step of constructing the watershed and grid according to the preset number of grids, the environment construction script, and the preset modeling tool includes:

[0012] The watershed parameters are obtained based on the watershed construction script, and the grid parameters are obtained based on the grid division script;

[0013] The watershed is constructed based on the watershed parameters and the preset modeling tool, and the grid is constructed based on the preset number of grids, the grid parameters, and the preset modeling tool.

[0014] In one embodiment, the preset optimization algorithm is a genetic algorithm;

[0015] The structural parameters corresponding to the target microstructure mesh in the target simulation model are optimized based on the target simulation model and the preset optimization algorithm to obtain the optimized target parameters, including:

[0016] Obtain the target optimization function;

[0017] The structural parameters corresponding to the target microstructure mesh in the target simulation model are encoded according to the chromosomes contained in the genetic algorithm to obtain the chromosomes corresponding to the structural parameters.

[0018] The chromosome is updated based on the chromosome and the target optimization function, and simulation is performed based on the updated chromosome until the simulation results meet the preset iteration conditions, thus obtaining the updated target parameters.

[0019] In one embodiment, updating the chromosome based on the chromosome and the target optimization function, and performing simulation based on the updated chromosome until the simulation results meet preset iteration conditions to obtain the updated target parameters, includes:

[0020] Based on the objective function and the preset screening algorithm, the parent chromosome is determined from among the multiple chromosomes;

[0021] The parent chromosomes are updated by crossover and mutation to obtain offspring chromosomes. The parent chromosomes and offspring chromosomes are then merged to obtain a new population containing multiple updated structural parameters.

[0022] Based on the parent chromosomes and offspring chromosomes contained in the new population, simulations were performed to obtain microstructure indices.

[0023] If the microstructure indicators do not meet the preset iteration conditions, the step of determining the parent chromosome from multiple chromosomes based on the objective function and the preset screening algorithm is executed.

[0024] If the microstructure indicators meet the preset iteration conditions, stop the iterative update of the chromosome, determine the target chromosome in the new population, and obtain the target parameters corresponding to the target chromosome.

[0025] In one embodiment, before acquiring the preset number of grids, target script data, and preset modeling tools, the method further includes:

[0026] Obtain the user's watershed modeling operations, grid modeling operations, and target variable parameters; the watershed modeling operations include the setting of watershed modeling parameters, and the grid modeling operations include the setting of grid modeling parameters;

[0027] The target script data is constructed based on the watershed modeling operation, the grid modeling operation, the target variable parameters, and the preset automated tools.

[0028] In one embodiment, the target variable parameters include a first variable parameter and a second variable parameter;

[0029] The step of constructing target script data based on the watershed modeling operation, the grid modeling operation, the target variable parameters, and the preset automated tools includes:

[0030] A first variable parameter is determined from among the multiple watershed modeling parameters, and a second variable parameter is determined from among the multiple grid modeling parameters;

[0031] An environment construction script is built based on the watershed modeling operation, the grid modeling operation, the first variable parameter, the second variable parameter, and the preset automated tools;

[0032] The fluid characteristic parameters are determined as third variable parameters by the preset automated tool, and a parameter setting script is constructed based on the third variable parameters.

[0033] Secondly, this application also provides a parameter optimization apparatus, comprising:

[0034] The first acquisition module is used to acquire a preset number of grids, target script data, and preset modeling tools; the target script data includes an environment construction script and a parameter setting script.

[0035] The first construction module is used to construct a watershed and a grid according to the preset number of grids, the environment construction script, and the preset modeling tool; to obtain fluid characteristic parameters according to the parameter setting script; and to construct a target simulation model based on the fluid characteristic parameters, the watershed, and the grid; the grid includes a target microstructure grid.

[0036] The optimization module is used to optimize the structural parameters corresponding to the target microstructure mesh in the target simulation model based on the target simulation model and the preset optimization algorithm, so as to obtain the optimized target parameters.

[0037] In one embodiment, the environment construction script includes a watershed construction script and a grid partitioning script;

[0038] The first construction module is specifically used to obtain watershed parameters based on the watershed construction script and to obtain grid parameters based on the grid partitioning script;

[0039] The watershed is constructed based on the watershed parameters and the preset modeling tool, and the grid is constructed based on the preset number of grids, the grid parameters, and the preset modeling tool.

[0040] In one embodiment, the preset optimization algorithm is a genetic algorithm;

[0041] The optimization module is specifically used to obtain the target optimization function;

[0042] The structural parameters corresponding to the target microstructure mesh in the target simulation model are encoded according to the chromosomes contained in the genetic algorithm to obtain the chromosomes corresponding to the structural parameters.

[0043] The chromosome is updated based on the chromosome and the target optimization function, and simulation is performed based on the updated chromosome until the simulation results meet the preset iteration conditions, thus obtaining the updated target parameters.

[0044] In one embodiment, the optimization module is specifically used to determine the parent chromosome from among the multiple chromosomes based on the objective function and a preset screening algorithm;

[0045] The parent chromosomes are updated by crossover and mutation to obtain offspring chromosomes. The parent chromosomes and offspring chromosomes are then merged to obtain a new population containing multiple updated structural parameters.

[0046] Based on the parent chromosomes and offspring chromosomes contained in the new population, simulations were performed to obtain microstructure indices.

[0047] If the microstructure indicators do not meet the preset iteration conditions, the step of determining the parent chromosome from multiple chromosomes based on the objective function and the preset screening algorithm is executed.

[0048] If the microstructure indicators meet the preset iteration conditions, stop the iterative update of the chromosome, determine the target chromosome in the new population, and obtain the target parameters corresponding to the target chromosome.

[0049] In one embodiment, the device further includes:

[0050] The second acquisition module is used to acquire the user's watershed modeling operations, grid modeling operations, and target variable parameters; the watershed modeling operations include the setting of watershed modeling parameters, and the grid modeling operations include the setting of grid modeling parameters;

[0051] The second construction module is used to construct target script data based on the watershed modeling operation, the grid modeling operation, the target variable parameters, and the preset automation tools.

[0052] In one embodiment, the target variable parameters include a first variable parameter and a second variable parameter;

[0053] The second construction module is specifically used to determine a first variable parameter among multiple watershed modeling parameters, and to determine a second variable parameter among multiple grid modeling parameters;

[0054] An environment construction script is built based on the watershed modeling operation, the grid modeling operation, the first variable parameter, the second variable parameter, and the preset automated tools;

[0055] The fluid characteristic parameters are determined as third variable parameters by the preset automated tool, and a parameter setting script is constructed based on the third variable parameters.

[0056] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0057] Obtain the preset number of grids, target script data, and preset modeling tools; the target script data includes environment construction scripts and parameter setting scripts.

[0058] The watershed and grid are constructed according to the preset number of grids, the environment construction script, and the preset modeling tool. Fluid characteristic parameters are obtained according to the parameter setting script, and a target simulation model is constructed based on the fluid characteristic parameters, the watershed, and the grid. The grid includes a target microstructure grid.

[0059] Based on the target simulation model and the preset optimization algorithm, the structural parameters corresponding to the target microstructure mesh in the target simulation model are optimized to obtain the optimized target parameters.

[0060] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0061] Obtain the preset number of grids, target script data, and preset modeling tools; the target script data includes environment construction scripts and parameter setting scripts.

[0062] The watershed and grid are constructed according to the preset number of grids, the environment construction script, and the preset modeling tool. Fluid characteristic parameters are obtained according to the parameter setting script, and a target simulation model is constructed based on the fluid characteristic parameters, the watershed, and the grid. The grid includes a target microstructure grid.

[0063] Based on the target simulation model and the preset optimization algorithm, the structural parameters corresponding to the target microstructure mesh in the target simulation model are optimized to obtain the optimized target parameters.

[0064] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0065] Obtain the preset number of grids, target script data, and preset modeling tools; the target script data includes environment construction scripts and parameter setting scripts.

[0066] The watershed and grid are constructed according to the preset number of grids, the environment construction script, and the preset modeling tool. Fluid characteristic parameters are obtained according to the parameter setting script, and a target simulation model is constructed based on the fluid characteristic parameters, the watershed, and the grid. The grid includes a target microstructure grid.

[0067] Based on the target simulation model and the preset optimization algorithm, the structural parameters corresponding to the target microstructure mesh in the target simulation model are optimized to obtain the optimized target parameters.

[0068] The aforementioned parameter optimization method, apparatus, computer equipment, storage medium, and computer program product acquire a preset number of grids, target script data, and preset modeling tools. The target script data includes an environment construction script and a parameter setting script. A flow domain and grid are constructed based on the preset number of grids, the environment construction script, and the preset modeling tools. Fluid characteristic parameters are obtained based on the parameter setting script, and a target simulation model is constructed based on the fluid characteristic parameters, the flow domain, and the grid. The grid includes a target microstructure grid. Based on the target simulation model and a preset optimization algorithm, the structural parameters corresponding to the target microstructure grid in the target simulation model are optimized to obtain the optimized target parameters. This method limits the data to be simulated by using a preset number of grids, ensuring the effectiveness of the preset number of grids for modeling and simulation. Simulation of the original parameters using script data and preset modeling tools yields a target simulation model, reducing the operational complexity of constructing the target simulation model. This target simulation model accurately reflects the influence of microstructures within the target simulation model, making the simulation results more accurately reflect the actual microstructure behavior. Furthermore, the preset optimization algorithm optimizes the structural parameters corresponding to the target microstructure grid, improving the effectiveness of the optimized target parameters. Attached Figure Description

[0069] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0070] Figure 1 This is a diagram illustrating the application environment of the parameter optimization method in one embodiment;

[0071] Figure 2 This is a schematic diagram of a visualization interface for watershed modeling in one embodiment;

[0072] Figure 3 This is a schematic diagram of the process of constructing a mesh in one embodiment;

[0073] Figure 4 This is a schematic diagram of a mesh diagram in one embodiment;

[0074] Figure 5 This is a flowchart illustrating the optimization of target parameters in one embodiment;

[0075] Figure 6 This is a flowchart illustrating the parameter optimization process of a genetic algorithm in another embodiment;

[0076] Figure 7This is a flowchart illustrating the process of constructing target script data in one embodiment;

[0077] Figure 8 This is a flowchart illustrating the environment build script and parameter setting script in one embodiment;

[0078] Figure 9 This is a flowchart illustrating an example of a parameter optimization method in one embodiment;

[0079] Figure 10 This is a structural block diagram of the parameter optimization device in one embodiment;

[0080] Figure 11 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0081] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0082] In one embodiment, such as Figure 1 As shown, a parameter optimization method is provided. This embodiment illustrates the method applied to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0083] Step 102: Obtain the preset number of grids, target script data, and preset modeling tools.

[0084] The target script data includes environment build scripts and parameter setting scripts.

[0085] In this embodiment, the preset mesh number is the number of meshes in the microstructure simulation model. The selection of the preset mesh number depends on the complexity of the microstructure simulation model, the simulation effect, and the computation speed of the terminal. For microstructure simulation models of the same complexity, different mesh numbers will result in different simulation effects, i.e., different evaluation metrics will be obtained during the simulation process. The target script data includes various parameters in parametric modeling, such as structural parameters and mesh parameters. The preset modeling tool can be conventional simulation software, such as Ansys (a finite element analysis software). The terminal can automatically construct the simulation model in the preset modeling tool by using the preset mesh number when running the target script data.

[0086] Step 104: Construct the watershed and grid according to the preset number of grids, environment construction script and preset modeling tools, obtain fluid characteristic parameters according to the parameter setting script, and construct the target simulation model based on the fluid characteristic parameters, watershed and grid.

[0087] The mesh includes the target microstructure mesh.

[0088] In this embodiment, the construction of the target simulation model includes the steps of establishing a flow domain, dividing the grid, and setting parameters. The target simulation model is a model for drag reduction simulation of the solid-liquid interface. The terminal executes an environment construction script, which automatically constructs the flow domain and grid according to a preset number of grids in a preset modeling tool. This includes determining the domain boundary of fluid flow, setting the boundary conditions of fluid flow, and creating the fluid geometry of the flow domain. A visual graphical interface is provided through the preset modeling tool, such as... Figure 2 As shown. The environment construction script automatically defines environmental conditions, fluid material properties, and mesh constraints according to simulation requirements. The terminal obtains fluid characteristic parameters based on the parameter setting script, including setting fluid characteristic parameters such as velocity, temperature, and pressure fields using preset modeling tools based on the constructed flow domain and mesh.

[0089] Step 106: Based on the target simulation model and the preset optimization algorithm, optimize the structural parameters corresponding to the target microstructure mesh in the target simulation model to obtain the optimized target parameters.

[0090] In this embodiment of the application, after the construction of the target simulation model is completed, the terminal can evaluate the drag reduction effect of different structural parameters on the microstructure at the solid-liquid interface based on the flow domain, grid and fluid characteristic parameters in the target simulation model.

[0091] The terminal initializes the target simulation model and calculates the index parameters of the target microstructure. Using target script data, it treats each process of building the target simulation model as a whole; that is, building the target simulation model and optimizing the structural parameters can be simplified to a single objective function. After inputting the structural parameters corresponding to the target microstructure mesh, it outputs the drag reduction ratio or other indexes of the microstructure. Subsequently, the terminal can optimize the structural parameters of the microstructure based on the drag reduction ratio or other indexes using a preset optimization algorithm. The preset optimization algorithm can be a genetic algorithm, particle swarm optimization, etc. This application embodiment does not limit the type of preset optimization algorithm. Optimization of the microstructure's structural parameters can be based on optimizing the geometric features of the microstructure, including row spacing, column spacing, height, and diameter. Alternatively, the terminal can also simulate and optimize microstructures with different arrangements and material properties.

[0092] In the above parameter optimization method, the data to be simulated is limited by a preset number of grids, and the effect of the preset number of grids on the modeling and simulation is guaranteed. The original parameters are simulated by script data and preset modeling tools to obtain the target simulation model. This can reduce the operational complexity of building the target simulation model. The target simulation model can accurately reflect the influence of microstructure in the target simulation model, so that the simulation results more accurately reflect the actual microstructure behavior. Then, the structural parameters corresponding to the target microstructure grid are optimized by a preset optimization algorithm to improve the effect of the optimized target parameters.

[0093] In one exemplary embodiment, the environment construction script includes a watershed construction script and a grid partitioning script; such as Figure 3 As shown, step 104 includes steps 302 to 304. Wherein:

[0094] Step 302: Obtain watershed parameters based on the watershed construction script, and obtain grid parameters based on the grid division script.

[0095] In this embodiment, the terminal executes a watershed construction script. The watershed construction script includes multiple variable parameters, such as attribute parameters describing the watershed geometry, boundary conditions, and microstructure. Structural parameters can be structural parameters of the microstructure or material properties. The watershed construction script prompts the user to input variable parameters according to requirements, and the terminal obtains the watershed parameters through the script. The watershed construction script can define watershed features through interfaces provided by a specific modeling language or preset modeling software. Then, the terminal executes a mesh generation script. This script defines the division of the watershed into discrete meshes and includes multiple parameters describing the mesh, such as mesh resolution, topological linkage, and hybrid mesh generation algorithms.

[0096] Step 304: Construct the watershed based on watershed parameters and preset modeling tools, and construct the grid based on preset grid number, grid parameters and preset modeling tools.

[0097] In this embodiment, the terminal begins constructing the watershed based on the acquired watershed parameters and preset modeling tools. This process involves creating the watershed's geometry, defining boundary conditions and material properties, and setting the characteristics of fluid flow. The terminal performs the watershed construction operation through the preset modeling tools and the functions set in the watershed construction script.

[0098] The terminal, based on a preset number of meshes, mesh parameters, and preset modeling tools, begins constructing the required mesh. According to the preset mesh generation scheme and mesh parameters, it generates the mesh's node coordinates, element connection relationships, etc., resulting in a mesh diagram as shown below. Figure 4 As shown.

[0099] In an optional embodiment, after constructing the watershed and mesh, the terminal can check and adjust the completed watershed and mesh to ensure their correctness and consistency. This includes checking whether the boundary conditions and material properties of the watershed are correctly defined according to preset inspection indicators, and checking whether the topological relationships of the mesh meet the requirements. Then, the watershed and mesh are adjusted and corrected based on the inspection results.

[0100] In this embodiment, a watershed is constructed based on watershed parameters and preset modeling tools, and a grid is constructed based on a preset number of grids, grid parameters, and preset modeling tools. The target simulation model can be constructed based on the original data. Under the limitation of the preset number of grids, the efficiency of the terminal in constructing and optimizing the target simulation model can be improved. Using the original watershed parameters and grid parameters can reduce the error of simulation modeling and improve the effect of subsequent parameter optimization.

[0101] In an exemplary embodiment, the preset optimization algorithm is described using a genetic algorithm as an example, such as... Figure 5 As shown, step 106 includes steps 502 to 506. Wherein:

[0102] Step 502: Obtain the target optimization function.

[0103] In this embodiment, the terminal uses the drag reduction rate of the microstructure at the solid-liquid interface as the objective function. Optionally, based on user input, the terminal can use other indicators of the microstructure as optimization targets, such as the microstructure's strength, stiffness, and thermal conductivity.

[0104] Step 504: Encode the structural parameters corresponding to the target microstructure mesh in the target simulation model according to the chromosomes contained in the genetic algorithm to obtain the chromosomes corresponding to the structural parameters.

[0105] In this embodiment, the chromosome is used to represent the structure of the structural parameters that need to be optimized. The terminal encodes the structural parameters corresponding to the target microstructure mesh with the chromosome and determines the chromosome according to a preset encoding method. For example, binary encoding, real number encoding or other custom encoding methods are used to hard-mapping the structural parameters to the gene positions of the chromosome to obtain the chromosome corresponding to the structural parameters of the microstructure.

[0106] Step 506: Update the chromosome based on the chromosome and the target optimization function, and perform simulation based on the updated chromosome until the simulation results meet the preset iteration conditions to obtain the updated target parameters.

[0107] In this embodiment, the terminal uses chromosomes to initialize the initial population of the genetic algorithm. Based on the initial population and the objective optimization function, it evaluates the optimization metric corresponding to each chromosome to obtain the chromosome evaluation result. Based on the chromosome evaluation result, a selection operation is performed, choosing chromosomes with higher fitness as the parents of the next generation. Subsequently, the terminal updates the parameters of the selected parents. The terminal repeats the above operation until a preset iteration condition is met. During the iteration process, the chromosome update introduces a certain degree of population diversity and parameter search space exploration, ultimately obtaining a chromosome structure that converges to the optimal solution. Based on the encoding method of chromosome structure and microstructure structural parameters, the optimized chromosome is converted into corresponding structural parameters to obtain the updated target parameters.

[0108] In this embodiment, the chromosome is updated by using the chromosome and the target optimization function, and simulation is performed based on the updated chromosome, thereby optimizing the structural parameters of the target microstructure mesh in the target simulation model and improving the accuracy of optimizing the structural parameters.

[0109] In one exemplary embodiment, such as Figure 6 As shown, step 506 includes steps 602 to 610. Wherein:

[0110] Step 602: Determine the parent chromosome from multiple chromosomes based on the objective function and a preset screening algorithm.

[0111] In this embodiment, the selection algorithm can be roulette wheel selection, tournament selection, etc., used to determine the parent chromosome with higher fitness among multiple chromosomes. The terminal can make selections based on a pre-set objective function and the chromosome's fitness value, selecting the chromosome with higher fitness as the parent for chromosome parameter updates.

[0112] Step 604: Update the parent chromosomes through crossover and mutation to obtain the offspring chromosomes, and merge the parent chromosomes and offspring chromosomes to obtain a new population containing multiple updated structural parameters.

[0113] In this embodiment, the terminal can perform crossover operations on the parent chromosome based on single-point crossover, multi-point crossover, etc., to generate new offspring chromosomes. It can also perform compilation operations on the offspring chromosomes to introduce new gene information. Finally, the terminal merges the offspring chromosomes updated by the crossover and mutation operations with the parent chromosomes that have not been updated to form a new population containing multiple updated structural parameters.

[0114] Step 606: Simulation is performed based on the parent chromosomes and offspring chromosomes contained in the new population to obtain microstructure indices.

[0115] In this embodiment, the terminal uses parent and offspring chromosomes from a new population to perform microstructure simulation. The terminal applies the structural parameters corresponding to each chromosome to the target simulation model to obtain the evaluation results of the microstructure indices. These microstructure indices are based on the drag reduction rate obtained from the simulation. Alternatively, depending on the objective function and optimization goal, the microstructure indices can also be other evaluation indicators such as structural performance and efficiency, used to evaluate the optimization effect of the corresponding chromosome.

[0116] Step 608: If the microstructure indicators do not meet the preset iteration conditions, perform the step of determining the parent chromosome from multiple chromosomes based on the objective function and the preset screening algorithm.

[0117] In this embodiment of the application, when the microstructure index does not meet the preset iteration conditions, that is, the preset optimization target or convergence standard is not reached, the terminal repeats step 602 to iterate and update the chromosome parameters again.

[0118] Step 610: If the microstructure indicators meet the preset iteration conditions, stop the iterative update of the chromosome, determine the target chromosome in the new population, and obtain the target parameters corresponding to the target chromosome.

[0119] In this embodiment, when the microstructure indicators meet the preset iteration conditions, the preset optimization goal or convergence criterion is reached, and the iterative update of the chromosome stops. At this point, the new population includes the structural parameters corresponding to the chromosome with the best drag reduction effect at the solid-liquid interface. Based on the new population, the terminal determines the chromosome with the highest fitness and obtains the target parameters corresponding to the target chromosome, which are the optimized microstructure parameters.

[0120] In this embodiment, the parent chromosome is determined from multiple chromosomes based on the objective function and a preset screening algorithm. Crossover and mutation operations are performed, and simulation is conducted. The selection or stopping of iterative updates is executed according to the satisfaction of microstructure indicators. Finally, the target chromosome and its corresponding microstructure parameters are determined, and structural parameters that meet the preset iteration conditions can be obtained, thereby improving the effect of parameter optimization.

[0121] In one exemplary embodiment, such as Figure 7 As shown, before step 102, the method further includes steps 702 to 704. Wherein:

[0122] Step 702: Obtain the user's watershed modeling operations, grid modeling operations, and target variable parameters.

[0123] The watershed modeling operation includes setting watershed modeling parameters, and the grid modeling operation includes setting grid modeling parameters.

[0124] In this embodiment, the terminal obtains watershed modeling operations, mesh modeling operations, and target variable parameters by recording the user's modeling process. Specifically, taking Spaceclaim in the Ansys platform as an example, the terminal records the user's modeling operations by recording the model. For watershed modeling operations, the terminal uses an indexed mode to record the entire modeling process. Taking a crescent-shaped microstructure as an example, the target variable parameters can be the row spacing, column spacing, height, and diameter of the microstructure. By replacing the values ​​recorded in the user's operations with variables, the target variable parameters are obtained, thus achieving parameterization of the modeling.

[0125] In an optional embodiment, during the user's modeling operation, deleting curves or other structures may cause changes in index values, thereby affecting the consistency and accuracy of the target simulation model. The terminal can convert the deletion operation of curves or other structures into parameter adjustment, and use parameter control to determine the presence or absence of curves instead of directly deleting them, thereby avoiding the problem of affecting the consistency of the target simulation model caused by changes in index values. Alternatively, the terminal can respond to the deletion operation of curves or other structures, record the changes in index values, and establish an index mapping table. In subsequent operations, the old index is mapped to the new index according to the index mapping table to ensure the consistency of the target simulation model.

[0126] In capturing user mesh modeling operations, taking Fluent Mesh software in the Ansys platform as an example, the user's mesh building operations are recorded by recording scripts. Then, the target variable parameters, such as mesh size, are replaced. Specifically, the target variable parameters for crescent-shaped microstructures can be the maximum size of the local mesh, boundary layer, and mosaic mesh. Poor mesh quality may occur during mesh building; the terminal can ensure the accuracy of the constructed mesh through automatic node migration or mesh refinement methods.

[0127] Step 704: Construct target script data based on watershed modeling operations, grid modeling operations, target variable parameters, and preset automated tools.

[0128] In this embodiment, the preset automation tool can be AutoHotkey or Python (a compiled language) code. The target variable parameters also include parameters that need to be numerically calculated. Taking Fluent software in the Ansys platform as an example, the user inputs initial parameters and determines the parameters to be calculated based on the principle of parameter calculation. For example, the velocity is set to 0.5 m / s, the inlet initialization parameters are turbulent kinetic energy of 0.0010328 m / s. The specific dissipation rate is 55.881 / s. At the same time, the Fluent reference value is initialized according to the model size.

[0129] The terminal generates complete target script data based on preset automation tools, such as programming scripts or script interfaces of modeling software, combined with script templates for watershed modeling and grid modeling operations, as well as information on target variable parameters.

[0130] In this embodiment, by using a preset automated tool, complete target script data is constructed based on information such as watershed modeling operations, grid modeling operations, and target variable parameters. This enables automated parameter optimization, reduces the human cost in parameter optimization, and improves the efficiency of parameter optimization.

[0131] In an exemplary embodiment, the target variable parameters include a first variable parameter and a second variable parameter; such as Figure 8 As shown, step 704 includes steps 802 to 806. Wherein:

[0132] Step 802: Determine the first variable parameter among multiple watershed modeling parameters, and determine the second variable parameter among multiple grid modeling parameters.

[0133] In this embodiment, standard environmental parameters exist in the watershed modeling operation. These environmental parameters can be repeatedly used for different microstructure parameters. Therefore, the terminal determines a first variable parameter among the watershed modeling parameters. The first variable parameter can be a structural parameter or material property that only describes the microstructure. For the same reason as watershed modeling, standard parameters exist in mesh modeling. The terminal can determine a second variable parameter among multiple mesh parameters. This second variable parameter is a mesh parameter that only describes the microstructure mesh.

[0134] Step 804: Construct an environment construction script based on watershed modeling operations, grid modeling operations, first variable parameters, second variable parameters, and preset automated tools.

[0135] In this embodiment, the terminal, based on the watershed modeling operation and grid modeling operation recorded by the user, uses the first variable parameter and the second variable parameter to replace the parameter type of the parameter corresponding to the target variable parameter in the watershed modeling operation and grid modeling operation, respectively, and generates an environment construction script according to a preset automated tool to complete the generation of the environment construction script.

[0136] Step 806: The fluid characteristic parameters are determined as third variable parameters according to the preset automation tool, and a parameter setting script is constructed based on the third variable parameters.

[0137] In this embodiment, the terminal executes a preset automated tool to determine the third variable parameter from the fluid characteristic parameters. The parameter that can be replaced according to the requirements in the fluid characteristics is determined as the third variable parameter, and a parameter setting script is constructed.

[0138] In this embodiment, by utilizing pre-set automated tools, complete target script data is constructed based on information such as watershed modeling operations, grid modeling operations, and target variable parameters. This enables automated parameter optimization, reduces labor costs in parameter optimization, and improves optimization efficiency.

[0139] In a specific embodiment, such as Figure 9 As shown, the terminal acquires input parameters (watershed parameters, grid parameters, and microstructure attribute parameters). Based on the automated program code and preset modeling tools in the target script data (Python program and AutoHotkey), it automatically performs watershed modeling, grid division, parameter setting, and initialization calculations to obtain microstructure indices. Based on the microstructure indices, a genetic algorithm is executed to optimize the structural parameters of the microstructure to obtain structural parameters that meet the preset iteration conditions.

[0140] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0141] Based on the same inventive concept, this application also provides a parameter optimization apparatus for implementing the parameter optimization method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more parameter optimization apparatus embodiments provided below can be found in the limitations of the parameter optimization method described above, and will not be repeated here.

[0142] In one exemplary embodiment, such as Figure 10 As shown, a parameter optimization device 1000 is provided, including: a first acquisition module 1001, a first construction module 1002, and an optimization module 1003, wherein:

[0143] The first acquisition module 1001 is used to acquire the preset number of grids, target script data, and preset modeling tools; the target script data includes environment construction scripts and parameter setting scripts.

[0144] The first construction module 1002 is used to construct the watershed and mesh according to the preset number of meshes, the environment construction script and the preset modeling tools, obtain the fluid characteristic parameters according to the parameter setting script, and construct the target simulation model based on the fluid characteristic parameters, the watershed and the mesh; the mesh includes the target microstructure mesh;

[0145] The optimization module 1003 is used to optimize the structural parameters corresponding to the target microstructure mesh in the target simulation model based on the target simulation model and the preset optimization algorithm, so as to obtain the optimized target parameters.

[0146] In one embodiment, the environment construction script includes a watershed construction script and a grid partitioning script;

[0147] The first construction module 1002 is specifically used to obtain watershed parameters based on the watershed construction script and to obtain grid parameters based on the grid division script;

[0148] The watershed is constructed based on watershed parameters and preset modeling tools, and the grid is constructed based on preset grid number, grid parameters, and preset modeling tools.

[0149] In one embodiment, the preset optimization algorithm is a genetic algorithm;

[0150] Optimization module 1003 is specifically used to obtain the target optimization function;

[0151] The structural parameters corresponding to the target microstructure mesh in the target simulation model are encoded according to the chromosomes contained in the genetic algorithm to obtain the chromosomes corresponding to the structural parameters.

[0152] The chromosome is updated based on the chromosome and the target optimization function, and simulation is performed based on the updated chromosome until the simulation results meet the preset iteration conditions, thus obtaining the updated target parameters.

[0153] In one embodiment, the optimization module 1003 is specifically used to determine the parent chromosome from multiple chromosomes based on the objective function and a preset screening algorithm;

[0154] The parent chromosomes are updated through crossover and mutation to obtain the offspring chromosomes. The parent chromosomes and offspring chromosomes are then merged to obtain a new population containing multiple updated structural parameters.

[0155] Microstructure indices were obtained by simulation based on the parent and offspring chromosomes contained in the new population.

[0156] If the microstructure indicators do not meet the preset iteration conditions, the step of determining the parent chromosome from multiple chromosomes based on the objective function and the preset screening algorithm is executed.

[0157] If the microstructure indicators meet the preset iteration conditions, stop iteratively updating the chromosome, determine the target chromosome in the new population, and obtain the target parameters corresponding to the target chromosome.

[0158] In one embodiment, the device 1000 further includes:

[0159] The second acquisition module is used to acquire the user's watershed modeling operations, grid modeling operations, and target variable parameters; the watershed modeling operations include the setting of watershed modeling parameters, and the grid modeling operations include the setting of grid modeling parameters;

[0160] The second construction module is used to construct target script data based on watershed modeling operations, grid modeling operations, target variable parameters, and preset automated tools.

[0161] In one embodiment, the target variable parameters include a first variable parameter and a second variable parameter;

[0162] The second building module is specifically used to determine the first variable parameter among multiple watershed modeling parameters and the second variable parameter among multiple grid modeling parameters;

[0163] Based on watershed modeling operations, grid modeling operations, first variable parameters, second variable parameters, and preset automated tools, construct an environment construction script;

[0164] The fluid characteristic parameters are determined as third variable parameters by the preset automated tools, and a parameter setting script is built based on the third variable parameters.

[0165] Each module in the aforementioned parameter optimization device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0166] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 11As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores target script data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a parameter optimization method.

[0167] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0168] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0169] Obtain the preset number of grids, target script data, and preset modeling tools; the target script data includes the environment build script and parameter setting script.

[0170] The watershed and grid are constructed based on the preset number of grids, environment construction script, and preset modeling tools. Fluid characteristic parameters are obtained based on the parameter setting script, and the target simulation model is constructed based on the fluid characteristic parameters, watershed, and grid. The grid includes the target microstructure grid.

[0171] Based on the target simulation model and the preset optimization algorithm, the structural parameters corresponding to the target microstructure mesh in the target simulation model are optimized to obtain the optimized target parameters.

[0172] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0173] Watershed parameters are obtained based on the watershed construction script, and grid parameters are obtained based on the grid division script;

[0174] The watershed is constructed based on watershed parameters and preset modeling tools, and the grid is constructed based on preset grid number, grid parameters, and preset modeling tools.

[0175] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0176] Obtain the target optimization function;

[0177] The structural parameters corresponding to the target microstructure mesh in the target simulation model are encoded according to the chromosomes contained in the genetic algorithm to obtain the chromosomes corresponding to the structural parameters.

[0178] The chromosome is updated based on the chromosome and the target optimization function, and simulation is performed based on the updated chromosome until the simulation results meet the preset iteration conditions, thus obtaining the updated target parameters.

[0179] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0180] The parent chromosome is determined from multiple chromosomes based on the objective function and a pre-defined screening algorithm;

[0181] The parent chromosomes are updated through crossover and mutation to obtain the offspring chromosomes. The parent chromosomes and offspring chromosomes are then merged to obtain a new population containing multiple updated structural parameters.

[0182] Microstructure indices were obtained by simulation based on the parent and offspring chromosomes contained in the new population.

[0183] If the microstructure indicators do not meet the preset iteration conditions, the step of determining the parent chromosome from multiple chromosomes based on the objective function and the preset screening algorithm is executed.

[0184] If the microstructure indicators meet the preset iteration conditions, stop iteratively updating the chromosome, determine the target chromosome in the new population, and obtain the target parameters corresponding to the target chromosome.

[0185] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0186] Obtain the user's watershed modeling operations, grid modeling operations, and target variable parameters; watershed modeling operations include the settings of watershed modeling parameters, and grid modeling operations include the settings of grid modeling parameters;

[0187] Target script data is constructed based on watershed modeling operations, grid modeling operations, target variable parameters, and preset automated tools.

[0188] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0189] The target script data is constructed based on watershed modeling operations, grid modeling operations, target variable parameters, and preset automated tools, including:

[0190] Determine the first variable parameter among multiple watershed modeling parameters, and determine the second variable parameter among multiple grid modeling parameters;

[0191] Based on watershed modeling operations, grid modeling operations, first variable parameters, second variable parameters, and preset automated tools, construct an environment construction script;

[0192] The fluid characteristic parameters are determined as third variable parameters by the preset automated tools, and a parameter setting script is built based on the third variable parameters.

[0193] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0194] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0195] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0196] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0197] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0198] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A parameter optimization method, characterized in that, The method includes: Obtain the preset number of grids, target script data, and preset modeling tools; the target script data includes environment construction scripts and parameter setting scripts. The watershed and grid are constructed according to the preset number of grids, the environment construction script, and the preset modeling tool. Fluid characteristic parameters are obtained according to the parameter setting script, and a target simulation model is constructed based on the fluid characteristic parameters, the watershed, and the grid. The grid includes a target microstructure grid. Based on the target simulation model and the preset optimization algorithm, the structural parameters corresponding to the target microstructure mesh in the target simulation model are optimized to obtain the optimized target parameters.

2. The method according to claim 1, characterized in that, The environment construction script includes a watershed construction script and a grid partitioning script; The step of constructing the watershed and grid according to the preset number of grids, the environment construction script, and the preset modeling tool includes: The watershed parameters are obtained based on the watershed construction script, and the grid parameters are obtained based on the grid division script; The watershed is constructed based on the watershed parameters and the preset modeling tool, and the grid is constructed based on the preset number of grids, the grid parameters, and the preset modeling tool.

3. The method according to claim 1, characterized in that, The preset optimization algorithm is a genetic algorithm; The structural parameters corresponding to the target microstructure mesh in the target simulation model are optimized based on the target simulation model and the preset optimization algorithm to obtain the optimized target parameters, including: Obtain the target optimization function; The structural parameters corresponding to the target microstructure mesh in the target simulation model are encoded according to the chromosomes contained in the genetic algorithm to obtain the chromosomes corresponding to the structural parameters. The chromosome is updated based on the chromosome and the target optimization function, and simulation is performed based on the updated chromosome until the simulation results meet the preset iteration conditions, thus obtaining the updated target parameters.

4. The method according to claim 3, characterized in that, The process of updating the chromosome based on the chromosome and the target optimization function, and performing simulations based on the updated chromosome until the simulation results meet preset iteration conditions to obtain the updated target parameters, includes: The parent chromosome is determined from among the multiple chromosomes based on the objective optimization function and the preset screening algorithm. The parent chromosomes are updated by crossover and mutation to obtain offspring chromosomes. The parent chromosomes and offspring chromosomes are then merged to obtain a new population containing multiple updated structural parameters. Based on the parent chromosomes and offspring chromosomes contained in the new population, simulations were performed to obtain microstructure indices. If the microstructure indicators do not meet the preset iteration conditions, the step of determining the parent chromosome from multiple chromosomes based on the objective optimization function and the preset screening algorithm is executed. If the microstructure indicators meet the preset iteration conditions, stop the iterative update of the chromosome, determine the target chromosome in the new population, and obtain the target parameters corresponding to the target chromosome.

5. The method according to claim 1, characterized in that, Before obtaining the preset number of grids, target script data, and preset modeling tools, the method further includes: Obtain the user's watershed modeling operations, grid modeling operations, and target variable parameters; the watershed modeling operations include the setting of watershed modeling parameters, and the grid modeling operations include the setting of grid modeling parameters; The target script data is constructed based on the watershed modeling operation, the grid modeling operation, the target variable parameters, and the preset automated tools.

6. The method according to claim 5, characterized in that, The target variable parameters include a first variable parameter and a second variable parameter; The step of constructing target script data based on the watershed modeling operation, the grid modeling operation, the target variable parameters, and the preset automated tools includes: A first variable parameter is determined from among the multiple watershed modeling parameters, and a second variable parameter is determined from among the multiple grid modeling parameters; An environment construction script is built based on the watershed modeling operation, the grid modeling operation, the first variable parameter, the second variable parameter, and the preset automated tools; The fluid characteristic parameters are determined as third variable parameters by the preset automated tool, and a parameter setting script is constructed based on the third variable parameters.

7. A parameter optimization device, characterized in that, The device includes: The first acquisition module is used to acquire a preset number of grids, target script data, and preset modeling tools; the target script data includes an environment construction script and a parameter setting script. The first construction module is used to construct a watershed and a grid according to the preset number of grids, the environment construction script, and the preset modeling tool; to obtain fluid characteristic parameters according to the parameter setting script; and to construct a target simulation model based on the fluid characteristic parameters, the watershed, and the grid; the grid includes a target microstructure grid. The optimization module is used to optimize the structural parameters corresponding to the target microstructure mesh in the target simulation model based on the target simulation model and the preset optimization algorithm, so as to obtain the optimized target parameters.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • General power lithium-ion battery cell finite element simulation pretreatment method

    CN105677977A

  • Bone cement flow prediction method and device, equipment and storage medium

    CN115205293A