Structural topology optimization method based on neural network adaptive reparameterization
Through the structural topology optimization method of adaptive reparameterization of neural networks, the problems of poor generalization and high computing cost in the existing technology are solved, and the acquisition of high-resolution topology and the improvement of finite element analysis efficiency is achieved, and the structure is avoided. Cracked, outputting a clear optimized structure.
Patent Information
- Application Number
- CN202411455260.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-10-18
AI Technical Summary
The existing topology optimization methods based on neural networks have problems such as poor generalization, structural fracture and high computational costs. Especially when acquiring high-resolution topology, the cost and complexity of training neural networks have increased significantly.
Adoptional reparameterization of neural networks is adopted to optimize the structure topology method, and the finite element grid and sampling point set are adaptively constructed by building a fully connected feedforward neural network model, and the fine units are merged using gradient evaluation indicators to reduce the complexity of the grid. and update the model parameters through the Adam optimizer to build the loss function to optimize the structure.
It realizes that when controlling the calculation cost, obtaining higher resolution topological structures, avoiding structural cracks, improving finite element analysis efficiency, and outputting clear boundaries and optimized structures.
Smart Images

Figure CN118966031B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of material structure optimization design, and specifically relates to a structural topology optimization method based on neural network adaptive re-parameterization. Background Art
[0002] As a structural design method, topology optimization mainly studies the optimal layout of materials under constraints such as load conditions, boundary conditions and performance indicators within a given design domain. It is not dependent on the initial configuration and has greater design freedom and more diverse optimization forms, so it is widely used in aerospace, marine engineering, bridge construction and other fields. With the development of machine learning technology represented by neural networks, many studies have begun to focus on using methods in this field to improve the framework of traditional topology optimization.
[0003] However, the current topology optimization methods based on neural networks still have defects such as poor generalization and broken topology structures. Among them, any sample used to train the neural network needs to complete at least one complete run of traditional topology optimization. If a high-resolution topology structure is required, the structural complexity brought by generating a fine grid and the cost of training the neural network will increase significantly. Therefore, it is of great significance to obtain a high-quality topology structure while controlling the computational cost within a certain range. Summary of the invention
[0004] In order to solve the shortcomings of the prior art, reduce the calculation cost and avoid structural cracks in the optimization results, the present invention adopts the following technical solutions:
[0005] The structural topology optimization method based on neural network adaptive reparameterization includes the following steps:
[0006] Step S1: Build a neural network model and obtain the density value corresponding to the point through the coordinates of the point in the structural design domain;
[0007] Step S2: discretize the structural design domain into a unit grid, set sampling points at the center of each unit, and obtain the density of the unit corresponding to the sampling point based on the neural network model;
[0008] Step S3: applying boundary conditions and geometric constraints to the discretized structure;
[0009] Step S4: Taking the flexibility of the structure as the optimization target and the neural network model parameters (weights and biases) as the design variables, a structural topology optimization model based on neural network reparameterization is established;
[0010] Step S5: Training the structural topology optimization model based on adaptive sampling, including the following steps:
[0011] Step S5.1: setting evaluation points of the gradient in adjacent grid cells within the design domain to construct an evaluation point set;
[0012] Step S5.2: In a certain grid area, a gradient evaluation index is defined based on the distance between the evaluation point and the unit center point;
[0013] Step S5.3: According to the gradient evaluation index, if the regional gradient evaluation index Less than the set threshold , then the fine cells in a certain area are merged to obtain a coarse grid cell, and a new sampling point is set at the center of the coarse grid cell to replace the initial sampling points in the certain area, and the finite element grid and sampling point set are adaptively constructed;
[0014] Step S5.4: The density of each sampling point obtained by the neural network model is used to construct a unit stiffness matrix containing grid units of different coarse and fine sizes, and the corresponding global stiffness matrix is obtained. ;
[0015] Step S5.5: Based on the unit displacement and the unit stiffness matrix, finite element analysis is performed to obtain the unit flexibility;
[0016] Step S5.6: Based on the initial flexibility of the structure, the unit flexibility and the unit density of the weighted penalty, and the volume constraint weighted penalty, construct the loss function of the neural network model; use the Adam optimizer to update the neural network model weight parameter set w; determine whether the gray unit ratio is less than the set threshold If the convergence condition is met, exit the iteration and end the training, otherwise update the penalty parameter , , repeat steps S5.2 to S5.6;
[0017] Step S6: Using the trained neural network model parameters, perform high-resolution sampling on the design domain to extract clear boundaries and output the final optimized structure.
[0018] Furthermore, in step S1, a fully connected feedforward neural network model is used, including a group of hidden layers connected in sequence, and the value of the hidden layer output is controlled between 0 and 1 through the classifier layer, thereby re-parameterizing the design variables in the topology optimization into weights and biases related to the neural network.
[0019] Furthermore, in step S3, the boundary conditions include the fixation or support of the structure and the external load; the geometric constraints are the mandatory reserved material area of the structure, and considering that the back propagation needs to be differentiable everywhere, the density of the sampling points corresponding to the grid cells covering the mandatory reserved material area is Make the following mapping:
[0020] .
[0021] Furthermore, in step S4, the structural topology optimization model based on neural network reparameterization is as follows:
[0022]
[0023] Where C represents the flexibility of the structure; w represents the parameter set related to the neural network model, including multiple weights and biases; F, K(w), and U represent the external force vector, the global stiffness matrix, and the global displacement matrix, respectively; represents the density of unit e, which is characterized by a function related to w after reparameterization, represents the coordinates of the sampling point at the center of unit e; v e represents the grid cell area; V* represents the specified volume constraint.
[0024] Furthermore, in step S5.1, the derivative of the density of each evaluation point with respect to its horizontal coordinate is obtained by differentiation, and the derivative of the density of each point with respect to its horizontal coordinate is obtained. , and normalize it as follows:
[0025]
[0026] Here, e represents the base of natural logarithms.
[0027] Furthermore, in S5.2, a gradient evaluation index of a certain grid area is defined and calculated:
[0028]
[0029] Among them, the weight operator , represents the distance between the i-th evaluation point and the center point e, represents the filtering radius, and N represents the number of evaluation points in the grid area.
[0030] Furthermore, the step S5.4 comprises the following steps:
[0031] Step S5.4.1: Use serendipity quadrilateral units to describe the grid cells with boundary nodes to transition between grid cells of different levels;
[0032] Step S5.4.2: In the rectangular area Calculate the shape function of each node of the serendipity quadrilateral element:
[0033]
[0034]
[0035] Where Ni is the shape function of the node numbered i in the serendipity quadrilateral element, and takes zero when this node does not exist; is the shape function of the node numbered j in the 4-node rectangular element, (x j ,y j ) represents the real coordinates of the node; the unit stiffness matrix k0 is expressed as the following integral form:
[0036]
[0037] Among them, D is the elasticity matrix and B is the geometric matrix, which are expressed as the differential form of the shape function as follows:
[0038]
[0039] Among them, μ represents the Poisson's ratio of the material, E represents the elastic model coefficient of the material, and then the unit stiffness matrix of all types of serendipity quadrilateral units is calculated by integration;
[0040] Step S5.4.3: If the current grid cell has an adjacent coarse grid cell, remove the boundary nodes on the coarse grid cell side;
[0041] Step S5.4.4: Number the remaining nodes, construct the correspondence between the global node number and the local node number, establish the degree of freedom index, and then assemble the global stiffness matrix.
[0042] Furthermore, in step S5.5, the unit flexibility ,in , represent the unit displacement and unit stiffness matrices respectively.
[0043] Furthermore, in step S5.6, the loss function of the fully connected feedforward neural network model is:
[0044]
[0045] in, represents the density of unit e, p represents the density penalty parameter, which makes the unit density tend to 0 or 1; c e represents the flexibility of unit e, C0 represents the initial flexibility of the structure; v e represents the unit area, V* represents the specified volume constraint; α represents the volume penalty parameter.
[0046] Furthermore, in step S5.6, it is determined whether the grayscale unit ratio is less than a set threshold, and if so, the convergence condition is met.
[0047] The advantages and beneficial effects of the present invention are:
[0048] The present invention makes full use of the neural network reparameterization method to construct a continuous mapping space between the horizontal and vertical coordinates of each point in the design domain and the density of the point. Unlike the existing topology optimization that discretizes the design domain into a grid, it can obtain a higher-resolution topological structure. On this basis, combined with the adaptive meshing method, adaptive sampling is performed based on the gradient information of the region to reduce the complexity of the finite element grid, thereby improving the efficiency of the finite element analysis link. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 Flow chart of the method for structural topology optimization in an embodiment of the present invention.
[0050] Figure 2 Schematic diagram of the re-parameterization process of a fully connected feedforward neural network in an embodiment of the present invention.
[0051] Figure 3 Schematic diagram of the initial boundary conditions of the load-bearing beam in an embodiment of the present invention.
[0052] Figure 4a Schematic diagram of a gradient-based adaptive sampling strategy in an embodiment of the present invention.
[0053] Figure 4b This is one of the schematic diagrams of the adjacent two-level units in an embodiment of the present invention.
[0054] Figure 4c This is the second schematic diagram of the adjacent two-level unit situation in the embodiment of the present invention.
[0055] Figure 5 This is a diagram of the topological optimization results of the load-bearing beam in an embodiment of the present invention.
[0056] Figure 6 It is a comparison chart of the finite element analysis time between the structural topology optimization method in the embodiment of the present invention and the traditional finite element method. DETAILED DESCRIPTION
[0057] The specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the present invention, and is not used to limit the present invention.
[0058] like Figure 1As shown in the figure, the structural topology optimization method based on neural network adaptive reparameterization reparameterizes the design variables in the topology optimization into weights and biases related to the neural network through a fully connected feedforward neural network; takes the flexibility of the structure as the optimization target, and the weights and biases as the design variables; defines and calculates the evaluation index of the regional gradient, adaptively constructs the finite element mesh and sampling point set in the iterative process, and constructs the loss function based on the weighted penalty of the volume constraint; solves the optimization model through the Adam optimizer, and resamples the design domain with fineness using the trained network parameters to obtain the optimized structure with clear boundaries, thereby realizing the structural topology optimization based on neural network adaptive reparameterization, which specifically includes the following steps:
[0059] Step S1: Build a fully connected feedforward neural network model, which consists of 5 hidden layers, each with 20 neuron nodes; its input is the horizontal and vertical coordinates of any point in the design domain , the output is the density of the point , LeakyReLU is used as a unified activation function, and the last layer is a classifier layer with a SoftMax activation function. The value of the hidden layer output is controlled between 0 and 1, and then the design variables in the topology optimization are reparameterized into weights and biases related to the neural network. The reparameterization process of the fully connected feedforward neural network is as follows Figure 2 shown.
[0060] Step S2: Take a load-bearing beam based on distributed load as the research object, discretize the design domain into a 60×30 grid, and set sampling points at the center of each unit grid. The density calculated at According to its corresponding grid unit, it is expressed as .
[0061] Step S3: Apply the discretized load-bearing beam Figure 3 The boundary conditions and geometric constraints shown are:
[0062] Step S3.1: Fix the left and right lower corners, and apply a uniform vertical downward distributed load with a sum of 1 on the top.
[0063] Step S3.2: Set the load-bearing surface with a top width of 2 as the mandatory material retention area. Considering that the back propagation needs to be differentiable everywhere, the density of the sampling points corresponding to the covering unit of the mandatory material retention area is Make the following mapping:
[0064] .
[0065] Step S4: Taking the flexibility of the load-bearing beam as the optimization target, the volume as the constraint, and the weight and bias of the neural network as the design variables, a topology optimization model based on the reparameterization of the fully connected feedforward neural network is established:
[0066]
[0067] Where C is the flexibility of the load-bearing beam; w is a set of parameters related to the neural network, including multiple weights and biases; F, K(w), and U are the force vector, global stiffness matrix, and global displacement matrix, respectively; is the density of unit e, which is characterized by a function related to the design variable w after reparameterization, is the coordinate of the sampling point at its center; v e is the unit grid area; V* is the specified volume constraint, which is set to 20%.
[0068] Step S5: Based on Figure 4a The adaptive sampling strategy shown solves the optimization model, specifically:
[0069] Step S5.1: Set the gradient evaluation points in four adjacent grids with a resolution of 5×5, and then construct the evaluation point set M. Apply the automatic differentiation technique to obtain the derivative of the density of each point with respect to its horizontal coordinate. , and normalize it as follows:
[0070] .
[0071] Step S5.2: Define and calculate the gradient evaluation index of the 2×2 grid area :
[0072]
[0073] Among them, the weight operator , is the distance between the i-th evaluation point and the center point e, the filtering radius , the number of evaluation points in the region is N=25.
[0074] Step S5.3: If the regional gradient evaluation index Less than the set threshold , the four fine grids in the area are merged into a single coarse grid, and a new sampling point is set at the center point of the coarse grid to replace the initial four sampling points in the area; then the finite element grid and sampling point set P are adaptively constructed.
[0075] Step S5.4: The neural network outputs the density of each sampling point and constructs a global element stiffness matrix containing coarse and fine grids , including the following sub-steps:
[0076] Step S5.4.1: Use serendipity units to describe the grid cells with boundary nodes to achieve the transition between grid cells of different levels;
[0077] Step S5.4.2: In the rectangular area Calculate the shape function of each node of the serendipity unit:
[0078]
[0079]
[0080] Where Ni is the shape function of the node numbered i in the serendipity unit, and takes zero when this node does not exist; is the shape function of the node numbered j in the 4-node rectangular element, (xj, yj) is the real coordinate of the node; the element stiffness matrix It can be expressed as the following integral form:
[0081]
[0082] Where D is the elasticity matrix and B is the geometry matrix, expressed as the differential form of the shape function:
[0083]
[0084] Among them, μ=1 is the Poisson's ratio of the material, E=1 is the elastic model coefficient of the material, and then the unit stiffness matrix of all types of serendipity units can be calculated by integration;
[0085] Step S5.4.3: Determine the type of each unit one by one, such as Figure 4b , Figure 4c As shown, when the right side is adjacent to a fine grid unit, the boundary nodes in the corresponding direction exist; on the contrary, if it is adjacent to a coarse grid unit, the boundary nodes are removed, thereby determining the Serendipity unit type according to the position and number of nodes on the unit;
[0086] Step S5.4.4: Number the remaining nodes, construct the correspondence between the global node number and the local node number, establish the degree of freedom index, and then assemble the global stiffness matrix.
[0087] Step S5.5: Perform finite element analysis to solve for unit flexibility ,in , are the unit displacement and stiffness matrices, respectively.
[0088] Step S5.6: Construct a loss function of a fully connected feedforward neural network based on a weighted penalty based on the volume constraint:
[0089]
[0090] Among them, v e is the unit area, which is set to 1 or 4 due to the existence of coarse grid units; V* is the specified volume constraint, which is set to 20%; c e is the flexibility of element e; C0 is the initial flexibility of the load-bearing beam; set the penalty parameters: α0 = 0.1, α max =100, △α= 0.05; p0 = 2.0, p max = 4.0, ∆p = 0.01;
[0091] The Adam optimizer is used to update the weight set w of the neural network, the learning rate is set to 0.01, and the threshold of gradient clipping is set to 0.1;
[0092] Determine whether the grayscale unit ratio is less than the set threshold If it is less than, the convergence condition is met, the iteration is exited and the training is ended, otherwise the penalty parameter is updated , , repeat steps S5.2 to S5.6.
[0093] Step S6: After the iteration is completed, the trained network parameters are used to resample the unit grid at a high resolution of 15×15. The final optimized structure of the load-bearing beam is as follows: Figure 5 As shown, the flexibility of the optimized structure , training rounds , the final volume fraction , compared with the finite element analysis time of the traditional finite element method Figure 6 As shown in the figure, the boundary of the optimized structure is clear and the time consumption of finite element analysis is reduced, which verifies the effectiveness of the proposed method.
[0094] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A structural topology optimization method based on neural network adaptive reparameterization, characterized by The steps include: Step S1: Build a neural network model and obtain the density corresponding to the point through the coordinates of the point in the structural design domain; Step S2: discretize the structural design domain into a unit grid, set sampling points at the center of each unit, and obtain the density of the unit corresponding to the sampling point based on the neural network model; Step S3: applying boundary conditions and geometric constraints to the discretized structure; Step S4: Taking the flexibility of the structure as the optimization target and the neural network model parameters as the design variables, a structural topology optimization model based on neural network reparameterization is established; Step S5: Training the structural topology optimization model based on adaptive sampling, including the following steps: Step S5.1: Setting gradient evaluation points in adjacent grid cells within the design domain; Step S5.2: In a certain grid area, a gradient evaluation index is defined based on the distance between the evaluation point and the unit center point; Step S5.3: Merge the cells in a certain area according to the gradient evaluation index to obtain a coarse grid cell, and set a new sampling point at the center of the coarse grid cell; Step S5.4: constructing a unit stiffness matrix containing grid units of different coarse and fine sizes by using the density of each sampling point obtained by the neural network model; Step S5.5: Based on the unit displacement and the unit stiffness matrix, finite element analysis is performed to obtain the unit flexibility; Step S5.6: Based on the initial flexibility of the structure, the unit flexibility and the unit density of the weighted penalty, and the volume constraint weighted penalty, construct the loss function of the neural network model; optimize and update the parameters of the neural network model; if the convergence condition is met, exit the iteration and end the training, otherwise update the penalty parameters and repeat steps S5.2 to S5.6; Step S6: Using the trained neural network model parameters, perform high-resolution sampling on the design domain to extract clear boundaries and output the final optimized structure.
2. The structural topology optimization method based on neural network adaptive re-parameterization according to claim 1 is characterized in that: In the step S1, a fully connected feedforward neural network model is used, including a group of hidden layers connected in sequence, and the design variables in the topology optimization are re-parameterized into weights and biases related to the neural network through the classifier layer.
3. The structural topology optimization method based on neural network adaptive re-parameterization according to claim 1 is characterized in that: In step S3, the boundary conditions include the fixation or support of the structure and the external load; the geometric constraints are the mandatory reserved material area of the structure, and the density of the sampling points corresponding to the grid cells covering the mandatory reserved material area. Make the following mapping: 。 4. The structural topology optimization method based on neural network adaptive re-parameterization according to claim 1 is characterized in that: In step S4, the structural topology optimization model based on neural network reparameterization is as follows: , Where C represents the flexibility of the structure; w represents the parameter set related to the neural network model, including weights and biases; F, K(w), and U represent the external force vector, the global stiffness matrix, and the global displacement matrix, respectively; represents the density of unit e, which is characterized by a function related to w after reparameterization, represents the coordinates of the sampling point at the center of unit e; v e represents the grid cell area; V* represents the specified volume constraint.
5. The structural topology optimization method based on neural network adaptive re-parameterization according to claim 1 is characterized in that: In step S5.1, the derivative of the density of each evaluation point with respect to its horizontal coordinate is obtained by differentiation, and the derivative of the density of each point with respect to its horizontal coordinate is obtained. , and normalize it as follows: , Here, e represents the base of natural logarithms.
6. The structural topology optimization method based on neural network adaptive re-parameterization according to claim 5 is characterized in that: In S5.2, the gradient evaluation index of a certain grid area is defined and calculated: , Among them, the weight operator , represents the distance between the i-th evaluation point and the center point e, represents the filtering radius, and N represents the number of evaluation points in the grid area.
7. The structural topology optimization method based on neural network adaptive re-parameterization according to claim 1 is characterized in that: The step S5.4 comprises the following steps: Step S5.4.1: Use quadrilateral units to describe the grid cells with boundary nodes to transition between grid cells of different levels; Step S5.4.2: In the rectangular area Calculate the shape functions of each node of the quadrilateral element: , , Where Ni is the shape function of the node numbered i in the quadrilateral element, and is zero when this node does not exist; is the shape function of the node numbered j in the 4-node rectangular element, (x j ,y j ) represents the real coordinates of the node; the unit stiffness matrix k0 is expressed as the following integral form: , Among them, D is the elasticity matrix and B is the geometric matrix, which are expressed as the differential form of the shape function as follows: , Among them, μ represents the Poisson's ratio of the material, E represents the elastic model coefficient of the material, and then the unit stiffness matrix of the quadrilateral unit is calculated by integration; Step S5.4.3: If the current grid cell has an adjacent coarse grid cell, remove the boundary nodes on the coarse grid cell side; Step S5.4.4: Number the remaining nodes, construct the correspondence between the global node number and the local node number, establish the degree of freedom index, and then assemble the global stiffness matrix.
8. The structural topology optimization method based on neural network adaptive re-parameterization according to claim 1 is characterized in that: In step S5.5, the unit flexibility ,in , represent the unit displacement and unit stiffness matrices respectively.
9. The structural topology optimization method based on neural network adaptive re-parameterization according to claim 1 is characterized in that: In step S5.6, the loss function of the neural network model is: , in, represents the density of unit e, p represents the density penalty parameter; c e represents the flexibility of unit e, C0 represents the initial flexibility of the structure; v e represents the unit area, V* represents the volume constraint, and α represents the volume penalty parameter.
10. The structural topology optimization method based on neural network adaptive re-parameterization according to claim 1, characterized in that: In step S5.6, it is determined whether the grayscale unit ratio is less than a set threshold. If so, the convergence condition is met.
Citation Information
Cited By
Topological optimization method based on manifold neural operator
CN119989955A
A Topological Optimization Method Based on Manifold Neural Operators
CN119989955B
