PHOTON USE
  p
 
 
 
  msg Press  after each pause
  gr ou x 1
  msg first-fluid velocity components
  set vec com
  u1 cv1 sw1
  vec x 1 sh
  pause
  vec off
  red
  msg second-fluid velocity components
  set vec com
  2u dv2 fw2
  vec x 1 sh
  pause;vec off;red
  msg first-fluid concentration contours
  con ar1 x 1 fi;0.01
  pause
  msg second-fluid concentration contours
  con br2 x 1 fi;0.01
  msg            -
  msg Press e to END
  enduse
  based on case 976, concerns 2-fluid mixing in a duct
  dbs summer 1991
    GROUP 1. Run title and other preliminaries
TEXT(Mixing in a duct; Two-Fluid Model   :W974
TITLE
mesg(PC486/50 time last reported as 5.5 min
  DISPLAY
  TWO-FLUID MODEL OF JETS MIXING IN A DUCT
  2-dimensional (y-z), Cartesian, steady, two-phase, elliptic
 
  This is an example of the application of the two-fluid model of
  turbulence to non-reacting, turbulent flow in a duct, as
  illustrated:
  ////////////////////////////////////////////////
  Inlet                                       Exit
  --------> W2                         ---------->
  ////////////
         ---------->                    ------->
             /////////////////////////////////////
 
  In the present calculations, the fluid 1 is defined as that which
  moves away from the stepped wall and fluid 2 as that moves
  towards it respectively. It is postulated that only fluid 2 enters
  the duct at the inlet, and that it is converted into fluid 1 there
  by entrainment. The boundary condition employed here is an extreme
  one to emphasise the role of inter-fluid transport of mass and
  momentum.
  enddis
INTEGER(NYS,NZS)
REAL(WIN,HIGHT,WIDTH,Cf,Cm,Cvw,Ct)
WIN=18.2;HIGHT=0.0381;WIDTH=HIGHT*3.0;NYS=15;NZS=6
    **** Model constants ****
Cf=0.05;Cm=10.0;Cvw=1.0;Ct=1.0
    GROUP 4. Y-direction grid specification
   *** The width of duct is 0.1143
NY=30;YVLAST=WIDTH
YFRAC(1)=-15.0;YFRAC(2)=0.022225
YFRAC(3)=15.0;YFRAC(4)=0.044446
    GROUP 5. Z-direction grid specification
   *** The length of duct is 0.762
NZ=30;ZWLAST=1.0
ZFRAC(1)=-30.0;ZFRAC(2)=2.54E-2
    GROUP 7. Variables stored, solved & named
ONEPHS=F
SOLVE(P1,V1,V2,W1,W2,R1,R2);SOLUTN(P1,Y,Y,Y,N,N,N)
SOLVE(U1,U2);NAME(U2)=2U
NAME(W1)=SW1;NAME(W2)=FW2;NAME(R1)=AR1;NAME(R2)=BR2
NAME(V1)=CV1;NAME(V2)=DV2
INTMDT=22;NAME(INTMDT)=MDOT;LEN1=23;NAME(LEN1)=LEN
VIST=24;NAME(VIST)=VIS
SOLUTN(MDOT,Y,N,N,N,N,N);SOLUTN(LEN,Y,N,N,N,N,N)
SOLUTN(VIS,Y,N,N,N,N,N)
    GROUP 9. Properties of the medium (or media)
EL1=NIKURCH;RHO1=0.1;RHO2=1.0;ENUL=1.E-6;ENUT=2FLUID;ENUTA=Ct
    GROUP 10. Inter-phase-transfer processes and properties
    *** Ierter-fluid friction
CFIPS=GRND4;CFIPA=0.0;CFIPB=1.0;CFIPC=Cf;CFIPD=-1.0
    *** Inter-fluid mass transfer
CMDOT=GRND1;CMDTA=Cm;CMDTB=0.5;CMDTC=0.0
    GROUP 11. Initialization of variable or porosity fields
FIINIT(SW1)=WIN;FIINIT(FW2)=WIN;FIINIT(AR1)=0.5;FIINIT(BR2)=0.5
CONPOR(0.0,CELL,1,1,1,-NYS,1,-NZS)
    GROUP 13. Boundary conditions and special sources
    *** Inlet
INLET(INLET,LOW,1,1,NYS+1,NY,1,1,1,1)
VALUE(INLET,P2,WIN*0.99);VALUE(INLET,FW2,WIN)
VALUE(INLET,P1,WIN*0.01);VALUE(INLET,SW1,WIN)
    *** Exit
PATCH(OUTLET,HIGH,1,1,1,NY,NZ,NZ,1,1)
COVAL(OUTLET,P1,1.E5,0.0);COVAL(OUTLET,P2,1.E5,0.0)
COVAL(OUTLET,CV1,ONLYMS,0.0);COVAL(OUTLET,DV2,ONLYMS,0.0)
COVAL(OUTLET,SW1,ONLYMS,0.0);COVAL(OUTLET,FW2,ONLYMS,0.0)
    *** North-wall
WALL (NORTHWAL,NORTH,1,1,NY,NY,1,NZ,1,1)
COVAL(NORTHWAL,SW1,1.0,0.0);COVAL(NORTHWAL,FW2,1.0,0.0)
    *** South-wall
WALL (SOUTHWAL,SOUTH,1,1,1,1,NZS+1,NZ,1,1)
COVAL(SOUTHWAL,SW1,1.0,0.0);COVAL(SOUTHWAL,FW2,1.0,0.0)
    *** Momentum source in the normal-to-wall-velocity equations
PATCH(SHSO,CELL,1,1,1,NY,1,NZ,1,1)
COVAL(SHSO,CV1,FIXFLU,GRND5);COVAL(SHSO,DV2,FIXFLU,GRND5)
SHSOA=Cvw
    *** Source of fluid 1 at face of step
PATCH(STEPIN,HIGH,1,1,1,NYS,NZS+1,NZS+1,1,1)
COVAL(STEPIN,P1,FIXFLU,0.99*0.5*WIN)
COVAL(STEPIN,P2,FIXFLU,0.01*0.5*WIN)
COVAL(STEPIN,U1,ONLYMS,WIN);COVAL(STEPIN,2U,ONLYMS,WIN)
    GROUP 15. Termination of sweeps
LSWEEP=75;SELREF=T; RESFAC=1.E-2
    GROUP 17. Under-relaxation devices
RELAX(P1,LINRLX,1.0);RELAX(AR1,LINRLX,0.25)
RELAX(BR2,LINRLX,0.25);RELAX(CV1,FALSDT,0.0001)
RELAX(DV2,FALSDT,0.0001);RELAX(SW1,FALSDT,0.001)
RELAX(FW2,FALSDT,0.001);RELAX(MDOT,LINRLX,0.5)
    GROUP 21. Print-out of variables
OUTPUT(AR1,N,N,N,N,N,N);OUTPUT(MDOT,Y,Y,Y,Y,Y,Y)
PATCH(LPRO1,PROFIL,1,1,1,1,NZS,NZ,1,1)
COVAL(LPRO1,P1,0.0,0.0)
PATCH(LPRO2,PROFIL,1,1,NY,NY,NZS,NZ,1,1)
COVAL(LPRO2,P1,0.0,0.0)
PATCH(WPRO,PROFIL,1,1,1,NY,8,8,1,1)
COVAL(WPRO,SW1,1.0,1.0);COVAL(WPRO,FW2,1.0,1.0)
COVAL(WPRO,CV1,0.1,0.1);COVAL(WPRO,DV2,0.1,0.1)
PATCH(MAP,CONTUR,1,NX,1,NY,1,NZ,1,LSTEP)
PLOT(MAP,AR1,0.0,10.0);PLOT(MAP,SW1,0.0,10.0)
PLOT(MAP,U1,0.0,0.0)
    GROUP 22. Spot-value print-out
IYMON=NYS-2;IZMON=NZS+2
NPLT=1;NYPRIN=NY/5;NZPRIN=NZ/5;ITABL=1;TSTSWP=-1