A pipeline flow field reshaping method based on LAAF-PINN

By employing the LAAF-PINN method and utilizing local adaptive activation functions and Brunone control equations, the accuracy problem of water hammer wave simulation in complex pipeline systems was solved, achieving efficient flow field reconstruction and parameter prediction under a meshless method.

CN120429988BActive Publication Date: 2026-08-25HOHAI UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411894605.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2026-08-25
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

Existing numerical simulation methods struggle to accurately describe the actual characteristics of pipelines when simulating the attenuation process of water hammer waves in complex pipeline systems, especially when data is scarce and sensor deployment is inconvenient, leading to inaccurate simulation results.

Method used

A pipeline flow field reshaping method based on LAAF-PINN is adopted. By collecting flow field data from pipeline measuring points, a neural network with local adaptive activation function is constructed. Combined with Brunone control equations, data-driven flow field reshaping is performed. Automatic differentiation algorithm is used to optimize model training, avoid gradient vanishing and exploding, and enhance physical constraints.

Benefits of technology

It enables rapid and accurate reconstruction of pipeline flow field information without the need for global modeling, improves the model's generalization ability and ability to learn physical laws, and can accurately predict the hydraulic parameters of unknown nodes under scarce data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120429988B_ABST
    Figure CN120429988B_ABST
Patent Text Reader

Abstract

The application discloses a pipeline flow field remodeling method based on LAAF-PINN, first, collecting the flow field data of pipeline measuring points; dividing the measuring points into monitoring points and test points, and preprocessing the data sequence; constructing LAAF-PINN, randomly selecting matching points along the pipeline, inputting the space-time sequence of monitoring points and matching points, and obtaining the model output; calculating the data loss term according to the model output of the monitoring points, and calculating the partial differential equation loss term by the residual error of the model output of the matching points, and combining the two to obtain the total loss; after multiple rounds of iteration and update, the trained PINN model is obtained, and the space-time sequence of the test set is inputted, so that the corresponding flow field information can be quickly and accurately reconstructed. The application applies LAAF-PINN to the research of pipeline hydraulic transients, expands the existing flow field remodeling method, has good robustness to data containing uncertain factors, and avoids the problem that the calculation accuracy of the forward simulation may not be high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computational technology for transient hydraulic parameter simulation, specifically relating to a pipeline flow field reshaping method based on LAAF-PINN. Background Technology

[0002] Currently, many scholars have developed various numerical simulation methods for this transient flow problem, including the finite difference method, the finite volume method, and the finite element method. In the forward solution process, the entire pipeline system needs to be divided into solution elements based on boundary conditions and initial conditions, and approximate partial differential equation calculations are performed to efficiently simulate the pressure changes in the pipeline.

[0003] If a water pipeline is long and exhibits numerous characteristic variations, the process of water hammer waves propagating and superimposing is intricate. Accurately simulating the attenuation process of water hammer waves by modeling and calculating the entire pipeline system is extremely difficult. Therefore, pressure sensors need to be deployed along the system. However, due to the influence of terrain and geology, sensors often cannot be deployed at key locations along the pipeline, such as before and after valves. How to effectively utilize sensor data to simulate the hydraulic parameters of critical nodes in the pipeline is crucial for hydraulic safety assessment and real-time monitoring and analysis. If pressure sensors are deployed at both the upstream and downstream ends of a pipe segment, forward numerical simulation methods can solve for the changes in hydraulic parameters at each node within that segment. However, this forward approach fails for areas outside the pipe segment. The forward and backward analysis method, under single-characteristic boundary conditions, can extrapolate the hydraulic parameters of the pipeline based on a time-step solution approach. However, this method requires tedious interpolation work to obtain discrete solutions to partial differential equations.

[0004] PINN is a data-driven model that fully utilizes automatic differentiation algorithms to solve forward and inverse problems of partial differential equation systems. Prior physical knowledge helps the neural network converge faster in the correct direction, and the inclusion of loss terms in the partial differential equation system enables the neural network to identify physical laws even with scarce data. Furthermore, PINN is a meshless method, yielding continuous solutions across the entire spacetime.

[0005] LAAF is a method for optimizing neural network frameworks. It exhibits good performance in solving nonlinear problems and can effectively avoid gradient vanishing and gradient exploding problems that may occur during model training.

[0006] The partial differential equations of transient flow exhibit a complex nonlinearity. Therefore, studying the feasibility of applying LAAF-PINN (Locally Adaptive Activation Functions) to reshape the flow field in pipelines is of great significance for solving the problem of accurately simulating hydraulic transients in pipelines using data-driven models. Summary of the Invention

[0007] To address the issue that numerical models cannot fully describe the characteristics of actual pipelines, this invention provides a pipeline flow field reshaping method based on LAAF-PINN, which expands existing pipeline hydraulic transient simulation methods and reshapes the flow field from a data-driven perspective.

[0008] A pipeline flow field reshaping method based on LAAF-PINN utilizes LAAF-PINN (Locally Adaptive Activation Functions) in a data-driven manner to reshape pipeline hydraulic transients, including the following steps:

[0009] S1: Collect flow field data from pipeline measuring points to obtain two sets of N×T-dimensional sequences regarding piezometric head and flow velocity, where N is the total number of measuring points and T is the total number of time steps collected;

[0010] S2: Divide the measurement points into monitoring points and test points, and perform the same preprocessing on the data sequences for both: stretch and recombine the two sets of sequences to merge them into data of shape (N×T, 2), forming the training set M. d and test set M t ;

[0011] S3: Construct LAAF-PINN, randomly select mating points along the pipeline, and input the one-dimensional spatiotemporal coordinate sequence {x} of the monitoring points and mating points respectively. d ,t d}, {x r ,t r}, thus obtaining the flow field information sequence u output by the model. d ={h d ,v d},u r ={h r ,v r};

[0012] S4: Calculate the data loss term based on the model output of the monitoring points. Substitute the model output of the matching points into the Brunone control equation through the automatic differentiation algorithm to obtain the partial differential equation loss term. Combine the two to obtain the total loss.

[0013] S5: After multiple rounds of iterative updates, the improved PINN model is obtained after training. When the spatiotemporal sequence of the test set is input, the corresponding flow field information can be reconstructed quickly and accurately.

[0014] In S1, only the flow field information of the measuring points along the pipeline needs to be collected, without the need to model the entire pipeline, so that the model can be trained and predicted.

[0015] In S3, the Local Adaptive Activation Function (LAAF) is introduced into the PINN neural network. It is an optimization scheme to improve the neural network framework and can effectively avoid the gradient vanishing and gradient explosion problems that occur during training.

[0016] Furthermore, a deep neural network of depth d has an input layer, d-1 hidden layers, and an output layer. The input to each hidden layer is:

[0017] l j (z j-1 )=ω j z j-1 +b j (1)

[0018] In the formula, l j (z j-1 ) indicates that the current hidden layer is receiving the output z of the neuron in the previous layer. j-1 The input after; ω j b represents the weights between layers j-1 and j in the neural network. j This represents the bias of the j-th hidden layer;

[0019] PINN with a local adaptive activation function introduces a parameter n and a trainable parameter a to each neuron in the hidden layer, where n≥1 is a preset scaling factor. The slope acts as the activation function. This operation amplifies the mapping relationship between neurons, thereby improving the performance of the neural network.

[0020]

[0021] In the formula, σ is the activation function of each hidden neuron; N j Let be the number of neurons in the j-th hidden layer; therefore, the neural network requires additional optimization. One parameter.

[0022] In S3, matching points are randomly selected along the line. Only the spatiotemporal sequence of these points needs to be input, and they do not need to correspond to the real "target value". This provides a great degree of freedom for model building. At the same time, when flow field information is scarce, the number of matching points can be increased to make up for the lack of training data.

[0023] Furthermore, in S4, the model output u of the matching points r ={h r ,v rAutomatic Differentiation (AD) algorithms can be used to obtain the partial differential terms in the system of partial differential equations, thereby evaluating the degree of fit of the model output to the physical information level, enhancing physical constraints, and accelerating model convergence.

[0024] Furthermore, in S4, an improved transient flow control equation is adopted, which considers local instantaneous acceleration and instantaneous convective acceleration, and better describes the dynamic friction caused by the transient flow of water in the pipe:

[0025]

[0026] In the formula, H is the piezometric head (m); t is time (s); a is the pipe wave velocity (m / s); and g is the gravitational acceleration (m / s²). 2 V is the flow velocity, m / s; x represents the distance along the pipe, m; k is the friction coefficient introduced by the Brunone model.

[0027] Introducing the above governing equations into the PINN model, and outputting u based on the model of the matching points. r ={h r ,v r},get:

[0028]

[0029] In the formula, F1 and F2 represent the residual vectors of the corresponding equations. The smaller their values ​​are, the more the model output conforms to the description of the physical equations. k(θ) represents the adaptive parameters for training the neural network, and θ is the neural network parameter set θ=[ω,b,a].

[0030] The data loss term MSE for the monitoring points is obtained using the mean square error formula MSE. u And the loss term MSE of the partial differential equation about the combination point f Therefore, the total loss L(θ) of the model in one iteration is:

[0031] L(θ)=MSE u +w f MSE f (7)

[0032] In the formula, w f For MSE f The weighted value;

[0033] In each iteration, the gradient of the loss function is calculated, and the parameters θ of LAAF-PINN are updated through the Adam gradient descent optimizer to optimize the model output until convergence.

[0034] Furthermore, in S5, a trained PINN model can quickly and accurately reconstruct the pipe flow field from the spatiotemporal coordinates of the input test point or any point along the pipe. Simultaneously, the model's performance can be measured by the relative error L. 2 express:

[0035]

[0036] In the formula, u t Output the flow field information of the model at the test point.

[0037] Compared with existing technologies, the LAAF-PINN-based pipe flow field reshaping method provided by this invention has the following advantages:

[0038] (1) This invention applies the PINN model to the reshaping of the pipeline flow field. The trained model is based on real flow field information and can be extended to practical engineering applications.

[0039] (2) Compared with numerical simulation methods, it is a meshless method. It can efficiently output the flow field information of the entire sequence by inputting the spatiotemporal sequence of the measurement points.

[0040] (3) Introducing partial differential equations as physical constraints ensures that the model can learn the physical laws implied in the real data, even when flow field information is scarce, and can efficiently and accurately predict the hydraulic parameters of unknown nodes.

[0041] (4) From a data-driven perspective, make up for the shortcomings of numerical models in fully describing the actual pipe characteristics and reshape the flow field. Attached Figure Description

[0042] Figure 1 This is a flowchart of a pipeline flow field reshaping method based on LAAF-PINN according to the present invention;

[0043] Figure 2 This is a schematic diagram of the PINN model framework of the present invention;

[0044] Figure 3 This is a schematic diagram of a pipeline system according to an embodiment of the present invention;

[0045] Figure 4 This method uses the method of characteristics to generate the piezometric head at the monitoring point for transient flow equations that only consider a constant frictional model. A graph showing the transient pressure changes at the monitoring point is also included.

[0046] Figure 5 These are two graphs showing the transient pressure changes at the monitoring points;

[0047] Figure 6 These are three graphs showing the transient pressure changes at the monitoring points;

[0048] Figure 7 This is the pressure comparison result of the flow field reshaping result of the model of the present invention at the test point with the "real" solution.

[0049] Figure 8 This is the second result of the pressure comparison between the flow field reshaping result of the model of this invention at the test point and the "real" solution. Implementation

[0050] The principles and technical advantages of the present invention will be further explained below with reference to specific implementation cases and corresponding drawings. It should be noted that the case scenarios are only used to illustrate the function of the present invention and are not intended to limit the scope of application of the present invention. After reading the relevant principles and functions of the present invention, any modifications to the present invention in various equivalent forms should be within the scope limited by the claims appended to this application.

[0051] like Figure 1 As shown, the present invention provides a pipeline flow field reshaping method based on LAAF-PINN, which uses LAAF-PINN (Locally Adaptive Activation Functions) in a data-driven manner to reshape pipeline hydraulic transients, and proceeds according to the following steps:

[0052] S1: Collect flow field data from pipeline measuring points to obtain two sets of N×T-dimensional sequences regarding piezometric head and flow velocity, where N is the total number of measuring points and T is the total number of time steps collected;

[0053] In S1, only flow field information at measuring points along the pipeline is collected for model training and prediction.

[0054] S2: Divide the measurement points into monitoring points and test points, and perform the same preprocessing on the data sequences for both: stretch and recombine the two sets of sequences to merge them into data of shape (N×T, 2), forming the training set M. d and test set M t .

[0055] S3: Construct LAAF-PINN, randomly select mating points along the pipeline, and input the one-dimensional spatiotemporal coordinate sequence {x} of the monitoring points and mating points respectively. d ,t d}, {x r ,t r}, thus obtaining the flow field information sequence u output by the model. d ={h d ,v d},u r ={h r ,v r}:

[0056] In S3, a local adaptive activation function is introduced into the PINN neural network. It is an optimization scheme to improve the neural network framework and can effectively avoid the gradient vanishing and gradient explosion problems that occur during training.

[0057] A deep neural network of depth d has an input layer, d-1 hidden layers, and an output layer. The input to each hidden layer is:

[0058] l j (z j-1 )=ω j z j-1 +b j (1)

[0059] In the formula, l j (z j-1 ) indicates that the current hidden layer is receiving the output z of the neuron in the previous layer. j-1 The input after; ω j b represents the weights between layers j-1 and j in the neural network. j This represents the bias of the j-th hidden layer.

[0060] LAAF-PINN with a local adaptive activation function introduces a parameter n and a trainable parameter a to each neuron in the hidden layer, where n≥1 is a preset scaling factor. The slope acts as the activation function. This operation amplifies the mapping relationship between neurons, thereby improving the performance of the neural network.

[0061]

[0062] In the formula, N j Let be the number of neurons in the j-th hidden layer; therefore, the neural network requires additional optimization. One parameter.

[0063] Matching points are randomly selected along the line, generally with even sampling along the line. The spatiotemporal coordinates of the monitoring points and matching points are determined. Based on the step size of the collected data, the sequence length is determined, and the spatiotemporal sequence is transformed into data of shape (N×T, 2). The monitoring points and matching points are input separately to obtain the corresponding model output u. d ={h d ,v d},u r ={h r ,v r}

[0064] In S3, matching points are randomly selected along the line. Only the spatiotemporal sequence of these points needs to be input, and they do not need to correspond to the real "target value". This provides a great degree of freedom for model building. At the same time, when flow field information is scarce, the number of matching points can be increased to make up for the lack of training data.

[0065] S4: Calculate the data loss term based on the model output of the monitoring points. Substitute the model output of the paired points into the Brunone control equation using an automatic differentiation algorithm to obtain the partial differential equation loss term. Combine the two to obtain the total loss.

[0066] In S4, the model output u of the matching points r ={h r ,v r Automatic Differentiation (AD) algorithms can be used to obtain the partial differential terms in the system of partial differential equations, thereby evaluating the degree of fit of the model output to the physical information level, enhancing physical constraints, and accelerating model convergence.

[0067] The model output from the monitoring points is used to calculate the data loss term MSE. u :

[0068]

[0069] In the formula, N d For training set M d total, This is the model output for the monitoring points.

[0070] The model output at the matching points is used to calculate the partial differential equation loss term (MSE) that measures physical constraints. f The Brunone dynamic friction model, which considers both local instantaneous acceleration and instantaneous convective acceleration, is used to effectively describe the dynamic friction caused by transient water flow in a pipe.

[0071]

[0072] In the formula, H is the piezometric head (m); t is time (s); a is the pipe wave velocity (m / s); and g is the gravitational acceleration (m / s²). 2 V is the flow velocity, m / s; x represents the distance along the pipe, m; k is the friction coefficient introduced by the Brunone model.

[0073] Introducing the above governing equations into the PINN model, and outputting u based on the model of the matching points. r ={h r ,v r The partial differential terms in the partial differential equation are obtained through an automatic differentiation algorithm, and the friction coefficient k is used as a trainable parameter of the neural network.

[0074]

[0075] In the formula, F1 and F2 represent the residual vectors of the corresponding equations. The smaller the values ​​of the two, the more the model output conforms to the description of the physical equation; θ is the neural network parameter set θ=[ω,b,a].

[0076] The data loss term MSE for the monitoring points is obtained using the mean square error formula MSE. u And the loss term MSE of the partial differential equation about the combination point f Therefore, the total loss L(θ) of the model in one iteration is:

[0077] L(θ)=MSE u +w f MSE f (7)

[0078] In the formula, w f For MSE f The weighted value.

[0079] like Figure 2 This is a schematic diagram of the LAAF-PINN framework. In each iteration, the gradient of the loss function is calculated, and the model parameters θ are updated through the Adam gradient descent optimizer to optimize the model output until convergence.

[0080] S5: After multiple rounds of iterative updates, the improved PINN model is obtained and fully trained. Inputting the spatiotemporal sequence of the test set allows for rapid and accurate reconstruction of the corresponding flow field information. The model's performance can be measured by the relative error L... 2 express:

[0081]

[0082] In the formula, u t Output the flow field information of the model at the test point.

[0083] Based on the above scheme, in order to verify the practicality of the method of the present invention, the following steps are taken: Figure 3Example 1: The system consists of a reservoir-pipeline-valve configuration. The upstream reservoir maintains a constant water level of Hr = 50m. The total pipeline length is L = 300m, the wave velocity is a = 1000m / s, the diameter is D = 0.05m, the constant friction coefficient is f = 0.015, and the initial flow velocity is 0.412m / s. To highlight the water hammer pressure change in the pipeline caused by valve operation, the end valve is rapidly closed in 0.02s to generate a transient pressure wave. Five pressure sensors are deployed in the middle of the pipeline system: sensor 2 (x = 80m), sensor 3 (x = 160m), and sensor 5 (x = 240m). The test points are sensor 1 (x = 50m) and sensor 4 (x = 200m).

[0084] Using the method of characteristics, a "realistic" dataset is generated for transient flow equations that only consider a constant friction model. Figure 4 A graph showing the transient pressure changes at the monitoring points. Figure 5 Two graphs showing the transient pressure changes at the monitoring points. Figure 6 Three graphs showing the transient pressure changes at the monitoring points.

[0085] After training, LAAF-PINN predicts the piezometric head at the test points. Figure 7 A graph comparing the model's predictions and the "true" solutions at the test points. Figure 8 By comparing the curves of the model's predicted results and the "true" solution at the test points, it can be found that the model can accurately predict the pressure changes at the nodes, including peaks and undulations. The pressure prediction L is obtained according to equation (8). 2 The relative errors are 6.29e-2, which further demonstrates that the method of the present invention has good generalization ability.

[0086] This invention applies LAAF-PINN to the study of hydraulic transients in pipelines, expanding existing flow field reshaping methods and demonstrating good robustness to data containing uncertainties, while avoiding the potential for low computational accuracy in forward simulations. This is of great significance for solving the problem of accurately simulating hydraulic transients in pipelines using data-driven models.

Claims

1. A method for reshaping the flow field in a pipe based on LAAF-PINN, characterized in that, The specific steps for using LAAF-PINN to reconstruct pipeline hydraulic transients in a data-driven manner are as follows: S1: Collect flow field data at the pipe measuring points to obtain information about the piezometric head and flow velocity. N × T Two sets of sequences in dimension, N The total number of measurement points. T This represents the total number of time steps collected. S2: Divide the measurement points into monitoring points and test points, and perform the same preprocessing on the data sequences: stretch and recombine the two sets of sequences, merging them into a shape ( N × T The data from 2) form the training set. M d and test set M t ; S3: Construct LAAF-PINN, randomly select mating points along the pipeline, and input the one-dimensional spatiotemporal sequences of the monitoring points and mating points respectively. x d , t d }, { x r , t r }, thus obtaining the flow field information sequence output by the model. u d = { h d , v d }, u r = { h r , v r }, u d The model output at the monitoring point corresponds to h d , v d These are the piezometric head and flow rate predicted by the model at the monitoring points; u r For the model output at the matching point, corresponding h r , v r These are the piezometric head and flow rate predicted by the model at the matching point; S4: Calculate the data loss term based on the model output of the monitoring points. Substitute the model output of the matching points into the Brunone control equation through the automatic differentiation algorithm to obtain the partial differential equation loss term. Combine the two to obtain the total loss. S5: After multiple rounds of iterative updates, the trained PINN model is obtained. When the spatiotemporal sequence of the test set is input, the corresponding flow field information can be reconstructed quickly and accurately. In S3, a local adaptive activation function is introduced into the PINN neural network. Depth d Deep neural networks, which have an input layer, d - There is one hidden layer and one output layer. The input to each hidden layer is: (1) In the formula, l j ( z j-1 This indicates that the current hidden layer is receiving the output of the neurons in the previous layer. z j-1 The input after; ω j For the neural network j -1st floor to the j Inter-layer weights; b j Indicates the first j The bias of the hidden layer; PINN with a local adaptive activation function introduces parameters to the neurons in each hidden layer. n and trainable parameters a ,in n ≥1 is the preset scaling factor. The slope that acts as the activation function: (2) In the formula, N j For the first j The number of neurons in each hidden layer determines the number of neurons required for the neural network to be optimized. One parameter; In S4, an improved transient flow control equation is used, considering both local instantaneous acceleration and instantaneous convective acceleration, to describe the dynamic friction caused by the transient flow of water in the pipe: (3) (4) In the formula, H The piezometric head is measured in meters (m). t For time, s; a The wave velocity in the pipe is m / s; g The acceleration due to gravity is m / s². 2 ; V The velocity is m / s; x The distance along the pipeline is expressed in meters (m). k The friction coefficient introduced for the Brunone model, f For a constant friction coefficient of the pipeline, D It is the pipe diameter; Introducing the above governing equations into the PINN model, and outputting the model based on the combination points... u r = { h r , v r },get: (5) (6) In the formula, F 1 and F 2 represents the residual vector of the corresponding equation. The smaller the values ​​of both, the better the model output matches the description of the physical equation. k ( θ ) represents the adaptive parameters for training the neural network. θ For neural network parameter set θ =[ ω , b , a ]; The data loss term for the monitoring points was obtained using the mean square error (MSE) formula. MSE u And the loss term of the partial differential equation about the collocation point MSE f Therefore, the total loss of the model in one iteration L ( θ )for: (7) In the formula, w f for MSE f The weighted value; In each iteration, the gradient of the loss function is calculated, and the parameters of LAAF-PINN are updated using the Adam gradient descent optimizer. θ Optimize the model output until convergence.

2. The pipeline flow field reshaping method based on LAAF-PINN as described in claim 1, characterized in that, In S4, the model output of the matching points u r = { h r , v r Automatic differentiation algorithms can be used to obtain the partial differential terms in the system of partial differential equations, thereby evaluating the degree of fit of the model output to the physical information level.

3. The pipeline flow field reshaping method based on LAAF-PINN as described in claim 1, characterized in that, In S5, a trained PINN model can quickly and accurately reconstruct the flow field of a pipeline by inputting the spatiotemporal coordinates of the test point or any point along the pipeline. Furthermore, the model's performance can be assessed through relative error. L 2 express: (8) In the formula, u t Output the flow field information of the model at the test point.

Citation Information

Patent Citations

  • Pipeline state evaluation method based on physical information neural network

    CN117725821A

  • Method and apparatus for BI-level physics-informed neural networks for PDE constrained optimization

    WO2024031525A1