A structural optimization design method

CN122471805BActive Publication Date: 2026-10-16SUZHOU YUANZHUO OPTOELECTRONICS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610923815.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-25
Publication Date
2026-10-16
Estimated Expiration
2046-06-25

AI Technical Summary

Technical Problem

[0005]本发明的目的在于提供一种结构优化设计方法,以解决现有技术中存在的优化过程自动化程度低、多设计变量下参数空间探索能力受限、多约束条件下难以全局寻优的技术问题

Benefits of technology

1、实现优化过程的全自动化闭环控制,解决了人工迭代效率低的问题。本发明通过操作系统进程调度机制,配置包含可执行文件路径、无界面批处理运行标识和脚本文件运行标识的后台调用命令,在遗传算法计算软件与有限元仿真软件两个独立进程之间建立基于文件系统输入输出操作的双向数据通道,使有限元仿真软件以无界面批处理模式在后台自动运行,形成全自动闭环优化流程,无需人工干预,大幅缩短优化周期。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122471805B_ABST
    Figure CN122471805B_ABST
Patent Text Reader

Abstract

The application discloses a structural optimization design method, and relates to the technical field of computer aided engineering and structural optimization design. The method comprises the following steps: a parametric finite element model of a structure to be optimized is established in finite element simulation software, and a script file is recorded; a background calling command is configured in genetic algorithm calculation software, a two-way data channel between the finite element simulation software is established, forward transmission of design variable values and reverse extraction of current values of performance constraint indexes are realized; a fitness function based on the deviation of the current values of the performance constraint indexes from preset target values is defined; an iterative optimization cycle is executed by using the genetic algorithm, the finite element simulation software is automatically driven to evaluate population individuals one by one, selection, crossover and mutation operations are executed according to the fitness function values, and optimal structure parameters are output after the convergence condition is met, so that full-automatic closed-loop collaborative optimization of the genetic algorithm and the finite element simulation is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer-aided engineering and structural optimization design technology, and in particular to a structural optimization design method. Background Technology

[0002] In mechanical equipment and related fields, structural optimization design is a crucial step in product development. Existing structural optimization design methods primarily rely on parametric optimization using finite element simulation software. This involves establishing a parametric finite element model of the structure and performing simulation analysis on design variables to find the optimal parameter combination. However, this method suffers from the following technical shortcomings in practical applications: First, the optimization process has a low degree of automation and is inefficient. Designers need to repeatedly and manually modify design variable parameters, start simulation software, record and compare simulation results. The entire optimization process is highly dependent on manual operation and has a long optimization cycle.

[0003] Second, the ability to explore the parameter space is limited. Most existing methods use local search algorithms such as gradient descent or gridded enumeration methods to explore the parameter space. When the number of design variables increases, gradient algorithms are prone to getting trapped in local optima, while the number of simulations required by enumeration methods increases exponentially, making it difficult to effectively explore large-scale design spaces.

[0004] Third, the ability to find the global optimum under multiple constraints is insufficient. Structural optimization problems in actual engineering often involve multiple constraints such as deformation, modality, stress, and mass. Different performance indicators have different dimensions, and existing methods are difficult to balance multiple constraints under a unified framework. They are prone to getting trapped in local optima and cannot achieve global optimum while satisfying all constraints. Summary of the Invention

[0005] The purpose of this invention is to provide a structural optimization design method to solve the technical problems of low automation in the optimization process, limited ability to explore parameter space under multiple design variables, and difficulty in global optimization under multiple constraints in the existing technology.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: A structural optimization design method includes the following steps: Step S1: Establish a parametric finite element model of the structure to be optimized in the finite element simulation software, and define design variables and performance constraint indicators; Step S2: In the genetic algorithm calculation software, a bidirectional data channel is established between the genetic algorithm calculation software and the finite element simulation software by configuring background call commands. The background call commands include the executable file path of the finite element simulation software, command line parameters for indicating interfaceless batch processing, and command line parameters for indicating script file execution. The bidirectional data channel realizes the forward transmission of design variable values ​​and the reverse extraction of the current values ​​of performance constraint indicators through file read and write methods. Step S3: Define a fitness function. The fitness function is constructed based on the deviation between the current value of each performance constraint index and the corresponding preset target value. The optimization objective is to minimize the value of the fitness function. Step S4: The genetic algorithm is used to perform iterative optimization loop. The finite element simulation software is automatically triggered through the bidirectional data channel to perform simulation calculations on each individual in the current population. Based on the fitness function value, the selection operation, crossover operation and mutation operation are performed on the population in sequence to generate a new generation of population. It is determined whether the convergence condition is met. If it is met, the iteration stops. Otherwise, the above process is repeated. The convergence condition includes at least reaching the preset maximum number of generations. Step S5: Output the design variable value that minimizes the fitness function value as the optimal structural parameter.

[0007] Furthermore, step S1 also includes: recording and generating a script file in the finite element simulation software, wherein the script file contains parameter variable definition and update commands, model update and solution commands, and result export commands.

[0008] Furthermore, in the bidirectional data channel, forward data transmission is achieved by updating the design variable values ​​of the current iteration to the preset parameter assignment statements in the script file through text replacement; reverse data transmission is achieved by extracting the current values ​​of each performance constraint index sequentially from the result file output by the finite element simulation software after the simulation is completed through file reading. The result file records the calculation results of each performance constraint index in the format of identifier plus numerical value.

[0009] Furthermore, the background call command is formed into a complete command line string through string concatenation and executed through a system call function.

[0010] Furthermore, the performance constraint indicators include at least two of the following: maximum deformation, first natural frequency, maximum stress, and total structural mass.

[0011] Furthermore, the fitness function is calculated using the formula: F = Σw i ×abs(C i / C i,0 -1) (i=1 to n), where n is the number of performance constraint indicators, C iLet C be the current simulated value of the i-th performance constraint index. i,0 w is the preset target value for the i-th performance constraint metric. i Let Σw be the weight coefficient corresponding to the i-th performance constraint index. i =1 (i=1 to n), abs(x) represents the absolute value of x.

[0012] Further, the convergence condition is any of the following: reaching a preset maximum number of generations; or within a preset number of consecutive stagnant generations, the change in the optimal fitness function value is less than a preset fitness tolerance; wherein, the optimal fitness function value refers to the minimum value among the fitness function values ​​of all individuals in each generation of the population, and the change in the optimal fitness function value refers to the absolute value of the difference between the optimal fitness function values ​​of two adjacent generations.

[0013] Furthermore, the selection operation employs a roulette wheel selection strategy or a tournament selection strategy; the crossover operation employs a single-point crossover method or a multi-point crossover method; and the mutation operation employs a uniform mutation method or a Gaussian mutation method.

[0014] Furthermore, step S5 is followed by step S6: substituting the optimal structural parameters into the parameterized finite element model, and performing verification simulation using the finite element simulation software to confirm that the simulation calculation values ​​of each performance constraint index meet the corresponding constraint conditions.

[0015] Furthermore, the parameter configuration of the genetic algorithm includes population size, maximum number of generations, crossover probability, and fitness tolerance; the value range of the design variables is defined by a lower bound vector and an upper bound vector.

[0016] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention achieves fully automated closed-loop control of the optimization process, solving the problem of low efficiency in manual iteration. Through the operating system process scheduling mechanism, it configures background call commands containing executable file paths, interfaceless batch processing run identifiers, and script file run identifiers. This establishes a bidirectional data channel based on file system input / output operations between the two independent processes of the genetic algorithm calculation software and the finite element simulation software. This allows the finite element simulation software to run automatically in the background in interfaceless batch processing mode, forming a fully automated closed-loop optimization process without manual intervention, significantly shortening the optimization cycle.

[0017] 2. Leveraging the global parallel search capability of genetic algorithms to overcome the bottleneck of limited parameter space exploration under multiple design variables. Genetic algorithms, through population-parallel evolution, do not rely on gradient information and are not constrained by the exponential growth in computational cost caused by the increase in the number of design variables. They can effectively explore large-scale design spaces and avoid getting trapped in local optima.

[0018] 3. By using a normalized weighted fitness function to uniformly handle multiple constraints, the problem of global optimization of performance indices with different dimensions under multiple constraints is solved. By normalizing the current value of each performance constraint by dividing it by its preset target value, the differences between different dimensions are eliminated. Then, the weighted sum is obtained as a single fitness value, so that all constraints are considered in a balanced way, effectively avoiding getting trapped in local optima.

[0019] 4. This invention employs a direct simulation-driven optimization strategy, which offers higher computational accuracy for complex nonlinear problems compared to surrogate model methods. In each fitness evaluation, this invention directly calls finite element simulation software to perform precise numerical calculations on the physical structure, obtaining performance indicators with real physical meaning (deformation, natural frequency, stress value, structural mass, etc.). This eliminates the errors introduced by approximate fitting in surrogate models, ensuring the physical accuracy of the optimization results. The final optimal structural parameters are directly used to guide the engineering manufacturing of the physical structure, making it particularly suitable for structural optimization problems with strong nonlinear characteristics. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating the overall process of the structural optimization design method of the present invention. Figure 2 This is a schematic diagram of the gantry frame structure in an embodiment of the present invention; Figure 3 This is a convergence curve of the optimal fitness value as a function of the number of generations in an embodiment of the present invention; Figure 4 This is a graph showing the change in vertical deformation of the beam with the number of iterations in an embodiment of the present invention. Figure 5 This is a graph showing the change of the first-order natural frequency of the structure with the number of iterations in an embodiment of the present invention. Figure 6 This is a graph showing the change of the maximum stress of the structure with the number of iterations in an embodiment of the present invention; Figure 7 This is a graph showing the change in the total mass of the structure with the number of iterations in an embodiment of the present invention.

[0021] The markings in the diagram are explained as follows: 1. Horizontal beam; 2. Left column; 3. Right column. Detailed Implementation

[0022] The present invention will now be described in further detail with reference to 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 the invention. The genetic algorithm computation software in this invention refers to a software platform capable of executing genetic algorithms and interacting with finite element simulation software, including but not limited to MATLAB, Python, etc.

[0023] like Figure 2 As shown, this embodiment uses a gantry frame structure as the object to be optimized. This structure includes three main components: a crossbeam 1, a left column 2, and a right column 3. Design variables include the thickness parameter d1 of the crossbeam 1, the width parameter d2 of the column, and the height parameter h of the column. The crossbeam 1 is rectangular in shape, horizontally arranged, and its two ends are fixedly connected to the tops of the left column 2 and the right column 3, respectively. The left column 2 and the right column 3 are both rectangular in shape, vertically arranged, and have the same geometric dimensions, forming a symmetrical structure. For this gantry frame structure, the performance constraints of concern are the vertical deformation of the crossbeam 1 (requiring a vertical deformation of less than 2μm) and its first natural frequency (requiring a first natural frequency greater than 250Hz).

[0024] Combination Figure 1 and Figure 2 This embodiment is executed sequentially according to steps S1 to S6, as follows: Step S1: Establish a parametric finite element model of the structure to be optimized in the finite element simulation software, and define design variables and performance constraints. In the finite element simulation software (ANSYS Workbench in this embodiment), a parametric finite element model of the gantry frame structure is established through the SpaceClaim geometric modeling module, and three design variables are set: the thickness parameter d1 of the beam 1 (range 150mm to 300mm), the width parameter d2 of the column (range 100mm to 200mm), and the height parameter h of the column (range 300mm to 500mm). A StaticStructure static analysis project and a Modal modal analysis project are established in the finite element simulation software, and two performance constraints are set as output variables: vertical deformation (unit mm) and first natural frequency (unit Hz); maximum stress (unit MPa) and total structural mass (unit kg) are also output as monitored quantities. Among them, performance constraint indices refer to performance indices that directly participate in fitness function calculation and are used to drive the optimization direction; monitoring quantities refer to performance indices that are recorded synchronously during the optimization process but are not included in the fitness function calculation, and are used to observe the changing trend of the overall structural performance during the optimization process. After completing the parameterization settings, a script is recorded in the finite element simulation software to generate a script file in .wbjn format. The script file contains parameter variable definition and update commands, model update solution commands, and result export commands, and is saved in a specified local path. At the same time, a simulation project file in .wbpj format is also saved.

[0025] Step S2 involves establishing a bidirectional data channel between the genetic algorithm calculation software and the finite element simulation software by configuring background call commands. These background call commands include the executable file path of the finite element simulation software, command-line parameters indicating interfaceless batch processing, and command-line parameters indicating script file execution. The bidirectional data channel achieves forward transmission of design variable values ​​and reverse extraction of current performance constraint index values ​​through file read / write operations. The technical essence of this step is establishing an automated data interaction channel between two independent software processes at the operating system level: the genetic algorithm calculation software (running in the optimization process) starts the finite element simulation software process through the operating system's process scheduling interface (system call function), and achieves data exchange between the two processes through file system input / output operations. This approach does not rely on any specific software's built-in integration interface but utilizes the operating system's general process management and file system mechanisms to achieve cross-software automated collaboration, exhibiting versatility and portability.

[0026] The specific configuration is as follows: In the genetic algorithm calculation software (MATLAB in this embodiment), define the complete path of the executable file RunWB2.exe of the finite element simulation software; use the fullfile function to concatenate the working path and the script file name to obtain the complete path of the script file; then use the strcat function to concatenate the executable file path, the command line parameter '-B', the command line parameter '-R', and the script file path into a complete command line string. The command line parameter '-B' represents Batchmode, which allows the finite element simulation software to run in the background without a graphical user interface; the command line parameter '-R' followed by the script file path instructs the finite element simulation software to execute the specified script file immediately after startup. The string concatenation format is: 'executable file path-B -R "script file path"', where the script file path is enclosed in double quotes to support paths containing spaces, for example: 'D:\ANSYS Inc\v221\Framework\bin\Win64\RunWB2.exe -B -R "D:\work\project.wbjn"'. The '-B' and '-R' mentioned above are command-line parameters specific to the ANSYS Workbench software in this embodiment; other finite element simulation software have corresponding command-line parameters with equivalent functions, and all are applicable to the bidirectional data channel establishment method described in this invention.

[0027] The technical significance of the '-B' flag (Batch mode) lies in enabling the finite element simulation software to run silently in the background in a batch processing mode without a graphical user interface. This avoids resource consumption and manual intervention caused by popping up a graphical interface with each iteration, and is a key prerequisite for the genetic algorithm to automatically call the simulation software in a loop. The technical significance of the '-R' flag (Run script) lies in specifying that the simulation software should immediately execute a script file at a specified path after startup. The script file contains a pre-recorded complete sequence of instructions for parametric modeling updates, mesh generation, boundary condition application, simulation solution, and result export, thereby enabling a single command-line call to complete the entire simulation task. The combination of these two flags forms the technical foundation for unattended automated collaboration between the genetic algorithm calculation software and the finite element simulation software. Executing the above command-line string through the `system` function triggers the finite element simulation software to start in the background and execute the script file. The `system` function runs in blocking mode, meaning it waits until the finite element simulation software process has completely exited before returning. This ensures that the finite element simulation software has completed all calculations and output the result file when the genetic algorithm calculation software reads the result file, achieving automatic synchronization between the two processes without manual waiting or additional synchronization control mechanisms.

[0028] The bidirectional data channel operates as follows: Forward transmission—The script file is in .wbjn format and contains a parameter definition area, a simulation solution command area, and a result export command area. The parameter definition area defines design variables in key-value pair format, such as 'd1=150', 'd2=100', and 'h=300'. This area is located after a specific keyword (such as the 'Parameters' identifier line) in the script file. During forward data transmission, the genetic algorithm calculation software opens the script file in text editing mode, searches for the keyword to locate the parameter definition area, writes the design variable values ​​for the current iteration in key-value pair format, for example, changing 'd1=150' to 'd1=153.5852', saves and closes the file, triggering a background call command to execute the simulation; Reverse transmission—The result file is in .txt format and is automatically generated by the finite element simulation software after the simulation is completed. The results file contains the calculation results of each performance constraint index, using an identifier followed by a numerical value format, such as 'Deformation: -0.00199 mm' and 'Modal: 251.3 Hz'. The deformation values ​​may contain negative signs, indicating the direction of deformation (e.g., downward is negative). In the fitness function calculation, the absolute value is used to eliminate the influence of the direction sign on the deviation calculation. During reverse data transmission, the genetic algorithm calculation software opens the results file in text reading mode, matches the identifiers of each performance constraint index line by line, extracts the numerical part after the identifier, and converts it to floating-point format for use in the fitness function calculation.

[0029] Step S3: Define a fitness function. The fitness function is constructed based on the deviation between the current value of each performance constraint index and the corresponding preset target value. The optimization objective is to minimize the fitness function value. In this invention, for upper limit constraint performance indices (such as deformation), the preset target value is taken as the upper limit constraint value; for lower limit constraint performance indices (such as natural frequency), the preset target value is taken as the lower limit constraint value. This design ensures that the fitness function achieves its optimal objective by ensuring that each index exactly satisfies the constraint boundary, which aligns with the engineering practice principle of pursuing the lightest design while satisfying constraints. In this embodiment, the performance constraint index is the vertical deformation (preset target value C). 1,0 =0.002mm, i.e. 2μm) and the first natural frequency (preset target value C) 2,0 =250Hz).

[0030] The general form of the fitness function in this invention is a normalized weighted form: F = Σw i ×abs(C i / C i,0 -1) (i=1 to n), where n is the number of performance constraint indicators, C i Let C be the current simulated value of the i-th performance constraint index. i,0 w is the preset target value for the i-th performance constraint metric. i Let Σw be the weight coefficient corresponding to the i-th performance constraint index. i =1 (i=1 to n), where abs(x) represents the absolute value of x. This form eliminates the dimensional differences between performance indicators of different dimensions by dividing the current value of each indicator by its target value, thus achieving a balanced trade-off among constraints within a unified dimensionless space. It is suitable for global optimization under multiple constraints. The smaller the fitness function value, the closer the current combination of design variables is to the optimal solution that satisfies all constraints.

[0031] It is important to note that the input C to the fitness function... i (Deformation, natural frequency, stress value, etc.) are all engineering quantities with clear physical meaning obtained from numerical analysis of the physical structure by finite element simulation software, rather than abstract mathematical variables; normalization operation C i / C i,0 It eliminates the dimensional differences between different physical quantities (such as deformation in the mm range and frequency in the Hz range). It is a specific technical processing method for engineering problems constrained by multiple physical quantities. The fitness function is closely integrated with the technical application scenario and cannot exist independently without the physical calculation background of finite element simulation.

[0032] In this embodiment, the above-described normalized weighting method is used, with w1=w2=0.5 (equal weights). The specific expression for the fitness function is: F=abs(deform_current / 0.002-1)×0.5+abs(modal_current / 250-1)×0.5 Where deform_current is the absolute value of the current simulated vertical deformation (in mm), and modal_current is the current simulated first-order natural frequency (in Hz). When n=2, C1=deform_current, C 1,0 =0.002, C2=modal_current, C 2,0 When w1 = w2 = 0.5 and w1 = 250, the above expression is a concrete example of the general normalized weighted formula. Normalization operation C i / C i,0 The current value of the i-th performance index is mapped to a dimensionless ratio relative to the target value, allowing different physical quantities (such as deformation on the order of mm and frequency on the order of Hz) to be compared and weighted within a unified dimensionless space. When an index exactly meets the target value, its contribution is zero; the greater the deviation, the greater the contribution, driving the algorithm to prioritize optimizing the index with the largest deviation. Weighting coefficient w i This allows engineers to prioritize performance indicators based on their importance, provided the normalization condition (Σw) is met. i Achieve multi-objective equilibrium optimization under the constraint of (=1).

[0033] Step S4: An iterative optimization loop is executed using a genetic algorithm. The finite element simulation software is automatically triggered via the bidirectional data channel to perform simulation calculations on each individual in the current population. Based on the fitness function value, selection, crossover, and mutation operations are sequentially performed on the population to generate a new generation. The convergence condition is then checked; if it is met, the iteration stops; otherwise, the above process is repeated. In the genetic algorithm calculation software (MATLAB Genetic Algorithm Toolbox in this embodiment), the genetic algorithm parameters are set using the `gaoptimset` function (MATLAB R2015b and earlier versions) or the `optimoptions` function (MATLAB R2016a and later versions). The parameter field names are the same in both and can be used interchangeably. This embodiment uses the `gaoptimset` function, with the following parameters: PopulationSize = 20, Maximum Generations = 100, CrossoverFraction = 0.8, MutationRate = 0.01, Fitness Tolerance = 1 × 10⁻⁶. -3Stall algebra threshold (StallGenLimit) = 50, plotting function (PlotFcns) is set to @gaplotbestf (the optimal fitness value plotting function used for real-time plotting). Figure 3 The curve showing the convergence of the optimal fitness value as a function of generations is shown.

[0034] The engineering meanings of the above parameters are as follows: Population Size = 20 means that each generation of the population contains 20 individuals, that is, each generation requires 20 calls to the finite element simulation software to complete the fitness evaluation of all individuals. This is a trade-off between computational cost and population diversity. The larger the population, the more comprehensive the search, but the greater the computational cost; Maximum Generations = 100 is a hard upper limit for the algorithm to run, preventing the algorithm from running indefinitely; Crossover Fraction = 0.8 means that 80% of the new individuals in each generation are generated by the crossover operation, and the remaining 20% ​​are directly retained by the selection operation (elite retention strategy), ensuring that superior individuals are not discarded; Mutation Rate = 0.01 means that each gene locus has about a 1% probability of mutation, used to introduce new genetic information and prevent the population from converging prematurely; Fitness Tolerance = 1 × 10 -3 The threshold for determining convergence is set at 50. This means that convergence is triggered when the change in the optimal fitness function value is less than the fitness tolerance over 50 consecutive generations.

[0035] In this embodiment, the optimal fitness function value refers to the minimum fitness function value among all individuals in each generation of the population. It reflects the degree to which the performance constraints of the best individual in the current generation are satisfied and is the core indicator for judging convergence. The change in the optimal fitness function value is defined as the absolute value of the difference between the optimal fitness value of the current generation and the optimal fitness value of the previous generation. After each generation iteration, the algorithm records the fitness value corresponding to the individual with the smallest fitness value in the current generation as the optimal fitness value of that generation. When judging convergence, if the absolute value of the change in the optimal fitness function value of the current generation compared with the optimal value before the preset stagnation generation is less than the preset fitness tolerance, then the algorithm is judged to have converged. The convergence condition is any of the following: reaching the maximum number of generations 100; or the change in the optimal fitness function value within 50 consecutive generations is less than the fitness tolerance (1×10). -3 ).

[0036] The design variable lower limit vector lb=[150,100,300] and upper limit vector ub=[300,200,500] correspond to the value ranges of the thickness dimension parameter d1 of the beam 1, the width dimension parameter d2 of the column, and the height dimension parameter h of the column, respectively.

[0037] Call the genetic algorithm function to perform optimization: [H,fval]=ga(@fitnessWW,3,[],[],[],[],lb,ub,[],[],options), where @fitnessWW is the fitness function handle, 3 is the number of design variables, the 3rd to 6th parameters are all [] (no nonlinear constraints), the 9th and 10th parameters are all [] (no nonlinear constraints, the design variables are continuous variables), options is the algorithm parameter structure, H is the output optimal design variable vector, and fval is the corresponding optimal fitness function value.

[0038] In each iteration, for each individual in the current population, MATLAB writes the design variable values ​​of that individual into the parameter definition area of ​​the script file. The system function is used to execute the command line string to trigger the ANSYS Workbench background batch processing to perform the simulation, complete the parameterized finite element model update, mesh generation, boundary condition application, and simulation solution. After the simulation is completed, MATLAB reads the result file to extract the current values ​​of each performance constraint index, substitutes them into the fitness function calculation formula to obtain the fitness function value of that individual. Then, the following operations are performed sequentially: selection (in this embodiment, a tournament selection strategy is used, randomly selecting several individuals from the current population for comparison, and selecting the individual with the smallest fitness function value into the mating pool; the roulette wheel selection strategy normalizes the reciprocal of each individual's fitness function value as the probability of each individual being selected, with individuals having a higher probability of being selected due to smaller fitness function values); crossover (in this embodiment, a multi-point crossover method is used, where the genes of the parent individuals participating in the crossover are recombined to generate new offspring individuals; the single-point crossover method randomly selects a crossover point, and the gene segments on both sides of the two parent individuals at that point are interchanged to generate two offspring individuals); and mutation (in this embodiment, a Gaussian mutation method is used, where Gaussian random perturbation is applied to the randomly selected gene positions according to the mutation probability; the uniform mutation method uniformly and randomly reassigns values ​​to the randomly selected gene positions within their value range).

[0039] Step S5: Output the design variable value that minimizes the fitness function value as the optimal structural parameters. After iterative optimization using the genetic algorithm, the algorithm satisfies the convergence condition in the 58th generation (the change in the optimal fitness function value within 50 consecutive generations is less than 1 × 10⁻⁶). -3 The iteration stops at this point. The optimal fitness function value is fval≈0.0051, and the corresponding optimal structural parameters are: the thickness of beam 1 is d1=153.5852mm, the width of the column is d2=138.1671mm, and the height of the column is h=476.9456mm.

[0040] Step S6: Substitute the optimal structural parameters into the parameterized finite element model and perform verification simulation using the finite element simulation software to confirm that the simulated calculated values ​​of each performance constraint index meet the corresponding constraint conditions. Substitute the optimal structural parameters (d1=153.5852mm, d2=138.1671mm, h=476.9456mm) output in step S5 into the parameterized finite element model for independent verification simulation. The purpose of the verification simulation is to confirm the reliability of the optimization results and avoid performance index deviations caused by algorithm convergence errors. The verification simulation results show that the vertical deformation is 1.99μm, satisfying the constraint condition of less than 2μm; the first natural frequency is 251.3Hz, satisfying the constraint condition of greater than 250Hz. The verification simulation confirms the effectiveness of the optimization results. The optimal structural parameters (d1=153.5852mm, d2=138.1671mm, h=476.9456mm) are specific physical dimensional data, which can be directly used to guide the engineering manufacturing of physical structures, realizing a complete technical closed loop from computer simulation optimization to engineering entity manufacturing. Substituting the fitness function for verification: F = |0.00199 / 0.002 − 1|×0.5 + |251.3 / 250 − 1|×0.5 = 0.0051, consistent with the optimization output.

[0041] like Figure 3 As shown, the evolutionary curve of the optimal fitness value illustrates the trend of fitness value change with the number of generations, indicating that the genetic algorithm has good convergence speed and global search capability. Figure 4 and Figure 5 As shown, the vertical deformation and the first-order natural frequency, after fluctuating drastically in the early stages of iteration, gradually converge and stabilize near the constraint target values, verifying the effectiveness of the method of this invention in achieving global optimization under multiple constraints. Figure 6 and Figure 7 As shown, the maximum stress and total mass of the structure remain within a reasonable engineering range during the optimization process, demonstrating the ability of the method of this invention to take into account the comprehensive performance of the structure.

[0042] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A structural optimization design method, characterized in that, Includes the following steps: Step S1: Establish a parametric finite element model of the structure to be optimized in the finite element simulation software, and define design variables and performance constraint indicators; Step S2: In the genetic algorithm calculation software, a bidirectional data channel is established between the genetic algorithm calculation software and the finite element simulation software by configuring background call commands. The background call commands include the executable file path of the finite element simulation software, command line parameters for indicating interfaceless batch processing, and command line parameters for indicating script file execution. The bidirectional data channel realizes the forward transmission of design variable values ​​and the reverse extraction of current values ​​of performance constraint indicators through file read and write. In the bidirectional data channel, forward data transmission is achieved by updating the design variable values ​​of the current iteration to the preset parameter assignment statements in the script file through text replacement. Reverse data transmission is achieved by extracting the current values ​​of each performance constraint indicator sequentially from the result file output by the finite element simulation software after simulation. The result file records the calculation results of each performance constraint indicator in the format of identifier plus numerical value. Step S3: Define a fitness function. The fitness function is constructed based on the deviation between the current value of each performance constraint index and the corresponding preset target value. The optimization objective is to minimize the fitness function value. The formula for calculating the fitness function is: F = Σw i ×abs(C i / C i,0 -1), i=1 to n, where n is the number of performance constraint indicators, C i Let C be the current simulated value of the i-th performance constraint index. i,0 w is the preset target value for the i-th performance constraint metric. i Let Σw be the weight coefficient corresponding to the i-th performance constraint index. i =1, i=1 to n, abs() represents the absolute value; Step S4: An iterative optimization loop is executed using a genetic algorithm. The finite element simulation software is automatically triggered through the bidirectional data channel to perform simulation calculations on each individual in the current population. Based on the fitness function value, selection, crossover, and mutation operations are sequentially performed on the population to generate a new generation of population. It is then determined whether the convergence condition is met. If it is met, the iteration stops; otherwise, the above process is repeated. The convergence condition includes at least reaching a preset maximum number of generations. The convergence condition is any of the following: reaching a preset maximum number of generations; or within a consecutive preset number of stagnant generations, the change in the optimal fitness function value is less than a preset fitness tolerance. The optimal fitness function value refers to the minimum fitness function value among all individuals in each generation of the population, and the change in the optimal fitness function value refers to the absolute value of the difference between the optimal fitness function values ​​of two adjacent generations. Step S5: Output the design variable value that minimizes the fitness function value as the optimal structural parameter.

2. The method according to claim 1, characterized in that, Step S1 also includes: recording and generating a script file in the finite element simulation software, wherein the script file contains parameter variable definition and update commands, model update and solution commands, and result export commands.

3. The method according to claim 1, characterized in that, The background command is formed into a complete command line string through string concatenation and then executed through a system call function.

4. The method according to claim 1, characterized in that, The performance constraints include at least two of the following: maximum deformation, first-order natural frequency, maximum stress, and total structural mass.

5. The method according to claim 1, characterized in that, The selection operation employs a roulette wheel selection strategy or a tournament selection strategy; the crossover operation employs a single-point crossover method or a multi-point crossover method; the mutation operation employs a uniform mutation method or a Gaussian mutation method.

6. The method according to claim 1, characterized in that, Step S5 is followed by step S6: Substitute the optimal structural parameters into the parameterized finite element model, and perform verification simulation using the finite element simulation software to confirm that the simulation calculation values ​​of each performance constraint index meet the corresponding constraint conditions.

7. The method according to claim 1, characterized in that, The parameters of the genetic algorithm include population size, maximum number of generations, crossover probability, and fitness tolerance; the range of values ​​for the design variables is defined by a lower bound vector and an upper bound vector.

Citation Information

Patent Citations

  • Engineering design optimization method and device based on genetic algorithm and proxy model

    CN113935235A

  • Numerical simulation and parameter optimization design method and system for hydraulic system

    CN118395849A