Page 340 - Introduction to Computational Fluid Dynamics
P. 340
P2: IWV
P1: ICD/GKJ
0 521 85326 5
CB908/Date
0521853265appc
319
APPENDIX C. 2D CARTESIAN CODE
DATA IN,JN/5,3/ May 25, 2005 11:59
DATA EPSI,RESIST/0.1,4E5/
END
Pipe-Expansion Problem – Chapter 5
IntheUSERfilethatfollowsseehowinletconditionsfore and aregivenintheINIT
subroutine. Also, in the BLOCK DATA routine, see that CONMAS and AXISYMM
are set active. The pipe-expansion step is designated by JB1. The file is first executed
with NTEMP = 0 and only flow variables are calculated. Then, reading NSIN, the
temperature equation is solved with NTEMP = 1. Also, in subroutine RESULT,
note how the reattachment length and Nusselt numbers are evaluated.
C **************************************
C THIS IS USER FILE FOR PIPE-EXPANSION
C **************************************
PROGRAM MAIN
INCLUDE ’COM2D.FOR’
OPEN(UNIT=6,FILE=’OO’)
WRITE(*,*)’-------- output is in OO file --------------’
C **** INITIAL DATA
INM=IN-1
JNM=JN-1
D2=2.0
D1=1.0
U2=1.0
C
WRITE(*,*)’ IF NTEMP = 1, ONLY TEMP SOLUTION ’
WRITE(*,*)’GIVE ----- MXIT,IREAD,DELT,VISCOS,NTEMP ’
READ(*,*)MXIT,IREAD,DELT,VISCOS,NTEMP
IF(NTEMP.EQ.1)THEN
SLVE(1)=.FALSE.
SLVE(2)=.FALSE.
SLVE(3)=.FALSE.
SLVE(5)=.FALSE.
SLVE(6)=.FALSE.
SLVE(7)=.TRUE.
ENDIF
PRT(7)=0.85+0.0309*(PR(7)+1)/PR(7)
REY=U2*D2*DENSIT/VISCOS
WRITE(6,*)’ REYNOLDS NO = ’,REY
C
CALL MAINPR