A method and system for predicting the flow field around a submarine pipeline based on multi-task learning
By employing a variable-scaled physical information neural network and an adaptive loss function weighting method in the prediction of flow fields around subsea pipelines, the weights of the loss terms are dynamically adjusted, solving the weight balance problem in multi-task learning and achieving fast and accurate flow field prediction. This method is suitable for dynamic monitoring and optimization design of subsea pipelines.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JINAN UNIVERSITY
- Filing Date
- 2025-11-18
- Publication Date
- 2026-06-23
AI Technical Summary
Existing technologies struggle to adaptively and dynamically balance the loss weights of different tasks in multi-task learning, resulting in low prediction accuracy. This is particularly true in predicting flow fields around submarine pipelines, where weight selection is sensitive and difficult.
A variable-scaled physical information neural network framework is adopted to construct a multi-task learning model. The weights of each loss term are dynamically allocated through an adaptive loss function weighting method and a weight growth factor to construct the final total loss function and train the physical information neural network.
It enables rapid and accurate prediction of the flow field around submarine pipelines, and can adapt to real-time analysis of different working conditions and structural designs, improving prediction accuracy and reliability, and avoiding the low efficiency of traditional CFD methods and the insufficient accuracy of other PINN methods.
Smart Images

Figure CN121503274B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence and machine learning technology, specifically relating to a method and system for predicting the flow field around a submarine pipeline based on multi-task learning. Background Technology
[0002] Subsea pipelines are the lifeline for the development and transportation of offshore oil and gas resources, and their structural safety is of paramount importance. Accurately predicting the flow field (i.e., velocity and pressure fields) around the pipeline is the most fundamental and crucial first step in conducting any subsequent structural safety analysis. Only with an accurate flow field can engineers calculate the total hydrodynamic load by integrating the pressure and shear forces on the pipeline surface, thereby assessing the risk of vortex-induced vibration and fatigue life. However, solving the Navier-Stokes equations describing this flow field typically relies on computationally intensive traditional computational fluid dynamics (CFD) simulations, making rapid analysis of various operating conditions (such as different flow velocities and pipe diameters) during the design phase extremely difficult. Physical Information Neural Networks (PINN) methods can predict flow field changes in real time, but balancing the learning weights of multiple physical constraints (i.e., multiple tasks) such as the governing equations and boundary conditions is key to determining prediction accuracy and remains a pressing technical challenge.
[0003] In multi-task learning, the weight of each loss term is crucial to training accuracy. However, current weighting of loss functions presents numerous problems, such as the high sensitivity and difficulty in weight selection, inconsistent task scales, the inability of static weights to adapt to training dynamics, and the potential for imbalance in weighting different loss terms when dynamically adjusting the weights of different loss terms according to specific rules.
[0004] Therefore, there is an urgent need for a method that can eliminate the need for manual parameter tuning, adaptively and dynamically balance the loss weights of different tasks, in order to improve the efficiency and accuracy of multi-task learning. Summary of the Invention
[0005] To address the problems existing in the prior art, this invention provides a method and system for predicting the flow field around a submarine pipeline based on multi-task learning, which has higher prediction accuracy and reliability compared to the prior art.
[0006] To achieve the above objectives, the present invention provides the following solution:
[0007] A method for predicting the flow field around a subsea pipeline based on multi-task learning includes:
[0008] A variable-scale physical information neural network framework is used to construct a multi-task learning model for solving the flow around a cylinder problem; wherein, the multi-task includes prediction tasks within the flow domain and prediction tasks at the flow field boundary;
[0009] The total loss function of the multi-task learning model is constructed, and the weighting method of the adaptive loss function based on uncertainty estimation and the introduction of a weight growth factor are used to dynamically assign weights to each loss term in the total loss function to obtain the final total loss function.
[0010] The physical information neural network is trained based on the final total loss function to obtain a trained physical information neural network.
[0011] Based on a trained physical information neural network, the flow field around the target subsea pipeline is predicted to obtain prediction results; wherein, the prediction results include the velocity components and pressure distribution of the flow field.
[0012] Preferably, the prediction task expression within the watershed is as follows:
[0013]
[0014] In the formula, For the direction of incoming flow, The plane formed by the two perpendicular to the direction of incoming flow corresponds to the flow area around the pipe cross-section; For the computational domain, The velocity component is in the direction of the incoming flow. The velocity component across the direction of the incoming flow. For fluid pressure; The density of seawater, For seawater dynamic viscosity, Scaling factor for VS-PINNs; subscript and Representing variables respectively , and right and The first-order partial derivatives are represented in the same way as the higher-order partial derivatives.
[0015] Preferably, the prediction task expression for the flow field boundary is as follows:
[0016]
[0017] In the formula, for The size of the direction calculation region, for The size of the direction calculation region. for The function, For export boundary conditions, for Inlet velocity profile boundary conditions. for Directional inlet velocity profile boundary conditions.
[0018] Preferably, the method for obtaining the final total loss function includes:
[0019] Substitute the flow field velocity components and pressure distribution output by the physical information neural network into the prediction task expression within the flow domain or at the flow field boundary to obtain the equation residuals predicted by the physical information neural network.
[0020] Based on the equation residuals predicted by the physical information neural network and the label data, a conditional probability density function is obtained; wherein, the conditional probability density function is used to describe the distribution characteristics of the label data given the equation residuals predicted by the physical information neural network.
[0021] Based on the number of tasks and the conditional probability density function, a log-likelihood function for the multiple tasks is constructed.
[0022] Based on the log-likelihood function, by ignoring the constant term and taking the negative value of the log-likelihood function as a whole, adaptive weights related to task uncertainty are derived for each loss term in the total loss function.
[0023] By introducing a weight growth factor into the coefficient of variance in the logarithmic term of the log-likelihood function, the adaptive weights are adjusted to obtain the final total loss function.
[0024] Preferably, the expression for the log-likelihood function is as follows:
[0025] ,
[0026] In the formula, The number of tasks. ; The variance of the task. This represents a component of the total loss function. This represents the loss component of the prediction task within the flow field domain. This represents the loss component of the prediction task for the flow field boundary; Represents the likelihood function. The residuals of the equations representing the physical information predicted by the neural network. Represents label data, The representative mean is variance is The normal distribution; This represents a component of the total loss function;
[0027] Based on the log-likelihood function, the formula for calculating the log-likelihood function by ignoring the constant term and taking the overall negative value is as follows:
[0028]
[0029] in, For loss components Weights; As trainable parameters for the network.
[0030] Preferably, the final total loss function is expressed as follows:
[0031] ,
[0032] In the formula, The weighting growth factor is a measure of the difficulty of the flow field boundary prediction task relative to the prediction task within the flow field domain.
[0033] This invention also provides a multi-task learning-based system for predicting the flow field around a subsea pipeline, used to implement the method, comprising:
[0034] A multi-task construction module is used to construct a multi-task learning model for solving the flow around a cylinder problem using a variable-scaled physical information neural network framework; wherein, the multi-task includes prediction tasks within the flow domain and prediction tasks at the flow field boundary;
[0035] The loss function construction module is used to construct the total loss function of the multi-task learning model, and adopts an adaptive loss function weighting method based on uncertainty estimation and introduces a weight growth factor to dynamically assign weights to each loss term in the total loss function to obtain the final total loss function.
[0036] The neural network training module is used to train the physical information neural network based on the final total loss function to obtain the trained physical information neural network.
[0037] The prediction module is used to predict the flow field around the target subsea pipeline based on a trained physical information neural network and obtain prediction results; wherein, the prediction results include the velocity components and pressure distribution of the flow field.
[0038] Preferably, the loss function construction module includes:
[0039] The prediction unit is used to substitute the flow field velocity components and pressure distribution output by the physical information neural network into the prediction task expression within the flow domain or at the flow field boundary to obtain the equation residual predicted by the physical information neural network.
[0040] The probability density function calculation unit is used to obtain the conditional probability density function based on the equation residuals predicted by the physical information neural network and the label data; wherein, the conditional probability density function is used to describe the distribution characteristics of the label data given the equation residuals predicted by the physical information neural network.
[0041] The log-likelihood function calculation unit is used to construct the log-likelihood function of the multi-task based on the number of multi-tasks and the conditional probability density function.
[0042] An adaptive weight calculation unit is used to derive adaptive weights related to task uncertainty for each loss term in the total loss function by ignoring the constant term and taking the overall negative value of the log-likelihood function based on the log-likelihood function.
[0043] The weight adjustment unit is used to introduce a weight growth factor into the coefficient of variance in the logarithmic term of the log-likelihood function to adjust the adaptive weights and obtain the final total loss function.
[0044] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0045] Calculating, analyzing, designing, and predicting flow fields around subsea pipelines requires solving the Navier-Stokes equations. Currently, solving the Navier-Stokes equations typically relies on computationally intensive traditional computational fluid dynamics (CFD) simulations, making rapid analysis of various operating conditions (such as different flow velocities and pipe diameters) during the design phase extremely difficult. Methods based on Physical Information Neural Networks (PINN) can predict flow field changes in real time, but different PINN methods exhibit significant differences in computational and prediction accuracy.
[0046] 1. Advantages of this invention over CFD: After training, it can quickly perform inference, making real-time predictions of flow field changes under different working conditions and structural designs. This rapid inference capability performs exceptionally well in engineering scenarios requiring fast response and real-time analysis, such as in the dynamic monitoring and optimization design of subsea pipelines, where it can quickly provide flow field information to support decision-making. In contrast, traditional CFD methods require remodeling and recalculation for even the slightest change in the flow field, which is time-consuming and inefficient.
[0047] 2. Advantages of this invention compared to other PINN methods: This invention is based on maximum likelihood estimation and introduces a weighted growth factor that measures the ratio of different task difficulties to construct an adaptive weighted method. This innovation enables this invention to achieve higher accuracy in the training and inference of flow fields around subsea pipelines compared to other methods, thus meeting the needs of calculating, analyzing, designing, and predicting flow fields around subsea pipelines. Attached Figure Description
[0048] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 This is a flowchart of the method for predicting the flow field around a subsea pipeline based on multi-task learning, as an embodiment of the present invention.
[0050] Figure 2 The dynamic evolution of each weight component during PINN training when solving the Navier-Stokes equations for flow around a cylinder using the AW method;
[0051] Figure 3 To adopt the IAW method ( The dynamic evolution of each weight component during PINN training when solving the Navier-Stokes equations for flow around a cylinder.
[0052] Figure 4 To adopt the IAW method ( The dynamic evolution of each weight component during PINN training when solving the Navier-Stokes equations for flow around a cylinder.
[0053] Figure 5 To adopt the IAW method ( The dynamic evolution of each weight component during PINN training when solving the Navier-Stokes equations for flow around a cylinder.
[0054] Figure 6 To employ the method of the present invention ( The dynamic evolution of each weight component during PINN training when solving the Navier-Stokes equations for flow around a cylinder.
[0055] Figure 7 To employ the method of the present invention ( The dynamic evolution of each weight component during PINN training when solving the Navier-Stokes equations for flow around a cylinder.
[0056] Figure 8 To employ the method of the present invention ( The dynamic evolution of each weight component during PINN training when solving the Navier-Stokes equations for flow around a cylinder.
[0057] Figure 9 The result is from Fluent calculations of the Navier-Stokes equations for flow around a cylinder. Cloud map;
[0058] Figure 10 The result is from Fluent calculations of the Navier-Stokes equations for flow around a cylinder. Cloud map;
[0059] Figure 11It is the absolute error of solving the Navier-Stokes equations for flow around a cylinder using the AW method. Cloud map;
[0060] Figure 12 It is the absolute error of solving the Navier-Stokes equations for flow around a cylinder using the AW method. Cloud map;
[0061] Figure 13 It is the IAW method ( The absolute error in solving the Navier-Stokes equations for flow around a cylinder. Cloud map;
[0062] Figure 14 It is the IAW method ( The absolute error in solving the Navier-Stokes equations for flow around a cylinder. Cloud map;
[0063] Figure 15 The method of this invention ( The absolute error in solving the Navier-Stokes equations for flow around a cylinder. Cloud map;
[0064] Figure 16 The method of this invention ( The absolute error in solving the Navier-Stokes equations for flow around a cylinder. Cloud map;
[0065] Figure 17 yes The curve showing the change.
[0066] Figure 18 This is a schematic diagram of the computational domain for solving the Navier-Stokes equations for flow around a cylinder; Detailed Implementation
[0067] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0068] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0069] The following supplementary explanations are provided for the relevant technical terms appearing in this embodiment:
[0070] VS-PINN: A variable-scaling neural network framework for physics-informed networks, derived from existing technology: KO S, PARK S. VS-PINN: A fast and efficient training of physics-informed neural networks using variable-scaling methods for solving PDEs with stiff behavior [J]. Journal of Computational Physics, 2025, 529.
[0071] AW: An adaptive weighting method, based on the following existing techniques:
[0072] CIPOLLA R, GAL Y, KENDALL A. Multi-task Learning Using Uncertainty toWeigh Losses for Scene Geometry and Semantics [Z]. 2018 IEEE / CVF Conference on Computer Vision and Pattern Recognition. 2018: 7482-91.10.1109 / cvpr.2018.00781;
[0073] XIANG Z, PENG W, LIU X, YAO W. Self-adaptive loss balanced Physics-informed neural networks [J]. Neurocomputing, 2022, 496: 11-34.;
[0074] HOU J, LI Y, YING S. Enhancing PINNs for solving PDEs via adaptivecollocation point movement and adaptive loss weighting [J]. NonlinearDynamics, 2023, 111(16): 15233-61.
[0075] Both have applications;
[0076] IAW: An adaptive weighting method applied in existing technologies: NIU P, GUO J, CHEN Y, ZHOU Y, FENGM, SHI Y. Improved physics-informed neural network in mitigating gradient-related failures [J]. Neurocomputing, 2025, 638.
[0077] Example 1:
[0078] like Figure 1 As shown, a method for predicting the flow field around a subsea pipeline based on multi-task learning includes:
[0079] S1: A multi-task learning model for solving the flow around a cylinder is constructed using a variable scaling physical information neural network framework (VS-PINNs); the multi-task includes prediction tasks within the flow domain and prediction tasks at the flow field boundary.
[0080] A further implementation method is based on the Navier-Stokes equations within the VS-PINNs framework, i.e., the expression for the prediction task in the watershed is as follows (the equations have been dimensionless, and the L2 norm of the relative error is used as the evaluation index):
[0081]
[0082] In the formula, The direction of the incoming flow (along the main ocean current direction, within a cross section orthogonal to the pipe axis). The plane formed by the two directions, perpendicular to the direction of incoming flow (in-section normal), corresponds to the flow area around the pipe cross-section. The computational domain covers a certain area of seawater outside the pipe, including the near-wall boundary layer and the downstream wake. The velocity component is in the direction of the incoming flow. The velocity component across the direction of the incoming flow. For fluid pressure; Let be the density of seawater, which is dimensionless and has a value of 1. The dynamic viscosity of seawater is dimensionless and taken as 0.02. Scaling factor for VS-PINNs; subscript and Representing variables respectively , and right and The first-order partial derivative. The representation of higher-order partial derivatives follows similarly. Wherein, the total velocity is defined. Used to evaluate speed error.
[0083] The wall is subjected to a no-slip boundary condition, meaning the relative velocity between the seawater and the wall is zero. The inlet and outlet boundary conditions, i.e., the prediction expressions for the flow field boundaries, are as follows:
[0084]
[0085] In the formula, for The size of the direction calculation region. for The size of the direction calculation region. for The function, For export boundary conditions, for Inlet velocity profile boundary conditions. for Directional inlet velocity profile boundary conditions.
[0086] This embodiment provides a specific calculation equation for a flow field boundary prediction task:
[0087]
[0088] In the formula, For export boundary conditions, the downstream far-field reference pressure is set to 0; The boundary conditions are the inlet velocity profile, i.e., a parabolic inflow distribution is given. The boundary condition for the inlet velocity profile is that the inlet normal velocity is zero. For example... Figure 18 As shown.
[0089] S2: Construct the total loss function of the multi-task learning model, and use an adaptive loss function weighting method based on uncertainty estimation and introduce a weight growth factor to dynamically assign weights to each loss term in the total loss function to obtain the final total loss function.
[0090] The total loss function is as follows:
[0091]
[0092] in:
[0093] For the loss of prediction tasks within the watershed, The loss for the task of predicting the flow field boundary. and These are the corresponding weighting coefficients.
[0094] A further implementation method for obtaining the final total loss function includes:
[0095] S21: Substitute the flow field velocity components and pressure distribution output by the physical information neural network into the prediction task expression within the flow domain or at the flow field boundary to obtain the equation residuals predicted by the physical information neural network.
[0096] S22: Based on the equation residuals predicted by the physical information neural network and the label data, obtain the conditional probability density function; whereby the conditional probability density function is used to describe the distribution characteristics of the label data when given the equation residuals predicted by the physical information neural network.
[0097] Specifically, regarding the flow field around this subsea pipeline, assuming the predicted value of the physical information neural network... With tag data All follow a Gaussian distribution. Here For: the velocity components of the fluid derived from physical information through neural network reasoning. and and pressure Substituting this into the prediction task expression within the watershed or at the flow field boundary, the value on the right-hand side of the resulting equation is... This refers to the residual of the equation predicted by the physical information neural network. Here... That is, 0.
[0098] Its conditional probability density function can be expressed as:
[0099]
[0100] in: Let be the variance of the task, which here represents the variance of the computational results within the computational domain for the flow field problem around the subsea pipeline. Conditional probability density function. Describes the situation where a given predicted value is... hour The distribution characteristics, assuming that the distribution follows a mean of variance is The normal distribution is denoted as . .
[0101] S23: Construct the log-likelihood function of the multi-task based on the number of tasks and the conditional probability density function.
[0102] Assuming there are a total of One task. Here. Let be the prediction tasks within the flow field domain and the prediction tasks at the flow field boundary, respectively. Their likelihood functions are as follows:
[0103] .
[0104] A further implementation method is that the expression for the log-likelihood function is as follows:
[0105] ,
[0106] In the formula, The number of tasks; The variance of the task. This represents a component of the total loss function. This represents the loss component of the prediction task within the flow field domain. This represents the loss component of the prediction task for the flow field boundary; Represents the likelihood function. The residuals of the equations representing the physical information predicted by the neural network. Represents label data, The representative mean is variance is It follows a normal distribution.
[0107] S24: Based on the log-likelihood function, ignore the constant term and take the negative value of the log-likelihood function as a whole to derive the adaptive weights related to task uncertainty for each loss term in the total loss function.
[0108] S25: Introduce a weight growth factor into the coefficient of variance in the logarithmic term of the log-likelihood function to adjust the adaptive weights and obtain the final total loss function.
[0109] We ignore constant terms that do not affect network updates. Since the goal is to minimize the loss function, we further consider the negative value of the log-likelihood function, which is expressed as:
[0110]
[0111] in, For loss components The weighting. It is worth noting that the weighting needs to be... As trainable parameters for the network, the weights are used to allow the network to adaptively select the optimal weights. This is relevant for tasks with high uncertainty (mathematically meaning variance). High uncertainty (high value) will be automatically assigned a lower weight because high uncertainty means that the model’s predictions for the task are less reliable, so it should account for a smaller proportion of the total loss.
[0112] However, research has found that this adaptive weighting method is prone to weight imbalance when dealing with multi-task learning problems that simultaneously involve both easy and difficult tasks. Specifically, tasks with high uncertainty are adaptively assigned very small weights, while tasks with low uncertainty are adaptively assigned very large weights. This significant difference in magnitude between weight components can lead to ill-conditioned gradients, suboptimal convergence, and even underfitting. To address this issue, a weight growth factor needs to be introduced. This is used to penalize high-uncertainty tasks, ensuring that the network can effectively learn low-confidence tasks even when driven by high-confidence tasks, thereby guaranteeing the accuracy of weight balancing calculations within a certain range. To measure the ratio of the difficulty of the flow field boundary prediction task to that of the flow field domain prediction task, the final total loss function expression is as follows:
[0113] ,
[0114] In the formula, This represents the weighting growth factor. Controlling growth, These can be fixed values, trainable parameters of the network, or parameters indirectly calculated through other methods. The value is greater than or equal to 1, and is usually between 1 and 100.
[0115] S3: Train the physical information neural network based on the final total loss function to obtain the trained physical information neural network.
[0116] S4: Based on the trained physical information neural network, predict the flow field around the target subsea pipeline and obtain the prediction results; the prediction results include the velocity components and pressure distribution of the flow field.
[0117] The sampling point configuration is consistent with VS-PINN. The remaining parameter settings are as follows: The hidden layer structure was designed with a training period of 40,000 epochs, using the tanh activation function. The optimizer used was Adam with an initial learning rate of 0.001, and PyTorch's exponential learning rate scheduler was employed with a decay rate of 0.95, updating every 1000 epochs. The computational accuracy of three adaptive weighting methods (the method described in this invention, the AW method, and the IAW method) was compared.
[0118] The adaptive loss function of the AW method is as follows:
[0119]
[0120] Research has found that the AW method is prone to weight imbalance when dealing with multi-task learning problems that simultaneously involve easy and difficult tasks. Specifically, tasks with high uncertainty are adaptively assigned very small weights, while tasks with low uncertainty are adaptively assigned very large weights. This significant difference in magnitude between weight components can lead to ill-conditioned gradients, suboptimal convergence, and even underfitting.
[0121] The adaptive loss function of the IAW method is as follows:
[0122]
[0123] in The IAW method introduces a weight cap based on the AW method. This limit is set to restrict the growth of the maximum weight. Although the IAW method performs well in most cases, the original IAW paper also points out that this upper limit of weight is an empirical parameter and needs to be adjusted according to specific circumstances; there is no universal standard. Inappropriate selection can disrupt the balance of adaptive weights—a threshold that is too high will significantly reduce the flexibility of adaptive adjustment; a threshold that is too low will lead to a weakening of the constraint effect.
[0124] The differences in characteristics between the method of this invention and the AW and IAW methods can be explained through the following analysis:
[0125] The method of this invention introduces a regulating factor. Used to control the final total loss function Changes. When the weight distribution is unbalanced, this adjustment mechanism can enhance the penalty for tasks with high uncertainty. The following rules are established to quantify the intensity of the penalty imposed on tasks with high uncertainty:
[0126]
[0127] in and These represent tasks with high uncertainty and tasks with low uncertainty, respectively. . This is used as a measure of the penalty and control imposed on high-uncertainty tasks in the method of this invention. Similarly, when this rule is applied to evaluate the AW method, it can be expressed as:
[0128]
[0129] In the AW method, The value of is usually negative. Therefore, The smaller the absolute value, the more dominant the update becomes. Therefore, for the AW method, the formula needs to be referenced. The rule is to reverse the numerator and denominator. Fixed at 0.01, and We plotted the value as it changed from 0.05 to 0.8. The change curve is as follows Figure 17 As shown, where express and All methods The values all increase monotonically, indicating that they can all impose a certain penalty on tasks with high uncertainty. However, at larger... Within the range of values, The relatively low value indicates that the AW method insufficiently penalizes tasks with high uncertainty and is unable to effectively alleviate the weight imbalance problem. In contrast, the method of this invention can adjust the parameters... To control The range of values and gradients are determined to implement an adjustable and stronger penalty for tasks with high uncertainty. This penalty helps reduce the uncertainty of these tasks, increases the weight of difficult tasks, and thus avoids weight imbalance. It is important to note that... Too large will lead to The numerical value and gradient actually decrease, weakening the penalty effect on difficult learning tasks and also hindering the mitigation of weight imbalance. For the IAW method, comparing the final total loss function formula with the adaptive loss function formula of the IAW method reveals that... and exist The same position in the IAW method. This represents the upper bound of the weights, and is therefore usually set relatively large to ensure sufficient adaptability. However, if... (or If the value is too large, it will also fail to effectively alleviate the weight imbalance.
[0130] The calculation error results are shown in Table 1. The method of this invention has a weight growth factor. It maintains high computational accuracy over a wide range of values, significantly outperforming the AW and IAW methods. This means that the present invention can provide more accurate flow field predictions. Figure 2 , Figure 3 , Figure 4 as well as Figure 5 It is evident that the maximum values of the two weight components in the AW method differ by two orders of magnitude. To control the upper bound of the AW method weights, the IAW method is adopted and set... Value , and The results show that when the IAW method... hour, and The errors are respectively and Raise the upper limit to At that time, the error increased to and ; and lower the upper bound This would cause both weight components to reach their upper bounds during training, completely losing their adaptive adjustment ability and rendering the IAW method ineffective. In contrast, as... Figures 6 to 8 As shown, although the overall trend of the weight components in the method of the present invention follows... The flow rate increases, but the weight ratios of each component remain relatively stable, indicating that the method of this invention can predict the flow field more stably and accurately. Finally, Figures 9 to 16 The graphs show the contour plots of the Fluent calculation results and the absolute error contour plots of the three methods. The results show that the method of this invention has the smallest error. This fully demonstrates that this invention has higher prediction accuracy and reliability compared to existing technologies when solving this type of hydrodynamic analysis problem for subsea pipelines.
[0131] Table 1
[0132]
[0133] It should be noted that the adaptive weighting method for the loss function in multi-task learning provided by this invention can be used for classification or regression tasks, supervised learning or unsupervised learning. This method can be widely applied to scenarios that require simultaneous optimization of multiple objectives, such as computer vision, natural language processing, speech recognition, recommender systems, and Physical-Informed Neural Networks (PINNs).
[0134] Example 2:
[0135] This invention also provides a system for predicting the flow field around a subsea pipeline based on multi-task learning, and a method for implementing this system, including:
[0136] The multi-task building module is used to construct a multi-task learning model for solving the flow around a cylinder problem using a variable-scaled physical information neural network framework; wherein, the multi-task includes prediction tasks within the flow domain and prediction tasks at the flow field boundary;
[0137] The loss function construction module is used to construct the total loss function of the multi-task learning model. It adopts an adaptive loss function weighting method based on uncertainty estimation and introduces a weight growth factor to dynamically assign weights to each loss term in the total loss function to obtain the final total loss function.
[0138] The neural network training module is used to train the physical information neural network based on the final total loss function to obtain the trained physical information neural network.
[0139] The prediction module is used to predict the flow field around the target subsea pipeline based on a trained physical information neural network, and obtain the prediction results, including the velocity components and pressure distribution of the flow field.
[0140] A further implementation method is that the loss function construction module includes:
[0141] The prediction unit is used to substitute the flow field velocity components and pressure distribution output by the physical information neural network into the prediction task expression within the flow domain or at the flow field boundary to obtain the equation residual predicted by the physical information neural network.
[0142] The probability density function calculation unit is used to obtain the conditional probability density function based on the equation residuals predicted by the physical information neural network and the label data; wherein, the conditional probability density function is used to describe the distribution characteristics of the label data when given the equation residuals predicted by the physical information neural network.
[0143] The log-likelihood function calculation unit is used to construct the log-likelihood function of multiple tasks based on the number of tasks and the conditional probability density function.
[0144] An adaptive weight calculation unit is used to derive adaptive weights related to task uncertainty for each loss term in the total loss function based on the log-likelihood function, ignoring constant terms and taking the overall negative value of the log-likelihood function.
[0145] The weight adjustment unit is used to introduce a weight growth factor into the coefficient of variance in the logarithmic term of the log-likelihood function, thereby adjusting the adaptive weights and obtaining the final total loss function.
[0146] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. A method for predicting the flow field around a subsea pipeline based on multi-task learning, characterized in that, include: A variable-scale physical information neural network framework is used to construct a multi-task learning model for solving the flow around a cylinder problem; wherein, the multi-task includes prediction tasks within the flow domain and prediction tasks at the flow field boundary; The total loss function of the multi-task learning model is constructed, and the weighting method of the adaptive loss function based on uncertainty estimation and the introduction of a weight growth factor are used to dynamically assign weights to each loss term in the total loss function to obtain the final total loss function. The physical information neural network is trained based on the final total loss function to obtain a trained physical information neural network. Based on a trained physical information neural network, the flow field around the target subsea pipeline is predicted to obtain the prediction results; wherein, the prediction results include the velocity components and pressure distribution of the flow field. The prediction task expression within the watershed is as follows: In the formula, For the direction of incoming flow, The plane formed by the two perpendicular to the direction of incoming flow corresponds to the flow area around the pipe cross-section; For the computational domain, The velocity component is in the direction of the incoming flow. The velocity component across the direction of the incoming flow. For fluid pressure; The density of seawater, For seawater dynamic viscosity, Scaling factor for VS-PINNs; subscript and Representing variables respectively , and right and The first-order partial derivatives are represented in the same way as the higher-order partial derivatives. The expression for the prediction task of the flow field boundary is as follows: In the formula, for The size of the direction calculation region. for The size of the direction calculation region. for The function, For export boundary conditions, for Inlet velocity profile boundary conditions. for Boundary conditions for the inlet velocity profile; The methods for obtaining the final total loss function include: Substitute the flow field velocity components and pressure distribution output by the physical information neural network into the prediction task expression within the flow domain or at the flow field boundary to obtain the equation residuals predicted by the physical information neural network. Based on the equation residuals predicted by the physical information neural network and the label data, a conditional probability density function is obtained; wherein, the conditional probability density function is used to describe the distribution characteristics of the label data given the equation residuals predicted by the physical information neural network. Based on the number of tasks and the conditional probability density function, a log-likelihood function for the multiple tasks is constructed. Based on the log-likelihood function, by ignoring the constant term and taking the negative value of the log-likelihood function as a whole, adaptive weights related to task uncertainty are derived for each loss term in the total loss function. By introducing a weight growth factor into the coefficient of variance in the logarithmic term of the log-likelihood function, the adaptive weights are adjusted to obtain the final total loss function. The expression for the log-likelihood function is as follows: , In the formula, Represents the number of tasks. ; The variance of the task. This represents a component of the total loss function. This represents the loss component of the prediction task within the flow field domain. This represents the loss component of the prediction task for the flow field boundary; Represents the likelihood function. The residuals of the equations representing the physical information predicted by the neural network. Represents label data, The representative mean is variance is The normal distribution; This represents a component of the total loss function; Based on the log-likelihood function, the formula for calculating the log-likelihood function by ignoring the constant term and taking the overall negative value is as follows: in, For loss components Weights; As trainable parameters for the network; The final total loss function expression is as follows: , In the formula, The weighting growth factor is a measure of the difficulty of the flow field boundary prediction task relative to the prediction task within the flow field domain.
2. A system for predicting the flow field around a subsea pipeline based on multi-task learning, used to implement the method described in claim 1, characterized in that, include: A multi-task construction module is used to construct a multi-task learning model for solving the flow around a cylinder problem using a variable-scaled physical information neural network framework; wherein, the multi-task includes prediction tasks within the flow domain and prediction tasks at the flow field boundary; The loss function construction module is used to construct the total loss function of the multi-task learning model, and adopts an adaptive loss function weighting method based on uncertainty estimation and introduces a weight growth factor to dynamically assign weights to each loss term in the total loss function to obtain the final total loss function. The neural network training module is used to train the physical information neural network based on the final total loss function to obtain the trained physical information neural network. The prediction module is used to predict the flow field around the target subsea pipeline based on a trained physical information neural network and obtain prediction results; wherein, the prediction results include the velocity components and pressure distribution of the flow field.
3. The system according to claim 2, characterized in that, The loss function construction module includes: The prediction unit is used to substitute the flow field velocity components and pressure distribution output by the physical information neural network into the prediction task expression within the flow domain or at the flow field boundary to obtain the equation residual predicted by the physical information neural network. The probability density function calculation unit is used to obtain the conditional probability density function based on the equation residuals predicted by the physical information neural network and the label data; wherein, the conditional probability density function is used to describe the distribution characteristics of the label data given the equation residuals predicted by the physical information neural network. The log-likelihood function calculation unit is used to construct the log-likelihood function of the multi-task based on the number of multi-tasks and the conditional probability density function. An adaptive weight calculation unit is used to derive adaptive weights related to task uncertainty for each loss term in the total loss function by ignoring the constant term and taking the negative value of the log-likelihood function as a whole, based on the log-likelihood function. The weight adjustment unit is used to introduce a weight growth factor into the coefficient of variance in the logarithmic term of the log-likelihood function to adjust the adaptive weights and obtain the final total loss function.