Full text
1. Introduction
Convective diffusion equations are a key branch of partial differential equations and are widely used in many fields, such as environmental science and fluid mechanics, to describe heat transfer, material diffusion, and dispersion of liquid solutes in drainage membranes, making it particularly important to study numerical computational methods for convective diffusion problems [1- 3]. A large number of finite difference solution methods and finite element solution
methods and theoretical analyses have been used to solve convective diffusion equations [4-8].
There are two very important parts in the convective diff usion equation: one is the diffusion term and the other is the convection term. The diffusion term describes the fluid migration or substance conduction due to the inhomogeneous distribution of a physical quantity in the fluid. When a physical quantity in a fluid is spatially unevenly distributed, diffusion leads to the diffusion of matter from regions of high concentration to regions of low concentration [9-10] in order to homogenize the distribution of the physical quantity, with the result that the spati al distribution of the physical quantity is altered. The convective term, on the other hand, describes how the macroscopic motion of the fluid leads to a change in the spatial distribution of physical quantities in it. When the fluid undergoes macroscopic motion, the relative positions between the different components change, and this change in relative position in turn affects the distribution of physical quantities in the fluid. Therefore, by analyzing some features in the convective diffusion equation one can derive the laws of variation of some physical quantities (such as concentration and energy) corresponding to the object [16] In recent years, with the rapid development of machine learning algorithms, a class of PINNs [11] (Physics - Informed NeuralNet works), a class of physics -informed neural network- based algorithms, has been proposed and widely used in various fields [12 -14]. The most commonly used numerical computational method for solving hydrodynamic equations is the finite difference method, in w hich the basic difference formats are the windward format, Lax -Friedrichs format, Lax -Wendroff format, QUICK format, exponential difference format, and Crank - Nicolson format [19]. - Nicolson format [19]. These calculation methods are simple in format and l ow in Abstract: Convective diffusion equations are a special class of partial differential equations, and the study of their numerical solution methods has been a hot issue. PINNs (Physics-informed Neural Networks) based on physical information are introduced and applied to solve two-dimensional convective diffusion equations. In contrast to traditional neural network models, PINNs introduce automatic differentiation techniques in the model building process, and compile the physical information, i.e., partial differential equation information, to obtain the optimi zation objectives of the neural network parameters, i.e., weights and biases, in the model by defining loss functions, which are then solved using exi sting optimization
computational accuracy, and the results are not ideal for some complex problems and cannot meet the needs of actual numerical simulations. Later, Tian et al [20] proposed a high -precision exponential difference method, and Ding and Zhang constructed a spatial fourth -order and temporal fifth -order difference format, which uses semi -discrete and PadΓ© approximation in time and polynomial tight difference in space as in the literature [21]. In [22], a high- precision fully implicit tight difference format is proposed for the two-dimensional non-constant incompressible vortex-velocity Navier-Stokes system of equations. In [23], a second- order five -point difference format is proposed for the two dimensional convective diffusion equation, and in [24], a fourth -order accurate implicit compact difference format is obtained for solving the two -dimensional convective diffusion equation using the fourth- order PadΓ©- type compact difference approximation of the first - and second-order derivatives, combined with the ori ginal equation. In [25], a high-precision compact difference format for solving the one -dimensional convective diffusion response problem on a nonuniform grid was constructed based on the Taylor series expansion of the function, in [26], a higher -order compact difference format for the one -dimensional convective diffusion equation was derived based on the Taylor series expansion of the function on a nonuniform grid, and in [27], a three -point fourth- order compact difference format on a nonuniform grid was proposed.
However, unlike traditional methods, PINNs define a loss function with respect to the root mean square error, i.e., the objective function, in order to combine the boundary conditions and the initial conditions. By optimizing this loss function, w e can find the optimal parameters of the neural network, including weights and biases. By optimally solving for the optimal parameters, we also obtain a deep neural network model that can approximate the description of this physical-mechanical system. The core idea of this approach is to transform the physical -mechanical behavior into a learning problem for the neural network and to train the network to fit and approximate the behavior of the physical system. By optimizing the loss function, we can obtain o ptimal parameters that allow the neural network model to approximate the dynamics of the physical system to some extent. This approach, which integrates deep learning and physical modeling, has a wide range of applications. It can help us better understand and predict the behavior of physical systems, and also provides a new way to address the complexity and computational efficiency problems encountered in traditional physical modeling. By combining neural networks with physical equations, we can apply this approach to a variety of practical problems in practice, thus advancing scientific research and engineering applications.
This method greatly reduces the need for the amount of data by introducing additional physical information and shows better robustness for a deterministic model [15].
2. Two-dimensional convective diffusion equation
2.1 Convection equation
In practical applications, convective equations are often used together with other equations and conditions to describe specific physical processes. The general convective equation can be expressed as ππππ ππππ + π£π£ π»π»ππ = 0 (1) where ππ is the physical quantity to be found, such as the temperature or concentration of the fluid, ππ is the time, π£π£ is the velocity vector, and π»π» is the gradient operator.
The convection equation describes the variation of the physical quantity ππ with time and space. By solving the convection equation, we can study the propagation and distribution of physical quantities in the fluid and the relationship with time.
2.2 Diffusion equation
In practical applications, diffusion equations are often used to describe the transport and diffusion phenomena of
substances, such as the diffusion of substances in chemical reactions and the temperature diffusion in heat conduction. By adjusting the diffusion coefficients and initial conditions in the equation, we can study the diffusion behavior under different conditions, optimize the efficiency of the diffusion process, or solve related engineering and scientific problems.
The general diffusion equation can be expressed as ππππ ππππ = π·π·π»π»2ππ (2) where ππ i s the physical quantity to be found, such as concentration or temperature, ππ i s time, π·π· is the diffusion coefficient, and π»π»Β² is the Laplace operator. The diffusion process is determined by the diffusion coefficient π·π·, which describes the rate and intensity of the substance diffusion. .3 Convective diffusion equation When considering the inclusion of Dirichlet boundary conditions, the equations describe how a fluid or substance propagates and diffuses in a two-dimensional region for known values on a given boundary.
The two -dimensional convective diffusion equation in general form containing the Dirichlet boundary can be expressed a βu βt = D οΏ½β2u βx2 + β2u βy2οΏ½ β V οΏ½βu βx + βu βyοΏ½ + F(x, y, t) (3) In this equation, π’π’ is the variable to be found, which can re present the concentration, temperature, or other properties of the fluid or substance. t is time, and π₯π₯ and π¦π¦ are spatial coordinates. d is the diffusion coefficient, which describes the intensity of the substance diffusion. π£π£ is the convective velocity , which describes the speed and direction of motion of the fluid or substance. ππ(π₯π₯, π¦π¦, ππ) i s the source term, which represents an external source or sink at a given location and time.
3. Neural networks based on physical information
In this paper, we propose the Physical Information Neural Network (PINN) method. PINN is able to combine the physical equations with a neural network model of the loss function, so that the optimization process is constrained by the physical equations, thus training a model that can satisfy the given physical laws. The main purpose of this method is to approximate the solution of partial differential equations.
3.1 PINN Module
Mathematically understood, a deep neural network is a structure composed of special functions. The s implest of these neural networks is the feedforward neural network (FNN), also known as the multilayer perceptron (MLP). Although many other types of neural networks, such as convolutional neural networks and recurrent neural networks, have been developed in the past decades, fully connected neural network remains one of the simplest and fastest solutions for most partial differential equations. Therefore, in this paper, the standard fully connected neural networks are used to solve physically constrained neural networks (PINNs) for partial differential equations. As an example, a standard fully connected neural network for the two-dimensional convection-diffusion equation is shown in Figure 1.
Figure 1.A simple neural network with a single hidden layer and three neurons Unlike traditional neural network algorithms, in PINNs the loss function is defined as follows, i.e. πΏπΏπΏπΏπΏπΏπΏπΏ = πΏπΏπΏπΏπΏπΏπΏπΏππππππππ + πΏπΏπΏπΏπΏπΏπΏπΏπΉπΉ + πΏπΏπΏπΏπΏπΏπΏπΏππππππππππ ππππ ππ (4) Wh ere πΏπΏπΏπΏπΏπΏπΏπΏππππππππ corresponds to the loss function for the given data, πΏπΏπΏπΏπΏπΏπΏπΏπΉπΉ corresponds to the residual loss function, and πΏπΏπΏπΏπΏπΏπΏπΏππππππππππ ππππ ππ corresponds to the boundary loss function.
I n the process of neural network training, the desired effect is achieved by minimizing the loss function. In this paper, we add weight coefficients to the loss function, and through experiments, we find that increasing the weight coefficients and appropriately decreasing the learning rate can make the neural network training resu lts better and the absolute error becomes smaller.
4. Experiment
4.1 Data set and evaluation metrics
In order to test the practical applicability of our proposed method, we can apply it to the solution of two dimensional partial differential equations, suc h as the seepage drive problem. Oil recovery has attracted widespread social attention, and the problem of seepage drive is currently of interest to many countries and regions around the world, and the problem has become an important issue in the internati onal community. In fact, when water is injected into an oil formation, a movement of water -oil mixture is formed, and this movement is called seepage drive [18], therefore, the solution of this problem is of great importance for oil recovery. However, it i s not an easy task to solve the seepage drive problem, which needs to be calculated and analyzed by applying the convective diffusion equation, and therefore, the seepage drive problem has become an important topic in the field of scientific research. This problem has attracted great attention in many countries and regions, therefore, we need to adopt an effective method to solve this problem, and our proposed method can provide a new way of thinking and solution for researchers.
Therefore, our research results have an important theoretical and practical value. [17] We consider the convective diffusion equations of the following form for the computational region πΊπΊ β [ 0, 1] containing the Dirichlet boundary, ππ( π₯π₯, π¦π¦) and πΉπΉ( π₯π₯, π¦π¦) given by the analytical solutions. οΏ½πΏπΏ π’π’ = ππ2π’π’ πππ₯π₯2 + ππ2π’π’ πππ¦π¦2 + πππ’π’π₯π₯ + πππ’π’ππ = πΉπΉ(π₯π₯, π¦π¦), ππππ ππ βππΞ© π’π’(π₯π₯, π¦π¦) = ππ(π₯π₯, π¦π¦), ππ ππ ππ βππ ππΞ© (5) The analytical solution of the equation is π’π’(π₯π₯, π¦π¦) = ππβππ((π₯π₯β0. 5)2+(ππβ0. 5)2) + 0.5 (6) A mong them, the meaning of each parameter is explained as shown in the table: Table 1: Meaning of the parameters of the mathematical formula Symbols Description π’π’ Distribution of physical quantities (e.g., concentration, temperature, etc.) in two dimensions π₯π₯ Denotes the spatial coordinates, which correspond to the position of the horizontal axis in
the two-dimensional case, respectively π¦π¦ Denotes the spatial coordinates, which correspond to the position of the vertical axis in the two-dimensional case, respectively ππ Diffusion coefficient, describing the degree of diffusion of a physical quantity in space ππ The component of convective velocity in the βxβ direction, describing the flow properties of the fluid in space ππ The component of convective veloci ty in the βyβ direction, describing the flow properties of the fluid in space In the experimental validation phase, ππ = 2, ππ = 2, and ππ = 5 were taken to determine the steepness of the two dimensional convective diffusion equation, and Mean Square Error (MSE) was used as an evaluation indicator plot, which is the mean value of the square of the difference between the predicted and true values for each sample. In statistics, MSE is an important indicator of the precision of an estimator. If we use an estimator to predict the value of an unknown parameter or variable, the MSE can tell us the magnitude of the bias and variance of this estimator.
Usually, we would like the estimator to have both a small bias and a small variance, which makes the estimation result more accurate and reliable. The MSE is very effective for the performance of the learning method of physical mechanics system, which is calculated as: πππΏπΏ ππ = 1 ππ οΏ½(π¦π¦ππ β π¦π¦οΏ½ππ)2 ππ ππ=1 (7) where π¦π¦ππ denotes the predicted value or the value of the model output, π¦π¦οΏ½ππ denotes the true or target value, and n denotes the number of samples.
The smaller the value of MSE, the smaller the difference between the predicted and true values, and the better the predictive performance of the model.MSE is sensitive to outliers because the square of the difference magnifies the effect of the outliers.MSE has a wide range of applications in training models, optimizing parameters, and evaluating model performance.
4.2 Application of the algorithm
T he parameters p and q in the equation represent the intensity of the convective term, i.e. the speed of motion in the fluid or the intensity of the fluid flow. In the equation, p*(du/dx) and q*(du/dy) represent the effect of the velocity gradient on the fluid in the x and y directions. When the values of p and q are larger, it means that the fluid is flowing faster and the convective term is more significant in the equation. Taking these two parameters to a value of 2, for example, can make the effect of the convective term in the equation more significant to simulate the fast flow or highspeed transport of the fluid. This allows the equations to be more consistent with the actual behavior of the fluid in a percolation-driven application. In addition, the parameter a affects the strength of the diffusion term in the equation, i.e., the second -order derivative term in the convective diffusion equation. As can be seen by the analytical solution π’π’(π₯π₯, π¦π¦) = ππβππ((π₯π₯β0. 5)2+(ππβ0. 5)2) + 0.5 , the parameter a determines the decay rate of the exponential functi on in the analytical solution. A larger value of a makes the exponential function decay faster in space, indicating that the strength of the diffusion term is higher, i.e., the change of gradient is smoothed out faster in space. a value of 5 can make the influence of the diffusion term in the equation stronger to simulate the rapid diffusion and smoothing of the fluid in space. By choosing appropriate parameter values, the strength and influence of the terms in the equation can be adjusted to better reflect the physical phenomena and behavior in real applications. In seepage drive applications, the parameter values are usually adjusted and optimized based on specific problems and experimental data to obtain more accurate simulation results and predictive power.
C ombining the significance of the parameters of the above equation, the PINN method was tested to solve this convective diffusion equation by first setting the learning rate to 0.001 using the Adam optimizer and iterating 1000 times until convergence.
Figure 2 shows the loss function versus the mean absolute error, and the image "Loss" represents the variation of the loss function (mean square error) during the training process. The horizontal axis is the number of iterations (Epochs) and the vertical axis is the value of the mean squared error. By observing the change of the loss function, we can understand the convergence of the model during the training process; the image "Error" indicates the change of Mean Absolute Error during the training process. The horizontal axis is the number of iterations (Epochs), and the vertical axis is the value of Mean Absolute Error. By observing the change of Mean Absolute Error, the prediction accuracy of the model can be evaluated, see Figure 2.
Figure 2. Loss versus error graph As can be seen from the above table, with the increase in the number of data points, it can be seen that as the number of iterations increases exponentially, the value of the loss function through the mean square loss function shows a significant decreasing trend when the number of iterations is 0-200, after which it gradually tends to stabilize.
The mean absolute error also shows an overall d ecreasing trend with a clear structure. The combination of the two comparisons shows that the two -dimensional convective diffusion equation is solved very well with this PINN method, and when the number of data points is 1000, a comprehensive observation o f the above two two-dimensional images It can be seen that there is the best solution effect, in this case the comparison between the true and predicted values is shown in Figure 3.
The following images represent the 3D visualization results, image "True solution" is the 3D visualization result of the true solution, showing the variation of the true solution with x and y; image "Predicted solution" is the 3D visualization result of the model predicted solution, showing the variation of the model predicted s olution with x and y; image "Absolute error" is the 3D visualization result of the absolute error between the true solution and the model predicted solution, showing the variation of the error with x and y. is the 3D visualization of the absolute error between the real solution and the predicted solution, showing the variation of the error with π₯π₯ and π¦π¦. See Figure 3.
Figure 3. PINN-based learning results
It can be seen that the predicted value of solving this two -dimensional convective diffusion equation based on the PINN method is extremely similar to the true value of this equation, and the absolute error is close to 0. Therefore, the number of iterations is 1000 has excellent solution effect. Next, for the data points are varied to observe the changes of the maximum error value, average error value, loss function value, and running time value, and the results of the analysis are shown in Table 2 and Figure 4.
Table 2: Comparison of results num_epochs Max Error Mean Error Loss Run time 500 0.0813 0.0334 0.02820 5.8268 1000 0.0580 0.0095 0.0154 8.7601 1500 0.0420 0.0086 0.0121 17.6619 2000 0.0405 0.0075 0.0109 32.3458 The comparison of the results in Table 2 shows that the iterative data points of the code test are spaced at 500, and the growth test process from 500 to 2000 shows that the maximum error value, average error value, and loss func tion value are gradually decreasing, while the running time is gradually increasing, and by observation, num_epochs=1000 can be taken as the best training result, because after this The maximum error value, average error value, and loss function values do not change significantly with the number of data points in the test, and the total time to run the code is moderate.
Figure 4 shows the true and predicted solutions of the two -dimensional convective diffusion equation for data points 500, 1000, 1500, and 2 000, respectively, and shows the variation of the true and predicted solutions with x, respectively, to visualize the details of Table 2. The image "Absolute error - XZ Plane" shows the absolute error between the real solution and the predicted solution of the model for each value of data points, respectively, as shown in Fig. 4, which shows the variation of the error with π₯π₯.
Figure 4. Contrast analysis chart
Journal of Computational Science &Engineering 59 (2022) 18-33
When the number of data points is 500, the predicted solution differs greatly compared with the real solution, and when the number of data points is taken as 1500 and 2000, the highest points of the images do not coincide with the real values, while when the number of data points is taken as 1000, it can be observed that the two-dimensional images of the real and predicted solutions have the highest coincidence, so it can be obtained that the number of data points is 1000 has the best solution effect. Meanwhile, the absolute error is stabl e between 0 and 0.1, which indicates that the results of the PINN method are in good agreement with the real solution of this two-dimensional convective diffusion equation.
5. Conclusion
This paper is based on the PINN solution method for solving the two-dimensional convective diffusion equation, which can be used to solve the material transport problem in seepage driven applications by choosing appropriate parameter values. The PINN metho d is grid- independent and has good adaptability, flexibility and practicality, and it does not require a discretized grid, which reduces the complexity of model construction and solution. By solving this equation and obtaining the analytical solution, deta iled information about the material transport behavior in the seepage drive process can be obtained, which provides an important reference for the design and optimization of seepage drive applications and helps to accurately describe the fluid motion and m aterial transport processes in porous media. Further research is needed for solving other types of convective diffusion equations.
Acknowledgments
The financial support was provided by the National Natural Science Foundation of China(NNSFC) through grant N os 12172186,, 11772166.
Figures


