A fluid topology optimization method and system based on physical neural network
Through the fluid topology optimization method based on physical neural networks, the material density distribution of fluid pipelines is optimized using two-dimensional steady-state control equations and neural network models, the problem of uneven material density in fluid pipelines is solved, and faster calculations and better density distribution are achieved.
Patent Information
- Application Number
- CN202210280917.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-22
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2042-03-22
AI Technical Summary
The prior art is difficult to achieve uniformly distributed material density in fluid pipelines, with large calculation amounts and long calculation time, making it difficult to find the optimal material density distribution scheme.
The fluid topology optimization method based on physical neural network is adopted to determine the basic parameters of the fluid pipeline through two-dimensional steady-state control equations, build a neural network model and iterative training, and optimize the material density distribution with the target optimization function and physical constraints.
Finding the optimal material density distribution in the design space of uniformly distributed density materials significantly shortens the calculation time and improves the calculation efficiency.
Smart Images

Figure CN114638076B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of fluid topology optimization, and in particular to a fluid topology optimization method and system based on physical neural network. Background Art
[0002] Topology optimization is a structural optimization method that optimizes the material distribution within a given area to achieve target performance indicators under a series of physical constraints. Although this concept originated from structural mechanics design problems, it has also been widely discussed and studied in the field of fluid mechanics. Artificial intelligence technology has provided new insights into solving topology optimization problems. However, whether using large-scale simulations to generate topology optimization image data for training and then obtaining material distribution results through techniques such as image generation and classification, or generating approximate solutions to material distribution functions through neural networks and then using finite element methods to obtain physical field data and determine whether further iterations are needed to achieve the material distribution that achieves the target performance, both rely on finite element methods. The entire algorithm consists of both neural network and finite element components, resulting in complex models and high computational complexity. It requires the calculation of numerous partial differential equation adjoint problems and sensitivity issues, making it difficult to obtain the optimal distribution solution in the design space of uniformly distributed materials. Summary of the Invention
[0003] The purpose of the present invention is to provide a fluid topology optimization method and system based on physical neural networks, which solves the problem of uneven density distribution of fluid pipeline materials, shortens the calculation time of fluid pipeline material density distribution, and can find the optimal material density distribution scheme in the design space of uniformly distributed density materials.
[0004] The first technical solution adopted by the present invention is: a fluid topology optimization method based on physical neural network, comprising the following steps:
[0005] Based on the fluid topology optimization problem, the basic parameters of the optimized fluid pipeline are determined through the two-dimensional steady-state control equation;
[0006] Based on the basic parameters of the fluid pipeline, a fluid topology optimization mathematical model is constructed according to the target optimization function;
[0007] Based on the mathematical model of fluid topology optimization, sample points in the computational domain are sampled, and a neural network model is constructed in combination with the basic parameters of the fluid pipeline;
[0008] Construct a loss function and iteratively train the neural network model according to the loss function to obtain the topology optimization result.
[0009] Furthermore, the step of determining the basic parameters of the optimized fluid pipeline through the two-dimensional steady-state control equation based on the fluid topology optimization problem specifically includes:
[0010] Based on the fluid topology optimization problem, boundary conditions are obtained and the two-dimensional steady-state control equations are solved to obtain the basic parameters of the fluid pipeline;
[0011] The basic parameters of the fluid pipeline include velocity vector, pressure value and material density distribution value.
[0012] Furthermore, the constitutive form of the two-dimensional steady-state control equation is as follows:
[0013]
[0014]
[0015] In the above formula, u represents the velocity vector, f represents the body force, and ρ fluid represents the fluid density, σ represents the Cauchy stress tensor, p represents the pressure, μ represents the fluid viscosity, I represents the identity matrix, T represents the matrix transpose, The Jacobian matrix representing the velocity, The transpose of the Jacobian matrix representing the velocity.
[0016] Furthermore, the objective optimization function is expressed as follows:
[0017]
[0018] In the above formula, f obj represents the target optimization value, Ω represents the calculation domain, and α represents the material penetration capacity.
[0019] Furthermore, the fluid topology optimization mathematical model is expressed as follows:
[0020]
[0021]
[0022] x∈Ω,u=u D (X),
[0023]
[0024] In the above formula, represents the computational domain boundary, Ω D represents the first kind of boundary, n represents the external normal boundary, g(x) represents the distribution of Cauchy stress on the second kind of boundary, Ω N represents the second type of boundary.
[0025] Furthermore, the step of sampling the computational domain sample points based on the fluid topology optimization mathematical model and constructing a neural network model in combination with the basic parameters of the fluid pipeline specifically includes:
[0026] Sampling sample points in the computational domain of the fluid topology optimization mathematical model to obtain the position coordinates of the sample points;
[0027] The position coordinates of the sample points are used as input values and the basic parameters of the fluid pipeline are used as output values to construct a neural network model;
[0028] The neural network model includes an input layer, a hidden layer and an output layer.
[0029] Furthermore, the step of constructing a loss function and iteratively training the neural network model according to the loss function to obtain a topology optimization result specifically includes:
[0030] Construct loss function based on the mathematical model of fluid topology optimization;
[0031] Based on the hidden layer of the neural network model, select the corresponding activation function;
[0032] Correct the output layer of the neural network model according to the activation function to obtain a correction value;
[0033] Based on the loss function and combined with the correction value, the neural network model is iteratively trained to output the topology optimization results.
[0034] Furthermore, the expression of the correction value is as follows:
[0035]
[0036]
[0037] In the above formula, represents the correction value of the velocity component, and x and y represent the two-dimensional position coordinates of the sample point.
[0038] Furthermore, the expression of the loss function is as follows:
[0039]
[0040] In the above formula, N i (i=1,2,3) represents the number of sample points, θ represents the parameters of the neural network model, ||f(x i ,θ)|| 2 represents the residual of the physics control variance, represents the approximate value of the velocity field on the first type of boundary obtained by the neural network model, u D (x i ,θ) represents the actual value of the velocity field on the known first-class boundary, represents the approximate stress field on the second type of boundary obtained by neural network, g(x i, θ) represents the actual value of the stress field on the known second-type boundary.
[0041] The second technical solution adopted by the present invention is: a fluid topology optimization system based on physical neural network, comprising:
[0042] The confirmation module determines the basic parameters of the optimized fluid pipeline through the two-dimensional steady-state control equation based on the fluid topology optimization problem;
[0043] The construction module builds a mathematical model for fluid topology optimization based on the basic parameters of the fluid pipeline and the target optimization function;
[0044] The sampling module samples sample points in the computational domain based on the mathematical model of fluid topology optimization and constructs a neural network model based on the basic parameters of the fluid pipeline;
[0045] The training module constructs a loss function and iteratively trains the neural network model based on the loss function to obtain the topology optimization result.
[0046] The beneficial effects of the method and system of the present invention are as follows: the present invention solves the problem of material density distribution in fluid pipelines through a neural network topology optimization method, and can greatly shorten the calculation time of material density distribution through parallel calculation of the neural network model. In addition, according to different forms of optimization objective functions, the optimal material density distribution method is found in the design space of uniformly distributed density materials. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a flow chart of the steps of a fluid topology optimization method based on physical neural network of the present invention;
[0048] Figure 2 It is a structural block diagram of a fluid topology optimization system based on physical neural network of the present invention;
[0049] Figure 3 Schematic diagram of the computational domain and boundary conditions of the two-dimensional steady-state topology optimization problem of the present invention;
[0050] Figure 4 is a schematic diagram of a neural network model for a two-dimensional steady-state topology optimization problem of the present invention; DETAILED DESCRIPTION
[0051] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The step numbers in the following embodiments are provided for ease of description only and do not limit the order of the steps. The order of execution of the steps in the embodiments can be adaptively adjusted based on the understanding of those skilled in the art.
[0052] Reference Figure 1The present invention provides a fluid topology optimization method based on physical neural network, which includes the following steps:
[0053] S1. Based on the fluid topology optimization problem, the basic parameters of the optimized fluid pipeline are determined through the two-dimensional steady-state control equation;
[0054] S11. Based on the fluid topology optimization problem, boundary conditions are obtained and the two-dimensional steady-state control equations are solved to obtain the basic parameters of the fluid pipeline;
[0055] Specifically, for fluid topology optimization problems, under given computational domain and boundary conditions, the optimal material distribution density within the computational domain is determined to design some fluid devices or pipeline networks.
[0056] S12. The basic parameters of the fluid pipeline include velocity vector, pressure value and material density distribution value;
[0057] Specifically, refer to Figure 3 For the steady-state topology optimization problem of fluid, the control equation is a steady-state two-dimensional steady-state control equation. In order to improve the training ability of the model, the constitutive form of the two-dimensional steady-state control equation is selected as follows:
[0058]
[0059]
[0060] In the above formula, u represents the velocity vector, f represents the body force, and ρ fluid represents the fluid density, σ represents the Cauchy stress tensor, p represents the pressure, μ represents the fluid viscosity, I represents the identity matrix, T represents the matrix transpose, The Jacobian matrix representing the velocity, The transpose of the Jacobian matrix representing the velocity;
[0061] Further calculation of body force, body force can be expressed as:
[0062] f=-αu
[0063] In the above formula, α represents the material permeability;
[0064] Further calculate the density of the material, the calculation formula is as follows:
[0065]
[0066] In the above formula, α min , α max They represent the permeability of fluid and solid respectively, q represents the conversion coefficient, when the density ρ = 1, it represents fluid, and when ρ = 0, it represents solid. Under normal circumstances, α min Choose 0, α maxChoose a larger number to improve calculation stability;
[0067] The two-dimensional steady-state control equation is solved and calculated through boundary conditions. The boundary condition formula is as follows:
[0068] u=u D (x), u=u D (x)
[0069]
[0070] In the above formula, u D and g represent the specific velocity vector on the first type of boundary and the distribution of Cauchy stress on the second type of boundary, respectively. n represents the external normal vector of the boundary. and They represent the first-class boundary conditions and the second-class boundaries respectively. The no-slip boundary condition is a special first-class boundary condition, representing u = 0. Open boundary conditions such as pipe outlets can be represented by the second-class boundary condition g = 0.
[0071] S2. Based on the basic parameters of the fluid pipeline, a fluid topology optimization mathematical model is constructed according to the target optimization function.
[0072] Specifically, the objective optimization function is expressed as follows:
[0073]
[0074] In the above formula, f obj represents the target optimization value, Ω represents the calculation domain, and α represents the material penetration capacity;
[0075] The mathematical model of fluid topology optimization is constructed by the objective optimization function and physical constraints. The mathematical model of fluid topology optimization is expressed as follows:
[0076]
[0077]
[0078] x∈Ω,u=u D (X),
[0079]
[0080] In the above formula, represents the computational domain boundary, Ω D represents the first kind of boundary, n represents the external normal boundary, g(x) represents the distribution of Cauchy stress on the second kind of boundary, Ω N represents the second type of boundary.
[0081] S3. Based on the mathematical model of fluid topology optimization, sample points in the computational domain are sampled, and a neural network model is constructed in combination with the basic parameters of the fluid pipeline;
[0082] S31, sampling sample points in the calculation domain of the fluid topology optimization mathematical model to obtain position coordinates of the sample points;
[0083] S32, using the position coordinates of the sample points as input values and the basic parameters of the fluid pipeline as output values to construct a neural network model;
[0084] S33. The neural network model includes an input layer, a hidden layer and an output layer.
[0085] Specifically, refer to Figure 4 The input layer of the neural network is the position coordinates of points within the computational domain: (x, y, z). In particular, for two-dimensional steady-state problems, the input layer only has two position coordinates, x and y. The output layer of the neural network is the velocity components, pressure, and material density: (u, v, w, p, ρ), where the material density is the topology optimization result to be calculated. The hidden layer is a fully connected layer. The main reason is that the fully connected layer is sufficient to meet the requirements of our problem and the model is easier to train.
[0086] For two-dimensional problems, the input layer is the two-dimensional position coordinates x and y, the output layer variables are the velocity components u and v, the pressure p, and the material density ρ. The hidden layer is a 5-layer fully connected layer with 64 neurons, and the activation function is the hyperbolic tangent function. According to the boundary conditions, the output layer variables can be modified. The modification of the velocity component is as follows:
[0087]
[0088]
[0089] In the above formula, represents the correction value of the velocity component, and x and y represent the two-dimensional position coordinates of the sample point.
[0090] S4. Construct a loss function and iteratively train the neural network model according to the loss function to obtain the topology optimization result;
[0091] S41. Construct a loss function based on the fluid topology optimization mathematical model;
[0092] Specifically, in order to meet the requirements of automatic differentiation for partial differential equations, the activation function is the hyperbolic tangent function. According to the fluid topology optimization mathematical model, the loss function of the neural network model is as follows:
[0093]
[0094] In the above formula, N i(i=1,2,3) represents the number of sample points, θ represents the parameters of the neural network model, ||f(x i ,θ)|| 2 represents the residual of the physics control variance, represents the approximate value of the velocity field on the first type of boundary obtained by the neural network model, u D (x i ,θ) represents the actual value of the velocity field on the known first-class boundary, represents the approximate stress field on the second type of boundary obtained by neural network, g(x i , θ) represents the actual value of the stress field on the known second-type boundary.
[0095] The last two terms of the loss function reflect the gap between the obtained approximate solution of the physical field and the known first and second boundary conditions. The smaller the gap, the more the approximate solution obtained by the neural network can meet the first and second boundary conditions. By modifying the variables of the neural network output layer, the approximate solution of the neural network can strictly meet the first boundary conditions. At the same time, it can reduce the dependence on the data on the boundary and reduce the number of terms in the loss function. Using the approximate distance function f adf The characteristic is 0 on the boundary and positive in the computational domain:
[0096]
[0097] In the above formula, Θ represents the output layer variable of the original neural network, is the modified variable.
[0098] S42. Selecting a corresponding activation function based on the hidden layer of the neural network model;
[0099] Specifically, since the automatic differentiation algorithm is differentiable, the hyperbolic tangent function is selected as the activation function, and its expression is as follows:
[0100]
[0101] In the above formula, tanh represents the hyperbolic tangent function, and exp represents the exponential function.
[0102] S43, performing correction processing on the output layer of the neural network model according to the activation function to obtain a correction value;
[0103] Specifically, because the value of material density is between 1 and 0, we need to correct the material density of the output layer of the neural network. The correction formula is as follows:
[0104]
[0105] The sample points required for neural network training include those within the computational domain and those at the boundary conditions. The computational domain is the unsupervised learning component and does not require numerical solutions for training. The boundary conditions are supervised learning, and training sample points can be generated using known conditions. By incorporating the first type of boundary conditions into the output layer through the correction method described above, boundary sample points are no longer required. This simplifies the neural network model loss function to:
[0106]
[0107] Sample points can be sampled uniformly or randomly, and can be sampled based on the geometry of the computational domain or the complexity of the physical fields in different sub-computational domains. For topology optimization problems, the objective function and physical constraints are incorporated into the loss function, transforming the constrained optimization problem of the objective function into an unconstrained optimization problem:
[0108] min(f obj +αf con +βloss pde )
[0109] In the above formula, β represents weight, loss pde represents the physical neural network loss function.
[0110] The loss function not only includes the control equation part, but also the objective function part and the physical constraints part of the problem to be solved:
[0111] loss = λ1·f obj +λ2·loss pde +λ3·f con
[0112] In the above formula, λ i (i=1,2,3) represents weight, f obj , f con , loss pde They represent the objective function term, physical constraint term and physical neural network loss function respectively.
[0113] Generally speaking, the physical constraint is a volume constraint, that is, the volume of the fluid in the computational domain does not exceed a certain threshold γ: ∫Ω ρdΩ ≤γ. In fact, the closer the fluid volume is to the threshold γ, the smaller the objective function is. In order to reduce the objective function while satisfying the inequality constraint, the physical constraint term can be written as:
[0114]
[0115] In the above formula, ρ i Represents the density function at a single data point used for training, γ represents the volume constraint threshold, and N represents the number of data points used for training.
[0116] S44. Based on the loss function and the correction value, the neural network model is iteratively trained to output the topology optimization results.
[0117] Specifically, the loss function is optimized by the optimizer ADAM and L-BFGS, and hyperparameters such as weight, learning rate, and number of iterations are appropriately adjusted. When the model converges, the material density distribution can be obtained. i (i = 1, 2, 3). If it is too small, the solution may not satisfy the fluid control equation or physical constraints such as volume constraints. If it is too large, although the fluid control equation or physical constraints can be satisfied in theory, it increases the training difficulty and reduces the convergence speed. In actual training, you can choose an appropriate method to adjust the weights according to the specific problem, such as selecting fixed weights according to the order of magnitude of each part of the loss function, or an adaptive method:
[0118]
[0119] In the above formula, loss i Represents the loss function component, loss represents the total loss function, Represents the weight corresponding to the loss function component, and n represents the number of loss function components.
[0120] Or you can choose to gradually increase the weight based on the initial fixed weight:
[0121] iteration=0:λ=λ0
[0122] iteration=k:λ k =ξ·λ k-1
[0123] In the above formula, ξ represents the increment factor, k represents the kth iteration, and λ k Indicates the k-th iteration weight value;
[0124] Through the above method, the change of weights can be effectively controlled, the convergence of the model can be accelerated, and the fluid control equations or physical constraints can be better satisfied.
[0125] Reference Figure 2 , a fluid topology optimization system based on physical neural networks, including:
[0126] The confirmation module determines the basic parameters of the optimized fluid pipeline through the two-dimensional steady-state control equation based on the fluid topology optimization problem;
[0127] The construction module builds a mathematical model for fluid topology optimization based on the basic parameters of the fluid pipeline and the target optimization function;
[0128] The sampling module samples sample points in the computational domain based on the mathematical model of fluid topology optimization and constructs a neural network model based on the basic parameters of the fluid pipeline;
[0129] The training module constructs a loss function and iteratively trains the neural network model based on the loss function to obtain the topology optimization result.
[0130] The contents of the above method embodiments are all applicable to the present system embodiments. The functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0131] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A fluid topology optimization method based on physical neural network, characterized in that: The following steps are involved: Based on the fluid topology optimization problem, the basic parameters of the optimized fluid pipeline are determined through the two-dimensional steady-state control equation; Based on the basic parameters of the fluid pipeline, a fluid topology optimization mathematical model is constructed according to the target optimization function; Based on the mathematical model of fluid topology optimization, sample points in the computational domain are sampled, and a neural network model is constructed in combination with the basic parameters of the fluid pipeline; Construct a loss function and iteratively train the neural network model based on the loss function to obtain the topology optimization result; The constitutive form of the two-dimensional steady-state control equation is as follows: In the above formula, u represents the velocity vector, f represents the body force, and ρ fluid represents the fluid density, σ represents the Cauchy stress tensor, p represents the pressure, μ represents the fluid viscosity, I represents the identity matrix, T represents the matrix transpose, The Jacobian matrix representing the velocity, The transpose of the Jacobian matrix representing the velocity; The objective optimization function is expressed as follows: In the above formula, f obj represents the target optimization value, Ω represents the calculation domain, and α represents the material penetration capacity; The mathematical model of fluid topology optimization is expressed as follows: In the above formula, represents the computational domain boundary, Ω D represents the first kind of boundary, n represents the external normal boundary, g(x) represents the distribution of Cauchy stress on the second kind of boundary, Ω N represents the second type of boundary.
2. The fluid topology optimization method based on physical neural network according to claim 1, characterized in that: The step of determining the basic parameters of the optimized fluid pipeline through the two-dimensional steady-state control equation based on the fluid topology optimization problem specifically includes: Based on the fluid topology optimization problem, boundary conditions are obtained and the two-dimensional steady-state control equations are solved to obtain the basic parameters of the fluid pipeline; The basic parameters of the fluid pipeline include velocity vector, pressure value and material density distribution value.
3. The fluid topology optimization method based on physical neural network according to claim 2, characterized in that: The step of sampling the computational domain sample points based on the fluid topology optimization mathematical model and constructing a neural network model in combination with the basic parameters of the fluid pipeline specifically includes: Sampling sample points in the computational domain of the fluid topology optimization mathematical model to obtain the position coordinates of the sample points; The position coordinates of the sample points are used as input values and the basic parameters of the fluid pipeline are used as output values to construct a neural network model; The neural network model includes an input layer, a hidden layer and an output layer.
4. The fluid topology optimization method based on physical neural network according to claim 3, characterized in that: The step of constructing a loss function and iteratively training the neural network model according to the loss function to obtain a topology optimization result specifically includes: Construct loss function based on the mathematical model of fluid topology optimization; Based on the hidden layer of the neural network model, select the corresponding activation function; Correct the output layer of the neural network model according to the activation function to obtain a correction value; Based on the loss function and combined with the correction value, the neural network model is iteratively trained to output the topology optimization results.
5. The fluid topology optimization method based on physical neural network according to claim 4, characterized in that: The expression of the correction process is as follows: In the above formula, represents the correction value of the velocity component, and x and y represent the two-dimensional position coordinates of the sample point.
6. The fluid topology optimization method based on physical neural network according to claim 5, characterized in that: The expression of the loss function is as follows: In the above formula, N i (i=1,2,3) represents the number of sample points, θ represents the parameters of the neural network model, ||f(x i ,θ)|| 2 represents the residual of the physics control variance, represents the approximate value of the velocity field on the first type of boundary obtained by the neural network model, u D (x i ,θ) represents the actual value of the velocity field on the known first-class boundary, represents the approximate stress field on the second type of boundary obtained by neural network, g(x i ,θ) represents the actual value of the known stress field on the second type boundary.
7. A fluid topology optimization system based on physical neural network, characterized in that: Used to execute the fluid topology optimization method based on physical neural network as claimed in claim 1, comprising the following modules: The confirmation module determines the basic parameters of the optimized fluid pipeline through the two-dimensional steady-state control equation based on the fluid topology optimization problem; The construction module builds a mathematical model for fluid topology optimization based on the basic parameters of the fluid pipeline and the target optimization function; The sampling module samples sample points in the computational domain based on the mathematical model of fluid topology optimization and constructs a neural network model based on the basic parameters of the fluid pipeline; The training module constructs a loss function and iteratively trains the neural network model based on the loss function to obtain the topology optimization result.
Citation Information
Patent Citations
Topological optimal structure prediction method based on embedded physical constraint deep learning technology
CN113505929A
Compressible turbulent fluid topological optimization method based on automatic differentiation
CN114021497A