An additive manufacturing topology optimization method based on a generative adversarial network
Patent Information
- Application Number
- CN202311612309.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-29
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2043-11-29
AI Technical Summary
Existing topology optimization methods in additive manufacturing suffer from initial defects such as local material density variations and cavities, leading to local stress concentration and damage. They are computationally expensive, rely on mesh refinement and human experience, and have poor model generalization ability, making them difficult to apply directly to additive manufacturing.
A topology optimization method based on adversarial networks is adopted. Through generator and discriminator networks, a black-box model is trained using a set of boundary condition images and a set of optimized reconstructed images. This directly maps the boundary conditions to a smooth 3D solid model, reducing the manpower and time costs of post-processing fine reconstruction.
It achieves efficient topology optimization and refined reconstruction, reduces computational and labor costs, improves the model's generalization ability and prediction accuracy, and can be directly used in additive manufacturing to enhance the seismic performance of the structure.
Smart Images

Figure CN117610207B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of additive manufacturing component design, specifically relating to an additive manufacturing topology optimization method based on adversarial networks. Background Technology
[0002] Additive manufacturing has made significant progress and is widely used. In fields such as automobiles, aerospace, and construction engineering, additive manufacturing can achieve lightweight and performance-oriented design. In the fields of biology and medicine, additive manufacturing can achieve bio-simulation design, improve the performance of artificial structures, reduce the number of assembly parts, and manufacture integrated high-strength complex structures.
[0003] Topology optimization fully leverages the design freedom of additive manufacturing to achieve high-performance, lightweight, and integrated structural designs. Simultaneously, additive manufacturing technology provides a broad application field for topology optimization, thus driving the development of advanced structural design and manufacturing technologies. However, current topology optimization methods remain at the initial design stage. The optimized model only yields an unsmoothed preliminary material geometry distribution and cannot be directly used for additive manufacturing. Current topology optimization methods, such as the commonly used density-based method, exhibit localized material density variations between adjacent elements when searching for the optimal solution. Although using filtering functions and increasing mesh density can smooth the density field to some extent and eliminate drastic local density changes, it still cannot guarantee that non-optimized cavities will not appear inside the solid. During actual loading, initial defects such as internal cavities and unsmooth surface features in the model directly manufactured based on the optimization results can lead to local stress concentration and cause local failure. Therefore, from the design stage to the manufacturing and application stage, a rigorous and refined reconstruction of the optimized model is required. In practical applications, different constraints and boundary conditions, including displacement, stress, and volume, are often set according to the actual engineering environment, further increasing the complexity and computational cost of topology optimization. In practical engineering applications, topology optimization and refinement typically consume significant time and manpower. Obtaining stable and convergent results requires numerous optimization iterations. Each independent optimization problem necessitates re-meshing the design domain and performing multiple finite element calculations, resulting in substantial computational costs. Furthermore, the accuracy of the final optimization result is highly dependent on the mesh refinement, requiring skilled technicians to configure settings appropriately to achieve accurate and reliable results. This process is labor-intensive and susceptible to deviations due to external factors. For most cases, using planar shell elements for topology optimization is far more efficient than using spatial tetrahedral meshes, and transforming the spatial problem into a planar problem further reduces computational costs. However, this still cannot reduce the manpower and time costs in the post-processing refinement and reconstruction stage.
[0004] In response to this, there is relevant research in the existing technology. For example, patent application CN116542080A discloses a topology optimization method and system for conditional generative adversarial networks based on contrastive learning. However, in terms of feature extraction and network construction, it is based on the black-and-white density distribution dataset obtained by topology optimization. In this type of dataset, the density distribution is discrete, and the boundary features are greatly affected by the filtering function. In addition, in order to extract complex features, a large number of convolutional layers need to be set in the generator and discriminator. Moreover, the network converges very quickly and the effect is only significant at a specific number of iterations, resulting in poor model generalization ability. Summary of the Invention
[0005] To address the aforementioned issues, this invention provides a topology optimization adversarial network design method for additive manufacturing. This method can improve the optimization rate, reduce the dependence of optimization results on the fineness of mesh partitioning, enhance the interpretability, generalization, and feature extraction efficiency of the prediction network black-box model, and reduce the manpower and time costs in the post-processing fine-reconstruction stage.
[0006] The additive manufacturing topology optimization method based on adversarial networks described in this invention includes the following steps:
[0007] Step 1: Generate a set of boundary condition images for the actual design domain of the additively manufactured component as needed;
[0008] Step 2: Use the finite element method combined with isotropic solid materials and the SIMP penalty method to find the optimal material space distribution, and solve to obtain the optimized model;
[0009] Step 3: Use the computer-aided design software AutoCAD to smooth the optimized boundary to obtain a set of reconstructed images of the optimized result. Then, randomly select and divide the set of boundary condition images and the corresponding set of reconstructed optimized images into training set, test set and validation set according to the proportion.
[0010] Step 4: Build a conditional generative adversarial network to train the boundary condition image set and the optimized reconstructed image set to obtain a predictable black box model;
[0011] Step 5: Use the trained black-box model to predict the validation set and guide the computer-aided design software to perform 3D solid design to facilitate additive manufacturing.
[0012] Furthermore, in step 1, the boundary condition image set includes the size information of the optimized design region, the boundary displacement and rotation constraint information, and the position and direction of the external load.
[0013] Furthermore, in step 2, the design domain to be optimized is uniformly divided into several S4 elements, each with a length of 1 unit. Design variables are then set to reduce the stiffness of the S4 elements. The range of values for the design variables is shown below:
[0014] s = {s1, s2, s3, ..., s} m}, m=1,2,3,…,M;0.001≤s m ≤1 where M represents the total number of units, and the design variables s for each unit. m The value varies between 0.001 and 1. The entire optimization problem is as follows:
[0015] Minimize:
[0016] stY j ≤Y * j = 1, 2, 3, ...
[0017] 0.001≤s m ≤1
[0018] u m and k m These correspond to the displacement vector and stiffness matrix of element m, respectively; T represents the transpose; RS represents the objective function of the entire design domain, which is set here as the compliance of the structure, i.e., the reciprocal of the stiffness; by multiplying the stiffness matrix of each tetrahedral element by the design variables to perform stiffness reduction, a reduction penalty function coefficient w of 4 can obtain more discrete results and avoid the appearance of intermediate grayscale; constraint Y j The constraint can be either an equality constraint or an inequality constraint, selected according to the actual engineering situation, where j represents the j-th constraint.
[0019] Furthermore, the unit phase design variables obtained in each step are filtered, specifically as follows:
[0020] First, set the filter radius. Within the filter radius, calculate the distance weight between each cell and the center cell; the closer the cell is to the center cell, the greater the weight. R filter Let represent the filtering radius, Q represent the total number of elements within the filtering radius, and D(m,q) represent the distance between elements m and q. After each optimization iteration, the design variable s for each element is updated according to the distance weight. q Updated cell density for:
[0021]
[0022] If the objective function is set to minimize compliance, its partial derivative is as follows:
[0023]
[0024] If the constraint function is set to a volume constraint, its partial derivative is as follows:
[0025]
[0026] v m Let m represent the volume corresponding to each unit. The optimization criterion method is used to solve this problem. The total number of iterations is set based on the absolute difference α between the maximum components of the design variables in two consecutive iterations and the most recent two-step difference β in the objective function. Convergence is calculated. If the convergence requirement is met before the total number of iterations is reached, optimization stops. Conversely, if the convergence requirement is not met by the time the total number of iterations is reached, optimization also stops, and the optimized result is output. The convergence calculation expression is shown below:
[0027]
[0028] k represents the kth iteration step, and k+1 represents the next iteration step;
[0029] After convergence, the iteration stops. When the optimal solution condition is met, the value of the design variable of each optimized element needs to be extracted and mapped. When the design variable is 0, the element is removed; when the design variable is 1, the element is retained. The material distribution map of the result is then output.
[0030] Furthermore, in step 3, the optimized model undergoes a refined reconstruction, specifically as follows:
[0031] The optimized material distribution map is imported into computer-aided modeling software. End nodes of all retained elements are extracted, and all end nodes inside the boundary are removed and sparsified. Key end nodes that can characterize the boundary are retained. End nodes are retained as control nodes near the feature holes obtained after optimization and in locations where stress tends to concentrate after reference finite element analysis. End nodes are deleted on smooth and straight feature boundaries. Then, spline curves are used to sequentially and smoothly connect all retained end nodes to generate a set of reconstructed images.
[0032] Furthermore, in step 4, the conditional generative adversarial network includes a discriminator network and a generator network;
[0033] The generator network includes an encoder and a decoder, each consisting of three convolutional layers. Each convolutional layer is connected by a normalization layer and uses the LeakyReLU activation function. The encoder continuously downsamples to reduce the size of the input image, and the decoder upsamples to restore the original resolution of the reduced image.
[0034] The discriminator network contains three convolutional layers, each connected by a normalization layer. The activation function is LeakyReLU, and the entire network does not use fully connected layers.
[0035] The training process requires training the discriminator simultaneously with real data from the boundary condition image set and the reconstructed image set, as well as data generated by the generator, and obtaining the average loss of real data and generated data. Then, the entire network is trained until convergence, resulting in a black-box prediction model that considers topology optimization and refined reconstruction. This model is then used to predict the input boundary condition model, and further 3D solid model design and additive manufacturing are carried out.
[0036] The beneficial effects of this invention are as follows: The method described in this invention can obtain a direct mapping relationship between the boundary condition image set and the reconstructed image set. In the node set of all units extracted through optimization mapping, spline curves are used to obtain boundary curves, maximizing the effectiveness of the optimization results. This achieves high prediction accuracy with relatively small datasets, thus completely skipping finite element calculations, topology optimization, and fine reconstruction in engineering applications. This further reduces the dependence of the results on mesh refinement and the experience of technical personnel. The reconstruction process is clear and easily encapsulated, replacing and simplifying manual operations. Topology optimization selects a larger penalty function, resulting in larger and more significant boundary gradients in the density distribution results. Combined with fine reconstruction, the dataset is preprocessed to further extract boundary features, eliminating the influence of irrelevant local features, and obtaining a smooth-boundary model for direct additive manufacturing. The method described in this invention uses a conditional adversarial generative network with fewer convolutional layers, resulting in higher network interpretability and feature extraction efficiency. It also has better adaptability to different working condition datasets and greatly reduces the occurrence of overfitting. Furthermore, the predicted model, after being materialized into a 3D entity, can be directly used for additive manufacturing, significantly reducing the complexity of model preprocessing in additive manufacturing. Attached Figure Description
[0037] Figure 1 This is a flowchart of the method described in this invention;
[0038] Figure 2 This is an example of a conditional generative adversarial network structure and the automated design of X nodes in structural engineering;
[0039] Figure 3 The failure modes and load-displacement curves of traditional non-penetrating tubular hollow X-nodes in structural engineering and X-nodes designed and additively manufactured using conditional generative adversarial networks in this invention under axial compression are shown. Detailed Implementation
[0040] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific examples and accompanying drawings.
[0041] like Figure 1 As shown, the additive manufacturing topology optimization method based on adversarial networks described in this invention, taking the optimization process of a planar X node in a building structure as an example, includes the following steps:
[0042] Step 1: Determine the model dimensions to be optimized. The selected optimization case is based on a hollow tubular welded X-node. The welded node is formed by welding a horizontal hollow tube to two short hollow square tubes at the center. The horizontal hollow tube is 200mm long and its width varies from 15, 16, 17, ... 40mm. The upper and lower hollow square tubes are 80mm long and their widths vary from 15, 16, 17, ... 40mm. The wall thickness of all nodes is 2mm. Plot the boundary condition image set for these 676 cases. Apply axial pressure to the four end faces of the tubular node and restrict displacement and in-plane rotation in the direction perpendicular to the pressure direction on each end face. Example: Figure 2 As shown;
[0043] Step 2: Set the objective function to minimize structural flexibility, with a volume constraint of 20% for solid nodes; V represents the volume constraint fraction, and γ represents the volume constraint percentage. U is the initial volume; cri To find the maximum displacement within a given node domain of interest, the node optimization problem is as follows:
[0044] Minimize:
[0045]
[0046] 0.001≤s i ≤1;
[0047] Step 3: Using the finite element software ABAQUS, divide the entire optimization design domain into finite element models of quadrilateral elements with equal length and width. Set the initial material elastic modulus to 210 GPa and Poisson's ratio to 0.3. Enter the initial step of optimization iteration, initialize the design variables to 0.2, and use the finite element software ABAQUS to calculate nodal displacements and element stresses, etc., and update the design variables using the optimization criterion method. Set the maximum number of iteration steps to 50 and the maximum change in design variables to α = 0.001.
[0048] Step 4: When the optimization conditions are met, extract the optimized design variables and perform element mapping to retain and remove elements. Using computer-aided design software, extract the nodes of all retained elements, remove and sparsify the internal nodes, and retain the key nodes on the boundary. When removing and retaining nodes, care should be taken to avoid reducing nodes at feature holes and locations where stress is likely to concentrate. On smooth boundaries, reduce the number of nodes. Then, use spline curves to smoothly connect the control nodes on the boundary to generate a set of reconstructed images. Divide all boundary condition image sets and the corresponding output reconstructed images into training, testing, and validation sets in an approximate 7:2:1 ratio.
[0049] Step 5: Construct a conditional generative adversarial network (GAN). The network structure is as follows: Figure 2 As shown, the discriminator network takes the boundary condition image and its corresponding generated reconstructed image as input. Convolutional layers are continuously added for downsampling until a classifier is output, yielding either 0 or 1. Batch normalization layers are introduced between the convolutional layers, and LeakyReLU is used as the activation function with a coefficient of 0.2. A convolutional network is used to construct the encoder and decoder. The encoder continuously downsamples the input image to reduce its size and extract image features, while the decoder uses deconvolutional layers to upsample the image and restore its original resolution. The discriminator network and the generator network are then connected for training. The training process requires training the discriminator simultaneously with real data and data with fake labels, obtaining the average loss between real and fake data. The entire network is then trained until convergence, resulting in a black-box prediction model that considers topology optimization and refined reconstruction.
[0050] Step 6 Figure 2 The example is to verify the X-nodes of the central horizontal square tube and the upper and lower square tubes, both with a width of 40mm; the material distribution of the reconstructed planar X-nodes based on the black box output guides the design of the 3D nodes to achieve 3D solidification, and then additive manufacturing.
[0051] Based on the complexity of the optimized node's spatial configuration and the accuracy of the measurements, additive manufacturing of the same-sized tubular 3D-printed non-through X-node and the 3D solidified X-node was performed using 316L stainless steel powder. The vertical displacement and axially applied load from the axial compression experiment were extracted. Figure 3 As shown, the failure area of the tubular X-node is concentrated at the center, while the failure area of the optimized node is shifted to the edge to achieve a strong node-weak connection mechanism, thus avoiding the failure of all connected components due to the failure of the core area of the tubular node. Figure 3The 3D-printed optimized X-node and 3D-printed tubular X-node exhibit completely different failure modes under vertical loading. Furthermore, the load-displacement curve of the optimized node is more robust, indicating that the X-node designed using the conditional generative adversarial network-based topology optimization and refined reconstruction method described in this invention can absorb more energy under load, thereby improving the node's seismic performance. The traditional 3D-printed tubular X-node and the 3D-printed optimized X-node were vertically compressed at a loading rate of 0.5 mm / min until the vertical displacement reached 15 mm, with ultimate loads of 90.8 kN and 94.2 kN, respectively. The corresponding vertical displacements at these ultimate loads were 1.38 mm and 2.16 mm, respectively. In contrast, the ultimate load of the 3D-printed optimized X-node increased by 3.4 kN, and the strain corresponding to the ultimate load increased by 56.5%.
[0052] The above description is merely a preferred embodiment of the present invention and is not intended to further limit the present invention. All equivalent changes made based on the description and drawings of the present invention are within the protection scope of the present invention.
Claims
1. A topology optimization method for additive manufacturing based on adversarial networks, characterized in that, Includes the following steps: Step 1: Generate a set of boundary condition images for the actual design domain of the additively manufactured component as needed; Step 2: Use the finite element method combined with isotropic solid materials and the SIMP penalty method to find the optimal material space distribution, and solve to obtain the optimized model; Step 3: Smooth the optimized boundaries to obtain a set of reconstructed images of the optimized results. Then, randomly select and divide the set of boundary condition images and the corresponding set of reconstructed images into a training set, a test set, and a validation set. Step 4: Build a conditional generative adversarial network to train the boundary condition image set and the optimized reconstructed image set to obtain a predictable black box model; Step 5: Use the trained black-box model to predict the validation set and perform 3D solid design to facilitate additive manufacturing.
2. The additive manufacturing topology optimization method based on adversarial networks according to claim 1, characterized in that, In step 1, the boundary condition image set includes the size information of the optimized design region, the boundary displacement and rotation constraint information, and the position and direction of the external load.
3. The additive manufacturing topology optimization method based on adversarial networks according to claim 1, characterized in that, In step 2, the design domain to be optimized is uniformly divided into several S4 elements, each with a length of 1 unit. Design variables are set to reduce the stiffness of the S4 elements. The range of values for the design variables is shown below: , Where M represents the total number of units, and the design variables for each unit. The value varies between 0.001 and 1. The entire optimization problem is as follows: , , , and These correspond to the displacement vector and stiffness matrix of element m, respectively; T represents the transpose; RS represents the objective function for the entire design domain, which is set here as the structural compliance, i.e., the reciprocal of the stiffness; stiffness reduction is achieved by multiplying the stiffness matrix of each S4 element by the design variables, where w represents the reduction penalty function coefficient; constraints The constraint can be either an equality constraint or an inequality constraint, selected according to the actual engineering situation, where j represents the j-th constraint.
4. The additive manufacturing topology optimization method based on adversarial networks according to claim 3, characterized in that, The unit phase design variables obtained in each step are filtered, specifically as follows: First, set the filter radius. Within the filter radius, calculate the distance weight between each cell and the center cell. The closer the cell is to the center cell, the greater the weight. Let D(m, q) represent the filter radius, Q represent the total number of elements within the filter radius, and D(m, q) represent the distance between elements m and q. After each optimization iteration, the design variables for each element are updated according to the distance weight. Updated cell density for: ; If the objective function is set to minimize compliance, its partial derivative is as follows: ; If the constraint function is set to a volume constraint, its partial derivative is as follows: ; This represents the volume corresponding to each unit m, which is solved using the optimization criterion method, based on the absolute difference of the maximum component of two adjacent design variables. and the most recent two most accurate differences in the objective function Set the total number of iterations and calculate convergence; If the convergence requirement is met before the total number of iterations is reached, the optimization stops; conversely, if the convergence requirement is not met when the total number of iterations is reached, the optimization also stops, and the optimized result is output. The convergence calculation expression is as follows: ; k represents the kth iteration step, and k+1 represents the next iteration step; After convergence, the iteration stops. When the optimal solution condition is met, the value of the design variable of each optimized element needs to be extracted and mapped. When the design variable is 0, the element is removed; when the design variable is 1, the element is retained. The material distribution map of the result is then output.
5. The additive manufacturing topology optimization method based on adversarial networks according to claim 1, characterized in that, In step 3, the optimized model undergoes a refined reconstruction, specifically as follows: The optimized material distribution map is imported into computer-aided modeling software. End nodes of all retained elements are extracted, and all end nodes inside the boundary are removed and sparsified. Key end nodes that can characterize the boundary are retained. End nodes are retained as control nodes near the feature holes obtained after optimization and in locations where stress tends to concentrate after reference finite element analysis. End nodes are deleted on smooth and straight feature boundaries. Then, spline curves are used to sequentially and smoothly connect all retained end nodes to generate a set of reconstructed images.
6. The additive manufacturing topology optimization method based on adversarial networks according to claim 1, characterized in that, In step 4, the conditional generative adversarial network includes a discriminator network and a generator network; The generator network includes an encoder and a decoder, each consisting of three convolutional layers. Each convolutional layer is connected by a normalization layer and uses the LeakyReLU activation function. The encoder continuously downsamples to reduce the size of the input image, and the decoder upsamples to restore the original resolution of the reduced image. The discriminator network contains three convolutional layers, each connected by a normalization layer. The activation function is LeakyReLU, and the entire network does not use fully connected layers.
Citation Information
Patent Citations
Density evolution topological optimization method for continuum structure with smooth boundary
CN112100882A
Conditional generative adversarial network topology optimization method and system based on comparative learning
CN116542080A
