The following AUTOPLOT use file produces two plots;
   the first is the axial velocity profile; and the
   second is the turbulent viscosity profile.
   AUTOPLOT USE
   file; phi 5
 
   cl; da 1 w1; col9 1
   msg        Velocity (W1) profile.  Press RETURN to continue
   pause
   clear;da 1 enut;   col9 1
   msg        Effective-viscosity profile. Press RETURN; e to end
   pause
   ENDUSE
    GROUP 1. Run title and other preliminaries
 
TEXT(CHEN-KIM K-E DEVELOPED CHANNEL FLOW:T101
TITLE
 
  DISPLAY
  The case considered is the 1d solution of fully-developed
  turbulent flow in a plane closed channel at a Re=1.E5. The
  solution is performed by use of the single-slab solver which
  computes the pressure drop for the specified mass flow rate.
 
  Calculations are made with the high-Re forms of the k-e model,
  the Chen-Kim k-e model (the default run), the RNG k-e model,
  and the k-omega model. For this case all models produce very
  similar results, and the comparison between measured and
  computed friction factors f is given below:
 
         Data    Chen-kim  Standard k-e  k-omega   RNG
    f   0.0156    0.0157     0.016        0.0166  0.0154
 
  where f=8.*(ustar/ubulk)**2.
  ENDDIS
CHAR(TMOD,TLSC); REAL(DHYDR,DELT,US,REYH)
REAL(HGHT,WIN,REY,TKEIN,EPSIN,MIXL,FRIC,DPDZ,MASIN,DTF)
  ** NB: The the hydraulic diameter is equal to 2.*duct height,
         so that pipe-flow correlations still apply
         with diameter replaced by 2.*height
HGHT=0.1;WIN=1.0; REY=1.E5;DHYDR=2.*HGHT; REYH=2.*REY
FRIC=1./(1.82*LOG10(REYH)-1.64)**2;US=WIN*(FRIC/8.)**0.5
DPDZ=0.5*RHO1*WIN*WIN*FRIC/DHYDR;TKEIN=0.25*WIN*WIN*FRIC
MIXL=0.09*0.5*HGHT;EPSIN=TKEIN**1.5/MIXL*0.1643
    GROUP 4. Y-direction grid specification
ENUL=WIN*HGHT/REY;DELT=2.*40.*ENUL/US
NREGY=2; REGEXT(Y,0.5*HGHT)
IREGY=1;GRDPWR(Y,29,0.5*HGHT-DELT,0.8);IREGY=2;GRDPWR(Y,1,DELT,1.0)
    GROUP 5. Z-direction grid specification
ZWLAST=0.1*HGHT
    GROUP 7. Variables stored, solved & named
SOLVE(W1);STORE(ENUT,LEN1);SOLUTN(W1,P,P,P,P,P,N)
MESG( Enter required turbulence model
MESG( Default: Chen-Kim k-e model
MESG( The options are:
MESG(  CKM  - Chen-Kim k-e model (default)
MESG(  KEM  - Standard k-e model
MESG(  KOM  - Wilcox   k-o model
MESG(  RNG  - RNG      k-e model
READVDU(TMOD,CHAR,CKM)
CASE :TMOD: OF
WHEN CKM,3
+ MESG(Chen-Kim k-e model
+ TURMOD(KECHEN);KELIN=1;TLSC=EP
WHEN KEM,3
TEXT(STANDARD K-E DEVELOPED CHANNEL FLOW:T101
+ MESG(Standard k-e model
+ TURMOD(KEMODL);KELIN=1;TLSC=EP
WHEN KOM,3
TEXT(K-OMEGA DEVELOPED CHANNEL FLOW:T101
+ MESG(k-omega model
+ TURMOD(KOMODL);TLSC=OMEG
+ STORE(EP);EPSIN=EPSIN/(0.09*TKEIN)
WHEN RNG,3
TEXT(RNG K-E DEVELOPED CHANNEL FLOW:T101
+ MESG(RNG k-e model
+ TURMOD(KERNG);KELIN=1;TLSC=EP
+ STORE(ETA,ALF,GEN1)
+ OUTPUT(ALF,Y,N,P,Y,Y,Y);OUTPUT(ETA,Y,N,P,Y,Y,Y)
ENDCASE
REY
FRIC
US
    GROUP 8. Terms (in differential equations) & devices
    GROUP 11. Initialization of variable or porosity fields
FIINIT(W1)=WIN;FIINIT(:TLSC:)=EPSIN;FIINIT(KE)=TKEIN
    GROUP 13. Boundary conditions and special sources
WALL(WALLN,NORTH,1,1,NY,NY,1,NZ,1,1)
  ** activate single-slab solver and specify mass flow rate
FDSOLV(FLOW,RHO1*WIN*0.5*HGHT)
    GROUP 15. Termination of sweeps
LSWEEP=30;LITHYD=10
    GROUP 16. Termination of iterations
    GROUP 17. Under-relaxation devices
DTF=15.*ZWLAST/WIN;VARMIN(W1)=1.E-10;WALPRN=T
RELAX(W1,FALSDT,DTF); RELAX(KE,FALSDT,DTF); RELAX(:TLSC:,FALSDT,DTF)
    GROUP 22. Spot-value print-out
IYMON=2;NPLT=2;NZPRIN=1;NYPRIN=1;IYPRF=1;ITABL=2;TSTSWP=-1