Published online by Cambridge University Press: 05 June 2012
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.
To save this book to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Find out more about the Kindle Personal Document Service.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.