****** TO LOAD CASE 105:TYPE L(N105) *****
    GROUP 1. Run title and other preliminaries
TEXT(YX TURBULENT BACKWARD-FACING-STEP FLOW
TITLE
mesg( PC486/50 time last reported as 1.0 hr
  DISPLAY
  Numerical Schemes validation example:
  2-d x-y, Cartesian, steady, elliptic simulation
  The problem considered is turbulent flow over a backward facing
  step, as studied experimentally W.D.Moss et al (1st Symp. on
  Turb. Shear Flows, Univ. Park, Penn., USA, Vol.II, p13.1, 1977).
 
  The Reynolds number based on step height H is 5E4 and the
  expansion ratio is 1.1. The inlet is specified as a uniform
  inflow located 12H upstream of the step. The outlet plane is
  located 30H downstream of the step. This Q1 uses quadratic-upwind
  differencing for the velocities, and Koren's bounded scheme for
  the turbulence variables.
 
  ENDDIS
 
  The configuration is similar to that of Kim et al (ASME J.Fluids
  Engng, Vol.102, p302, 1980 ), as studied numerically throughout
  the PHOENICS Library (see e.g. library cases T103 &T305) and by
  many others (see e.g. S.Thangam & C.G.Speziale, AIAA J, Vol.30,
  No.5, p1314, 1992). The present geometry has a smaller expansion
  ratio and slightly higher Reynolds number.
 
  The measured reattachment length for this case is Xr/H=5.5, as
  measured from the step. The default computation using higher-
  order differencing schemes predicts a reattachment length of
  Xr/H=4.74. The PHOENICS default of hybrid differencing predicts
  Xr/H=4.43. No grid refinement studies have been conducted.
 
  PHOTON USE
  P
 
 
   0.20443E+04 0.15633E+04 CR
  gr ou z 1;use patgeo;msg vectors;vec z 1 sh
  msg press  and then  to end
  pause
  ENDUSE
 
REAL(HIN,HSTEP,LEIN,LEUP,LERC,LEDN,RENO,VIN,KEIN,EPIN)
REAL(RLXFAC);INTEGER(NX1,NX2,NX3,NX4,NY1,NY2,NY3,NXS);CHAR(SCHM)
  ** All dimensions are based on: kg, m, sec
HIN=0.762;HSTEP=0.076;RENO=50000.0;ENUL=1.6E-5
VIN=RENO*ENUL/HSTEP
KEIN=0.5*1.E-5*VIN*VIN;EPIN=KEIN**1.5*0.1643/(0.09*HIN)
    GROUP 2. Transience; time-step specification
    GROUP 3. X-direction grid specification
NX1=10;NX2=10;NX3=30;NX4=15;NXS=NX1+NX2
LEIN=7.0*HSTEP;LEUP=5.0*HSTEP;LERC=10.0*HSTEP;LEDN=30.0*HSTEP
NREGX=4;IREGX=1;GRDPWR(X,NX1,LEIN,1.0)
IREGX=2;GRDPWR(X,NX2,LEUP,-1.3);IREGX=3;GRDPWR(X,NX3,LERC,1.2)
IREGX=4;GRDPWR(X,NX4,LEDN-LERC,1.4)
    GROUP 4. Y-direction grid specification
NY1=10;NY2=10;NY3=10
NREGY=3;IREGY=1;GRDPWR(Y,-NY1,HSTEP,1.3)
IREGY=2;GRDPWR(Y,NY2,HSTEP,1.2)
IREGY=3;GRDPWR(Y,NY3,HIN-HSTEP,1.5)
    GROUP 5. Z-direction grid specification
NZ=1;ZWLAST=0.01
    GROUP 6. Body-fitted coordinates or grid distortion
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1)
SOLUTN(P1,Y,Y,Y,N,N,N);TURMOD(KEMODL);STORE(ENUT)
  ** use arithmetic averaging for vels as V2.1.3 & V2.2
     default of harmonic averaging produces unphysical U1
     velocities in near-wall cells of recirculation zone.
SOLUTN(U1,P,P,P,P,P,N);SOLUTN(V1,P,P,P,P,P,N)
  ** conjugate-gradient solver
CSG3=CNGR;RLXFAC=XULAST/(NX*VIN)
    GROUP 8. Terms (in differential equations) & devices
MESG( Enter required convection scheme
MESG(  Default: QUICK for momentum; KOREN for k and eps
MESG( The alternative is:
MESG(  HYB - Hybrid differencing for all variables
READVDU(SCHM,CHAR,HOC)
CASE :SCHM: OF
WHEN HYB,3
+ MESG(Hybrid-differencing scheme
+ DIFCUT=0.5;RLXFAC=XULAST/(NX*VIN)
WHEN HOC,3
+ MESG(QUICK for momentum; KOREN for k and e
+ SCHEME(QUICK,U1,V1);SCHEME(KOREN,KE,EP)
+ RLXFAC=0.1*XULAST/(NX*VIN)
ENDCASE
    GROUP 9. Properties of the medium (or media)
RHO1=1.2
    GROUP 10. Inter-phase-transfer processes and properties
    GROUP 11. Initialization of variable or porosity fields
FIINIT(U1)=VIN;FIINIT(P1)=1.3E-4;FIINIT(KE)=KEIN;FIINIT(EP)=EPIN
     ** Initialization of variables in blocked region
  ** since using arithmetic averaging on vels, it is necessary
     to intoduce wall friction patches around blockage separately,
     remove - from patch limits.
   CONPOR(STEP,0.0,CELL,#1,-#2,#1,-#1,#1,#1)
CONPOR(STEP,0.0,CELL,#1,#2,#1,#1,#1,#1)
    GROUP 12. Convection and diffusion adjustments
    GROUP 13. Boundary conditions and special sources
PATCH(IN1,WEST,1,1,NY1+1,NY,1,NZ,1,LSTEP)
COVAL(IN1,P1,FIXFLU,RHO1*VIN)
COVAL(IN1,U1,ONLYMS,VIN);COVAL(IN1,V1,ONLYMS,0.0)
COVAL(IN1,KE,ONLYMS,KEIN);COVAL(IN1,EP,ONLYMS,EPIN)
  ** Wall boundary conditions
PATCH(TWALL,NWALL,1,NX,NY,NY,1,NZ,1,LSTEP)
COVAL(TWALL,U1,LOGLAW,0.0)
COVAL(TWALL,KE,LOGLAW,LOGLAW);COVAL(TWALL,EP,LOGLAW,LOGLAW)
PATCH(BWALL,SWALL,#3,NX,1,1,1,NZ,1,LSTEP)
COVAL(BWALL,U1,LOGLAW,0.0)
COVAL(BWALL,KE,LOGLAW,LOGLAW);COVAL(BWALL,EP,LOGLAW,LOGLAW)
  ** Outlet boundary
PATCH(OUT,EAST,NX,NX,1,NY,1,NZ,1,LSTEP)
COVAL(OUT,P1,10.0,0.0);COVAL(OUT,KE,ONLYMS,SAME)
COVAL(OUT,EP,ONLYMS,SAME)
  ** Step wall boundary conditions
     use explicit patches & not CONPOR - arguments because
     of need to use arithmetic averaging on velocities
PATCH(STEP-WW,WWALL,NXS+1,NXS+1,1,NY1,1,1,1,1)
COVAL(STEP-WW,V1,LOGLAW,0.0);COVAL(STEP-WW,KE,LOGLAW,LOGLAW)
COVAL(STEP-WW,EP,LOGLAW,LOGLAW)
 
PATCH(STEP-SW,SWALL,1,NXS,NY1+1,NY1+1,1,1,1,1)
COVAL(STEP-SW,U1,LOGLAW,0.0);COVAL(STEP-SW,KE,LOGLAW,LOGLAW)
COVAL(STEP-SW,EP,LOGLAW,LOGLAW)
    GROUP 14. Downstream pressure for PARAB=.TRUE.
    GROUP 15. Termination of sweeps
  ** About 2000 sweeps are required for complete convergence
     when using higher-order differencing. Only 400 sweeps
     are required when using hybrid differencing.
LSWEEP=200
    GROUP 16. Termination of iterations
LITER(U1)=10;LITER(V1)=10;LITER(KE)=10;LITER(EP)=10
    GROUP 17. Under-relaxation devices
RELAX(P1,LINRLX,0.8);RELAX(ENUT,LINRLX,0.6)
RELAX(U1,FALSDT,RLXFAC);RELAX(V1,FALSDT,RLXFAC)
RELAX(KE,FALSDT,RLXFAC);RELAX(EP,FALSDT,RLXFAC)
    GROUP 18. Limits on variables or increments to them
    GROUP 22. Spot-value print-out
TSTSWP = -1;IYMON=NY1/2;IXMON=NX1+NX2+NX3/2
    GROUP 23. Field print-out and plot control
NPLT=50;ITABL=3
    GROUP 24. Dumps for restarts