TALK=T;RUN(1,1)
PHOTON USE
p;parphi
msg Temperature contours
con h1 z 1 fi;0.001
con h1 z 19 fi;0.001
con h1 z 39 fi;0.001
con h1 z 59 fi;0.001
con h1 z 79 fi;0.001
con h1 z 99 fi;0.001
pause;con off;red
msg the grid
gr y m
gr z m
pause;gr off;red
view z;con h1 z m fi;0.0001
msg Temperature contours at outlet plane
pause;con off;red
msg velocity vectors at outlet plane
set ref vec 0.3
vec z m sh;pause;con off;vec off;red
msg pressure contours at outlet plane
con p1 z m sh;int 50
ENDUSE
****** TO LOAD CASE: TYPE L(125) ******
GROUP 1. Run title and other preliminaries
TEXT(Free Convection In Horizontal Pipe
TITLE
DISPLAY
Air flows at low Reynolds Number along a horizontal pipe of
circular cross-section, the wall of which is at a higher
temperature than the entering air.
Natural convection (ie buoyancy) creates a circulation in the
cross-sectional plane, superimposed on the Poiseille-like
longitudinal motion.
The parabolic mode permits use of a fine grid in the longitud-
inal direction. 40 000 cells are used,in effect, although the
storage used is that apporpriate to 400.
^ .-.-----------------------------.
| |r / \ \
g| | -|--> | Pipe wall is at |->
v -|--> | constant temp., TWAL |->
Fixed \ / /
mass flux `-'-----------------------------'
with temp. TIN z---->
ENDDIS
The locally-defined variables are as follows:
RADIUS radius of pipe m
PIPL length of pipe m
TIN inlet temperature C
TWAL wall temperature C
WIN inlet mean velocity m/s
REAL(RADIUS,PIPL,WIN,TIN,TWAL)
RADIUS=0.01; PIPL=.1; TIN=20.0; TWAL=40.0; WIN=0.2
GROUP 3. X-direction grid specification
*** Cylindrical-polar coordinate system is used
CARTES=F; IREGX=1; GRDPWR(X,20,3.14159,1.0)
GROUP 4. Y-direction grid specification
IREGY=1; GRDPWR(Y,20,RADIUS,-1.5)
GROUP 5. Z-direction grid specification
*** The flow is parabolic
PARAB=T; IREGZ=1; GRDPWR(Z,100,PIPL,1.0)
GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1,W1,H1)
GROUP 9. Properties of the medium (or media)
PRNDTL(H1)=0.7
GROUP 13. Boundary conditions and special sources
1. Inlet boundary: uniform velocity and temperature
INLET(UNIFORM,LOW,#1,#NREGX,#1,#NREGY,#1,#1,1,1)
VALUE(UNIFORM,P1,WIN*RHO1); VALUE(UNIFORM,W1,WIN)
VALUE(UNIFORM,H1,TIN)
2. Wall boundary: constant temperature
WALL (PIPE,NORTH,#1,#NREGX,#NREGY,#NREGY,#1,#NREGZ,1,1)
COVAL(PIPE,W1,1.0,0.0);COVAL(PIPE,U1,1.0,0.0)
COVAL(PIPE,H1,1.0,TWAL)
3. Buoyancy source
*** Set buoyancy source = RHO * VOLUME * grav * DVO1DT * (Tref-T)
where DVO1DT is coefficient of expansion based on mean
temperature. (See GREX3, Group 13, sec.15, and GXBUOY)
*** Following data need to be set for this purpose:
BUOYE=Tref; BUOYA=grav.
DVO1DT=1.005E+03/(273.0+(TIN+TWAL)*.5)
BUOYE=TIN; BUOYA=0.0; BUOYB=-9.81 ! corresponds to u1 source = 0
! at x=0 and pi, maximum at pi/2,
! v1 source = maximum ay x=0,
! =0 at x=p1/2
PATCH(BUOY,PHASEM,1,NX,1,NY,1,NZ,1,1)
COVAL(BUOY,U1,FIXFLU,BOUSS); COVAL(BUOY,V1,FIXFLU,BOUSS)
GROUP 15. Termination of sweeps
LITHYD=20;LITER(U1)=10;LITER(W1)=10;SELREF=T;RESFAC=0.1
GROUP 23. Field print-out and plot control
NXPRIN=2; NYPRIN=2; IZPRF=NZ; IZPRL=NZ;TSTSWP=-1
nzprin=10
PATCH(EXIT,CONTUR,1,NX,1,NY,NZ,NZ,1,1); COVAL(EXIT,H1,0.0,TWAL)
IDISPA=1 ! to ensure creation of parphi file
conwiz=t