two-FVM

所属分类:数学计算
开发工具:Fortran
文件大小:49KB
下载次数:308
上传日期:2011-09-18 14:33:06
上 传 者zcfycc
说明:  本程序是采用有限体积法求解二维对流扩散方程的经典程序。程序里包含各种离散方法,划分网格方法等。适合CFD初学者阅读。
(The program is two-dimensional finite volume method for solving convection-diffusion equation of the classic program. Program includes a variety of discrete methods, meshing methods. CFD for beginners)

文件列表:
2dc\grid.f (16503, 2011-09-05)
2dc\grid.inp (355, 2011-09-05)
2dc\pcol.f (48078, 2011-09-05)
2dc\pcol.inp (748, 2011-09-05)
2dc\pipe\dcpipe (755, 2011-09-05)
2dc\pipe\dgpipe (247, 2011-09-05)
2dc\pipe\grid.f (16503, 2011-09-05)
2dc\pipe\pcol1.f (50268, 2011-09-05)
2dc\plot.f (49706, 2011-09-05)
2dc\plot.inp (380, 2011-09-05)
2dc\psc.f (11130, 2011-09-05)
2dc\psc.inp (405, 2011-09-05)
2dc\pscus.f (10933, 2011-09-05)
2dc\pscus.inp (328, 2011-09-05)
2dc\pipe (0, 2011-09-16)
2dc (0, 2011-09-16)

This directory contains several computer codes for solving two-dimensional heat and fluid flow problems using Cartesian grids. At present (January 1997), the following files are included: 1. GRID.F A code for generating Cartesian grids (multigrid version). The solution domain is split into several subdomains in each direction; within each subdomain, the grid may expand or contract, and one can specify either the expansion ratio or the size of one CV at the begining of an interval. One can generate any grid level first, and the levels above and below will be generated automatically (e.g. if one wants 5 CV in one direction on the coarsest grid and a symmetric expanding/contracting grid about centerline for all finer grids, one can generate the second, symmetric grid with 10 CV first; the coarser grid will then have one big CV in the center and smaller CVs on either side). See comments in the code. Compile, run, and follow instructions. 2. GRID.INP An example of input data for the above code (input data can be either entered on request or prepared on a file; also, an echo file is created which can be used later for repeated grid generation). 3. PSC.F A code which solves steady scalar transport equation for a given velocity field (2D convection/diffusion equation). Here, stagnation point flow is used. See section 4.8 for a description of the problem solved. Finite Volume method is used, with upwind or central differences for convective fluxes and central differences for diffusive fluxes. The grid in each direction can be non-uniform; expansion factor is requested from input along with dimensions. Three different solvers can be chosen from: line-by-line TDMA along X or Y direction, or ILU solver after Stone (SIP, Sect. 5.3.4). Input data can be either typed in on request, or provided on a file to which standard input is re-directed (e.g. type PSC < PSC.INP to use data in the file below). 4. PSC.INP This file contains an example of input data for the above code. 5. PSCUS.F THe unsteady version of PSC.F. Here one can in addition choose the time integration method, out of four provided: explicit Euler (EE), implicit Euler (IE), Crank-Nicolson (CN) and implicit three time levels (I3L). The code was used to solve the 2D problem described in Sect. ***. 6. PSCUS.INP An example of input data for the above code. 7. PCOL.F A code which employs the SIMPLE-based pressure-correction method for solving the Navier-Stokes equations using Finite Volume method, Cartesian grid, and a colocated arrangement of variables. The code has been structured and written in a way which allows easy extension to non-orthogonal grids (a version of such a code is available in directory 2DG). The notation follows by large the one used in Chapter 7. The code is set up for solving lid-driven and buoyancy-driven flow in a closed cavity. One can choose between upwind and central differences for convective terms, and between implicit Euler and implicit three time levels for time integration. Diffusive terms are approximated using central differences. ILU solver after Stone (SIP) is used for solving linear equation systems. There are many comments in the code which describe all steps and major variables, as well as the meaning of input data. It was used to solve problems described in Sect. 7.8. File names for input, output, grid, and results have to be typed in on request (or provided on a file to which standard input is re-directed); an eample of input file is provided. 8. PCOL.INP An example of input data for PCOL.F (here for the unsteady lid-driven cavity flow). 9. PLOT.F A code which produces plots of grid, velocity vectors, profiles of velocity components or temperature, contours of pressure, temperature or streamlines, and colour filled contours for pressure, temperature or streamfunction. In case of multigrid or unsteady problems, files with several data sets can be processed; each plot is saved as a separate file, which carries the name (e.g. VECT for velocity vectors) and data set number for easy identification. File names and number of data sets are to be typed on request; the rest of input data should be preparaed on an input file. The code is full of comments describing the individual steps; it can easily be adapted for interactive use and screen output under windows or X11; postscript was chosen here since it is hardware-independent. 10. PLOT.INP An example of input data for ploting velocity vectors from four data sets resulting from an unsteady flow simulation. This file needs to be adapted to each test case, depending on which quantities are to be ploted. See comments in the code describing input data. A multigrid version of PCOL.F, which was announced earlier, has still not been provided. However, there is a multigrid version of the CAFFA.F code, see directory 2DGl/MG. In subdirectory PIPE, the following files are available: GRID.F Same as GRID.F in the parent-directory. PCOL1.F Version of PCOL.F including inlet and outlet boundary conditions, set for computing flow between two parallel plates or in a pipe. Also, there is a global correction of mass fluxes at the outlet boundary to make them satisfy the global mass conservation, before solving the pressure-correction equation. When this is done, one can assume in the pressure-correction equation that the mass fluxes are prescribed at all boundaries and therefore need not be corrected, leading to Neumann boundary conditions for pressure correctionat all boundaries. DGPIPE Input data for GRID.F DCPIPE Input data for PCOL1.F

近期下载者

相关文件


收藏者