```
photon use
p
parphi
20 1

msg radial (ie vertical) scale has been enlarged 20-fold
msg velocity vectors
vec x 1 sh;pause;vec off;red
msg effective-viscosity contours
con enut x 1 fi;0.1;pause;con off;red
msg w1 contours
con w1 x 1 fi;0.1;pause;con off;red
msg temperature contours
con temperature x 1 fi;0.1;pause;con off;red
enduse

GROUP 1. Run title and other preliminaries
TEXT(Pipe Flow M-Length Turb Model;Para
TITLE
DISPLAY
The problem considered is turbulent flow in a smooth-walled pipe,
with a wall temperature at a uniform value below that of the
entering fluid.
The calculation is continued to a distance of 30 diameters from
the entrance, to enable the velocity and temperature profiles to
attain unchanging shapes.
The Prandtl mixing-length model is used, with Nikuradze's formula
for the length scale:
2(Lm/D) = 0.14 - 0.08(2y/D)**2 - 0.06(2y/D)**4
where y is the normal distance from the channel wall.

Wall at temperature TWALL
/////////////////////////////////////////////////////
Constant   -----------------------------------------------------
specified --->                                               ->
mass-flux,--->                                               -->
velocity  --->                                               --->
and        - - - - - - - - - - -Symmetry line- - - - - - - - - -
temperature ^
|-------> z-direction
ENDDIS

REYNO=4.E5;DIAM=1.0;WIN=1.0;TIN=1.;TWALL=0.;AK=.41;EWAL=8.6
mesga(Reynolds Number is :reyno:  OK? If not, insert desired value
reyno
GROUP 3. X-direction grid specification
CARTES=F;XULAST=0.1
GROUP 4. Y-direction grid specification
GROUP 5. Z-direction grid specification
PARAB=T;NZ=40;PLEN=30.*DIAM;GRDPWR(Z,NZ,PLEN,1.0)
GROUP 7. Variables stored, solved & named
SOLVE(P1,V1,W1);STORE(ENUT)
NAME(H1)=TEMP;SOLVE(TEMP);STORE(LEN1)
GROUP 8. Terms (in differential equations) & devices
TERMS(TEMP,N,Y,Y,Y,Y,Y)
GROUP 9. Properties of the medium (or media)
ENUL=WIN*DIAM/REYNO;PRT(TEMP)=0.86;PRNDTL(TEMP)=0.7
** Use Nikuradse's formula noting that wall is at north boundary
at distance RAD from the centre-line...
GROUP 11. Initialization of variable or porosity fields
FIINIT(W1)=WIN;FIINIT(TEMP)=TIN
GROUP 13. Boundary conditions and special sources
** North-Wall Boundary
WALL(WFUN,NORTH,1,1,NY,NY,1,NZ,1,1);COVAL(WFUN,TEMP,LOGLAW,TWALL)
** Inlet Boundary
INLET(IN,LOW,1,1,1,NY,1,1,1,1);VALUE(IN,P1,WIN);VALUE(IN,W1,WIN)
VALUE(IN,TEMP,TIN)
GROUP 16. Termination of iterations
LITHYD=20;SELREF=T;RESFAC=0.01
GROUP 17. Under-relaxation devices
RELAX(ENUT,LINRLX,0.25)
GROUP 19. Data communicated by SATELLITE to GROUND
DWDY=T
GROUP 21. Print-out of variables
OUTPUT(TEMP,Y,Y,Y,N,Y,Y)
GROUP 22. Monitor print-out
IZMON=1;IYMON=27;ITABL=1;NPLT=1;NPRMON=1

GROUP 23. Field print-out and plot control
PATCH(IZEQNZ,PROFIL,1,1,1,NY,NZ,NZ,1,1)
PLOT(IZEQNZ,W1,0.0,0.0);PLOT(IZEQNZ,LEN1,0.0,0.0)
PATCH(LONGPLOT,PROFIL,1,NZ,NY,NY,3,NZ,1,1)
PLOT(LONGPLOT,W1,0.0,0.0);PLOT(LONGPLOT,TEMP,TWALL,TIN)
PATCH(LONGPLT2,PROFIL,1,1,1,1,3,NZ,1,1)
PLOT(LONGPLT2,W1,0.0,0.0);PLOT(LONGPLT2,TEMP,TWALL,TIN)
GROUP 24. Dumps for restarts
** create file parphi or parada for PHOTON viewing
WALPRN=T;UWATCH=T;TSTSWP=LITHYD-1;IDISPA=2
mesg(Use low-Reynolds-Number modification? (y/n)
IF(:ANS:.EQ.Y) THEN
mesg(enter 6 for fourth-power decay of turbulent viscosity or
mesg(      9 for complete cut-off at turb/lam = 20