photon use
  p;;
 
  gr ou z 1; use patgeo
  msg light-phase volume fractions
  msg note the high concentration in the recirculation region
  con r1 z 1 fi;0.01; pause;con off;red
  msg light-phase velocity vectors
  vec z 1 sh; pause;vec off;red; se ve com; u2 v2 w2
  msg heavy-phase velocity vectors
  vec z 1 sh ; pause;con off;red
  msg x-direction velocity-difference contours
  con slpu z 1 fi;0.01; pause;con off;red
  msg y-direction velocity-difference contours
  con slpv z 1 fi;0.01
  msg Press e to END
  enduse
    GROUP 1. Run title and other preliminaries
TEXT(2PH BACKWARD-FACING-STEP K-E MODEL: W574
TITLE
  DISPLAY
  A 2-phase turbulent mixture flows over a backward-facing step of
  height h in a 2D channel of exit width 3h. The calculation starts
  at x = -4h and terminates 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. The density
  ratio of the fluids is 100:1 .
 
    ---------------------------------north wall--------------------
 
   Constant prescribed mass
   inflow rate
   ---------------->
  ___________________
    ////////////////|                                          Exit
         step      /| Recirculation
                   /|  <----      ----->
                   /|_______________south wall_____________________
  ENDDIS
INTEGER(NYS,NXS)
REAL(HEIGHT,WIDTH,CLEN,SLEN,REYNO,UIN,TKEIN,EPSIN,GENUT)
REAL(R1IN,R2IN)
    Calculation of domain specifications
HEIGHT=0.0381;WIDTH=3.*HEIGHT;SLEN=4.*HEIGHT;CLEN=20.*HEIGHT
NXS=4;NYS=10;REYNO=4.5E4;UIN=13.
    GROUP 2. Transience; time-step specification
    GROUP 3. X-direction grid specification
NREGX=2
IREGX=1;GRDPWR(X,NXS,SLEN,-1.5)
IREGX=2;GRDPWR(X,20-NXS,CLEN-SLEN,1.5)
    GROUP 4. Y-direction grid specification
NREGY=2
IREGY=1;GRDPWR(Y,-NYS,HEIGHT,1.5)
IREGY=2;GRDPWR(Y,-(15-NYS),WIDTH-HEIGHT,1.5)
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1);SOLUTN(P1,Y,Y,Y,N,N,N);TURMOD(KEMODL);STORE(ENUT)
ONEPHS=F;SOLVE(U2,V2,R2);STORE(R1)
STORE(SLPV,SLPU)
    Activate the following line if required
    STORE(GEN1,REYN,VREL,CD,CFIP)
    GROUP 9. Properties of the medium (or media)
RHO1=1.0;ENUL=UIN*HEIGHT/REYNO;RHO2=100.0
    GROUP 10. Inter-phase-transfer processes and properties
CFIPS=GRND7;CFIPA=1E-3;CFIPB=1E-4
    GROUP 11. Initialization of variable or porosity fields
    Calculation of KE (where fric=0.018)...
TKEIN=0.01*UIN**2
    Calculation of EP (where lmix=0.09 x h)...
EPSIN=TKEIN**1.5*0.1643/(0.09*(WIDTH-HEIGHT))
R1IN=0.9;R2IN=1-R1IN
    Initial values
FIINIT(U1)=UIN; FIINIT(P1)=1.3E-4; FIINIT(KE)=TKEIN;FIINIT(EP)=EPSIN
FIINIT(U2)=UIN; FIINIT(R1)=R1IN; FIINIT(R2)=1.0 - R1IN
    Initialization of variables in blocked region
PATCH(STEP,INIVAL,#1,#1,#1,#1,1,1,1,1)
STORE(PRPS); INIADD=F; COVAL(STEP,PRPS,0.0,100)
EGWF=T
    GROUP 13. Boundary conditions and special sources
    Inlet
INLET(INLET,WEST,1,1,#2,#2,1,1,1,1)
VALUE(INLET,P1,RHO1*R1IN*UIN); VALUE(INLET,U1,UIN)
VALUE(INLET,KE,TKEIN); VALUE(INLET,EP,EPSIN)
VALUE(INLET,P2,RHO2*R2IN*UIN); VALUE(INLET,U2,UIN)
    Exit
PATCH(OUTLET,EAST,NX,NX,#1,#2,1,1,1,1)
COVAL(OUTLET,P1,1.0,0); COVAL(OUTLET,P2,1.0*RHO2/RHO1,0.0)
COVAL(OUTLET,U1,ONLYMS,0.0);COVAL(OUTLET,V1,ONLYMS,0.0)
COVAL(OUTLET,U2,ONLYMS,0.0);COVAL(OUTLET,V2,ONLYMS,0.0)
COVAL(OUTLET,KE,ONLYMS,SAME);COVAL(OUTLET,EP,ONLYMS,SAME)
    N-wall
WALL(WFUNNORT,NORTH,#1,#2,#2,#2,1,1,1,1)
    S2-wall
WALL(WFUNSOUT,SOUTH,#2,#2,#1,#1,1,1,1,1)
    GROUP 15. Termination of sweeps
LSWEEP=1000
    GROUP 17. Under-relaxation devices
  self-adjusting relaxation
SARAH=0.005;KELIN=3;RELAX(KE,LINRLX,0.5);RELAX(EP,LINRLX,1.0)
    GROUP 22. Monitor print-out
IYMON=NYS-2;IXMON=NXS+2;TSTSWP=-1
    GROUP 23. Field print-out and plot control