GROUP 1. Run title and other preliminaries
TEXT(Cav. Flow K-EPS Turbu Model;Ellip 
TITLE
  DISPLAY
  The case considered is steady, incompressible, turbulent flow in
  a square cavity driven by a free stream across its open top.
 
  A thin region of high shear stress develops from the separation
  edge and this provides the energy to maintain the cavity flow.
  The calculation is started upstream of the cavity with a uniform
  free-stream velocity profile. The k-e model of turbulence is used.
  ENDDIS
REAL(CLEN,HEIGHT,WMEAN,WIN,REYNO,TKEIN,EPIN,WFREE)
INTEGER(NZA,NZAP,NYC,NYCP,NZC,NZCM,NTBMON)
REYNO=1.2E5;HEIGHT=0.1;WIN=8.0;WFREE=8.0
     ** Calculation of domain specifications
NYC=12;NZC=17;NZA=4;NZAP=5;NYCP=13;NZCM=16
 
    GROUP 4. Y-direction grid specification
NREGY=2
IREGY=1;GRDPWR(Y,12,0.1,1.0)
IREGY=2;GRDPWR(Y,8,0.15,1.0)
 
  GROUP 5. Z-direction grid specification
NREGZ=3
IREGZ=1;GRDPWR(Z,4,0.05,1.0)
IREGZ=2;GRDPWR(Z,12,0.1,1.0)
IREGZ=3;GRDPWR(Z,4,0.05,1.0)
 
    GROUP 7. Variables stored, solved & named
SOLVE(P1,V1,W1);SOLUTN(P1,Y,Y,Y,N,N,N);TURMOD(KEMODL);STORE(ENUT)
    GROUP 8. Terms (in differential equations) & devices
DIFCUT=0.0
    GROUP 11. Initialization of variable or porosity fields
TKEIN=WIN*WIN*0.013*0.25;EPIN=0.692
    **EPIN=0.1643*TKEIN**1.5/LMIX where LMIX=0.09*RADIUS
     ** Initial values
FIINIT(W1)=WIN;FIINIT(EP)=EPIN;FIINIT(KE)=TKEIN
     ** Initialization of variables in blocked region
CONPOR(0.0,CELL,1,1,1,-NYC,-NZC,NZ)
CONPOR(0.0,CELL,1,1,1,-NYC,1,-NZA)
 
    GROUP 13. Boundary conditions and special sources
  **    Bottom wall
WALL (WFUNSOUT,SOUTH,1,1,1,1,NZAP,NZCM,1,100)
  **  Inlet
INLET(INLET,LOW,1,1,NYCP,NY,1,1,1,100)
VALUE(INLET,P1,8.0);VALUE(INLET,W1,8.0)
VALUE(INLET,KE,TKEIN);VALUE(INLET,EP,EPIN)
  **  Exit
PATCH(OUTLET,HIGH,1,1,NYCP,NY,NZ,NZ,1,100)
COVAL(OUTLET,P1,1.E8,0.0)
COVAL(OUTLET,W1,ONLYMS,0.0);COVAL(OUTLET,V1,ONLYMS,0.0)
COVAL(OUTLET,KE,ONLYMS,0.0);COVAL(OUTLET,EP,ONLYMS,0.0)
  **  Free stream
PATCH(STREAM,NORTH,1,1,NY,NY,1,NZ,1,100)
COVAL(STREAM,P1,1.E8,0.0);COVAL(STREAM,W1,ONLYMS,WFREE)
COVAL(STREAM,KE,ONLYMS,1.0E-10);COVAL(STREAM,EP,ONLYMS,1.E-10)
 
    GROUP 15. Termination of sweeps
LSWEEP=20
 
    GROUP 17. Under-relaxation devices
RELAX(P1,LINRLX,0.35);RELAX(W1,FALSDT,0.03);RELAX(V1,FALSDT,0.03)
RELAX(EP,FALSDT,0.03);RELAX(KE,FALSDT,0.03)
 
    GROUP 18. Limits on variables or increments to them
VARMIN(KE)=1.E-10;VARMIN(EP)=1.E-10
 
    GROUP 21. Print-out of variables
NYPRIN=NY/5;NZPRIN=NZ/5
 
    GROUP 22. Monitor print-out
IYMON=9;IZMON=7;NPRMON=10;NPLT=1
 
    GROUP 23. Field print-out and plot control
PATCH(MAP,CONTUR,1,NX,1,NY,1,NZ,1,LSTEP)
PLOT(MAP,P1,0.0,10.0);PLOT(MAP,V1,0.0,10.0)
PLOT(MAP,W1,0.0,10.0);PLOT(MAP,KE,0.0,10.0)
PLOT(MAP,EP,0.0,10.0);PLOT(MAP,ENUT,0.0,10.0)