In recent years,with the proposal of the national marine strategy,the shipbuilding industry has also been exploding.In the shipbuilding industry,the numerical tank technology has been used in ship design and simulation.Numerical tank is a highly efficient parallel computing software which is developed by advanced hydrodynamic theory model and fine numerical algorithm and whose core is carrying out CFD(Computational Fluid Dynamics)simulation.And NS equation(Navier-Stokes equation)is one of the core equations of computational fluid mechanics field,the solution of which need a large amount of complex calculation.Aiming at the problems of low efficiency in engineering practice,in order to improve the efficiency of the NS equation’s accurate and fast solution algorithm,the NS equation solution method is proposed based on MPI+OpenMP mixed programming.Firstly,the limited space discretization of the NS equation has been carring out,with the introducing of the Realizable κ-ε turbulence model equation,so that a theoretical model of NS equation based on parallel is constructed.Then,the Multi-Grid algorithm is introduced on the basis of the original TDMA algorithm(Tri-Diagonal Matrix Algorithm)in the stage of the convergence of algebraic equations which can make a improving in the speed of convergence.On the basis of this,a parallel computing model of NS equation based on MPI+OpenMP hybrid programming is proposed.According to the principle that the number of grids allocated to each node as equal as possible,all the grids according to the number of nodes in the cluster hardware will be allocated furtherly.In this way,a vertical bidirectional parallel algorithm in 3D mesh based on MPI+OpenMP is proposed,which can simultaneous execute at the same time in two directions perpendicular to each other.The Internal of which has been used of OpenMP shared storage programming with a Reducing in communication overhead.Compared with the traditional parallel algorithm,the parallel scale has been greatly improved,and a good parallel acceleration ratio can be get.In the process of solving the NS equation,for the features that a large number of data have been transmitted in each pair of adjacent grid nodes with the use of the discrete format,and the problems of data transmission scale generated by millions grids as well as data communication bottlenecks caused by concurrent transmissions of a large number of datas and so on,optimization methods such as a dynamic load balancing which is amied at the data transmission characteristics in the solving of NS equation as well as non blocking communication optimization based on MPI have been used.At last,in the experiment,the optimization method proposed in this paper has beenevaluated according to the parallel algorithm evaluation criteria.And a comparison between the mode of pure MPI and the mode of hybrid MPI+OpenMP has been made in execution time,acceleration ratio,efficiency and so on.The results of which show that the method used in this paper has a good optimization effect,and the MPI+OpenMP hybrid mode has a better optimization effect than the pure MPI mode. |