GROUP 1. Run title and other preliminaries
TEXT(REALISABLE_KE SCAL_WF BLUNT PLATE:T311
TITLE
  DISPLAY
  The case considered is 2D incompressible, turbulent flow
  past a thick flat rectangular plate with a sharp leading
  edge, as studied experimentally by Djilali,N. & Gartshore,I.S.,
  "Turbulent flow around a bluff rectangular plate, Part I:
  Experimental Investigation", Journal of Fluid Mechanics,
  Vol.113, pp51-59, (1991).
 
  The flow separates at the leading edge of the plate, and then
  reattaches further downstream to form a long separation zone on
  top of the plate. The thickness of the plate H is taken as 0.1m,
  and the working fluid is air at standard temperature and
  pressure.The flow Reynolds number based on the free-stream
  velocity and plate thickness H is 50,000.
 
  The inlet and outlet planes are located 10H upstream and
  downstream of the leading edge of the plate. The height of the
  solution domain is taken as 10H, and for simplicity a zero
  flux boundary is assumed here. Symmetry is exploited so that
  only one half of the flow is simulated. A fixed-pressure boundary
  condition is applied at the outlet, and uniform flow profiles are
  specified at the inlet. Scalable wall functions are used at
  the walls of the plate.
 
  The default simulation is made with the realisable k-e model, but
  the case can also be run with the standard k-e and k-w models, and
  the following k-e variants: Chen-Kim, RNG, Kato-Launder, Murakami
  et al. The measured and predicted reattachment points are listed
  below:
 
             KE   REAL_KE CHEN  RNG  MMK   KL   KO    EXPT
 
      Xr/H = 1.08   4.85   4.7  3.9  3.2   3.2  0.73   4.7
 
  These results are not grid independent. It can be seen that the
  standard k-e and k-w models seriously underestimate the separation 
  length. This is because this model predicts excessive turbulence 
  production at the stagnation zone on the front of the plate, and 
  the high turbulence levels are then convected into the separation 
  zone. The other models perform much better, with the Chen-Kim and 
  Realisable models showing close agreement with the measurement.
  ENDDIS
 
  This AUTOPLOT sequence provides a plot of the axial velocity U1 
  along the top of the plate against axial distance normalised by
  the step height. The axial coordinate 0.0 corresponds to the 
  front of the step. The reattachment point corresponds the axial 
  location where U1 changes from negative to positive.
 
   AUTOPLOT USE
   file
   phida 3
 
   da 1 u1 y 11
   divide x .1 1
   shift x -10 1
   colf 1
   level y 0;level x 0
   scale x 0 5
   redraw
   msg Velocity (U1) profile
   msg Press e to END
   ENDUSE
 
CHAR(CTURB,TLSC)
REAL(THICKNESS,DHEIGHT,DLEN,PLEN,PHEIGHT,REYNO,UIN)
REAL(TKEIN,EPSIN,MIXL,FRIC)
INTEGER(NYP,NYF,NXF,NXP)
     ** Calculation of domain specifications
THICKNESS=0.1;PHEIGHT=0.5*THICKNESS
DHEIGHT=10.*THICKNESS;PLEN=10.*THICKNESS;DLEN=20.*THICKNESS
REYNO=5.0E4;UIN=7.3
TKEIN=(0.01*UIN)**2;MIXL=0.05*DHEIGHT
EPSIN=0.1643*TKEIN**1.5/MIXL
    GROUP 3. X-direction grid specification
    GROUP 4. Y-direction grid specification

NXF=60;NXP=55;NYP=10;NYF=65
NREGX=2
IREGX=1;GRDPWR(X,NXF,-(DLEN-PLEN),-1.04)
IREGX=2;GRDPWR(X,NXP,-PLEN,1.04)
NREGY=2
IREGY=1;GRDPWR(Y,NYP,-PHEIGHT,1.04)
IREGY=2;GRDPWR(Y,NYF,-(DHEIGHT-PHEIGHT),1.04)
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1);STORE(ENUT,EL1,DEN1)

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
MESG(  KL   - Kato-Launder k-e model
MESG(  MMK  - Murakami k-e model
MESG(  RNG  - RNG k-e model
MESG(  RKE  - Realisable k-e model (default)
MESG(
READVDU(CTURB,CHAR,RKE)
CASE :CTURB: OF
WHEN CHEN,4
TEXT(CHEN_KIM_KE SCAL_WF BLUNT PLATE:T311
+ MESG(Chen-Kim k-e model
+ TURMOD(KECHEN);TLSC=EP
WHEN KE,2
TEXT(STANDARD_KE SCAL_WF BLUNT PLATE:T311
+ MESG(Standard k-e model
+ TURMOD(KEMODL);TLSC=EP
WHEN KO,2
TEXT(KO SCAL_WF BLUNT PLATE:T311
+ MESG(k-omega model (default)
+ TURMOD(KOMODL);TLSC=OMEG
+ STORE(EP);EPSIN=EPSIN/(0.09*TKEIN)
WHEN KL,2
+ TEXT(KATO_LAUNDER_KE SCAL_WF BLUNT PLATE:T311
+ MESG(Kato-Launder k-e model
+ TURMOD(KEKL);TLSC=EP
WHEN MMK,3
+ TEXT(MMK_K-E SCAL_WF BLUNT PLATE:T311
+ MESG(MMK k-e model
+ TURMOD(KEMMK);TLSC=EP
WHEN RNG,3
+ TEXT(RNG_K-E SCAL_WF BLUNT PLATE:T311
+ 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_KE SCAL_WF BLUNT PLATE:T311
+ 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,STRS,SKIN)
    GROUP 8. Terms (in differential equations) & devices
DENPCO=T;ADDDIF=T	
    GROUP 9. Properties of the medium (or media)
RHO1=1.225;ENUL=UIN*THICKNESS/REYNO
    GROUP 11. Initialization of variable or porosity fields
FIINIT(U1)=UIN;FIINIT(V1)=0.001*UIN
FIINIT(KE)=TKEIN;FIINIT(:TLSC:)=EPSIN
CASE :CTURB: OF
WHEN RKE,3
+ FIINIT(U1)=1.E-10
ENDCASE
     ** Initialization of variables in blocked region	 
CONPOR(PLATE,0.0,CELL,-#2,#2,-#1,#1,#1,#1)
    GROUP 13. Boundary conditions and special sources
INLET(INLET,WEST,#1,#1,#1,#NREGY,#1,#1,1,1)
VALUE(INLET,P1,RHO1*UIN);VALUE(INLET,U1,UIN)
VALUE(INLET,KE,TKEIN);VALUE(INLET,:TLSC:,EPSIN)

PATCH(OUTLET,EAST,#NREGX,#NREGX,#2,#NREGY,#1,#1,1,1)
COVAL(OUTLET,P1,1.0E3,0.0)
COVAL(OUTLET,U1,ONLYMS,0.0);COVAL(OUTLET,V1,ONLYMS,0.0)
SCALWF=T   ! Scalable wall functions
    GROUP 15. Termination of sweeps
LSWEEP=1500
    GROUP 16. Termination of iterations
SELREF=T;RESFAC=1.E-4
    GROUP 17. Under-relaxation devices
CONWIZ=T  
KELIN=3
CASE :CTURB: OF
WHEN KO,2
+ CONWIZ=F;KELIN=0
+ REAL(DTF);DTF=XULAST/UIN
+ RELAX(V1,FALSDT,DTF);RELAX(U1,FALSDT,DTF)
+ RELAX(KE,FALSDT,DTF);RELAX(:TLSC:,FALSDT,DTF)
+ RELAX(ENUT,LINRLX,0.5)
ENDCASE
IYMON=NYP+2;IXMON=NXF+13;NPRMON=100
    GROUP 23. Field print-out and plot control
ITABL=3;NPLT=10;IPLTL=LSWEEP;NXPRIN=23;NYPRIN=15
TSTSWP=-1
DISTIL=T 
STORE(PRPS)
EX(PRPS)=9.362E-01;EX(DEN1)=1.147E+00
EX(VPOR)=9.362E-01
CASE :CTURB: OF
WHEN CHEN,4
+EX(P1  )=5.509E+00;EX(U1  )=6.621E+00
+EX(V1  )=4.384E-01;EX(KE  )=1.068E-01
+EX(EP  )=4.566E+00;EX(EPKE)=6.777E+00
+EX(EL1 )=2.751E-02;EX(STRS)=2.418E-04
+EX(YPLS)=1.484E-01;EX(SKIN)=5.053E-05
+EX(ENUT)=1.388E-03
WHEN KE,2
+EX(P1  )=4.615E+00;EX(U1  )=6.763E+00 
+EX(V1  )=3.448E-01;EX(KE  )=4.162E-01 
+EX(EP  )=1.812E+01;EX(EPKE)=4.837E+00 
+EX(EL1 )=4.060E-02;EX(STRS)=3.877E-04 
+EX(YPLS)=1.835E-01;EX(SKIN)=4.730E-05 
+EX(ENUT)=3.523E-03 
WHEN KO,2
+EX(P1  )=6.023E+00;EX(U1  )=6.655E+00
+EX(V1  )=3.729E-01;EX(KE  )=2.913E+00
+EX(EP  )=4.685E+01;EX(EPKE)=9.362E-11 
+EX(SKIN)=4.650E-05
+EX(STRS)=4.692E-04;EX(YPLS)=1.969E-01
+EX(OMEG)=4.630E+01;EX(DEN1)=1.147E+00
+EX(EL1 )=7.147E-02;EX(ENUT)=4.923E-02
WHEN KL,2
+EX(P1  )=5.146E+00;EX(U1  )=6.667E+00
+EX(V1  )=3.990E-01;EX(KE  )=1.247E-01
+EX(EP  )=5.601E+00;EX(EPKE)=5.071E+00
+EX(DVDX)=3.928E+00;EX(DUDY)=1.757E+01
+EX(FOMG)=2.223E-01;EX(EL1 )=4.046E-02
+EX(STRS)=2.654E-04;EX(YPLS)=1.539E-01
+EX(SKIN)=5.027E-05;EX(ENUT)=1.935E-03
WHEN MMK,3
+EX(P1  )=5.157E+00;EX(U1  )=6.666E+00 
+EX(V1  )=4.003E-01;EX(KE  )=1.236E-01 
+EX(EP  )=5.389E+00;EX(EPKE)=5.019E+00 
+EX(DVDX)=3.924E+00;EX(DUDY)=1.759E+01 
+EX(FOMG)=2.061E-01;EX(EL1 )=4.050E-02 
+EX(STRS)=2.645E-04;EX(YPLS)=1.536E-01 
+EX(SKIN)=5.030E-05;EX(ENUT)=5.105E-04 
 WHEN RNG,3
+EX(P1  )=5.344E+00;EX(U1  )=6.643E+00  
+EX(V1  )=4.205E-01;EX(KE  )=1.291E-01  
+EX(EP  )=5.132E+00;EX(EPKE)=5.857E+00  
+EX(GEN1)=5.710E+03;EX(ALF )=8.198E+00  
+EX(ETA )=8.497E+00;EX(EL1 )=3.148E-02  
+EX(STRS)=2.585E-04;EX(YPLS)=1.527E-01  
+EX(SKIN)=5.016E-05;EX(ENUT)=1.707E-03  
 WHEN RKE,3
+EX(P1  )=5.421E+00;EX(U1  )=6.629E+00 
+EX(V1  )=4.262E-01;EX(KE  )=1.230E-01 
+EX(EP  )=4.972E+00;EX(SKIN)=5.051E-05 
+EX(STRS)=2.497E-04;EX(YPLS)=1.502E-01 
+EX(C1E )=5.868E-01;EX(DVDY)=5.134E+00 
+EX(DVDX)=3.958E+00;EX(DUDY)=1.836E+01 
+EX(DUDX)=5.133E+00;EX(EPKE)=5.302E+00 
+EX(CMU )=7.094E-02;EX(DEN1)=1.147E+00 
+EX(EL1 )=4.079E-02;EX(ENUT)=1.602E-03  
 ENDCASE