Book contents
- Frontmatter
- Contents
- Nomenclature
- Preface
- 1 Introduction
- 2 1D Heat Conduction
- 3 1D Conduction–Convection
- 4 2D Boundary Layers
- 5 2D Convection – Cartesian Grids
- 6 2D Convection – Complex Domains
- 7 Phase Change
- 8 Numerical Grid Generation
- 9 Convergence Enhancement
- Appendix A Derivation of Transport Equations
- Appendix B 1D Conduction Code
- Appendix C 2D Cartesian Code
- Bibliography
- Index
Appendix C - 2D Cartesian Code
Published online by Cambridge University Press: 05 June 2012
- Frontmatter
- Contents
- Nomenclature
- Preface
- 1 Introduction
- 2 1D Heat Conduction
- 3 1D Conduction–Convection
- 4 2D Boundary Layers
- 5 2D Convection – Cartesian Grids
- 6 2D Convection – Complex Domains
- 7 Phase Change
- 8 Numerical Grid Generation
- 9 Convergence Enhancement
- Appendix A Derivation of Transport Equations
- Appendix B 1D Conduction Code
- Appendix C 2D Cartesian Code
- Bibliography
- Index
Summary
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 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.
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.
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.
- Type
- Chapter
- Information
- Introduction to Computational Fluid Dynamics , pp. 306 - 368Publisher: Cambridge University PressPrint publication year: 2005