GROUP 1. Run title and other preliminaries
TEXT(K-OMEGA_BKWRD FACING STEP Y-X :T103
TITLE
  DISPLAY
  This simulation  concerns 2d incompressible, turbulent flow
  over a backward-facing step in a closed channel. The edge of the
  step provides a fixed point of flow separation.The case is
  similar to that described for library case 290, excepting that
  the calculation is performed in the y-x plane.
 
  The geometry considered has a expansion ratio of 1.5 and an
  exit width of 3h, where h is the step height. The calculations
  are started at x= -4h and terminated at x=16h, where a fixed-
  pressure boundary condition is applied. The Reynolds number based
  on the step height is 45,000 and uniform profiles of u, k and e
  are specified at the inlet to the calculation domain. Scalable
  wall functions are used in the simulations.
 
  For this case, the standard form of the k-e model is known to
  underpredict the reattachment length XR by about 14%. Calculations
  may be made with the high-Re form of the k-e model, the Chen-Kim
  k-e model, the RNG k-e model, the k-omega model, and the
  realisable k-e model.
  ENDDIS
 
  The calculation employs a non-uniform mesh of NY=50 by NX=60 for 
  which the standard k-e model predicts XR/H=5.8, the Chen-Kim k-e 
  model predicts XR/H=7.7, the RNG k-e model predicts XR/H=6.7, the 
  k-omega model predicts XR/H=5.2, and the realisable k-e model 
  predicts XR/H=7.1.  The measurements indicate that XR/H=7.1.
  This mesh is not fine enough around the vicinity of the step to 
  resolve the experimentally-observed secondary-separation region 
  in the corner just downstream of the step. 
 
    This AUTOPLOT sequence provides a plot of the axial
    velocity U1 along the bottom surface of the solution
    domain versus normalised axial distance X. The axial
    coordinate 0.0 corresponds to the step location. The
    reattachment point corresponds the axial location where
    U1 changes from negative to positive.
 
   AUTOPLOT USE
   file
   phida 3
 
   da 1 u1 y 1
   divide x .0381 1
   shift x -4 1
   col9 1
   level y 0;level x 0
   scale x 0 15
   msg Velocity (U1) profile
   msg Press e to END
   ENDUSE
 
CHAR(CTURB,TLSC)
REAL(HEIGHT,WIDTH,CLEN,SLEN,REYNO,UIN,TKEIN,EPSIN,MIXL,FRIC)
INTEGER(NYS,NXS)
     ** Calculation of domain specifications
HEIGHT=0.0381;WIDTH=3.*HEIGHT;SLEN=4.*HEIGHT;CLEN=20.*HEIGHT
REYNO=4.5E4;UIN=13.
FRIC=0.018;TKEIN=0.25*UIN*UIN*FRIC;MIXL=0.09*HEIGHT
EPSIN=0.1643*TKEIN**1.5/MIXL
    GROUP 3. X-direction grid specification
    GROUP 4. Y-direction grid specification
     ** channel length = 0.762 & channel width = 0.1143
NXS=10;NYS=20;NREGX=2;IREGX=1;GRDPWR(X,NXS,SLEN,1.0)
IREGX=2;GRDPWR(X,50,CLEN-SLEN,1.1);NREGY=2
IREGY=1;GRDPWR(Y,-NYS,HEIGHT,1.3)
IREGY=2;GRDPWR(Y,-30,WIDTH-HEIGHT,1.4)
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1);SOLUTN(P1,Y,Y,Y,N,N,N);STORE(ENUT)
SOLUTN(U1,P,P,P,P,P,N);SOLUTN(V1,P,P,P,P,P,N)
MESG( Enter the required turbulence model:
MESG(  CHEN -  Chen-Kim k-e model
MESG(  KE   -  Standard k-e model
MESG(  KO   -  Wilcox   k-o model (default)
MESG(  RNG   - RNG      k-e model
MESG(  RKE   - Realisable k-e model
MESG(
READVDU(CTURB,CHAR,KO)
CASE :CTURB: OF
WHEN CHEN,4
+ TEXT(CHEN KIM K-E_BKWRD FACING STEP Y-X :T103
+ MESG(Chen-Kim k-e model
+ TURMOD(KECHEN);TLSC=EP
WHEN KE,2
+ TEXT(K-E_BKWRD FACING STEP Y-X :T103
+ MESG(Standard k-e model
+ TURMOD(KEMODL);TLSC=EP
WHEN KO,2
+ MESG(k-omega model (default)
+ TURMOD(KOMODL);TLSC=OMEG
+ STORE(EP);EPSIN=EPSIN/(0.09*TKEIN)
WHEN RNG,3
+ TEXT(RNG K-E_BKWRD FACING STEP Y-X :T103
+ MESG(RNG k-e model
+ TURMOD(KERNG);TLSC=EP
+ STORE(ETA,ALF,GEN1)
+ OUTPUT(ALF,Y,N,P,Y,Y,Y);OUTPUT(ETA,Y,N,P,Y,Y,Y)
WHEN RKE,3
+ TEXT(Realisable K-E_BKWRD FACING STEP Y-X :T103
+ MESG(Realisable k-e model
+ TURMOD(KEREAL);TLSC=EP;STORE(C1E)
+ OUTPUT(CMU,P,P,P,P,Y,Y);OUTPUT(C1E,P,P,P,P,Y,Y)
ENDCASE
STORE(YPLS)
    GROUP 8. Terms (in differential equations) & devices
    GROUP 9. Properties of the medium (or media)
RHO1=1.0;ENUL=UIN*HEIGHT/REYNO
    GROUP 11. Initialization of variable or porosity fields
FRIC=0.018;TKEIN=0.25*UIN*UIN*FRIC;MIXL=0.09*HEIGHT
EPSIN=0.1643*TKEIN**1.5/MIXL;FIINIT(U1)=UIN;FIINIT(P1)=1.3E-4
FIINIT(KE)=TKEIN;FIINIT(:TLSC:)=EPSIN;FIINIT(V1)=0.001*UIN
     ** Initialization of variables in blocked region
CONPOR(STEP,0.0,CELL,#1,-#1,#1,-#1,#1,#1)
    GROUP 13. Boundary conditions and special sources
INLET(INLET,WEST,#1,#1,#2,#NREGY,#1,#1,1,1)
VALUE(INLET,P1,UIN);VALUE(INLET,U1,UIN)
VALUE(INLET,KE,TKEIN);VALUE(INLET,:TLSC:,EPSIN)
PATCH(OUTLET,EAST,#NREGX,#NREGX,#1,#NREGY,#1,#1,1,1)
COVAL(OUTLET,P1,1.0E5,0.0)
COVAL(OUTLET,U1,ONLYMS,0.0);COVAL(OUTLET,V1,ONLYMS,0.0)
COVAL(OUTLET,KE,ONLYMS,0.0);COVAL(OUTLET,:TLSC:,ONLYMS,0.0)
  ** scalable wall functions
SCALWF=T
WALL (WFNN,NORTH,#1,#NREGX,#NREGY,#NREGY,#1,#1,1,1)
WALL (WFNS,SOUTH,#2,#NREGX,#1,#1,#1,#1,1,1)
    GROUP 15. Termination of sweeps
LSWEEP=600
    GROUP 16. Termination of iterations
REAL(MASIN,DTF);MASIN=2.*HEIGHT*UIN*RHO1; RESREF(P1)=1.E-12*MASIN
RESREF(U1)=RESREF(P1)*UIN; RESREF(V1)=RESREF(U1)
RESREF(KE)=RESREF(P1)*TKEIN; RESREF(:TLSC:)=RESREF(P1)*EPSIN
    GROUP 17. Under-relaxation devices
DTF=XULAST/UIN; RELAX(U1,FALSDT,DTF); RELAX(V1,FALSDT,DTF)
IF(:TLSC:.EQ.EP) THEN
+ DTF=DTF/NX;LSWEEP=400
ELSE
+ DTF=5.*DTF/NX
ENDIF
 
CASE :CTURB: OF
WHEN KO,2
+ RELAX(V1,FALSDT,DTF);RELAX(U1,FALSDT,DTF)
+ RELAX(KE,FALSDT,DTF);RELAX(:TLSC:,FALSDT,DTF)
WHEN RKE,3
+ LSWEEP=2000
+ RELAX(U1,FALSDT,DTF);RELAX(V1,FALSDT,DTF)
+ LITER(P1)=50
+ RELAX(KE,FALSDT,DTF/5.);RELAX(EP,FALSDT,DTF/5.)
+ RELAX(ENUT,LINRLX,0.3)
ENDCASE
 
IYMON=NYS-2;IXMON=NXS+2;NPRMON=100
    GROUP 23. Field print-out and plot control
ITABL=3;NPLT=10;IPLTL=LSWEEP;NXPRIN=2;NYPRIN=2
WALPRN=T;TSTSWP=-1;LITER(KE)=5;LITER(:TLSC:)=5
DISTIL=T 
CASE :CTURB: OF
WHEN CHEN,4
+ EX(P1  )=1.603E+01;EX(KE  )=1.335E+00
+ EX(ENUT)=2.089E-03;EX(YPLS)=8.124E-01
+ EX(U1  )=8.175E+00;EX(V1  )=2.020E-01
+ EX(EP  )=1.481E+02;EX(VPOR)=9.333E-01
WHEN KE,2
+ EX(P1  )=1.376E+01;EX(U1  )=8.174E+00
+ EX(V1  )=2.107E-01;EX(KE  )=1.542E+00
+ EX(EP  )=1.528E+02;EX(VPOR)=9.333E-01
+ EX(ENUT)=2.557E-03;EX(YPLS)=8.464E-01
WHEN KO,2
+ EX(P1  )=1.298E+01;EX(U1  )=8.226E+00
+ EX(V1  )=2.264E-01;EX(KE  )=1.996E+00
+ EX(EP  )=1.650E+02;EX(ENUT)=7.780E-03
+ EX(VPOR)=9.333E-01;EX(OMEG)=7.979E+02
+ EX(YPLS)=9.511E-01 
WHEN RNG,3
+ EX(P1  )=1.524E+01;EX(U1  )=8.169E+00
+ EX(V1  )=2.089E-01;EX(KE  )=1.460E+00
+ EX(EP  )=1.465E+02;EX(VPOR)=9.333E-01
+ EX(GEN1)=8.657E+05;EX(ENUT)=2.234E-03
+ EX(YPLS)=8.125E-01
WHEN RKE,3
+ EX(P1  )=1.561E+01;EX(U1  )=8.160E+00
+ EX(V1  )=2.033E-01;EX(KE  )=1.397E+00
+ EX(EP  )=1.459E+02;EX(VPOR)=9.333E-01
+ EX(CMU )=1.385E-01;EX(DVDY)=8.556E+00
+ EX(DVDX)=1.638E+00;EX(DUDY)=2.050E+02
+ EX(DUDX)=8.573E+00;EX(EPKE)=8.764E+01
+ EX(ENUT)=2.799E-03;EX(YPLS)=8.019E-01
+ EX(C1E )=4.095E-01
ENDCASE