Page 327 - Introduction to Computational Fluid Dynamics
P. 327

P2: IWV
            P1: ICD/GKJ
                            CB908/Date
            0521853265appc
                                         0 521 85326 5
                            APPENDIX C                                             May 25, 2005  11:59


                            2D Cartesian Code










                            C.1 Structure of the Code

                            The structure of the 2D Cartesian code is similar to that of the 1D conduction
                            code. The code is again divided into two parts: The problem-dependent user part
                            containing files COM2D.FOR and USER2D.FOR and the problem independent
                                                                     1
                            library part that contains the LIB2D.FOR file. The listings of each file are given
                            at the end of this appendix. The list of variable names with their meanings is given
                            in Table C.1.


                            C.2 File COM2D.FOR

                            In this file, again logical, real, and integer variables are included. All other contents
                            of this file bear the same description as the COM1D.FOR file.


                            C.3 File USER2D.FOR

                            This is the main control file at the command of the user. The first routine PROGRAM
                            MAIN is the command routine from where subroutine MAINPR is called. The
                            latter is the first subroutine of the LIB2D.FOR file. Here, listings of USER files are
                            given for three problems solved in Chapter 5. These are (a) 1D porous body flow,
                            (b) turbulent flow in an axisymmetric pipe expansion, and (c) natural convection
                            evaporation.
                            BLOCK DATA This routine at the end of the USER2D.FOR file specifies all the
                            problem-dependent data such as control parameters, relaxation parameters, Prandtl
                            numbers, flow conditions, equations to be solved, and convection scheme used. The


                            1  The library file does not contain two features that can be generalised. These are (a) modifications
                              to coefficients of the pressure-correction equation for a compressible flow and (b) modifications
                              for a fixed pressure boundary condition. However, these can be incorporated by the user via the
                              ADSORB.FOR routine in the USER file.

                     306
   322   323   324   325   326   327   328   329   330   331   332