Artificial Neural Networks Approach for Solving Stokes Problem

In this paper a new method based on neural network has been developed for obtaining the solution of the Stokes problem. We transform the mixed Stokes problem into three independent Poisson problems which by solving them the solution of the Stokes problem is obtained. The results obtained by this method, has been compared with the existing numerical method and with the exact solution of the problem. It can be observed that the current new approximation has higher accuracy. The number of model parameters required is less than conventional methods. The proposed new method is illustrated by an example.


Introduction
CFD stands for Computational Fluid Dynamics, a subgenre of fluid mechanics that uses computers (numerical methods and algorithms) to represent, or model, problems that engage fluid flows.CFD software is usually used to solve equations in a discretized way.The domain is transferred into a grid or mesh -a regular/irregular and 2D/3D surface of cells.After discretization, an equation solver runs to solve the equations of fluid motion (Euler equations, Navier-Stokes equations, etc.).Algorithms from numerical linear algebra, like: Gauss-Seidel, successive over relaxation, Krylov subspace method or algorithms from Multigrid family are typically used.These methods involve millions of calculations, so, as it can be easily observed, computing is time consuming.Also in many problems, even with parallel programming and supercomputers, only approximate solutions can be reached.
There are various optimization methods of computer science which can be used for CFD.Simulated Annealing, Genetic Algorithms, Evolution Strategy, Feed-Forward Neural Networks are popular and we reimplemented in many projects.
In [1] a framework is created for evolutionary optimization which is then tested on aerodynamic design example.The framework was based on covariance matrix adaptation, with the feed-forward neural network as an approximate fitness function.An aerodynamic design procedure which combines neural networks with polynomial fits is introduced in [2] and [3] discussed an arti-ficial neural network which is an approximate model that is used for optimization of the blade geometry by simulated annealing method.Parallel stochastic search algorithm is introduced in [4] and tested on defining a shape of two airfoils.In this work, a performance neural network for solving Stokes equations is presented.
Lagaris, et al. [5] used artificial neural networks (ANN) for solving ordinary differential equations and partial differential equations for both boundary value and initial value problems.Canh and Cong [6] presented a new technique for numerical calculation of viscoelastic flow based on the combination of neural networks and Brownian dynamics simulation or stochastic simulation technique (SST).Hayati and Karami [7] used a modified neural network to solve the Berger's equation in one-dimensional quasilinear partial differential equation.
The Stokes equations describe the motion of a fluid in . These equations are to be solved for an unknown velocity vector 1 ( , ) ( ( , ))   and pressure ( , ) p x y R  .We restrict our attention here to incompressible fluids filling all of n R (n = 2) as follow: with boundary conditions: Here, 0 u is given, C  divergence-free vector field on  , 1 2 , f f are the components of a given, externally applied force ( e.g.gravity).The first and second equations of (1) are just Newton's law f ma  for fluid element subject to the external force 1 2 ( , ) f f f  and to the forces arising from pressure and friction.The third equation of (1) says that the fluid is incompressible.For physically reasonable solutions, we want to make sure 1 2 ( , ) u u u  does not grow as ( , ) x y   .Hence we will restrict our attention to the force f and initial condition 0 u that satisfy , for any and some K .
We accept a solution of (1) as physically reasonable only if it satisfies , ( )

Description of the Method
The usual proposed approach for problem (1) will be illustrated in terms of the following general partial differential equation: subject to certain boundary conditions (BC's) (for example Dirichlet and/or Neumann), where 1 ( ,..., ) , denotes the definition domain and 1 2 ( ), ( ), ( ) are the solutions to be computed. If ( , ), ( , ), ( , ) denote trial solutions with adjustable parameters 1 2 3 , , subject to the constraints imposed by the BC's.
In the proposed approach, the trial solutions are single-outputs feed forward neural network with parameters 1 2 3 , , P P P and n input units fed with the input vector x .The terms ( ) ( 1,2,3) i A x i  contain no adjustable parameters and satisfy the boundary conditions.
The second terms ( , ( , ))( 1,2,3) is constructed so as not to contribute to the BC's, since ( , ), ( , ), ( , ) must also satisfy the BC's.These terms employ a neural network whose weights and biases are to be adjusted in order to deal with the minimization problem.Note at this point that the problem has been reduced from the original constrained optimization problem to an unconstrained one (which is much easier to handle) due to the choice of the form of the trial solution that satisfies by construction the BC's.In the next section we present a systematic way to construct the trial solution, i.e., the functional forms of both A i and F i. We treat several common cases that one frequently encounters in various scientific fields.As indicated by our experiments, the approach based on the above formulation is very effective and provides in reasonable computing time accurate solutions with impressive generalization (interpolation) properties.

Neural Network for Solving Stokes Equations
To solve problem (1) with [0,1] [0,1]    , we apply the operators x   and y   on the first and second equations respectively.Then we obtain: Using the third equation in (1), the Equation ( 5) may be written as: ( ) ( ) this is the Poisson equation, and has infinitely many solutions.By imposing some boundary conditions, we are going to obtain an appropriate solution for Equation ( 6) ] .

A x y x h y xh y y g x x g xg y g x x g xg
where where 1 2 ( ) ( ) x y is a point in Ω.By solving the optimization problem (9), the weights , , i i j i v w u are obtained and then a trial solution for t p is obtained.By substituting the trial solution t p in the first equation of ( 1) we obtain: which is a Poisson equation for 1 u , by using (9) and by substituting 1t u and 1 ( ) for or p and F , respectively, we can obtain a trial solution for 1t u .To obtain 2 u , we can substitute the trial solution t p in the second equation in (1) to obtain: In a similar manner we can obtain 2t u .

Numerical Examples
In this section we present one example to illustrate the method.We used a multilayer perceptron having one hidden layer with five hidden units and one linear output unit.For a given input vector Example.Consider the problem (1) with Ω = [0,1] × [0,1].We choose 1 f and 2 f such that the exact solution for 1 2 , u u and p be as follows:
The domain Ω is first discretized by uniform mesh of size 1/ 3 h  (4 points).This initial mesh is successively refined to produce meshes with sizes 1/ 4 h  and 1/ 5 h  (respectively 9 and 16 points).In Figure 1 the error function t p p  for N = 25 is depicted which shows the solution is very accurate.
We used the Equation (10) and obtained the solution 1t u .Table 2 reports the maximum error at the training set points and the distances 1 1 2 t u u  and (1) u u  between the exact solution and the training solution.
In a similar manner we obtained 2t u .Table 3 reports the maximum error at the training set points and the dis- u u  respect to x and y , for N = 25 are depicted, respectively, which show the solutions are differentiable.
Aman and Kerayechian [8] used linear programmingmethods to solve the above problem.They converted the Stokes problem to a minimization problem, then by discretizing the minimization problem.They obtained a linear programming problem and solved it.Table 4 present the comparison between the proposed method and with Aman -Kerayechian method for 25 points.

Conclusions
In this paper a new method based on ANN has been applied to find solution for Stokes equation.The solution via ANN method is a differentiable, closed analytic form easily used in any subsequent calculation.The neural network here allows us to obtain fast solution of Stokes equation starting from randomly sampled data sets and refined it without wasting memory space and therefore reducing the complexity of the problem.
If we compare the results of the numerical methods (see [8]) with our method, we see that our method has some small error.Other advantage of this method, the solution of the Stokes problem is available for each arbitrary point in training interval (even between training points).Indeed, after solving the Stokes problem, we obtain an approximated function for the solution and so we can calculate the answer at every point immediately.
analytic solution is known in advance.Therefore we test the accuracy of the obtained solution.

Figure 1 .
Figure 1.Error function  t p p .

Figure 2 .
Figure 2. The error function  1 1 t u u .

Figure 3 .
Figure 3.The error function  2 2 t u u .

Figure 4 .
Figure 4.The differential of error function  1 1 t u u respect to x .

Figure 5 .
Figure 5.The differential of error function  1 1 t u u respect to y .

Figure 6 .
Figure 6.The differential of error function  2 2 t u u respect to x .

Figure 7 .
Figure 7.The differential of error function  2 2 t u u respect to y .

Table 1
reports the maximum error at nodal points (Maximum error) at the training set points and the distances

Table 3 . Maximum error at training set points and the dis- tances 
= 25 is depicted which shows the solutions are very accurate (even between training points).