TEXT(Couette Flow, K-EPS, Various RE   
TITLE
REAL(REYNLD,GRNVELS,GRNSCALS);BOOLEAN(KEMOD)
GRNVELS=GRND1; GRNSCALS=GRND1
reynld=10000.0
mesga(Reynolds No = :REYNLD: OK? If not insert desired value
readvdu(reynld,real,reynld)
reynld
    GROUP 4. Y-direction grid specification
NY=20; GRDPWR(Y,NY,1.0,1.0)
    GROUP 7. Variables stored, solved & named
SOLVE(W1); STORE(LEN1,VIST); SOLVE(A,B,C)
TURMOD(KEMODL)
    GROUP 8. Terms (in differential equations) & devices
TERMS(KE,N,N,Y,Y,Y,Y); TERMS(EP,N,N,Y,Y,Y,Y)
TERMS(W1,N,N,Y,Y,Y,Y); TERMS(A,N,N,Y,Y,Y,Y)
TERMS(B,N,N,Y,Y,Y,Y); TERMS(C,N,N,Y,Y,Y,Y)
TERMS(KE,N,N,Y,Y,Y,Y); TERMS(EP,N,N,Y,Y,Y,Y)
kelin=0
mesg(Which mode of ke linearization do you want? Insert 0, 1, 2 or 3
readvdu(kelin,int,kelin)
kelin
    GROUP 9. Properties of the medium (or media)
RHO1=1.0;ENUL=1.0/REYNLD
PRNDTL(A)=1.0; PRNDTL(B)=0.1; PRNDTL(C)=10.0
 
EL1B=YVLAST;EL1A=0.0001*YVLAST
mesga(Switch on simple low-Reynolds-number feature? (y/n)
READVDU(ANS,CHAR,N)
IF(:ANS:.EQ.Y) THEN
 IENUTA=6;ENUTA=0.1;ENUTB=4.0
 IENUTA
 ENUTA
 ENUTB
ENDIF
    GROUP 11. Initialization of variable or porosity fields
FIINIT(KE)=0.01; FIINIT(EP)=0.01; FIINIT(VIST)=0.001; FIINIT(W1)=0.5
 
    GROUP 13. Boundary conditions and special sources
PATCH(MOVING,CELL,1,1,NY,NY,1,NZ,1,1)
COVAL(MOVING,W1,FIXVAL,1.0); COVAL(MOVING,A,FIXVAL,0.0)
COVAL(MOVING,B,FIXVAL,0.0); COVAL(MOVING,C,FIXVAL,0.0)
 
PATCH(SWALL,SWALL,1,1,1,1,1,NZ,1,1)
COVAL(SWALL,W1,GRNVELS,.0); COVAL(SWALL,A,GRNSCALS,1.0)
COVAL(SWALL,B,GRNSCALS,1.0); COVAL(SWALL,C,GRNSCALS,1.0)
COVAL(SWALL,KE,LOGLAW,LOGLAW); COVAL(SWALL,EP,LOGLAW,LOGLAW)
 
    GROUP 16. Termination of iterations
LSWEEP=500; SELREF=T; RESFAC=0.01
    GROUP 17. Under-relaxation devices
RELAX(KE,LINRLX,0.1); RELAX(VIST,LINRLX,0.1)
    GROUP 21. Print-out of variables
NYPRIN=1
    GROUP 22. Monitor print-out
IZMON=1; IYMON=NY/2; ITABL=1; TSTSWP=-10
    GROUP 23. Field print-out and plot control
OUTPUT(VIST,N,N,N,N,N,N)
PATCH(WPROFIL,PROFIL,1,1,1,NY,NZ,NZ,1,1)
PLOT(WPROFIL,W1,0.0,1.0); PLOT(WPROFIL,A,0.0,1.0)
PLOT(WPROFIL,B,0.0,1.0); PLOT(WPROFIL,C,0.0,1.0)
 
PATCH(PROFIL,PROFIL,1,1,1,NY,NZ,NZ,1,1)
PLOT(PROFIL,LEN1,0.0,0.5); PLOT(PROFIL,VIST,0.0,0.0)
PLOT(PROFIL,KE,0.0,0.002); PLOT(PROFIL,EP,0.0,0.0)
    Group 24. dumps for restarts