TALK=T;RUN( 1, 1)
 ** LOAD(x205) from the x Input Library
    GROUP 1. Run title and other preliminaries
TEXT(LAM-BRE KE_1D PLANE COUETTE FLOW  :T205
TITLE
  DISPLAY
  The problem considered is plane turbulent couette flow in a
  channel with one moving wall, as simulated for library case T100 
  using various high-Re turbulence models with wall functions. Here,
  the turbulence is simulated by use of various low-Re k-e and
  k-w models. The calculation integrates down to the wall and the
  solution is performed by use of the single-slab solver. A non-
  uniform grid is employed so as to concentrate cells very close to
  the walls. The Reynolds number is 1.E5 based on the channel height 
  and the average velocity.
  
  For this flow, the shear stress is uniform across the flow and 
  hence the axial pressure-gradient is zero. The velocity profile 
  is S-shaped and symmetrical about the central plane, and so the 
  average velocity is one half of the velocity of the moving wall. 
  ENDDIS
  
  Comparisons between measured and computed skin-friction
  coefficients Cf are made below:
                                          Cf             
 
    Data - Telbany & Reynolds [1982]    3.070E-3            
    LB low-Re k-e                       3.787E-3            
    Chen-Kim low-Re k-e                 3.503E-3                      
    Wilcox 1988 low-Re k-w              3.212E-3  
    Wilcox 2008 low-Re k-w              3.086E-3	
    Menter low-Re k-w                   3.207E-3 
    k-w SST low-Re model                3.065E-3  
 
   where Cf =2.*tauw/(rho*uav)**2 and Uav is the average velocity.
 
   The following AUTOPLOT use file produces three plots;
   the first is the axial velocity profile; the second
   is the turbulence energy profile; and the third is the
   turbulent viscosity profile.
 
   AUTOPLOT USE
   file
   phi 5
 
   da 1 w1;col9 1
   msg Velocity (W1) profile
   msg Press RETURN to continue
   pause
   clear
   da 1 ke;col9 1
   msg KE profile
   msg Press RETURN to continue
   pause
   clear
   da 1 enut;col9 1
   msg ENUT profile
   msg Press e to END
   ENDUSE
 
CHAR(CTURB,TLSC);BOOLEAN(VARLAM);VARLAM=T
REAL(HEIGHT,WTOP,REY,TKEIN,EPSIN,MIXL,DTF)
REAL(WAV,US,MASIN,DELT1,DELY,KFAC,AA)
INTEGER(NY2,JJM,JJJ)
HEIGHT=0.1;WTOP=1.0; REY=1.E5;WAV=0.5*WTOP
  ** US from data of El Telbany & Reynolds [1982]
US=WAV*0.196/LOG10(REY);TKEIN=US*US/.3
MIXL=0.045*HEIGHT;EPSIN=TKEIN**1.5/MIXL*0.1643
    GROUP 4. Y-direction grid specification
ENULA=WAV*HEIGHT/REY
  ** define first dely from wall and the grid-expansion
     factor Kfac which defines a constant ratio of lengths of
     two adjacent cells.
DELT1=0.5*ENULA/US;KFAC=1.08;DELY=DELT1/(0.5*HEIGHT)
  ** calculate NY from dely & Kfac
AA=(0.5/DELY)*(KFAC-1.0)+1.0;AA=LOG(AA)/LOG(KFAC)+1.0001
NY2=AA;NY=2*NY2
  ** define uniform grid initially
IREGY=1;GRDPWR(Y,NY,YVLAST,1.0)
  ** compute expanding grid from south boundary over one
     half of the channel width
YFRAC(1)=DELY
DO JJ=2,NY2
+ JJM=JJ-1
+ DELY=KFAC*DELY
+ YFRAC(JJ)=YFRAC(JJM)+DELY
ENDDO
YFRAC(NY2)=0.5
  ** create symmetrical grid in the second half of the channel
JJJ=0
DO JJ=NY-1,NY2+1,-1
+ JJJ=JJJ+1
+ YFRAC(JJ)=1.-YFRAC(JJJ)
ENDDO
YFRAC(NY)=1.0;YVLAST=HEIGHT
    GROUP 7. Variables stored, solved & named
SOLVE(W1);STORE(ENUT,LEN1);SOLUTN(W1,P,P,P,P,P,N)
STORE(STRS)
(stored of CF is 2.*STRS/(RHO1*:WAV:*:WAV:))
MESG( Enter the required turbulence model:
MESG(  CK   -  Chen-Kim low-Re k-e model
MESG(  LB   -  Lam-Bemhorst low-Re k-e model (default)
MESG(  KW   -  Wilcox 1988 low-Re k-w model
MESG(  KWR  -  Wilcox 2008 low-Re k-w model
MESG(  KWM  -  Menter 1992 low-Re k-w model
MESG(  KWS  -  Low-Re k-w SST model
MESG(
READVDU(CTURB,CHAR,LB)
CASE :CTURB: OF
WHEN CK,2
+ TEXT(CHEN-KIM KE_1D PLANE COUETTE FLOW :T205
+ MESG(Chen-Kim low-Re k-e model
+ TURMOD(KECHEN-LOWRE);KELIN=1;TLSC=EP
STORE(FMU,REYT,REYN,FONE,FTWO)
WHEN LB,2
+ MESG(Lam-Bremhorst low-Re k-e model
+ TURMOD(KEMODL-LOWRE);KELIN=1;TLSC=EP
+ STORE(FMU,REYT,REYN,FONE,FTWO)
WHEN KW,2
+ TEXT(WILCOX 1988 k-w_1D PLANE COUETTE FLOW :T205
+ MESG(Wilcox 1988 k-w low-Re model
+ TURMOD(KWMODL-LOWRE);TLSC=OMEG
+ EPSIN=EPSIN/(0.09*TKEIN)
  ** the following line trashes the solution
    + STORE(FMU,REYT,REYN,FONE,FTWO)
+ STORE(REYT,FONE)	
WHEN KWR,3
+ TEXT(WILCOX 2008 k-w_1D PLANE COUETTE FLOW :T205
+ MESG(Wilcox 2008 k-w low-Re model
+ TURMOD(KWMODLR-LOWRE);TLSC=OMEG
+ EPSIN=EPSIN/(0.09*TKEIN)
WHEN KWM,3
TEXT(Menter k-w_1D PLANE COUETTE FLOW :T205
+ MESG(Menter 1992 low-Re k-w model
+ TURMOD(KWMENTER-LOWRE);TLSC=OMEG
+ STORE(BF1)
+ EPSIN=EPSIN/(0.09*TKEIN)
+ STORE(BF1,GEN1)
WHEN KWS,3
TEXT(SST k-w_1D PLANE COUETTE FLOW :T205
+ MESG(Menter 1992 low-Re k-w SST model
+ TURMOD(KWSST-LOWRE);TLSC=OMEG
+ STORE(BF1,BF2,GEN1)
+ EPSIN=EPSIN/(0.09*TKEIN)
ENDCASE
    GROUP 8. Terms (in differential equations) & devices
  ** Deactivate convection for single-slab solution
TERMS(W1,N,N,P,P,P,P);TERMS(KE,Y,N,P,P,P,P)
TERMS(:TLSC:,Y,N,P,P,P,P)
    GROUP 9. Properties of the medium (or media)
ENUL=ENULA
   ** test for ground-set enul
IF(VARLAM) THEN
+ TMP1=CONST;TMP1A=0.0;ENUL=LINTEM
ENDIF
    GROUP 11. Initialization of variable or porosity fields
FIINIT(:TLSC:)=EPSIN;FIINIT(KE)=TKEIN
PATCH(ICOUF,LINVLY,1,1,1,NY,1,NZ,1,1)
INIT(ICOUF,W1,WTOP/HEIGHT,0.0)
    GROUP 13. Boundary conditions and special sources
  ** moving upper wall
WALL(WALLN,NORTH,1,1,NY,NY,1,NZ,1,1);COVAL(WALLN,W1,LOGLAW,WTOP)
  ** stationary bottom wall
WALL(WALLS,SOUTH,1,1,1,1,1,NZ,1,1)
    GROUP 15. Termination of sweeps
LSWEEP=80;TSTSWP=-1;LITHYD=6
    GROUP 16. Termination of iterations
MASIN=RHO1*WAV*HEIGHT; RESREF(W1)=1.E-12*MASIN*WAV
RESREF(KE)=RESREF(W1)*TKEIN; RESREF(:TLSC:)=RESREF(W1)*EPSIN
    GROUP 17. Under-relaxation devices
DTF=0.1*ZWLAST/WAV
RELAX(W1,FALSDT,DTF); RELAX(KE,FALSDT,DTF/4.)
RELAX(:TLSC:,FALSDT,DTF/4.)
    GROUP 18. Limits on variables or increments to them
VARMIN(W1)=1.E-10
    GROUP 22. Spot-value print-out
IYMON=2;NPLT=5;NZPRIN=1;NYPRIN=1;IYPRF=1
    GROUP 24. Dumps for restarts
WALPRN=T
 LIBREF = 205
DISTIL=T
CASE :CTURB: OF
WHEN CK,2
+EX(W1  )=5.000E-01;EX(KE  )=1.460E-03
+EX(EP  )=1.538E-02;EX(FTWO)=9.652E-01
+EX(FONE)=2.673E+00;EX(REYN)=7.445E+02
+EX(REYT)=1.689E+03;EX(FMU )=7.582E-01
+EX(LTLS)=3.596E-04;EX(WDIS)=9.707E-03
+EX(LEN1)=3.612E-03;EX(ENUT)=7.447E-05
+EX(CF  )=5.308E-05;EX(STRS)=6.635E-06
WHEN LB,2
+EX(W1  )=5.000E-01;EX(KE  )=1.589E-03 
+EX(EP  )=1.690E-02;EX(FTWO)=9.653E-01 
+EX(FONE)=2.240E+00;EX(REYN)=7.737E+02 
+EX(REYT)=1.833E+03;EX(FMU )=7.624E-01 
+EX(LTLS)=3.596E-04;EX(WDIS)=9.707E-03 
+EX(LEN1)=3.769E-03;EX(ENUT)=8.077E-05
+EX(CF  )=5.737E-05;EX(STRS)=7.172E-06
WHEN KW,2
+EX(W1  )=5.000E-01;EX(KE  )=1.327E-03 
+EX(EP  )=3.051E-02;EX(FTWO)=8.619E-01 
+EX(FONE)=1.314E+00;EX(REYN)=1.000E-10 
+EX(REYT)=1.355E+02;EX(FMU )=7.765E-01 
+EX(OMEG)=4.830E+03;EX(LEN1)=3.358E-03 
+EX(ENUT)=6.550E-05;EX(CF  )=4.866E-05
+EX(STRS)=6.082E-06
WHEN KWR,3
+EX(W1  )=5.000E-01;EX(KE  )=1.087E-03 
+EX(EP  )=1.442E-02;EX(DWDY)=1.159E+02 
+EX(GEN1)=6.141E+04;EX(FBP )=1.000E+00 
+EX(OMEG)=5.152E+03;EX(CF  )=4.676E-05 
+EX(STRS)=5.845E-06;EX(LEN1)=3.240E-03 
+EX(ENUT)=6.342E-05 
WHEN KWM,3
+EX(W1  )=5.001E-01;EX(LTLS)=3.596E-04
+EX(WDIS)=9.707E-03;EX(BF1 )=1.000E+00
+EX(KE  )=1.135E-03;EX(EP  )=1.526E-02 
+EX(GEN1)=6.430E+04;EX(OMEG)=4.874E+03 
+EX(CF  )=4.858E-05;EX(STRS)=6.073E-06 
+EX(LEN1)=3.326E-03;EX(ENUT)=6.637E-05 
WHEN KWS,3
+EX(W1  )=5.000E-01;EX(LTLS)=3.596E-04 
+EX(WDIS)=9.707E-03;EX(BF2 )=1.000E+00
+EX(BF1 )=1.000E+00;EX(KE  )=1.131E-03
+EX(EP  )=1.547E-02;EX(GEN1)=6.357E+04
+EX(OMEG)=4.875E+03;EX(CF  )=4.816E-05
+EX(STRS)=6.020E-06;EX(LEN1)=3.324E-03
+EX(ENUT)=6.601E-05
ENDCASE 
 STOP