PHOTON USE
  P
 
 
 
  gr ou x 1
  set vec ref 1.
  vec x 1 sh
  msg(             Water velocity distribution
  msg( Press ENTER to continue
  pause;
  vec off;red
  set vec comp - v2 w2
  vec x 1 sh
  msg(             Air velocity distribution
  msg( Press ENTER to continue
  pause;
  vec off;red
  con r2 x 1 1 z 1 19 fil;.0001
  msg(             Air volume fraction contours
  msg( Press E to finish
  ENDUSE
    GROUP 1. Run title and other preliminaries
 
  DISPLAY
   This problem  is  concerned with the prediction of lateral phase
   distribution for a bubbly flow in a duct. The phase distribution
   is  caused  by  the interaction of gravity and lift forces.  The
   latters  are  introduced  by  PLANT  options.  The   interesting
   variants  include  the changing in gravity directions to see how
   the bubbles accumulate near the walls for the upflow  situation,
   while  they  accumulate near the center of the duct for the down
   flow case.  Note that some uderrelaxation adjustments  could  be
   used to accelerate the convergence.
  ENDDIS
 
TEXT(PHASE DISTRIBUTION IN A DUCT:143
    GROUP 4. Y-direction grid specification
GRDPWR(Y,10,0.025,1.0)
    GROUP 5. Z-direction grid specification
GRDPWR(Z,20,0.25,1.)
    GROUP 7. Variables stored, solved & named
ONEPHS=F
SOLVE(P1,V1,W1,V2,W2,R2,R1)
    GROUP 8. Terms (in differential equations) & devices
TERMS(V1,Y,Y,Y,N,P,P);TERMS(V2,Y,Y,N,N,P,P)
TERMS(W1,Y,Y,Y,N,P,P);TERMS(W2,Y,Y,N,N,P,P)
    GROUP 9. Properties of the medium (or media)
ENUL=1.e-04;RHO1=1000.0;RHO2=1.
    GROUP 10. Inter-phase-transfer processes and properties
  ** Set a constant inter-phase friction coefficient
CFIPS=100.
    GROUP 11. Initialization of variable or porosity fields
FIINIT(W1)=0.5;FIINIT(W2)=0.5
FIINIT(R1)=0.9;FIINIT(R2)=0.1
    GROUP 13. Boundary conditions and special sources
PATCH(INLET,LOW,1,1,1,NY,1,1,1,1)
COVAL(INLET,P1,FIXFLU,0.9*RHO1*0.5)
COVAL(INLET,P2,FIXFLU,0.1*RHO2*0.5)
COVAL(INLET,W1,ONLYMS,0.5)
COVAL(INLET,W2,ONLYMS,0.5)
   **Wall friction boundary condition.
PATCH(WALL,NWALL,1,1,NY,NY,1,NZ,1,1)
COVAL(WALL,W1,1.0,0.)
   **Fixed static pressure exit boundary condition.
PATCH(EXIT,HIGH,1,1,1,NY,NZ,NZ,1,1)
COVAL(EXIT,P1,1.*RHO1,0.0)
COVAL(EXIT,P2,1.*RHO2,0.0)
  ** Gravity
PATCH(GRAVITY,PHASEM,1,NX,1,NY,1,NZ,1,LSTEP)
COVAL(GRAVITY,W1,FIXFLU,-9.81)
COVAL(GRAVITY,W2,FIXFLU,-9.81)

    PLANTBEGIN
  ** Lift force
PATCH(LIFT,VOLUME,1,NX,1,NY,1,NZ,1,LSTEP)
   VAL=RG(1)*R2*(W2-W1)*(NORTH(W1)-W1)/DYG2D
COVAL(LIFT,V1,FIXFLU,GRND)
   VAL=RG(1)*R2*(W1-W2)*(NORTH(W1)-W1)/DYG2D
COVAL(LIFT,V2,FIXFLU,GRND)
    PLANTEND   

RG(3)=0.02;RG(1)=RG(3)*RHO1
    GROUP 15. Termination of sweeps
LSWEEP=200
    GROUP 17. Under-relaxation devices
RELAX(P1,LINRLX,0.5);RELAX(R1,LINRLX,0.5)
RELAX(R2,LINRLX,0.5)
RELAX(V1,FALSDT,.1);RELAX(W1,FALSDT,.1)
RELAX(V2,FALSDT,.1);RELAX(W2,FALSDT,.1)
    GROUP 20. Preliminary print-out
    GROUP 22. Spot-value print-out
IYMON=3;IZMON=10
    GROUP 23. Field print-out and plot control
NZPRIN=1;NYPRIN=1
NAMSAT=MOSG

tstswp=-1
dmpstk=t
DISTIL=T
EX(P1)=1.108E+03; EX(V1)=5.782E-03; EX(V2)=5.586E-03
EX(W1)=4.913E-01; EX(W2)=5.943E-01; EX(R1)=9.144E-01
EX(R2)=8.557E-02
 LIBREF=143
STOP