| Computational Fluid Dynamics(CFD)is widely used in theoretical research and applications of Fluid mechanics by solving Navier-Stokes(N-S)equations numerically,and its solver is the core part of numerical simulation.Up to now,computational fluid dynamics has produced finite difference,finite element and finite volume numerical methods,including a variety of algorithms,some of which can support different numerical methods.Different CFD methods/algorithms have their own advantages and limitations,but no one specific CFD method/algorithm is suitable for all flow problems.Mac Cormack algorithm has the characteristics of small computation and easy programming,and can give correct or reasonable results for some flow problems.Up to now,some people still use and develop this algorithm.CFD commercial and open source software such as Fluent,Phoenics,Openc FD-SC,Open FOAM and Athena are investigated in this paper.As far as is known,the CFD open-source code does not have a parallel solver based on Mac Cormack’s algorithm,and its algorithm content is not available to commercial software.Therefore,this paper chooses to develop a solver based on explicit Mac Cormack method,including solver,pre-processing and postprocessing functions.The core content of this paper is to write a set of CFD codes for solving compressible N-S equations in Cartesian coordinate system using finite difference method.The solver is based on Mac Cormack algorithm,and the parallel part is written and run in Linux system using the mainstream parallel programming tool MPI.The programming language is Fortran 90.In this paper,numerical examples of unsteady compressible flows in one and three dimensions are simulated by using new codes.The code and the program test:Homogeneous isotropic turbulence with Reynolds number Re=72 and Mach number Ma=0.4 is calculated at the grid point 1283.The calculated results were compared with those obtained by openc FD-SC using the Steger-Warming Flux Vector Splitting method,combined with the 5th-order WENO difference scheme and the 6th-order central difference scheme.The results show that the dissipation of the solver is greater than that of the openc FD-SC high-precision difference scheme,and the computational efficiency is relatively high.The completion degree of each module of the solver is verified.The independent research and development of CFD code in this study is an important basis for the new theoretical research of fluid mechanics. |