PHOTON USE
  p
  phi
  5 1
 
 
 
  msg grid (y-direction scale enlarged 10 times)
  gr x 1
  msg Press  to continue
  pause
  cl
  msg 1st-phase velocity vectors
  vec x 1 sh
  gr ou x 1
  msg Press  to continue
  pause
  cl
  msg 2nd-phase velocity vectors
  set vec comp
  - v2 w2
  vec x 1 sh
  gr ou x 1
  msg Press  to continue
  pause
  cl
  msg contour of pressure
  con p1 x 1 fi;0.002
  gr ou x 1
  msg Press  to continue
  pause
  cl
  msg contour of 1st-phase volume fraction
  con r1 x 1 fi;0.002
  gr ou x 1
  msg Press  to continue
  pause
  cl
  msg contour of 1st-phase volume fraction
  con r2 x 1 fi;0.002
  gr ou x 1
  msg Press  to continue
  pause
  cl
  msg contour of 1st-phase enthalpy
  con h1 x 1 fi;0.002
  gr ou x 1
  msg Press  to continue
  pause
  cl
  msg contour of 2nd-phase enthalpy
  con h2 x 1 fi;0.002
  gr ou x 1
  msg Press e to END
  enduse
    GROUP 1. Run title and other preliminaries
TEXT(AREA RESTRICTION AT QUARTER LENGTH: W440
TITLE
  DISPLAY
  This is the unsteady two-phase variant of the steady
  single-phase case considered in an earlier section.The initial
  conditions are those corresponding to plug-flow.
  ENDDIS
    GROUP 2. Transience; time-step specification
STEADY=F;GRDPWR(T,5,0.5,1.0)
    GROUP 3. X-direction grid specification
CARTES=F;XULAST=0.01
    GROUP 4. Y-direction grid specification
GRDPWR(Y,20,0.01,1.0)
    GROUP 5. Z-direction grid specification
GRDPWR(Z,20,0.20,1.0)
    GROUP 7. Variables stored, solved & named
SOLVE(P1,V1,W1,H1)
ONEPHS=F;SOLVE(R1,R2,V2,W2,H2)
    GROUP 8. Terms (in differential equations) & devices
TERMS(H1,N,Y,Y,Y,Y,Y);TERMS(H2,N,Y,Y,Y,N,Y)
    GROUP 9. Properties of the medium (or media)
ENUL=1.E-5;PRNDTL(H1)=0.7;RHO2=1000.0
    GROUP 10. Inter-phase-transfer processes and properties
  ** Set a constant inter-phase friction coefficient.
CFIPS=1.E2
    GROUP 11. Initialization of variable or porosity fields
FIINIT(W1)=0.1;FIINIT(W2)=0.1
FIINIT(R1)=0.999;FIINIT(R2)=0.001
    GROUP 13. Boundary conditions and special sources
  ** Wall
WALL (WALL,NORTH,1,1,NY,NY,1,NZ,1,LSTEP)
COVAL(WALL,W1,1.0,0.0);COVAL(WALL,H1,1.428,1.0)
  ** Inlet
INLET(INLET,LOW,1,1,1,NY,1,1,1,LSTEP)
VALUE(INLET,P1,0.1);VALUE(INLET,W1,0.1)
VALUE(INLET,H1,0.0);VALUE(INLET,P2,0.1)
VALUE(INLET,W2,0.1)
  ** Outlet
PATCH(OUTLET,HIGH,1,1,1,NY,NZ,NZ,1,LSTEP)
COVAL(OUTLET,P1,FIXP,0.0);COVAL(OUTLET,P2,1.E3,0.0)
COVAL(OUTLET,W1,ONLYMS,0.0);COVAL(OUTLET,W2,ONLYMS,0.0)
COVAL(OUTLET,V1,ONLYMS,0.0);COVAL(OUTLET,V2,ONLYMS,0.0)
  ** Orifice
PATCH(ORIFICE,HIGH,1,1,11,NY,NZ/4,NZ/4,1,LSTEP)
COVAL(ORIFICE,W1,FIXVAL,0.0);COVAL(ORIFICE,W2,FIXVAL,0.0)
    GROUP 15. Termination of sweeps
LSWEEP=20;RESREF(P1)=1.E-6;RESREF(V1)=1.E-6;RESREF(H1)=1.E-6
RESREF(R1)=1.E-6;RESREF(V2)=1.E-6;RESREF(H2)=1.E-6
RESREF(W1)=1.E-6;RESREF(W2)=1.E-6;RESREF(R2)=1.E-6
    GROUP 17. Under-relaxation devices
RELAX(W1,FALSDT,1.0);RELAX(V1,FALSDT,1.0)
RELAX(W2,FALSDT,1.0);RELAX(V2,FALSDT,1.0)
RELAX(R1,LINRLX,0.75);RELAX(R2,LINRLX,0.75)
SPEDAT(SET,GXMONI,TRANSIENT,L,F)
    GROUP 22. Spot-value print-out
NPRMON=20;IYMON=5
    GROUP 22. Spot-value print-out
IYMON=19;IZMON=10;IPLTL=30
    GROUP 23. Field print-out and plot control
NPRINT=10;IYPRF=9;IZPRF=4;IZPRL=8;TSTSWP=-1
PATCH(IZEQ19,PROFIL,1,1,1,NY,NZ-1,NZ-1,1,LSTEP)
PLOT(IZEQ19,W1,0.0,0.4);PLOT(IZEQ19,W2,0.0,0.4)
PATCH(CONT,CONTUR,1,1,1,NY,1,NZ,1,LSTEP)
PLOT(CONT,W1,0.0,10);PLOT(CONT,W2,0.0,10)
PLOT(CONT,H1,0.0,10);PLOT(CONT,R2,0.0,10)
PLOT(CONT,H2,0.0,10)
PATCH(IZ1TONZ,PROFIL,1,1,1,1,1,NZ,1,LSTEP)
PLOT(IZ1TONZ,W1,0.000E+00,6.000E-01)
PLOT(IZ1TONZ,W2,0.000E+00,6.000E-01)
PLOT(IZ1TONZ,R2,0.000E+00,1.000E-02)