photon use
  p
 
  1 20 1
 
  msg grid, with 20-fold magnification of y's; press return
  gr x 1;pause;gr off;red;gr ou x 1
  msg turbulence-energy contours;  press return
  con ke x 1 fi;0.001;pause;con off;red
  msg turbulence-length contours;  press return
  con len1 x 1 fi;0.001;pause;con off;red
  msg reciprocal-time contours;  press return
  con epke x 1 fi;0.001;pause;con off;red
  msg temperature contours;  press return
  con temp x 1 fi;0.001;pause;con off;red
  msg longitudinal-velocity contours;  press return
  con w1 x 1 fi;0.001;pause;con off;red
 
  enduse
     GROUP 1. Run title and other preliminaries
TEXT(Channel Flow K-EPS Turblnc. Model 
TITLE
  DISPLAY
  This case is similar to cases 170 to 172.
 
  In this example, the two-equation k-epsilon turbulence model is
  used and generalised wall functions are used at the north
  boundary of the domain.
 
  The recommended linearization practice, KELIN=3, is employed.
 
  10 "hydrodynamic iterations" are used at each z-location in
  order to reduce the number of sweeps needed for convergence.
 
  PHOTON commands are attached for convenience.
  ENDDIS
REAL(AK,WD23,TIN,TWALL,EWAL,GMIXL,CLEN,WIDTH,WIN,REYNO,WD2)
REAL(TKEIN,EPIN)
INTEGER(NTBMON);NTBMON=2
REYNO=1.E5;WIDTH=0.1;WIN=50.;TIN=10.;TWALL=5.;AK=0.41;EWAL=8.6
REYNO=1.E6;TWALL=0.0
 
    GROUP 4. Y-direction grid specification
NY=30;WD2=0.5*WIDTH;GRDPWR(Y,NY,WD2,0.75)
 
    GROUP 5. Z-direction grid specification
NZ=10;CLEN=70.*WIDTH;GRDPWR(Z,NZ,CLEN,1.0)
 
    GROUP 7. Variables stored, solved & named
SOLVE(P1,W1,V1,H1);STORE(ENUT,LEN1,GEN1);NAME(H1)=TEMP
TURMOD(KEMODL)
 
    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*WIDTH/REYNO;PRT(TEMP)=0.86;PRNDTL(TEMP)=5.0
mesg(The Reynolds and Prandtl numbers are :reyno: and :prndtl(temp):
  ** Prandtl-Kolmogorov formula: ENUT = CMU * LEN1 * SQRT(KE)
ENUT=PRKOLM
  ** EL1=KE15DEP makes the length equal to: CD * KE**1.5 / EP
EL1=KE15DEP
 
    GROUP 11. Initialization of variable or porosity fields
FIINIT(W1)=WIN;FIINIT(TEMP)=TIN;FIINIT(LEN1)=0.1*YVLAST
FIINIT(ENUT)=0.01*WIN*YVLAST
  ** TKEIN = 0.25*WIN*WIN*FRIC where FRIC=0.018 AT REYNO=1.E5
TKEIN=0.25*WIN*WIN*0.018;FIINIT(KE)=TKEIN
  ** EPIN = 0.1643*KIN**1.5/LMIX where LMIX=0.045*WIDTH
GMIXL=0.09*WD2; EPIN=TKEIN**1.5/GMIXL*0.1643; FIINIT(EP)=EPIN
 
    GROUP 13. Boundary conditions and special sources
  ** 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)
VALUE(IN,KE,TKEIN);VALUE(IN,EP,EPIN)
 
  **Outlet boundary
PATCH(OUTLET,CELL,1,NX,1,NY,1,NZ,1,1)
COVAL(OUTLET,P1,FIXP,0.0)
 
  **North-Wall boundary (generalised wall functions)
PATCH(WFUN2,NWALL,1,1,NY,NY,1,NZ,1,1)
COVAL(WFUN2,W1,LOGLAW,0.0);COVAL(WFUN2,TEMP,LOGLAW,TWALL)
COVAL(WFUN2,KE,GENLAW,GENLAW);COVAL(WFUN2,EP,GENLAW,GENLAW)
 
    GROUP 15. Termination of sweeps
LSWEEP=50;RESFAC=0.01
 
    GROUP 16. Termination of iterations
LITHYD=10
 
    GROUP 17. Under-relaxation devices
KELIN=3;RELAX(KE,LINRLX,0.5);RELAX(EP,LINRLX,1.0)
 
    GROUP 19. Data communicated by SATELLITE to GROUND
  ** Select strain-rate
DWDY=T;GENK=F
 
    GROUP 21. Print-out of variables
WALPRN=T;OUTPUT(KE,Y,Y,Y,Y,Y,Y);OUTPUT(TEMP,Y,Y,Y,Y,Y,Y)
 
    GROUP 22. Monitor print-out
IZMON=NZ-1;IYMON=NY-1;UWATCH=T
 
    GROUP 23. Field print-out and plot control
NPLT=1;NZPRIN=NZ/5
NYPRIN=3;IYPRF=1;IYPRL=30
 
PATCH(IZEQNZ,PROFIL,1,1,1,NY,NZ-1,NZ-1,1,1)
PLOT(IZEQNZ,W1,0.0,0.0);PLOT(IZEQNZ,TEMP,0.0,0.0)
PLOT(IZEQNZ,LEN1,0.,0.0);PLOT(IZEQNZ,ENUT,0.0,0.0)
PLOT(IZEQNZ,KE,0,0.0);PLOT(IZEQNZ,EP,0.0,0.0)
 
PATCH(LONGPLOT,PROFIL,1,1,NY-2,NY-2,1,NZ,1,1)
PLOT(LONGPLOT,W1,0.0,0.0);PLOT(LONGPLOT,TEMP,0.0,0.0)
 
PATCH(MAP,CONTUR,1,1,1,NY,1,NZ,1,1)
PLOT(MAP,W1,0.0,10.0);PLOT(MAP,TEMP,0.0,10.0)
PLOT(MAP,KE,0.0,10.0);PLOT(MAP,EP,0.0,10.0)