CFD_Stanford

所属分类:数学计算
开发工具:Fortran
文件大小:192KB
下载次数:121
上传日期:2011-09-09 10:22:51
上 传 者郝静
说明:  斯坦福大学计算流体力学课程代码算例,包括二维和三维流体计算程序。
(Stanford Computational Fluid Dynamics Course code examples, including two-dimensional and three-dimensional fluid calculation program.)

文件列表:
Code\1\grid.f (16503, 2011-09-08)
Code\1\grid.inp (355, 2011-09-08)
Code\1\pcol.f (48016, 2011-09-08)
Code\1\pcol.inp (748, 2011-09-08)
Code\1\plot.f (49706, 2011-09-08)
Code\1\plot.inp (1239, 2011-09-08)
Code\1\psc.f (11130, 2011-09-08)
Code\1\psc.inp (405, 2011-09-08)
Code\1\pscus.f (10933, 2011-09-08)
Code\1\pscus.inp (328, 2011-09-08)
Code\2\grid.f (26939, 2011-09-08)
Code\2\grid.inp (1586, 2011-09-08)
Code\2\plot.f (49706, 2011-09-08)
Code\2\plot.inp (988, 2011-09-08)
Code\2\prog.f (73365, 2011-09-08)
Code\2\prog.inp (752, 2011-09-08)
Code\3\grid.f (15130, 2011-09-08)
Code\3\grid.inp (1231, 2011-09-08)
Code\3\prog.f (108849, 2011-09-08)
Code\3\prog.inp (878, 2011-09-08)
Code\4\parp.f (44671, 2011-09-08)
Code\4\tpp.f (3244, 2011-09-08)
Code\5\lapl2d.f (30104, 2011-09-08)
Code\5\lapl2d.inp (504, 2011-09-08)
Code\5\lapl3d.f (20624, 2011-09-08)
Code\5\lapl3d.inp (164, 2011-09-08)
Code\5\sipvec.f (15984, 2011-09-08)
Code\6\grid.f (16503, 2011-09-08)
Code\6\grid.inp (355, 2011-09-08)
Code\6\plot.f (49706, 2011-09-08)
Code\6\plot.inp (567, 2011-09-08)
Code\6\pstag.f (23786, 2011-09-08)
Code\6\pstag.inp (398, 2011-09-08)
Code\Download_document.mht (100516, 2011-09-08)
Code\1 (0, 2011-09-08)
Code\2 (0, 2011-09-08)
Code\3 (0, 2011-09-08)
Code\4 (0, 2011-09-08)
Code\5 (0, 2011-09-08)
... ...

This directory contains a number of solvers for linear equation systems. The files included at present (March 1996) are: LAPL2D.F Program for solving Laplace equation in 2D using different solvers. The Laplace equation is discretzed on a Cartesian grid using FV method and central differences. The boundary conditions are chosen such that the converged solution is exact; therefore, after each iteration one can calculate the iteration convergence error. The program was used to solve 2D problems presented in Sect. 5.7. The solvers included are: 1. Gauss-Seidel solver (GS); 2. Line-by-line application of TDMA solver, alternately in X- and Y-direction (often called ADI-TDMA); 3. Strongly implicit procedure of Stone (SIP) (see Sect. 5.3.4); 4. Conjugate gradient solver for symmetric matrices, preconditioned by incomplete Cholesky decomposition (in flow calculation, suitable only for the pressure or pressure-correction equation; equations which contain a convective term produce non-symmetric matrices); 5. Multigrid solver (correction scheme) using GS as smoother; 6. Multigrid solver using SIP as smoother; 7. ADI solver (see Sect. 5.3.5). The program requires the following input data, which can be entered upon request during execution, or be prepared in an input file to which standard input has to be re-directed when runing the code, e.g. by typing LAPL2D < LAPL2D.INP: - Output file name (FILEO); - Maximum number of allowed iterations (MAXIT); - Residual level at which iterations are stoped (RESMAX); - Dimension of the solution domain in X- and Y-direction, XMAX and YMAX; - Grid expansion factor in X- and Y-direction, EXX and EXY; - Number of CVs in X- and Y-direction, N and M; - Solver choice, ISOL (1 -> GS, 2 -> LBL-TDMA, 3 -> SIP, 4 -> ICCG, 5 -> MG+GS, 6 -> MG+SIP, 7 -> ADI); - Parameters ALPHA and BETA (ALPHA relevant for SIP, BETA for ADI; see Sect. 5.3.4 and 5.3.5, respectively). The solvers can be easily adapted and implemented in other programs. The code is heavily commented and self-explanatory. LAPL2D.INP An example of input data for the above code. LAPL3D.F Program for solving the three-dimensional Laplace equation using FD method and uniform grids in each direction. Three solvers are included, which can be easily adapted to other similar problems: 1. Three-dimensional version of the SIP-solver (see Sect. 5.3.4 and a paper by Leister and Peric, 1994), suitable also for convection-dominated problems; 2. Three-dimensional version of the ICCG-solver (applicable to symmetric matrices only, e.g. pressure or pressure- correction equation in incompressible flows, heat conduction equation etc.); 3. CGSTAB solver (see Sect. 5.3.7 for a description of the algorithm; the code structure and the variable names largerly correspond to the text in the book), suitable for both symmetric and non-symmetric matrices. The code requires the following input data, which can be either entered upon request during execution, or be prepared in an input file to which standard input has to be re-directed when runing the code, e.g. by typing LAPL3D < LAPL3D.INP: - The number of nodes in X, Y and Z direction (NI, NJ, NK); - The maximum allowed number of iterations (MAXIT) and the residual level at which iterations are stoped (RESMAX); - The dimensions of the solution domain (XL, YL, ZL); - The value of LTEST which controls additional output (1 -> print additional output, 0 -> don't print it); - Choice of solver (ISOL): 1 -> SIP3D, 2 -> ICCG3D, 3 -> CGSTAB3D; - The value of ALFA (relevant for SIP only). LAPL3D.INP An example of input data for the above code. In addition to these two programs, which involve most of the frequently used solvers, the following file is also included: SIPVEC.F Computer program including the vectorized version of the SIP3D-solver. It is here presented in the form where arrays use three indices; this solver and a detailed description for the one-dimensional indices used in the above codes can be found in a paper by Leister and Peric (1994); see the list of references in the book. Note that conjugate gradient solvers and the Gauss-Seidel solver can easily be adapted to unstructured grids as well. Also note that SIP can be used as pre-conditioner in the ICCG and CGSTAB solvers, increasing the efficiency on fine grids substantially.

近期下载者

相关文件


收藏者