Neural operator multi-working-condition simulation and post-processing method and system fused with hybrid expert system
By integrating a neural operator architecture with a hybrid expert system, and combining multi-branch networks and physical constraint optimization, the computational efficiency and accuracy issues of multi-condition physical field simulation were solved, achieving efficient, stable simulation results and physical consistency.
Patent Information
- Application Number
- CN202511653558.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-01-23
AI Technical Summary
Existing technologies are computationally expensive and time-consuming in multi-condition physical field simulations, making it difficult to meet the needs of multi-parameter scanning and real-time simulation. Furthermore, they lack physical rationality guarantees, resulting in insufficient simulation accuracy and model generalization ability.
A neural operator architecture integrating hybrid expert systems is adopted, which performs data-driven learning through multi-branch networks and cross-attention fusion mechanisms, and combines physical constraints for post-processing correction, including pyramid-style multi-scale fusion and cross-attention mechanisms, and uses training loss functions and physical residuals to optimize the model.
It significantly improves the computational efficiency and accuracy of multi-condition simulation, achieves efficient and stable model training, ensures the physical rationality and generalization ability of simulation results, and increases speed by 100-1000 times.
Smart Images

Figure CN121389801A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of physical simulation and artificial intelligence, in particular to a neural operator multi-working condition simulation and post-processing method and system fused with a hybrid expert system. BACKGROUND
[0002] At present, multi-working condition physical field simulation plays a key role in engineering design, product optimization and scientific research. Although traditional numerical simulation methods (such as finite element method, finite volume method, etc.) have high accuracy, they have high computational cost and long time consumption, and are difficult to meet the needs of multi-parameter scanning and real-time simulation. The existing simulation methods based on deep learning also have some shortcomings: the introduction of physical constraints in the training stage of the physical information neural network often leads to difficulty in model convergence; pure data-driven methods lack physical rationality guarantee; single network architecture is difficult to cope with the nonlinear coupling problem of complex physical fields under multi-parameter and multi-working condition; at the same time, there is a lack of effective post-processing physical correction mechanism, which is difficult to correct the predicted results physically consistent. In addition, in the multi-condition input scene, the coupling efficiency between features is low, which further limits the simulation accuracy and the generalization ability of the model.
[0003] Therefore, it is of great practical significance to develop a multi-working condition simulation and post-processing method with high efficiency, accuracy and physical rationality to improve the simulation performance and engineering application value of complex physical systems. SUMMARY
[0004] Therefore, the present application provides a neural operator multi-working condition simulation and post-processing method and system fused with a hybrid expert system to realize efficient data-driven learning in the training stage and physical correction after reasoning, and to improve the simulation accuracy and physical rationality.
[0005] To solve the above technical problems, the present application provides a neural operator multi-working condition simulation and post-processing method fused with a hybrid expert system, comprising: After obtaining physical field data under multiple working conditions and standardizing the physical field data, a data set is obtained, and the data set is divided into a training set, a validation set and a test set; wherein the physical field data includes cavity flow data of geometric parameters, material properties, boundary conditions and time evolution parameters; A neural operator architecture fused with a hybrid expert system is constructed, including multiple branch networks, a backbone network and a fusion layer, each branch network adopts a hybrid expert system subnetwork structure including a gating network and multiple expert networks; a velocity field is predicted through a pyramid multi-scale fusion method and a cross-attention fusion mechanism, including: For the input condition parameters of each branch network, the corresponding expert weight is calculated through the gating network; Based on the expert weight and the expert network, branch features of the branch network output are obtained by soft routing fusion or by hard routing selection of the expert with the highest weight; Two-dimensional spatial coordinates are input into the backbone network, and backbone features are output; Through a pyramid multi-scale fusion mode, multi-layer features including the branch features and the backbone features are aggregated by scale, vectorized and stacked, and then averaged by scale, and then fused and projected through a lightweight feedforward, to obtain fused features; Based on a cross-attention fusion mechanism, the fused features are taken as queries, and the final outputs of each branch network are taken as keys and values, attention weighted residual errors and feedforward are calculated, normalized, and then output to obtain a predicted velocity field; A training loss function is constructed, and based on the data set and the training loss function, the neural operator architecture is trained to obtain a trained model; wherein the training loss function includes a main loss function constructed by mean square error and an auxiliary loss function including gate load balancing and sparsity; Based on the trained model, a model prediction result is obtained, and the model prediction result is physically corrected, finite difference NS equations and continuity residual errors are calculated by combining material parameters, the predicted velocity field is optimized by gradient descent, and after optimization, the boundary conditions are hardened to ensure physical rationality.
[0006] In an embodiment of the present application, physical field data under multiple working conditions is obtained and standardized, including: The first 6 dimensions of the condition parameters, spatial coordinates and velocity components are standardized by Z-score, and the time parameters are not normalized in the physical time scale; the first 6 dimensions of the condition parameters include 2 dimensions of boundary conditions, 2 dimensions of geometric parameters, and 2 dimensions of material properties; The mathematical expression of Z-score standardization is: ; Wherein, is the original condition parameter, and are the mean and standard deviation, respectively; is the standardized condition parameter; The time parameter is not normalized in the physical time scale; The spatial coordinates and the velocity field variable are standardized by Z-score: ; Wherein, is the standard deviation of coordinate x; is the standard deviation of coordinate y; Let u be the standard deviation of velocity u. Let v be the standard deviation of velocity v; The mean of the x-coordinate; Let y be the mean of the coordinates. Let be the mean value of velocity u; Let v be the mean value of the velocity. And it is denormalized for recovery when the model is used for inference and prediction.
[0007] In one embodiment of the present invention, the input condition parameters are used to divide multiple branch networks into geometric branch networks, material branch networks, boundary branch networks, and time branch networks according to the condition type; wherein: Geometric branching network, with cavity height and width as input; Material branching network, with fluid density and viscosity as inputs; Boundary branch network, inputs are top velocity and rotation flags; A time branching network, with time parameters as input; The gated network of each branch network consists of a linear layer, LayerNorm, GELU activation function, a linear layer, and Softmax; Each expert network employs a multilayer perceptron, using 1-2 layers of GELU activation function to output hidden features.
[0008] In one embodiment of the present invention, for each input condition parameter of the branch network, the corresponding expert weight is calculated through the gating network; based on the expert weight and the expert network, the branch features output by the branch network are obtained by soft routing fusion or by hard routing to select the expert with the highest weight; including: For input condition parameters , For the k-th input condition parameter, it belongs to The dimensional real space, each branch network contains An expert network, a gated network, is used to calculate expert weights. : ; in, Let be the expert weight vector of the k-th branch network. After Softmax, it represents the weights of each expert network, with dimension . ; The weight matrix of the second layer of the gated network; The weight matrix of the first layer of the gated network; The bias vector of the first layer of the gated network; The bias vector of the second layer of the gated network; The activation function transforms the input into a probability distribution, ensuring that the sum of the expert weights is 1, thereby achieving a weighted fusion of the expert network outputs. GELU is the activation function for Gaussian error linear units; LayerNorm is a layer normalization operation; Each expert network , For multilayer perceptrons: ; in, This is the output of the j-th expert network in the k-th branch; For the j-th expert network, for the input The forward computation process; Let J be the weight matrix of the first layer of the j-th expert network; Let J be the bias vector of the first layer of the j-th expert network; Let J be the bias vector of the second layer of the j-th expert network; For real number space dimension, The dimension of the output feature; Branch outputs are merged via a software router: ; Alternatively, select the expert with the highest weight through hardware routing: ; in, This is the fused output of the k-th branch; This is the index of the expert network with the highest weight.
[0009] In one embodiment of the present invention, a pyramid-style multi-scale fusion method is used to aggregate multi-layer features, including the branch features and the backbone features, according to scale. After vectorization and stacking, the average value is calculated according to scale, and then fused features are obtained through lightweight feedforward fusion and projection; including: Branch networks and backbone network: Output multi-layer features Aggregation by scale: ; Projection after fusion via a lightweight feedforward network: ; wherein, geo is a geometry branch network; mat is a material branch network; bc is a boundary branch network; time is a time branch network; trunk is a trunk branch network; is a scale fusion feature of the l-th layer, obtained by mean aggregation of each branch l-th layer feature, realizing fusion of multi-branch features of the same level; is a mean operation on each branch network feature, used for multi-branch feature aggregation and integration of each branch information; is a feature of the k-th branch network of the l-th layer; is a final feature after fusion and projection by a light feedforward network; is an output layer weight matrix; is a feedforward network weight matrix; is a feature set after branch aggregation, a mean operation on multiple scales, further integrating multi-scale features.
[0010] In an embodiment of the present application, based on a cross-attention fusion mechanism, the fusion feature is taken as a query, and the final output of each branch network is taken as a key value, to calculate an attention weighted residual and a feedforward, and then to normalize the layer to output a predicted velocity field, including: taking the pyramid fusion feature as a query, and the final output of each branch stacked as a key value matrix , to calculate attention: ; ; wherein, is the number of branches; is the feature dimension; represents that the dimension of the matrix is ; is a weight matrix of a query vector; is a pyramid fusion feature; is a weight matrix of a key vector; is a real space dimension; the feature after attention weighting, is an attention weight value matrix weighted sum; is an attention weight vector, representing the weight distribution of each branch output when fused; is a weight matrix of the value vector; is a value matrix; through the residual connection and the feedforward network: ; ; wherein, is the cross-attention fused feature, obtained through LayerNorm and residual connection, integrating the query feature and the attention feature; is the final fused feature, obtained after LayerNorm and feedforward network FFN processing; is a weight matrix of the residual connection; is an attention weighted feature; FFN is a feedforward neural network; The velocity field prediction is finally obtained through the output layer : ; wherein, is the second layer weight matrix of the output layer; is the first layer weight matrix of the output layer; is the final fused feature of the attention mechanism.
[0011] In an embodiment of the present application, the training loss function is: ; wherein the main loss is mean square error: ; The auxiliary loss includes load balancing loss and sparsity loss: ; wherein, is the average gating weight of the i-th expert of the i-th branch, is the i-th branch; is the i-th expert; is the auxiliary loss weight; are the predicted velocity u, the true velocity u, the predicted velocity v and the true velocity v of the i-th sample, respectively.
[0012] In an embodiment of the present application, based on the data set and the training loss function, comprising: The training is performed using an Adam optimizer, each branch network uses 4 experts by default, the gate uses soft routing, the hidden layer dimension is set to 256, and a Dropout dropout layer is set; Further comprising: The trained model is optimized using a structured pruning strategy to optimize the model parameter quantity, comprising: The importance of neurons is determined based on the absolute value of the weight, low-importance neuron connections are removed according to a preset pruning rate, and the network after pruning is fine-tuned, the model accuracy is restored through a learning rate decay strategy, thereby realizing the structured lightweight processing of the neural network model.
[0013] In an embodiment of the present application, the model prediction result is physically corrected, the finite difference NS equation and the continuity residual are calculated by combining material parameters, the prediction velocity field is optimized by gradient descent, and the boundary condition is hardened after optimization to ensure physical rationality, comprising: Material parameters are combined to obtain density and viscosity from the data input conditions; ; Finite difference discretization is performed, the spatial derivative uses central difference, and the boundary point uses forward or backward difference; the time derivative uses adjacent time step difference; Physical residual calculation is performed, the equation is moved to the left, the derivative is replaced by difference, and the momentum equation residual and the continuity equation residual are calculated; Optimization variables are performed, the full-time sequence velocity field predicted by the neural network is optimized; The velocity field is set as the optimization parameter, and an Adam optimizer is used; The objective function is constructed, including the NS momentum residual mean square, the continuity residual mean square, and the boundary condition soft constraint loss; Boundary processing is performed, including adding loss with soft constraint during optimization, and hardening the boundary condition after optimization for each time step; ; Wherein, is the weight hyperparameter of the boundary condition loss; is the boundary condition soft constraint loss; Wherein, the Navier-Stokes momentum equation residual is: ; wherein, , , is the partial derivative of the velocity component u with respect to time t, space x, and space y; is the partial derivative of the pressure p with respect to space x, which is 0 for incompressible fluid; is the fluid density; is the dynamic viscosity of the fluid; is the gradient operator; are the partial derivatives of the velocity component v with respect to time t, space x, and space y, respectively.
[0014] The continuity equation residual is: ; wherein, is the kinematic viscosity, and the spatial derivative is discretized using central finite difference:
[0015] ; wherein, is the partial derivative of the velocity u with respect to x at the grid point ; is the spatial grid step; is the Laplacian operator of the velocity u at the grid point ; , , , , are the velocity u values at the grid points , , , , , respectively; Boundary condition soft constraint loss To ensure that the boundary nodes satisfy the no-slip condition or the driven flow condition, a hardening process is performed after optimization.
[0016] The application also provides a hybrid expert system fusion neural operator multi-working condition simulation and post-processing system, comprising: A data set acquisition module is configured to acquire physical field data under various working conditions, perform standardization processing on the physical field data, and obtain a data set, and divide the data set into a training set, a validation set and a test set, wherein the physical field data includes cavity flow data of geometric parameters, material properties, boundary conditions and time evolution parameters; A neural operator architecture construction module is configured to construct a hybrid expert system fused neural operator architecture, including multiple branch networks, a trunk network and a fusion layer, each branch network adopts a hybrid expert system subnetwork structure including a gating network and multiple expert networks, and a velocity field is predicted through a pyramid multi-scale fusion manner and a cross-attention fusion mechanism. An expert weight calculation module is configured to calculate corresponding expert weights for input condition parameters of each branch network through the gating network. A branch feature output module is configured to obtain branch features output by the branch network based on the expert weights and the expert networks through soft routing fusion or by selecting the expert with the highest weight through hard routing. A trunk feature output module is configured to input two-dimensional spatial coordinates into the trunk network and output trunk features. A fusion feature acquisition module is configured to aggregate multiple layers of features including the branch features and the trunk features by scale through a pyramid multi-scale fusion manner, vectorize and stack, calculate the mean value by scale, and then obtain fusion features through light feedforward fusion and projection. A velocity field prediction module is configured to calculate attention weighted residuals and feedforward based on the cross-attention fusion mechanism, take the fusion features as queries and the final outputs of each branch network as keys and values, normalize, and output to obtain a predicted velocity field. A model training module is configured to construct a training loss function, train the neural operator architecture based on the data set and the training loss function, and obtain a trained model, wherein the training loss function includes a main loss function constructed by mean square error and an auxiliary loss function including gating load balancing and sparsity. An optimization module is configured to obtain a model prediction result based on the trained model, perform physical correction on the model prediction result, combine material parameters to calculate finite difference NS equations and continuity residuals, optimize the predicted velocity field through gradient descent, and harden the boundary conditions after optimization to ensure physical rationality.
[0017] The above technical solutions of the present application have the following advantages compared with the prior art: The mixed expert system fusion neural operator multi-working condition simulation and post-processing method and system adopt a mixed expert system (MOE) enhanced neural operator architecture, process different physical parameters through parallel branch networks, combine load balancing and sparsity auxiliary loss of the gating network, effectively improve the fitting ability and training stability of the multi-working condition, and simultaneously, through pyramid multi-scale fusion and cross attention fusion mechanism, the information interaction ability across branches and scales is enhanced, and the feature expression is significantly enriched. The architecture adopts data-driven training, effectively avoids convergence difficulty caused by physical constraint embedding, greatly reduces the training time compared with the physical information neural network, and realizes efficient and stable model training.
[0018] The present application significantly reduces the physical error through the partial differential equation (PDE) residual fine-tuning and boundary condition hardening in the inference stage, ensures that the simulation result strictly conforms to the physical law, and effectively solves the inherent problem of insufficient physical rationality of the data-driven method. The method maintains high precision while improving the speed by 100-1000 times compared with the traditional numerical simulation method, and has excellent computing efficiency. The architecture design also endows strong generalization ability to various geometric sizes, material properties and boundary conditions, and provides an efficient and reliable solution for engineering design, parameter optimization and real-time simulation scenes. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to make the content of the present application more easily understood, the present application will be further described in detail below according to specific embodiments of the present application and in conjunction with the drawings.
[0020] Figure 1 The overall flow chart of the mixed expert system fusion neural operator multi-working condition simulation method proposed in the present application.
[0021] Figure 2 The mixed expert system fusion neural operator architecture framework diagram in the present application.
[0022] Figure 3 The physical correction flow chart of the model prediction inference post-processing process in the present application.
[0023] Figure 4 The model training loss curve diagram in the square cavity flow case in the present application.
[0024] Figure 5 The speed field component (U speed) comparison nephogram of CAE simulation, model prediction and model prediction post-processing in the present application.
[0025] Figure 6 The speed field component (v speed) comparison nephogram of CAE simulation, model prediction and model prediction post-processing in the present application.
[0026] Figure 7 For the CAE simulation, model prediction and model prediction post-processing speed field (speed amplitude) comparison chart in the application.
[0027] Figure 8 For the CAE simulation and model prediction post-processing streamline chart comparison chart in the application.
[0028] Figure 9 For the CAE simulation and model prediction post-processing velocity cloud chart comparison chart in the application. DETAILED DESCRIPTION
[0029] The application will be further described below in conjunction with the drawings and specific embodiments, so that those skilled in the art can better understand the application and implement it, but the embodiments are not as a limitation on the application.
[0030] In the application, if the direction (up, down, left, right, front and back) is described, it is only for the convenience of describing the technical scheme of the application, and is not indicative or suggestive of the technical features indicated must have a specific orientation, structure and operation in a specific orientation, therefore, cannot be understood as a limitation on the application.
[0031] In the application, the meaning of "several" is one or more, the meaning of "multiple" is two or more, "greater than", "less than", "more than" and the like are not included in the number; "above", "below", "within" and the like are understood to include the number. In the description of the application, if "first" and "second" are described, they are only used for the purpose of distinguishing technical features, and cannot be understood as indicating or suggesting relative importance or implicitly indicating the number of indicated technical features or implicitly indicating the sequence of indicated technical features.
[0032] In the application, unless otherwise explicitly limited, the words "set", "install", "connect" and the like should be broadly understood, for example, they can be directly connected, or indirectly connected through an intermediate medium; can be fixedly connected, or can be detachably connected, or can be integrally formed; can be mechanically connected, or can be electrically connected or capable of communicating with each other; can be the internal communication or interaction relationship of two elements. Those skilled in the art can reasonably determine the specific meaning of the above words in the application in combination with the specific content of the technical scheme.
[0033] Example 1 Referring to Figure 1 As shown in the figure, the hybrid expert system fusion neural operator multi-working condition simulation and post-processing method of the embodiment includes: S1, obtaining physical field data under multiple working conditions and performing standardization processing to obtain a data set, dividing the data set into a training set, a validation set and a test set; wherein the physical field data includes cavity flow data of geometric parameters, material properties, boundary conditions and time evolution parameters.
[0034] Specifically, obtaining physical field data under multiple working conditions and performing standardization processing, comprising: Z-score standardization is adopted for the first 6 dimensions of condition parameters, spatial coordinates and velocity components, and the time parameter is not normalized in the physical time scale; the first 6 dimensions of condition parameters include 2 dimensions of boundary conditions, 2 dimensions of geometric parameters and 2 dimensions of material properties; the data set is divided into a training set of 80%, a validation set of 10% and a test set of 10%.
[0035] Wherein, the mathematical expression of Z-score standardization is: ; Wherein, is the original condition parameter, and are the mean and standard deviation, respectively; is the standardized condition parameter; The time parameter is not normalized in the physical time scale; The spatial coordinates and the velocity field variable are Z-score standardized: ; Wherein, is the standard deviation of coordinate x; is the standard deviation of coordinate y; is the standard deviation of velocity u; is the standard deviation of velocity v; is the mean of coordinate x; is the mean of coordinate y; is the mean of velocity u; is the mean of velocity v; And when the model is used for inference and prediction, it is de-normalized and restored.
[0036] S2, construct a neural operator architecture fused by a hybrid expert system, refer to Figure 2As shown, including a plurality of branch networks, backbone networks and fusion layers, each of the branch networks adopts a hybrid expert system (MOE) subnetwork structure, including a gating network and a plurality of expert networks; through a pyramid multi-scale fusion method and a cross attention fusion mechanism, to integrate each branch feature, to predict the velocity field, including: S21, for each input condition parameter of the branch network, the corresponding expert weight is calculated through the gating network; S22, based on the expert weight and the expert network, the branch feature output by the branch network is obtained by soft routing fusion or by selecting the expert with the highest weight through hard routing; S23, input the two-dimensional spatial coordinates into the backbone network, and output the backbone feature.
[0037] Specifically, the input condition parameters (physical parameters) are divided into a plurality of branch networks according to the condition type, including a geometric branch network, a material branch network, a boundary branch network and a time branch network; wherein: The geometric branch network is input as the cavity height and width; The material branch network is input as the fluid density and viscosity; The boundary branch network is input as the top speed and rotation flag; The time branch network is input as the time parameter; The gating network of each branch network is composed of a linear layer, a LayerNorm, a GELU activation function, a linear layer and a Softmax; Each expert network adopts a multilayer perceptron, which can output hidden features, uses a 1-2 layer GELU activation function, and outputs hidden features. The gating network supports soft routing (weighted combination) or hard routing (selecting a certain expert).
[0038] Specifically, for each input condition parameter of the branch network, the corresponding expert weight is calculated through the gating network; based on the expert weight and the expert network, the branch feature output by the branch network is obtained by soft routing fusion or by selecting the expert with the highest weight through hard routing; including: For input condition parameters , The kth input condition parameter belongs to a real number space, each branch network contains expert networks, and the gating network calculates the expert weight : ; Wherein, is the expert weight vector of the kth branch network, and after Softmax, the weight of each expert network is ; weight matrix of the second layer of the gating network; weight matrix of the first layer of the gating network; bias vector of the first layer of the gating network; bias vector of the second layer of the gating network; for an activation function, convert the input into a probability distribution, so that the sum of the expert weights is 1, and realize the weighted fusion of the output of the expert network; GELU is a Gaussian Error Linear Unit activation function; LayerNorm is a layer normalization operation; Each expert network , is a multi-layer perceptron: ; wherein, is the output of the jth expert network in the kth branch; is the forward calculation process of the jth expert network on the input ; is the weight matrix of the first layer of the jth expert network; is the bias vector of the first layer of the jth expert network; is the bias vector of the second layer of the jth expert network; is the dimension of the real space, is the dimension of the output feature; The branch output is fused by soft routing: ; or the expert with the highest weight is selected by hard routing: ; wherein, is the fusion output of the kth branch; is the index of the expert network with the highest weight.
[0039] S3, by a pyramid multi-scale fusion manner, aggregating multi-layer features including the branch features and the backbone features by scale, vectorizing and stacking, and then averaging by scale, and then through light feedforward fusion and projection, a fusion feature is obtained.
[0040] Step S3 specifically includes: Each branch network and backbone network: outputs multi-layer features , scale aggregation: ; projection after fusion by light feedforward network: ; Wherein, geo is the geometric branch network; mat is the material branch network; bc is the boundary branch network; time is the time branch network; trunk is the trunk branch network; is the scale fusion feature of the lth layer, which is obtained by mean aggregation of the features of each branch lth layer, realizing the fusion of multi-branch features of the same level; is the mean operation of each branch network feature, used for multi-branch feature aggregation and integration of each branch information; is the feature of the kth branch network lth layer; is the final feature after fusion projection by light feedforward network; is the output layer weight matrix; is the feedforward network weight matrix; is the feature set after branch aggregation, mean operation on multi-scale, further integrating multi-scale features.
[0041] S4, based on the cross attention fusion mechanism, taking the fusion feature as the query and the final output of each branch network as the key value, calculating the attention weighted residual and the feedforward, and then normalizing to output the predicted velocity field.
[0042] Step S4 specifically includes: taking the pyramid fusion feature as the query, and the final output of each branch stacked as the key value matrix , calculating the attention: ; ; Wherein, is the number of branches; is the feature dimension; represents that the dimension of the matrix is ; is the weight matrix of the query vector; is the pyramid fusion feature; is the weight matrix of the key vector; is the real space dimension; is the attention weighted feature, and is the attention weight is the value matrix weighted sum; is the attention weight vector, indicating the weight distribution of each branch output when fused; is the weight matrix of the value vector; is the value matrix; through residual connection and feedforward network: ; ; wherein, is the cross-attention fused feature, obtained through LayerNorm and residual connection, integrating the query feature and the attention feature; is the final fused feature, obtained after LayerNorm and feedforward network FFN processing; is the weight matrix of the residual connection; is the attention weighted feature; FFN is a feedforward neural network; Finally, the velocity field prediction is obtained through the output layer : ; wherein, is the second layer weight matrix of the output layer; is the first layer weight matrix of the output layer; is the final fused feature of the attention mechanism.
[0043] S5, a training loss function is constructed, and based on the data set and the training loss function, the neural operator architecture is trained to obtain a trained model; wherein the training loss function includes a main loss function constructed in the form of mean square error and an auxiliary loss function containing gate load balancing and sparsity.
[0044] Specifically, the Adam optimizer is used for training, each branch network uses 4 experts by default, the gate uses soft routing, the hidden layer dimension is set to 256, and the Dropout dropout layer is set.
[0045] Specifically, the training loss function is: ; The main loss is the mean squared error: ; The auxiliary losses include load balancing losses and sparsity losses: ; in, For the first The first branch The average gating weight of each expert To assist in loss weighting; Let u, v, v, and v be the predicted velocity u, the actual velocity u, the predicted velocity v, and the actual velocity v, respectively, for the i-th sample.
[0046] After the model training is completed, a structured pruning strategy is used to optimize the number of model parameters, including: Neuron importance is determined based on the absolute value of weights. Low-importance neuron connections are removed according to a preset pruning rate, and the pruned network is fine-tuned. Model accuracy is restored through a learning rate decay strategy, thereby achieving structured and lightweight processing of the neural network model. After iterative pruning and fine-tuning, the number of parameters is reduced by approximately 10% while maintaining the prediction error MSE, thus improving inference speed while ensuring model prediction accuracy.
[0047] S6. Based on the trained model, obtain the model prediction results and perform physical corrections on them. This involves calculating the finite-difference Navier-Stokes equations and continuous residuals using material parameters, optimizing the predicted velocity field through gradient descent, and hardening the boundary conditions after optimization to ensure physical rationality. (Refer to...) Figure 3 As shown, physical corrections are applied to the model's predictions. Finite difference discrete control equations are used to calculate the physical residuals. The Adam optimizer is used to minimize the objective function, and the boundary conditions are hardened after optimization.
[0048] Specifically, step S6 includes: S61. Combine material parameters and obtain density from data input conditions. and viscosity Calculate kinematic viscosity ; S62. Perform finite difference discretization, with the spatial derivative using central difference and the boundary points using forward or backward difference; the time derivative uses adjacent time step difference; wherein, the finite difference discretization uses a 64×64 grid spatial resolution and a 0.1 second time step, and supports physical units of meters, seconds, kg / m³, and Pa·s; S63, physical residual calculation is performed, the equation is moved to the left, the derivative is replaced by difference, and the momentum equation residual and the continuity equation residual are calculated; S64, optimization variables are performed, and the full-time sequence velocity field predicted by the neural network is predicted The velocity field is Set as an optimization parameter, and an Adam optimizer is used; S65, a target function is constructed, including NS momentum residual mean square, continuity residual mean square and boundary condition soft constraint loss; S66, boundary processing is performed, including adding loss in the optimization process with soft constraint, and hardening the boundary condition after optimization.
[0049] Wherein, the physical correction is performed by minimizing the following objective function: ; Wherein, is a weight hyperparameter of the boundary condition loss; is a boundary condition soft constraint loss; Wherein, the Navier-Stokes momentum equation residual is: ; Wherein, 、 、 is the partial derivative of the velocity component u with respect to time t, space x and space y; is the partial derivative of the pressure p with respect to space x, which is 0 for incompressible fluid; is the fluid density; is the dynamic viscosity of the fluid; is the gradient operator; are the partial derivatives of the velocity component v with respect to time t, space x and space y respectively.
[0050] The continuity equation residual is: ; Wherein, is the kinematic viscosity, and the spatial derivative is discretized by central finite difference:
[0051] ; Wherein, is the partial derivative of the velocity u at the grid point with respect to x; space grid step; grid point Laplacian of the velocity u at the grid point , , , , velocity u at the grid point , , , , velocity u at the grid point boundary condition soft constraint loss Ensure that the boundary nodes meet the no-slip condition or the driven flow condition, and perform hardening processing after optimization.
[0052] Exemplarily, in the square cavity flow case, the training parameter setting is that the hidden layer dimension is 256, and the Adam optimizer is adopted. The loss function curve of the training process is shown in Figure 4 . The results show that, with the increase of the number of training iterations, the overall loss gradually converges and tends to be stable, indicating that the model training process is smooth and effective.
[0053] Figures 5 to 7 respectively show the velocity field and component comparison nephograms of CAE simulation, model prediction and model prediction post-processing. The results show that the model prediction result has high consistency with the CAE simulation result, and the result after post-processing correction is more consistent with the CAE result, and the method significantly improves the accuracy and physical rationality of the velocity field prediction.
[0054] Figure 7 and Figure 8 respectively show the streamline diagram and velocity nephogram comparison of CAE simulation and model prediction post-processing. The results show that the main vortex structure of the two is consistent, the streamline distribution is smooth and continuous, and the position of the velocity peak value and the low speed area is basically coincided, which shows that the model of the application can not only correctly capture the main flow characteristics of the square cavity flow field, but also maintain high-fidelity reconstruction of local details, and verifies the effectiveness of the combination of neural operator and physical post-processing.
[0055] To sum up, the present application aims at the problem of multi-condition physical field simulation, adopts a neural operator architecture enhanced by a mixed expert system (MOE), processes different physical parameters through parallel branch networks, and realizes feature integration by using multi-scale pyramid fusion and cross attention fusion. In the training stage, data-driven learning is adopted to avoid convergence problems caused by physical constraints; in the inference post-processing stage, gradient descent fine-tuning is performed by combining the partial differential equation (PDE) residual of the physical parameters to ensure the physical rationality of the simulation results. The system can efficiently and accurately perform multi-condition physical field simulation, significantly improve the calculation efficiency, and at the same time ensure the physical consistency, and is suitable for engineering design and optimization in the fields of aerospace, etc.
[0056] Embodiment 2 Based on the same inventive concept, the present embodiment provides a mixed expert system fused neural operator multi-condition simulation and post-processing system, which has a similar problem solving principle as the mixed expert system fused neural operator multi-condition simulation and post-processing method, and the repeated parts will not be described again.
[0057] The present embodiment provides a mixed expert system fused neural operator multi-condition simulation and post-processing system, comprising: A data set acquisition module is configured to acquire physical field data under multiple conditions, perform standardization processing on the physical field data, and obtain a data set, and divide the data set into a training set, a validation set and a test set. The physical field data includes cavity flow data of geometric parameters, material properties, boundary conditions and time evolution parameters. A neural operator architecture construction module is configured to construct a mixed expert system fused neural operator architecture, which includes multiple branch networks, a backbone network and a fusion layer. Each branch network adopts a mixed expert system subnetwork structure, which includes a gating network and multiple expert networks. The velocity field is predicted by a pyramid multi-scale fusion method and a cross attention fusion mechanism. An expert weight calculation module is configured to calculate the corresponding expert weight for each input condition parameter of the branch network through the gating network. A branch feature output module is configured to obtain branch features output by the branch network based on the expert weight and the expert network by soft routing fusion or by selecting the expert with the highest weight through hard routing. A backbone feature output module is configured to input two-dimensional spatial coordinates into the backbone network to output backbone features. A fusion feature acquisition module is configured to aggregate multi-layer features including the branch features and the backbone features by a pyramid multi-scale fusion method, vectorize and stack, and then calculate the mean value by scale, and finally obtain fusion features through light feedforward fusion and projection. The speed field prediction module is configured to calculate an attention weighted residual and feedforward based on a cross-attention fusion mechanism, take the fusion features as queries and the final outputs of each branch network as keys and values, normalize, and output a predicted speed field. The model training module is configured to construct a training loss function, train the neural operator architecture based on the data set and the training loss function, and obtain a trained model; wherein the training loss function comprises a main loss function constructed in the form of mean square error and an auxiliary loss function comprising a gating load balancing and sparsity. The optimization module is configured to obtain a model prediction result based on the trained model, perform physical correction on the model prediction result, perform finite difference NS equation and continuity residual calculation by combining material parameters, optimize the predicted speed field through gradient descent, and harden the boundary conditions after optimization to ensure physical rationality.
[0058] Those skilled in the art will understand that embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.
[0059] The present application is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one or more flows and / or blocks Figure 1 The functions specified in one or more flows and / or blocks
[0060] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product comprising instruction devices that implement the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one or more flows and / or blocks Figure 1 The functions specified in one or more flows and / or blocks
[0061] These computer program instructions can also be loaded into a computer or other programmable data processing devices, so that a series of operational steps are generated to realize the computer-implemented processes in the computer or other programmable devices, and the instructions executed in the computer or other programmable devices provide operational steps for implementing the functions specified in the flowchart Figure 1 one flow or multiple flows and / or the functions specified in the block Figure 1 one flow or multiple flows and / or the functions specified in the block
[0062] Finally, it should be noted that the above detailed description is merely intended to illustrate the technical solutions of the present application, rather than limit the same. Although the present application has been described in detail with reference to the examples, those skilled in the art should understand that the technical solutions of the present application can be modified or equivalently replaced, without departing from the spirit and scope of the technical solutions of the present application, and all of these should be covered in the scope of the claims of the present application.
Claims
1. A hybrid expert system fused neural operator multi-working condition simulation and post-processing method, characterized in that, The method comprises the following steps: After obtaining physical field data under multiple working conditions and standardizing the physical field data, a data set is obtained, and the data set is divided into a training set, a validation set and a test set; wherein the physical field data includes cavity flow data of geometric parameters, material properties, boundary conditions and time evolution parameters; A neural operator architecture fused by a hybrid expert system is constructed, including multiple branch networks, a trunk network and a fusion layer, each branch network adopts a hybrid expert system subnetwork structure, including a gating network and multiple expert networks; a velocity field is predicted through a pyramid multi-scale fusion method and a cross-attention fusion mechanism, including: For the input condition parameters of each branch network, the corresponding expert weights are calculated through the gating network; Based on the expert weights and the expert networks, the branch features output by the branch network are obtained through soft routing fusion or by selecting the expert with the highest weight through hard routing; The two-dimensional spatial coordinates are input into the trunk network, and the trunk features are output; Through a pyramid multi-scale fusion method, the multi-layer features including the branch features and the trunk features are aggregated by scale, vectorized and stacked, and then the mean value is calculated by scale, and then a lightweight feedforward fusion and projection are performed to obtain the fusion features; Based on the cross-attention fusion mechanism, the fusion features are taken as queries, and the final outputs of each branch network are taken as keys and values, the attention weighted residual error is calculated, then fed forward, normalized, and the predicted velocity field is output; A training loss function is constructed, and based on the data set and the training loss function, the neural operator architecture is trained to obtain a trained model; wherein the training loss function includes a main loss function constructed by mean square error and an auxiliary loss function containing gating load balancing and sparsity; Based on the trained model, a model prediction result is obtained, and the model prediction result is physically corrected, the finite difference NS equation and the continuity residual error are calculated by combining material parameters, the predicted velocity field is optimized by gradient descent, and the boundary conditions are hardened after optimization to ensure physical rationality.
2. The hybrid expert system fused neural operator multi-working condition simulation and post-processing method according to claim 1, characterized in that, After obtaining physical field data under multiple working conditions and standardizing the physical field data, the following steps are included: The first 6 dimensions of the condition parameters, spatial coordinates and velocity components are standardized by Z-score standardization, and the time parameters are not normalized in the physical time scale; the first 6 dimensions of the condition parameters include 2 dimensions of boundary conditions, 2 dimensions of geometric parameters and 2 dimensions of material properties; The mathematical expression of Z-score standardization is: ; wherein, is the original condition parameter, and are the mean and standard deviation, respectively; is the normalized condition parameter; The time parameters are not normalized in the physical time scale; Spatial coordinates and velocity field variables Z-score standardization was applied: ; wherein is the standard deviation of the coordinate x; is the standard deviation of the coordinates y; is the standard deviation of the velocity u; is the standard deviation of the velocity v; is the mean value of the coordinate x; is the mean value of the coordinates y; is the average value of the velocity u; is the average value of the speed v; And when the model is used for inference and prediction, it is denormalized and restored.
3. The hybrid expert system fused neural operator multi-condition simulation and post-processing method of claim 1, wherein, The input condition parameters are divided into multiple branch networks according to the condition types, including geometric branch networks, material branch networks, boundary branch networks and time branch networks; wherein: The geometric branch network inputs the cavity height and width; The material branch network inputs the fluid density and viscosity; The boundary branch network inputs the top velocity and rotation flag; The time branch network inputs the time parameter; The gating network of each branch network is composed of a linear layer, a LayerNorm, a GELU activation function, a linear layer and a Softmax. Each of the expert networks adopts a multi-layer perceptron, uses a 1-2 layer GELU activation function, and outputs hidden features.
4. The hybrid expert system fused neural operator multi-working condition simulation and post-processing method of claim 1, wherein, For each input condition parameter of the branch network, the corresponding expert weight is calculated by the gating network; Based on the expert weight and the expert network, the branch feature output by the branch network is obtained by soft routing fusion or by selecting the expert with the highest weight through hard routing; including: For input condition parameters , is the kth input condition parameter, belongs to dimensional real number space, each branch network contains expert networks, the gating network calculates the expert weight : ; wherein, is the expert weight vector of the kth branch network, and is the weight of each expert network after Softmax, with a dimension of ; The weight matrix of the second layer of the gated network; The weight matrix of the first layer of the gated network; The bias vector of the first layer of the gated network; The bias vector of the second layer of the gated network; For the activation function, the input is converted into a probability distribution, making the sum of the expert weights equal to 1, and achieving weighted fusion of the outputs of the expert networks; GELU is the Gaussian Error Linear Unit activation function; LayerNorm is the layer normalization operation; Each expert network , , is a multilayer perceptron: ; wherein, is the output of the jth expert network in the kth branch; For the jth expert network, the forward computation process for the input is Wj is the weight matrix of the first layer for the jth expert network; bias vector for the first layer of the jth expert network; bias vector for the second layer of the jth expert network; is the dimension of the real space, is the dimension of the output feature; Branching out through soft routing fusion: ; or by hard routing the highest weighted expert: ; wherein, is the fusion output for the kth branch; Index of the network of experts with the highest weight.
5. The hybrid expert system fused neural operator multi-condition simulation and post-processing method of claim 1, wherein, Through a pyramid multi-scale fusion method, the multi-layer features including the branch features and the trunk features are aggregated by scale, vectorized and stacked, and then averaged by scale, and then fused and projected through a lightweight feedforward network to obtain the fused features; including: Branch networks and backbone network: Output multi-layer features Scale aggregation: ; After fusion through the lightweight feedforward network, projection is performed: ; Wherein, geo is the geometric branch network; mat is the material branch network; bc is the boundary branch network; time is the time branch network; trunk is the trunk branch network; The scale fusion features of the first layer are obtained by mean aggregation of the branch features of the first layer, so as to realize fusion of multi-branch features at the same level. For the mean operation of each branch network feature, for multi-branch feature aggregation, integrate each branch information; characteristic for the l-th layer of the k-th branch network; to fuse the final features projected after the light-weight feedforward network; output layer weight matrix; W is a feedforward network weight matrix; For the branch after the aggregation of feature set, multi-scale mean operation, further integration of multi-scale features.
6. The hybrid expert system fused neural operator multi-condition simulation and post-processing method of claim 1, wherein, Based on the cross-attention fusion mechanism, the fused features are taken as the query, and the final outputs of each branch network are taken as the key and value, to calculate the attention weighted residual and feedforward, and then layer normalization is performed to output the predicted velocity field, including: Pyramid fused features For queries, each branch outputs Stacked as key-value matrix Compute attention: ; ; wherein, is the number of branches; is the feature dimension; The dimensions of the representation matrix are ; is a weight matrix for the query vector; pyramid fused features; is the weight matrix for the key vector; for real space dimension; attention weighted features, attention weights value matrix weighted sum is an attention weight vector, representing the weight distribution of each branch output when fused; is a weight matrix for the value vector; is a value matrix; Through residual connection and a feedforward network: ; ; wherein, is the cross-attention fused feature, obtained through LayerNorm and residual connection, integrating the query feature and the attention feature; For the final fusion feature, after being processed by LayerNorm and a feed-forward network FFN; is the weight matrix for the residual connection; attention weighted features; FFN is a feedforward neural network; The velocity field prediction is finally obtained through the output layer : ; wherein, is the output layer second layer weight matrix; is the output layer first layer weight matrix; is the final fused feature for attention mechanism.
7. The hybrid expert system fused neural operator multi-condition simulation and post-processing method of claim 1, wherein, The training loss function is: ; Wherein, the main loss is the mean square error: ; The auxiliary loss includes the load balancing loss and the sparsity loss: ; wherein, is the average gating weight for the th branch for the th specialist, is the auxiliary loss weight; Predicted velocity u, true velocity u, predicted velocity v, and true velocity v of the i-th sample, respectively.
8. The hybrid expert system fused neural operator multi-condition simulation and post-processing method of claim 1, wherein, Based on the data set and the training loss function, including: Adam optimizer is used for training, each branch network uses 4 experts by default, the gating uses soft routing, the hidden layer dimension is set to 256, and a Dropout dropout layer is set; Further including: A structured pruning strategy is used to optimize the model parameter quantity after the model is trained, including: The importance of neurons is determined based on the absolute value of the weight, low importance neuron connections are removed according to a preset pruning rate, and the network after pruning is fine-tuned, the model accuracy is restored through a learning rate decay strategy, so as to realize the structured lightweight processing of the neural network model.
9. The hybrid expert system fused neural operator multi-condition simulation and post-processing method of claim 1, wherein, The model prediction result is physically corrected, the finite difference NS equation and the continuity residual are calculated by combining the material parameters, the predicted velocity field is optimized through gradient descent, and the boundary conditions are hardened after optimization to ensure physical reasonableness, including: Material parameters are combined to obtain density from data input conditions and viscosity , calculating kinematic viscosity ; Discrete finite difference is performed, central difference is used for spatial derivative, and forward or backward difference is used for boundary points; the time derivative uses adjacent time step difference; Physical residual calculation is performed, the equation is moved to the left, the derivative is replaced by difference, and the momentum equation residual and the continuity equation residual are calculated; Optimizing variables, through neural network on model predicted full time series velocity field Performing a differentiable optimization, setting the velocity field as the parameter to be optimized, using the Adam optimizer; The objective function is constructed, including the NS momentum residual mean square, the continuity residual mean square, and the boundary condition soft constraint loss; Boundary processing is performed, including adding loss with soft constraint during optimization, and hardening the boundary condition for each time step after optimization; Wherein, the physical correction minimizes the following objective function: ; wherein, is a weight hyperparameter for the boundary condition loss; is a boundary condition soft constraint loss; Wherein, the Navier-Stokes momentum equation residual is: ; wherein , , is the partial derivative of the velocity component u with respect to time t, space x, space y. The partial derivative of pressure p with respect to space x is zero for incompressible fluids. where p is the fluid density; kinematic viscosity of the fluid; is the gradient operator; respectively the partial derivatives of the velocity component v with respect to time t, space x, space y, The continuity equation residual is: ; where The spatial derivative is discretized using central finite differences, with the kinematic viscosity The spatial derivative is discretized using central finite differences, with the kinematic viscosity ; ; in, For grid points ( The partial derivative of the velocity u with respect to x; space grid step size; For grid points ( The Laplace operator for velocity u; , , , , They are grid points ( 、( 、( 、( 、( The velocity u at that location; boundary condition soft constraint loss Ensure that the boundary nodes meet the no-slip condition or drive flow condition, and optimize and harden after processing.
10. A hybrid expert system fused neuro- operator multi- condition simulation and post-processing system, characterized in that, Including: A data set acquisition module is configured to acquire physical field data under various working conditions, perform standardization processing on the physical field data, and obtain a data set. The data set is divided into a training set, a validation set, and a test set. The physical field data includes cavity flow data of geometric parameters, material properties, boundary conditions, and time evolution parameters. A neural operator architecture construction module is configured to construct a neural operator architecture fused with a hybrid expert system. The neural operator architecture includes multiple branch networks, a trunk network, and a fusion layer. Each branch network adopts a hybrid expert system subnetwork structure including a gating network and multiple expert networks. A velocity field is predicted through a pyramid multi-scale fusion manner and a cross-attention fusion mechanism. An expert weight calculation module is configured to calculate corresponding expert weights for input condition parameters of each branch network through the gating network. A branch feature output module is configured to obtain branch features output by the branch network based on the expert weights and the expert networks through soft routing fusion or by selecting the expert with the highest weight through hard routing. A trunk feature output module is configured to input two-dimensional spatial coordinates into the trunk network and output trunk features. A fusion feature acquisition module is configured to aggregate multiple layers of features including the branch features and the trunk features by scale through a pyramid multi-scale fusion manner, vectorize and stack, calculate the mean value by scale, and then obtain fusion features through light feedforward fusion and projection. A velocity field prediction module is configured to calculate attention weighted residual and feedforward based on the cross-attention fusion mechanism, take the fusion features as queries, and take the final outputs of each branch network as key values, normalize, and output to obtain a predicted velocity field. A model training module is configured to construct a training loss function, train the neural operator architecture based on the data set and the training loss function, and obtain a trained model. The training loss function includes a main loss function constructed with mean square error and an auxiliary loss function including gating load balancing and sparsity. An optimization module is configured to obtain a model prediction result based on the trained model, perform physical correction on the model prediction result, combine material parameters to calculate finite difference NS equation and continuity residual, optimize the predicted velocity field through gradient descent, and harden the boundary conditions after optimization to ensure physical rationality.