Introduction to Computational Fluid Dynamics

Appendix B: 1D Conduction Code

B.1 Structure of the Code

The 1D conduction code is divided into two parts:

  1. a user part containing files COM1D.FOR and USER1D.FOR and

  2. a library part containing file LIB1D.FOR.

The user part is problem dependent. Therefore, the two files in this part are used to specify the problem to be solved. In contrast, the library part is problem independent. Thus, the LIB1D.FOR file remains unaltered for all problems. In this sense, the library part may be called the solver whereas the user part may be called the pre- and postprocessor.

This structure is central to creation of a generalised code. To execute the code, USER1D.FOR and LIB1D.FOR files are compiled separately and then linked before execution. The COM1D.FOR is common to both parts and its contents are brought into each subroutine or function via the INCLUDE statement in FORTRAN. Variable names starting with I, J, K, L, M, and N are integers whereas all others are real by default. The list of variable names with their meanings is given in Table B.1. The listings of each file are given at the end of this appendix.

Table B.1: List of variables 1D for conduction code.

Variable

Meaning

ACF

Array containing cross-sectional area (m 2) at cell face w

AE, AW

Array containing east and west coefficients

AL

Domain length (m)

AP

Array containing coefficient of variable ? P

COND

Array containing conductivity (W/m-K) at node P

CONDREF

Reference...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Additive Manufacturing Software
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.