Particle fluid two-phase flow simulation and reverse optimization method based on deep learning
Through the DEM and SPH coupling framework and GNN model, combined with GPU parallel computing and automatic differential technology, the problems of grid failure and slow optimization in two-phase flow simulation are solved, and efficient and accurate fluid particle system simulation and optimization are achieved, which is suitable for complex engineering applications.
Patent Information
- Application Number
- CN202510605736.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-08-19
AI Technical Summary
The existing two-phase flow simulation methods have problems such as grid failure, high computing resource consumption, and slow optimization process convergence when simulating the interaction between particles and fluids, which is difficult to meet the rapid decision-making needs of complex engineering applications.
An efficient two-phase flow coupled simulation framework based on DEM and SPH is built, dynamic process prediction is carried out in combination with graph neural network (GNN), and reverse optimization is carried out through GPU parallel acceleration and automatic differential technology to achieve control of the degree of flow collapse and center of mass offset.
It realizes high-precision and fast two-phase flow simulation and optimization, significantly reduces calculation costs and time, improves system stability and design efficiency, and is suitable for complex engineering scenarios such as dam collapse and mudslide flow prevention and control.
Smart Images

Figure CN120509271A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the interdisciplinary field of fluid mechanics and machine learning, and specifically to a particle-fluid two-phase flow simulation method based on the coupling of discrete element method (DEM) and smoothed particle hydrodynamics (SPH), combined with graph neural network (GNN) to achieve dynamic process prediction and inverse optimization control. The method is particularly suitable for the fields of geological disaster prevention and control, industrial process optimization, and intelligent design of complex fluid control structures. Background Art
[0002] Particle-fluid two-phase flows are widely present in natural environments and industrial processes, such as debris flows, dam breaches, chemical transportation, powder handling, and fluidized bed reactor operations. Existing two-phase flow simulation methods, such as the finite volume method (FVM) and the traditional discrete element-smoothed particle hydrodynamics coupling method (DEM-SPH), can simulate the interaction between particles and fluids to a certain extent, but they still have significant limitations. For example, traditional grid methods are prone to grid failure or require frequent grid reconstruction when dealing with large-scale particle displacement, fragmentation, and merging, resulting in poor numerical stability; high-precision two-phase flow simulations usually require fine-grained discretization and small time steps, resulting in long computational times and high resource consumption; existing optimization processes often rely on a large number of expensive forward simulation samples and use heuristic or black-box optimization methods (such as genetic algorithms and Bayesian optimization). These methods converge slowly and are costly in large-scale parameter spaces, making it difficult to meet the needs of practical engineering applications for rapid decision-making.
[0003] With the rapid development of machine learning, particularly graph neural networks (GNNs), in physical modeling and scientific computing, new methods have emerged to improve the speed and accuracy of simulation reasoning by learning the dynamics of particle systems. However, the current lack of an integrated framework that can simultaneously combine high-precision two-phase flow physics modeling with differentiable machine learning reasoning, while also balancing fast reasoning and inverse optimization capabilities, has limited the promotion and application of machine learning in complex particle-fluid system engineering applications. Summary of the Invention
[0004] Purpose of the invention: In response to the above-mentioned problems in the prior art, the present invention proposes a novel intelligent simulation and inverse optimization method for particle-fluid two-phase flow. Based on GPU parallel acceleration, the present invention constructs an efficient two-phase flow coupling simulation framework that integrates the discrete element method (DEM) and smoothed particle hydrodynamics (SPH) to simulate large-scale, complex evolution of particle-fluid interaction processes (such as flow collapse and dam break phenomena); then, based on the simulation data training, an improved graph neural network (GNN) model is used to accurately capture the dynamic evolution laws of two-phase flow particles, and an inverse optimization design method based on automatic differentiation technology is developed to achieve optimization of control structure (such as obstacle) layout parameters with flow collapse degree, impact energy or center of mass offset as optimization targets.
[0005] Technical solution: The present invention provides a two-phase flow simulation and inverse optimization method based on deep learning, comprising the following steps:
[0006] S1. Construction of a particle-fluid two-phase flow coupling framework: The discrete element method (DEM) is used to model solid particles, and the smoothed particle hydrodynamics method (SPH) is used to perform Lagrangian particle modeling of fluid particles. The motion state of particles is dynamically tracked by simulating interactions such as contact force, penetration resistance, buoyancy, and capillary force between particles. The density, pressure, and velocity fields of fluid particles are calculated using kernel function interpolation methods to accurately capture free surface changes and flow field evolution. The penetration resistance and buoyancy between the solid-liquid two-phase are introduced through Darcy's law to achieve dynamic interaction coupling between solid particles and fluid particles. At the same time, capillary force and adhesion force models are introduced to quantitatively describe the liquid bridge effect between particles and the wetting and adhesion behavior of the fluid on the particle surface. The overall simulation process is accelerated based on GPU parallel computing to achieve efficient dynamic evolution data generation for large-scale particle-fluid two-phase systems.
[0007] S2. Efficient Data Acquisition: Based on the particle-fluid two-phase flow coupling framework, simulate and generate a dataset of particle and fluid motion states under different obstacle layout conditions; divide the particle-fluid two-phase flow dataset into training, test, and validation sets in proportion;
[0008] S3. Graph Neural Network Model Construction: The particle-fluid two-phase flow system is represented as a graph structure, where nodes represent solid particles or fluid particles and edges represent the interactions between particles. Separate encoders and decoders are used for solid particles and fluid particles, respectively, to construct a graph neural network framework model consisting of an encoding module, a message passing module, and a decoding module. The encoding module maps the initial state information of particles or fluid particles into node feature vectors. The message passing module updates the hidden state of each node by aggregating feature information from neighboring nodes. The decoding module maps the updated node features back to the desired output format. The training set data is input into the graph neural network framework model for training.
[0009] Unlike traditional methods that uniformly process all particle features, this method uses independent encoders and decoders for different types of particles (solid particles and fluid particles) in a two-phase flow system, thereby more accurately capturing the dynamic evolution characteristics of the fluid and solid phases, improving model training efficiency and prediction accuracy.
[0010] S4. Adaptive optimization of the control structure position based on target flow characteristics: Set the flow control target (such as minimizing the degree of collapse or center of mass offset of a particle-fluid two-phase flow system) and use the control structure (such as obstacle position parameters) as the optimization variable; based on a trained and differentiable graph neural network model, calculate the gradient information of the optimization target with respect to the control structure parameters through automatic differentiation technology; use a gradient descent optimization algorithm (such as the adaptive moment estimation optimizer Adam) to iteratively update the control structure parameters until the preset convergence conditions are met, thereby realizing the inverse optimization design of the control structure, thereby effectively suppressing destructive flow behavior and improving system stability.
[0011] Furthermore, in S1, the interaction force between solid particles and fluid particles is calculated by the following equation:
[0012] The model expression of the penetration resistance (Drag Force) of solid particle k is:
[0013]
[0014]
[0015] Among them, fluid particles are identified by i or j; solid particles are identified by k; V i is the volume of the i-th fluid particle, ε is the local porosity, β is the interphase momentum exchange coefficient, C d is the experimentally determined Kozeny-Carman constant, v k is the velocity of the solid particle k, is the average velocity of the fluid in the neighborhood around solid particle k;
[0016] The buoyancy calculation formula is as follows:
[0017]
[0018] Among them, ρ w is the density of water, g is the acceleration due to gravity, V i is the volume of the fluid particle, W ik is the kernel function value, which is used to describe the interaction weight between fluid particles and solid particles.
[0019] The calculation of buoyancy force considers the repulsive interaction between fluid particles and surrounding solid particles. In the smoothed particle hydrodynamics (SPH) framework, the buoyancy force on fluid particles can be indirectly calculated by analyzing the repulsive force exerted by solid particles on fluid particles. This repulsive force can be considered a form of buoyancy.
[0020] The dimensionless capillary force between two solid particles can be expressed as:
[0021] F capi =f cp,sf +f cp,men
[0022]
[0023] f cp,men =-2πγrsin(φ)sin(φ+θ)
[0024] Among them, f cp,sf is the surface energy term, f cp,men is the meniscus surface energy term, which represents the component of the meniscus surface tension in the vertical direction, and γ is the surface tension coefficient of the liquid;
[0025] Adhesion force F on fluid particle i adhe,i and the symmetric adhesion force F on the solid particle k adhe,k Respectively expressed as:
[0026]
[0027] Among them, m i 、m k are the masses of fluid particle i and solid particle k respectively; S rk is the saturation of solid particles k; Γ2(S rk ) is the adhesion coefficient function related to water content; D ik is the distance weight function between fluid particle i and solid particle k; x ik is the displacement vector from fluid particle i to solid particle k; ξ is a small positive number to prevent numerical divergence; V k is the volume of solid particles; W kj 、W jk ' is the kernel function value; is the adhesion force acting on fluid particle j.
[0028] Adhesion refers to the attraction between different materials in contact due to the interface effect. The adhesion of solid particles increases with the increase of water content, reaches a peak when the water content approaches the liquid limit, and then gradually decreases as the water content further increases. In the present invention, the fluid-solid interface adhesion model (Surface Adhesion Model) proposed by Akinci et al. is used to calculate the adhesion between fluid particles and solid particles (soil particles). Through this adhesion model, the attraction effect between fluid particles and solid particles as the water content changes can be accurately described, thereby improving the physical reality of the interfacial force during the two-phase flow simulation process.
[0029] Furthermore, in S1, the specific steps of GPU parallel computing acceleration are as follows: in the simulation initialization stage, all SPH fluid particles, DEM solid particles and boundary particles are configured and uniformly loaded into the GPU memory; using the CUDA architecture, the particle data is divided into thread blocks and distributed to multiple stream processing units (Streaming Multiprocessors, SM), and the local data interaction and kernel function calculation process are optimized through shared memory to improve the overall computing efficiency. Within each time step (t+Δt), the DEM subprocess and the SPH subprocess are executed in parallel. The DEM subprocess is used to calculate the dynamic properties of solid particles, such as velocity, position, and porosity, while the SPH subprocess is used to calculate the density, pressure, and velocity changes of fluid particles. After each subprocess is completed, momentum exchange is performed to calculate and apply the permeation resistance, capillary force, and adhesion force at the fluid-solid interface to achieve dynamic interaction coupling between particles and fluid particles. The position and velocity information of fluid and solid particles are updated, and after each time step, it is determined whether the simulation termination conditions have been met, including but not limited to reaching the preset total number of steps, the flow evolution reaching a stable state, or the collapse end criteria. If the termination conditions are not met, the calculation continues at the next time step. If the termination conditions are met, the simulation result data set is output.
[0030] Furthermore, in S2, the particle-fluid two-phase flow dataset is used as reference data of the real particle fluid motion state and is divided into a training set, a test set and a validation set in a ratio of 10:1:1, wherein the training set is used for training model parameters, the test set is used for testing model accuracy, and the validation set is used for verifying the model generalization performance.
[0031] Furthermore, during the generation of the particle-fluid two-phase flow dataset, the positions and numbers of the initial particles are randomly distributed, the positions and numbers of obstacles are randomly set, and noise is introduced into the data to enhance the robustness and generalization ability of the model to different initial conditions and environmental changes.
[0032] Furthermore, in S3, the training set data is input into the graph neural network framework model for training. During the training process, a multi-component loss function including data loss and semi-physical loss is adopted, and the model parameters are optimized through the back-propagation algorithm.
[0033] The expression of the data loss is:
[0034]
[0035] in, and represents the true value, a i and x i represents the predicted acceleration and position vector, and γ is the weight factor;
[0036] The calculation expression of the semi-physical loss is:
[0037]
[0038] Among them, m i is the mass of the i-th particle, and λ is the weight factor.
[0039] Furthermore, in S4, the collapse degree or center of mass offset of the particle-fluid two-phase flow system is set as the optimization target, and an inverse optimization problem is established with the obstacle position parameter as the independent variable. The specific target loss function L is defined as:
[0040]
[0041] The first term represents the mean square error (MSE) between the predicted value and the true value of the terminal particle position, and the second term represents the mean square error (MSE) between the predicted value and the true value of the particle center of mass; N r Indicates the number of particles participating in the terminal calculation, is the predicted end position of the i-th particle, is the true end position of the i-th particle, c pred and c true represent the centroid positions of the predicted and actual particle swarms, respectively.
[0042] Furthermore, in S4, the rules for each iteration update are as follows:
[0043]
[0044] in, represents the current obstacle position, η is the learning rate, is the gradient of the objective function with respect to the obstacle position.
[0045] Beneficial effects: The present invention generates two-phase flow system simulation data based on the DEM and SPH coupling method, uses GPU parallel acceleration to improve computing efficiency, and accurately introduces the drag force, buoyancy and capillary force between particles and fluids through the variational coupling method to construct a high-fidelity simulation data set; uses graph neural network (GNN) to establish a particle-level dynamic interaction modeling framework, independently handles the encoding and prediction of solid particles and fluid particles, trains the graph neural network (GNN) model, and uses a multi-component loss function that combines data loss and semi-physical conservation loss for optimization; further develops a differentiable inverse design system, takes the degree of two-phase flow collapse and the change in the center of mass position of the particle group as optimization targets, and based on the trained differentiable GNN, reversely optimizes the control structure (such as obstacle position parameters) through automatic differentiation technology to achieve intelligent control and optimization of flow behavior. This method has both high-precision simulation and efficient optimization capabilities, and is suitable for complex two-phase flow engineering scenarios such as dam breach, debris flow prevention and control, and fluidized bed design. Compared with the existing technology, the specific beneficial effects are as follows:
[0046] (1) Through an inverse optimization method based on the flow characteristic objective function, the layout parameters of the obstacles can be adaptively adjusted, so that the obstacles form an effective flow control area in the particle-fluid two-phase flow, significantly reducing the overall flow collapse and impact energy, and improving the stability of the system. Simulation and experimental results show that the collapse state of the two-phase flow can be effectively controlled while maintaining high precision.
[0047] (2) The model of the present invention can accurately predict the flow evolution process based on different two-phase flow initial conditions (such as particle distribution, fluid velocity field, number and location of obstacles), and quickly perform reverse optimization based on target guidance. Compared with traditional optimization methods based on experience or exhaustive simulation, the present invention can converge to the ideal structural layout within a very small number of optimization iterations (generally less than 20 steps), significantly improving design efficiency.
[0048] (3) The dynamic prediction model built based on a graph neural network (GNN) has good generalization capabilities for different obstacle configurations, different particle physical parameters, and different fluid conditions. In the validation set, when conditions such as obstacle location, number, and initial flow velocity are not present in the training set, the model can still maintain stable flow prediction accuracy and has excellent cross-scenario adaptability, providing a universal solution for complex geological disaster modeling and industrial particle process optimization.
[0049] (4) Compared with traditional simulation methods based on a complete DEM-SPH solver, the present invention significantly improves overall computational efficiency. In a typical two-phase flow obstacle simulation task, the method based on the present invention only takes about 25 seconds to complete a forward prediction, compared to tens of minutes for traditional methods, greatly reducing the computational cost and time consumption during the engineering simulation process. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 Schematic diagram of the framework of the particle-fluid two-phase flow simulation and inverse optimization method based on deep learning of the present invention;
[0051] Figure 2 Schematic diagram of the DEM-SPH coupling framework: (a) SPH fluid mechanics: particle-based simulation of fluid behavior; (b) coupled interaction: the exchange of forces between fluid and solid; (c) DEM particle mechanics: the mechanical behavior of discrete solid particles; (d) capillary force: the role of liquid bridges between particles;
[0052] Figure 3 Parallel execution of the DEM-SPH solver for solving the coupled governing equations;
[0053] Figure 4 Optimize case settings for obstacle layout;
[0054] Figure 5 Figure 1 is a schematic diagram of particle state update, which includes three modules in the update process: encoding, message passing, and decoding. V represents a particle, E represents the connection between particles, and G represents the graph structure composed of V and E.
[0055] Figure 6 Set up the scenario for the comparative experiment;
[0056] Figure 7 To compare the real experimental results, DEM-SPH solver simulations and GNN model predictions at selected time points (t = 0.05, 0.1, 0.15 and 0.2 s);
[0057] Figure 8 For solid-liquid dam break: temporal variation of the wave front;
[0058] Figure 9 Schematic diagram of the reverse design structure model based on GNN;
[0059] Figure 10 Iterative optimization of obstacle placement: (a) Top-down comparison showing the convergence of the predicted collapse boundary (black) toward the target boundary (yellow) with decreasing loss; (b) 3D view showing the evolution of flow behavior during the optimization process; (c) Ground truth results verifying the optimized obstacle configuration. DETAILED DESCRIPTION
[0060] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0061] Implementation method 1:
[0062] This embodiment provides a method for optimizing the shape of a granular material hopper based on deep learning, as follows:
[0063] 1. Data Preparation: 1. Construct a two-phase flow coupling simulation framework based on the fusion of discrete element method and smoothed particle fluid dynamics, and accurately introduce the drag force, buoyancy and capillary force between particles and fluid through variational coupling method:
[0064] Solid particles are modeled using the discrete element method (DEM), and fluid particles are modeled using the smoothed particle hydrodynamics (SPH) method for Lagrangian particle modeling. The particle motion state is dynamically tracked by simulating interactions such as contact force, penetration resistance, buoyancy, and capillary force between particles. The density, pressure, and velocity fields of fluid particles are calculated using kernel function interpolation methods to accurately capture free surface changes and flow field evolution. The penetration resistance and buoyancy between the solid and liquid phases are introduced through Darcy's law to achieve dynamic interaction coupling between solid particles and fluid particles. Capillary and adhesion force models are also introduced to quantitatively describe the inter-particle liquid bridge effect and the wetting and adhesion behavior of the fluid on the particle surface.
[0065] Specifically, the model expression of the penetration resistance (Drag Force) of the solid particle k is:
[0066]
[0067] Among them, fluid particles are identified by i or j; solid particles are identified by k; V i is the volume of the i-th fluid particle, ε is the local porosity, β is the interphase momentum exchange coefficient, C d is the experimentally determined Kozeny-Carman constant, v k is the velocity of the solid particle k, is the average velocity of the fluid in the neighborhood around solid particle k;
[0068] The buoyancy calculation formula is as follows:
[0069]
[0070] Among them, ρ w is the density of water, g is the acceleration due to gravity, V i is the volume of the fluid particle, W ik is the kernel function value, which is used to describe the interaction weight between fluid particles and solid particles.
[0071] The calculation of buoyancy force considers the repulsive interaction between fluid particles and surrounding solid particles. In the smoothed particle hydrodynamics (SPH) framework, the buoyancy force on fluid particles can be indirectly calculated by analyzing the repulsive force exerted by solid particles on fluid particles. This repulsive force can be considered a form of buoyancy.
[0072] The dimensionless capillary force between two solid particles can be expressed as:
[0073] F capi =f cp,sf +f cp,men
[0074]
[0075] f cp,men =-2πγrsin(φ)sin(φ+θ)
[0076] Among them, f cp,sf is the surface energy term, f cp,men is the meniscus surface energy term, which represents the component of the meniscus surface tension in the vertical direction, and γ is the surface tension coefficient of the liquid;
[0077] Adhesion force F on fluid particle i adhe,i and the symmetric adhesion force F on the solid particle k adhe,k Respectively expressed as:
[0078]
[0079] Among them, m i 、m k are the masses of fluid particle i and solid particle k respectively; S rk is the saturation of solid particles k; Γ2(S rk ) is the adhesion coefficient function related to water content; D ik is the distance weight function between fluid particle i and solid particle k; x ik is the displacement vector from fluid particle i to solid particle k; ξ is a small positive number to prevent numerical divergence; V k is the volume of solid particles; W kj 、W jk ' is the kernel function value; is the adhesion force acting on fluid particle j.
[0080] Coupled model framework such as Figure 2As shown, (a) SPH fluid mechanics: particle-based simulation of fluid behavior; (b) coupled interaction: exchange of forces between fluid and solid; (c) DEM particle mechanics: mechanical behavior of solid discrete particles; (d) capillary force: the effect of liquid bridges between particles, showing the meniscus between two solid particles, where r is the particle radius, θ is the contact angle, H is the distance between the two solid particles, φ is the half-filling angle, and the degree of liquid bridge curvature is determined by φ and θ together to determine the magnitude of the capillary attraction.
[0081] 2. Use GPU parallel acceleration to improve computing efficiency. Based on the GPU computing process, Figure 3 As shown in the figure, during the simulation initialization phase, all SPH fluid particles, DEM solid particles, and boundary particles are configured and uniformly loaded into GPU memory. Using the CUDA architecture, particle data is partitioned and distributed to multiple Streaming Multiprocessors (SMs) according to thread blocks. Shared memory optimizes local data interaction and kernel function calculations to improve overall computational efficiency. Within each time step (t+Δt), the DEM and SPH subprocesses are executed in parallel. The DEM subprocess calculates the dynamic properties of the solid particles, such as velocity, position, and porosity, while the SPH subprocess calculates the density, pressure, and velocity changes of the fluid particles. After each subprocess is completed, momentum exchange is performed to calculate and apply the permeation resistance, capillary force, and adhesion force at the fluid-solid interface, achieving dynamic interaction coupling between the particles and the fluid particles. The position and velocity information of the fluid and solid particles is updated, and after each time step, the simulation termination criteria are determined, including but not limited to reaching the preset total number of steps, the flow evolution reaching a stable state, or the collapse end criteria. If the termination condition is not met, the calculation will continue at the next time step; if the termination condition is met, the simulation result data set will be output.
[0082] 3. Based on the constructed particle-fluid two-phase flow coupling framework, simulate and generate a dataset of particle and fluid motion states under different obstacle layout conditions; and divide the particle-fluid two-phase flow dataset into training, test, and validation sets in proportion:
[0083] In the process of generating the particle-fluid two-phase flow data set, the positions and numbers of the initial particles are randomly distributed, the positions and numbers of obstacles are randomly set, and noise is introduced into the data to enhance the robustness and generalization ability of the model to different initial conditions and environmental changes. The data set parameter configuration is shown in Table 1, and a total of 400 working conditions are generated. Figure 4As shown in the figure, the unit length is defined as a = 0.05 meters. The total area of the flume is set to 4a × 3a × 2a, that is, the length of the flume is 4a, the width is 3a, and the height is 2a. The dataset is used as reference data for the motion state of real-world particles and fluids and is divided into training, test, and validation sets in a ratio of 10:1:1. The training set is used to train the model parameters, the test set is used to test the model accuracy, and the validation set is used to verify the model generalization performance.
[0084] Table 1: Dataset parameter configuration
[0085]
[0086] 2. Graph neural network model construction, training and optimization: Figure 5 The GNN model is constructed as shown in the figure. The graph neural network architecture is divided into three main parts: input state (X0 to X n ), Graph Neural Networks (GNNs (d θ )), feature vector processing (including encoding, message passing and decoding). The encoding module is used to map the initial state information of particles or fluid particles into node feature vectors. In the encoding stage, the input particle material state is converted into feature vectors Where G represents a graph structure composed of particles, which contains information about the particles themselves and information about the interactions between particles. The message passing module updates the hidden state of each node by aggregating the feature information of neighboring nodes. In the message passing phase, the nodes Features and Edges The features are updated, and the node features contain information about the interactions between particles. The decoding module maps the updated node features back to the required output format. During the decoding phase, the updated feature vectors are converted back to the physical state of the particulate material. It is worth noting that in two-phase flow systems, independent encoders and decoders are used for different types of particles (solid particles and fluid particles), so as to more accurately capture the dynamic evolution characteristics of the fluid phase and the solid phase, and improve the model training efficiency and prediction accuracy. This network framework is used to input the training set data for training, and a multi-component loss function including data loss and semi-physical loss is used to optimize the model parameters through the back propagation algorithm. The loss function expression is:
[0087]
[0088] in, and represents the true value, a i and x i represents the predicted acceleration and position vector, γ is the weight factor, and is determined to be 0.6 optimal in the experiment;
[0089] The calculation expression of semi-physical loss is:
[0090]
[0091] Among them, m i is the mass of the i-th particle, and λ is the weight factor.
[0092] 3. Coupling framework verification: In order to verify the coupling effect of DEM and SPH and the accuracy of the neural network model, this study compared the real Figure 6 The initial settings used in this study are shown. These parameter settings ensure that the scale of the simulation system is consistent with the actual experimental conditions, ensuring the comparability of the results. Figure 7 Comparison snapshots between real experimental data, solver simulations, and neural network model predictions are shown for selected time instances of t = 0.05, 0.1, 0.15, and 0.2 seconds. Figure 8 A quantitative comparison of simulations and experiments was performed. A dimensionless number z* is defined here, where the surge front position z is normalized by the initial dam size a, as follows:
[0093]
[0094] Here, t * The experimental results show that the simulation results are in good agreement with the experimental data, indicating that the neural network framework can accurately predict the dynamic behavior of the liquid phase.
[0095] 4. Two-phase flow dam break optimization framework: Develop a differentiable inverse design system, take the two-phase flow collapse degree as the optimization target, and based on the above-mentioned trained differentiable GNN, reversely optimize the obstacle position parameters through automatic differentiation technology to achieve intelligent control and optimization of flow behavior. The optimization framework is as follows: Figure 9 As shown: The process first initializes the position of the obstacle and uses the GNN model to simulate the flow dynamics. Given a goal (for example, sediment collapse or minimize collapse), the gradient of the objective function with respect to the obstacle position is calculated by automatic differentiation. The specific objective loss function L is defined as:
[0096]
[0097] The first term represents the mean square error (MSE) between the predicted value and the true value of the terminal particle position, and the second term represents the mean square error (MSE) between the predicted value and the true value of the particle center of mass; N r Indicates the number of particles participating in the terminal calculation, is the predicted end position of the i-th particle, is the true end position of the i-th particle, cpred and c true represent the centroid positions of the predicted and actual particle swarms, respectively.
[0098] The gradient of the objective function with respect to the obstacle position (expressed as ) provides the direction for adjusting the obstacle position. Based on the gradient information, an optimization algorithm such as Adaptive Moment Estimation (Adam) or Stochastic Gradient Descent (SGD) is used to update the position parameters of the two obstacles. In order to proceed to the next iteration. This iterative process continues until the optimal position of the obstacle is obtained to achieve the goal, thus achieving reverse design. The update rules for each iteration are as follows:
[0099]
[0100] in represents the current obstacle position, η is the learning rate, is the gradient of the objective function with respect to the obstacle position. The iterative process continues until the system reaches the optimal configuration that achieves the goal and stabilizes the process. Figure 10 An iterative optimization process is presented for adjusting the obstacle position to achieve a target slump range for two-phase flow. The optimization framework continuously evaluates the difference between the current slump behavior and the target slump range and minimizes this difference by incrementally adjusting the obstacle position.
[0101] As shown in Table 2, compared with traditional optimization methods based on experience or exhaustive simulation, the present invention can converge to the ideal structural layout within a very small number of optimization iterations (generally less than 20 steps), greatly improving design efficiency.
[0102] Table 2: Resources and computational efficiency of different methods
[0103]
[0104] The above embodiments are intended only to illustrate the technical concepts and features of the present invention. Their purpose is to enable those skilled in the art to understand the contents of the present invention and implement them accordingly. They are not intended to limit the scope of protection of the present invention. Any equivalent changes or modifications made in accordance with the spirit of the present invention are intended to be covered by the scope of protection of the present invention.
Claims
1. A particle-fluid two-phase flow simulation and inverse optimization method based on deep learning, characterized in that: The following steps are involved: S1. Construction of a particle-fluid two-phase flow coupling framework: The discrete element method is used to model solid particles, and the smoothed particle hydrodynamics method is used to perform Lagrangian particle modeling of fluid particles. The particle motion state is dynamically tracked by simulating interactions such as contact force, penetration resistance, buoyancy, and capillary force between particles. The density, pressure, and velocity fields of fluid particles are calculated using kernel function interpolation. The penetration resistance and buoyancy between the solid and liquid phases are introduced using Darcy's law. Capillary and adhesion force models are also introduced. The entire simulation process is accelerated by GPU parallel computing. S2. Efficient Data Acquisition: Based on the particle-fluid two-phase flow coupling framework, simulate and generate a dataset of particle and fluid motion states under different obstacle layout conditions; divide the particle-fluid two-phase flow dataset into training, test, and validation sets in proportion; S3. Graph Neural Network Model Construction: The particle-fluid two-phase flow system is represented as a graph structure, where nodes represent solid particles or fluid particles and edges represent the interactions between particles. Separate encoders and decoders are used for solid particles and fluid particles, respectively, to construct a graph neural network framework model consisting of an encoding module, a message passing module, and a decoding module. The encoding module maps the initial state information of particles or fluid particles into node feature vectors. The message passing module updates the hidden state of each node by aggregating feature information from neighboring nodes. The decoding module maps the updated node features back to the desired output format. The training set data is input into the graph neural network framework model for training. S4. Adaptive optimization of control structure position based on target flow characteristics: Set the flow control target and use the control structure as the optimization variable; Based on a trained and differentiable graph neural network model, the gradient information of the optimization objective with respect to the control structure parameters is calculated through automatic differentiation technology. The control structure parameters are iteratively updated using a gradient descent optimization algorithm until the preset convergence conditions are met, thereby realizing the inverse optimization design of the control structure.
2. The particle-fluid two-phase flow simulation and inverse optimization method based on deep learning according to claim 1 is characterized in that: In S1, the model expression of the penetration resistance of solid particle k is: Among them, fluid particles are identified by i or j; solid particles are identified by k; V i is the volume of the i-th fluid particle, ε is the local porosity, β is the interphase momentum exchange coefficient, C d is the experimentally determined Kozeny-Carman constant, v k is the velocity of the solid particle k, is the average velocity of the fluid in the neighborhood around solid particle k; The buoyancy calculation formula is as follows: Among them, ρ w is the density of water, g is the acceleration due to gravity, V i is the volume of the fluid particle, W ik is the kernel function value; The dimensionless capillary force between two solid particles can be expressed as: F capi =f cp,sf +f cp,men f cp,men =-2πγrsin(φ)sin(φ+θ) Among them, f cp,sf is the surface energy term, f cp,men is the meniscus energy term, which represents the component of the meniscus surface tension in the vertical direction, and γ is the surface tension coefficient of the liquid; Adhesion force F on fluid particle i adhe,i and the symmetric adhesion force F on the solid particle k adhe,k Respectively expressed as: Among them, m i 、m k are the masses of fluid particle i and solid particle k respectively; S rk is the saturation of solid particles k; Γ2(S rk ) is the adhesion coefficient function related to water content; D ik is the distance weight function between fluid particle i and solid particle k; x ik is the displacement vector from fluid particle i to solid particle k; ξ is a small positive number to prevent numerical divergence; V k is the volume of solid particles; W kj 、W jk ' is the kernel function value; is the adhesion force acting on the water particle j.
3. The particle-fluid two-phase flow simulation and inverse optimization method based on deep learning according to claim 1 is characterized in that: In S1, the specific steps of GPU parallel computing acceleration are: configuring fluid particles, solid particles and boundary particles and loading them into GPU memory; using the CUDA architecture, dividing the particle data according to thread blocks and distributing them to multiple stream processing units to optimize local data interaction and kernel function calculation processes through shared memory; in each time step (t+Δt), the DEM sub-process and SPH sub-process are executed in parallel, where the DEM sub-process is used to calculate the dynamic properties of solid particles such as velocity, position and porosity, and the SPH sub-process is used to calculate the density, pressure and velocity changes of fluid particles; after each sub-process is completed, momentum exchange is performed, and the penetration resistance, capillary force and adhesion force on the fluid-solid interface are calculated and applied to realize the dynamic interaction coupling between particles and fluid particles; the position information and velocity information of fluid particles and solid particles are updated, and it is judged whether the simulation termination condition is met after each time step; if the termination condition is not met, the calculation is continued in the next time step; if the termination condition is met, the simulation result data set is output.
4. The particle-fluid two-phase flow simulation and inverse optimization method based on deep learning according to claim 1 is characterized in that: In S2, the data is divided into training set, test set and validation set in a ratio of 10:1:
1. The training set is used to train the model parameters, the test set is used to test the model accuracy, and the validation set is used to verify the generalization performance of the model.
5. The particle-fluid two-phase flow simulation and inverse optimization method based on deep learning according to claim 4 is characterized in that: In the process of generating the particle-fluid two-phase flow dataset, the positions and number of initial particles are randomly distributed, the positions and number of obstacles are randomly set, and noise is introduced into the data to enhance the robustness and generalization ability of the model to different initial conditions and environmental changes.
6. The particle-fluid two-phase flow simulation and inverse optimization method based on deep learning according to claim 1, characterized in that: In S3, the training set data is input into the graph neural network framework model for training. During the training process, a multi-component loss function including data loss and semi-physical loss is used, and the model parameters are optimized through the back-propagation algorithm. The expression of the data loss is: in, and represents the true value, a i and x i represents the predicted acceleration and position vector, and γ is the weight factor; The calculation expression of the semi-physical loss is: Among them, m i is the mass of the i-th particle, and λ is the weight factor.
7. The particle-fluid two-phase flow simulation and inverse optimization method based on deep learning according to claim 1, characterized in that: In S4, the collapse degree or center of mass offset of the particle-fluid two-phase flow system is set as the optimization target, and an inverse optimization problem is established with the obstacle position parameter as the independent variable. The specific target loss function L is defined as: The first term represents the mean square error (MSE) between the predicted value and the true value of the terminal particle position, and the second term represents the mean square error (MSE) between the predicted value and the true value of the particle center of mass; N r Indicates the number of particles participating in the terminal calculation, is the predicted end position of the i-th particle, is the true end position of the i-th particle, c pred and c true represent the centroid positions of the predicted and actual particle swarms, respectively.
8. The particle-fluid two-phase flow simulation and inverse optimization method based on deep learning according to claim 1, characterized in that: In S4, the rules for each iteration update are as follows: in, represents the current obstacle position, η is the learning rate, is the gradient of the objective function with respect to the obstacle position.
Citation Information
Cited By
Paddy wheel mud soil dynamic response analysis method and system based on multi-sensor fusion
CN121095005A
Paddy field wheel mud dynamic response analysis method and system based on multi-sensor fusion
CN121095005B
Debris flow surface SPH particle adaptive processing method and debris flow real-time simulation method
CN121189121A
Mudslide surface spf particle adaptive processing method and mudslide real-time simulation method
CN121189121B