PHOTON USE
  p
  phi
 
 
  msg grid
  gr z 1
  msg Press  to continue
  pause
  cl
  msg 1st-phase (light fluid) velocity vectors
  set vec comp
  au1 cv1 -
  vec z 1 sh
  gr ou z 1
  msg Press  to continue
  pause
  cl
  msg 2nd-phase (dense fluid) velocity vectors
  set vec comp
  bu2 dv2 -
  vec z 1 sh
  gr ou z 1
  msg Press  to continue
  pause
  cl
  msg contour of pressure
  con p1 z 1 fi;0.002
  gr ou z 1
  msg Press  to continue
  pause
  cl
  msg contour of 1st-phase (light fluid) volume fraction
  con gas z 1 fi;0.002
  gr ou z 1
  msg Press  to continue
  pause
  cl
  msg contour of 2nd-phase (light fluid) volume fraction
  con liq z 1 fi;0.002
  gr ou z 1
  msg Press e to END
  enduse
 
    GROUP 1. Run title
TEXT(TEE-JUNCTION :                      W909
TITLE
  DISPLAY
    NUMERICAL BENCHMARK PROBLEM 3.1: IDEALISED TEE-JUNCTION
    The purpose of this problem is to test of the ability
    of computational procedures to calculate the separation
    of a lighter from heavier phase when a lateral pressure
    gradient is induced by the presence of an aperture in
    the side of a duct.
 
    Phenomena of this kind make their appearence whenever
    a two-phase mixture flowing in a pipe is allowed to
    escape through a break in the pipe wall. In that case,
    the flow pattern is bound to be three-dimensional;
    but a two-dimensional problem is here regarded as
    being both sufficiently illuminating and sufficiently
    difficult.
  ENDDIS
    GROUP 3. X-direction grid specification
GRDPWR(X,10,1.0,1.0)
    GROUP 4. Y-direction grid specification
GRDPWR(Y,10,0.2,1.0)
    GROUP 7. Variables stored, solved & named
ONEPHS=F;SOLUTN(P1,Y,Y,N,N,P,P)
SOLUTN(U1,Y,Y,N,Y,P,P);SOLUTN(U2,Y,Y,N,Y,P,P)
SOLUTN(V1,Y,Y,N,Y,P,P);SOLUTN(V2,Y,Y,N,Y,P,P)
SOLUTN(R1,Y,Y,N,Y,P,P);SOLUTN(R2,Y,Y,N,Y,P,P)
NAME(U1)=AU1;NAME(U2)=BU2;NAME(V1)=CV1;NAME(V2)=DV2
NAME(R1)=GAS;NAME(R2)=LIQ
    GROUP 9. Properties of the medium (or media)
RHO1=1.0;RHO2=1.E3
    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
REAL(GAS0);GAS0=0.99
FIINIT(GAS)=GAS0;FIINIT(LIQ)=1.0-GAS0;FIINIT(P1)=0.5*9.81
FIINIT(P1)=0.0
FIINIT(AU1)=0.1;FIINIT(CV1)=0.0;FIINIT(BU2)=0.1;FIINIT(DV2)=0.
    GROUP 13. Boundary conditions and special sources
  ** Inlet of air and water at low x
INLET(INLET,WEST,1,1,1,NY,1,1,1,1)
VALUE(INLET,P1,0.1*RHO1*GAS0)
GAS0=1.0-GAS0
VALUE(INLET,P2,0.1*RHO2*GAS0);VALUE(INLET,AU1,0.1)
VALUE(INLET,BU2,0.1)
  ** Water or air exit 1
PATCH(OUTLET1,EAST,NX,NX,1,NY,1,1,1,1)
REAL(OUTCO1);OUTCO1=0.01
COVAL(OUTLET1,P1,OUTCO1,0.0);COVAL(OUTLET1,P2,RHO2*OUTCO1,0.0)
COVAL(OUTLET1,AU1,ONLYMS,0.0);COVAL(OUTLET1,BU2,ONLYMS,0.0)
COVAL(OUTLET1,CV1,ONLYMS,0.0);COVAL(OUTLET1,DV2,ONLYMS,0.0)
  ** Water or air exit 2
PATCH(OUTLET2,SOUTH,NX/2-1,NX/2+2,1,1,1,1,1,1)
REAL(OUTCO2);OUTCO2=OUTCO1*1.0
COVAL(OUTLET2,P1,OUTCO2,0.0);COVAL(OUTLET2,P2,RHO2*OUTCO2,0.0)
COVAL(OUTLET2,AU1,ONLYMS,0.0);COVAL(OUTLET2,BU2,ONLYMS,0.0)
COVAL(OUTLET2,CV1,ONLYMS,0.0);COVAL(OUTLET2,DV2,ONLYMS,0.0)
    GROUP 15. Termination of sweeps
LSWEEP=200;RESREF(P1)=1.E-10;RESREF(GAS)=1.E-10;RESREF(LIQ)=1.E-10
RESREF(AU1)=1.E-10;RESREF(BU2)=1.E-10;RESREF(CV1)=1.E-10
RESREF(DV2)=1.E-10
    GROUP 16. Termination of iterations
ENDIT(P1)=1.E-10
    GROUP 17. Under-relaxation devices
RELAX(GAS,LINRLX,0.25);RELAX(LIQ,LINRLX,0.25)
REAL(FALDT);FALDT=0.1
RELAX(AU1,FALSDT,FALDT);RELAX(CV1,FALSDT,FALDT*0.1)
RELAX(BU2,FALSDT,FALDT);RELAX(DV2,FALSDT,FALDT*0.1)
    GROUP 21. Print-out of variables
OUTPUT(AU1,Y,Y,Y,Y,Y,Y);OUTPUT(BU2,Y,Y,Y,Y,Y,Y)
OUTPUT(CV1,Y,Y,Y,Y,Y,Y);OUTPUT(DV2,Y,Y,Y,Y,Y,Y)
OUTPUT(LIQ,Y,Y,Y,Y,Y,Y);OUTPUT(P1,Y,Y,Y,Y,Y,Y)
    GROUP 22. Spot-value print-out
IXMON=NX/2;IYMON=NY/2;TSTSWP=-1
    GROUP 23. Field print-out and plot control
ITABL=1;IPLTL=LSWEEP;NXPRIN=NX/10;NYPRIN=NY/10
IXPRF=NX/2-1;IXPRL=NX-2
PATCH(MAP,CONTUR,1,NX,1,NY,1,1,1,1)
COVAL(MAP,P1,0.0,10);COVAL(MAP,LIQ,0.0,10.0)
COVAL(MAP,AU1,0.0,10);COVAL(MAP,CV1,0.0,10.0)
PATCH(XPROFIL,PROFIL,1,NX,NY/2,NY/2,1,1,1,1)
COVAL(XPROFIL,AU1,-0.1,0.12);COVAL(XPROFIL,BU2,-0.1,0.12)
COVAL(XPROFIL,LIQ,0.0,0.10)
PATCH(YPROF1,PROFIL,NX/2,NX/2,1,NY,1,1,1,1)
COVAL(YPROF1,AU1,-0.1,0.12);COVAL(YPROF1,BU2,-0.1,0.12)
COVAL(YPROF1,CV1,-0.1,0.0);COVAL(YPROF1,DV2,-0.1,0.0)
COVAL(YPROF1,LIQ,0.0,0.02)
PATCH(YPROF2,PROFIL,NX-1,NX-1,1,NY,1,1,1,1)
COVAL(YPROF2,AU1,-0.1,0.12);COVAL(YPROF2,BU2,-0.1,0.12)
COVAL(YPROF2,LIQ,0.0,0.02)
    GROUP 24. Dumps for restarts