GROUP 1. Run title and other preliminaries
TEXT(2S K-E MODEL_1D DVLPD CHANNEL FLOW :T402
TITLE
  DISPLAY
  The case considered is the one-dimensional solution of
  fully-developed turbulent flow in a plane closed channel at a
  Reynolds number of 1.E5. The solution is performed by use of
  the single-slab solver with a prescribed pressure drop.
 
  Calculations are made with the high-Re forms of the standard
  k-e model and the 2-scale k-e model. The latter is selected
  by setting TSKE=T. For this case both models produce very
  similar results.
  ENDDIS
 
REAL(DHYDR,DELT,US,REYH);BOOLEAN(TSKE);TSKE=T
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
REY
FRIC
US
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 7. Variables stored, solved & named
SOLVE(W1);KELIN=1;STORE(ENUT,LEN1)
IF(TSKE) THEN
+ TURMOD(TSKEMO)
ELSE
+ TURMOD(KEMODL)
ENDIF
    GROUP 8. Terms (in differential equations) & devices
   Deactivate convection
TERMS(W1,N,N,P,P,P,P);TERMS(EP,Y,N,P,P,P,P)
IF(TSKE) THEN
+ TERMS(KP,N,N,P,P,P,P);TERMS(KT,Y,N,P,P,P,P)
+ TERMS(ET,Y,N,P,P,P,P)
ELSE
+ TERMS(KE,N,N,P,P,P,P)
ENDIF
    GROUP 11. Initialization of variable or porosity fields
FIINIT(W1)=WIN;FIINIT(EP)=EPSIN;FIINIT(KE)=TKEIN
IF(TSKE) THEN
+ REAL(KTDKP);KTDKP=0.25
+ FIINIT(ET)=EPSIN;FIINIT(KP)=TKEIN/(1.+KTDKP)
+ FIINIT(KT)=KTDKP*FIINIT(KP)
ENDIF
    GROUP 13. Boundary conditions and special sources
WALL(WALLN,NORTH,1,1,NY,NY,1,NZ,1,1)
PATCH(PFORW,VOLUME,1,1,1,NY,1,NZ,1,1)
COVAL(PFORW,W1,FIXFLU,DPDZ)
    GROUP 15. Termination of sweeps
LSWEEP=15;TSTSWP=-1;LITHYD=10
    GROUP 16. Termination of iterations
MASIN=RHO1*WIN*HGHT; RESREF(W1)=1.E-12*MASIN*WIN
RESREF(EP)=RESREF(W1)*EPSIN
IF(TSKE) THEN
+ RESREF(KP)=RESREF(W1)*TKEIN; RESREF(ET)=RESREF(EP)
+ RESREF(KT)=RESREF(KP)
ELSE
+ RESREF(KE)=RESREF(W1)*TKEIN
ENDIF
    GROUP 17. Under-relaxation devices
DTF=10.*ZWLAST/WIN;VARMIN(W1)=1.E-10;WALPRN=T
    GROUP 22. Spot-value print-out
IYMON=2;ITABL=3;NPLT=2;NZPRIN=1;NYPRIN=1;IYPRF=1
    GROUP 24. Dumps for restarts
RELAX(W1,FALSDT,DTF); RELAX(EP,FALSDT,DTF)
IF(TSKE) THEN
+ RELAX(KP,FALSDT,DTF); RELAX(EP,FALSDT,DTF)
+ RELAX(KT,FALSDT,DTF); RELAX(ET,FALSDT,DTF)
ELSE
+ RELAX(KE,FALSDT,DTF)
ENDIF