Skip to main content
×
×
Home
  • Print publication year: 2005
  • Online publication date: June 2012

Appendix C - 2D Cartesian Code

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.

Recommend this book

Email your librarian or administrator to recommend adding this book to your organisation's collection.

Introduction to Computational Fluid Dynamics
  • Online ISBN: 9780511808975
  • Book DOI: https://doi.org/10.1017/CBO9780511808975
Please enter your name
Please enter a valid email address
Who would you like to send this to *
×