TEXT(3D PIPE FLOW TEST OF LIFT FORCES
TITLE
  DISPLAY
 
  This case concerns of the upward flow of swirling bubbles and
  liquid in a circular pipe. The case provides a test of the
  functionality of the interfacial-lift forces in the phasic
  momentum equations.
 
  ENDDIS
 
  * CONPHS=1 selects 1st phase as the continuous ( gas ) phase
             and thus CFIPS=GRND7
  *       =2 selects 2nd phase as the continuous ( gas ) phase
             and thus CFIPS=GRND8
BOOLEAN(SWIRL);INTEGER(CONPHS);CONPHS=1;SWIRL=T
REAL(RHOL,RHOG,EMULIQ,EMUGAS,GLIQ,GGAS,RGAS,RLIQ,VSGAS,VSLIQ)
REAL(VIN1,VIN2,RIN1,RIN2,FLOW1,FLOW2,AREA,PI,XGAS,XLIQ)
REAL(VGAS,VLIQ,DIAM,GRAD,PLEN,DIAMB,EMUMIX,REYMIX)
RHOL=1000.;RHOG=1.23;EMULIQ=1.E-3;EMUGAS=1.8E-5;PI=3.14159
   *** liquid & gas inlet mass fluxes & volume fractions
GLIQ=1.08E3;GGAS=0.492;RGAS=0.2;RLIQ=1.-RGAS
   *** superficial & phase velocities
VSGAS=GGAS/RHOG;VSLIQ=GLIQ/RHOL;VGAS=VSGAS/RGAS;VLIQ=VSLIQ/RLIQ
DIAM=0.057;GRAD=0.5*DIAM;PLEN=4.*DIAM;AREA=PI*GRAD*GRAD
DIAMB=3.E-3
    GROUP 1. Run title and other preliminaries
    GROUP 2. Transience; time-step specification
    GROUP 3. X-direction grid specification
CARTES=F
   * set NX > 1 for 3d test case
XULAST=0.1;AREA=XULAST/(2.*PI);NX=1
IF(NX.GT.1) THEN
+ GRDPWR(X,NX,XULAST,1.0)
ENDIF
    GROUP 4. Y-direction grid specification
GRDPWR(Y,6,GRAD,1.0)
    GROUP 5. Z-direction grid specification
GRDPWR(Z,6,PLEN,1.0)
IF(NX.GT.1) THEN
+ XCYCLE=T
ENDIF
    GROUP 6. Body-fitted coordinates or grid distortion
    GROUP 7. Variables stored, solved & named
ONEPHS=F;SOLVE(P1,V1,V2,W1,W2,R1,R2)
IF(SWIRL) THEN
+ SOLVE(U1,U2)
ENDIF
SOLUTN(P1,Y,Y,Y,P,P,P);STORE(REYN,VREL,CFIP)
    GROUP 8. Terms (in differential equations) & devices
    GROUP 9. Properties of the medium (or media)
IF(CONPHS.EQ.1) THEN
+ RHO1=RHOL;RHO2=RHOG;VIN1=VLIQ;VIN2=VGAS;RIN1=RLIQ;RIN2=RGAS
ELSE
+ RHO2=RHOL;RHO1=RHOG;VIN1=VGAS;VIN2=VLIQ;RIN1=RGAS;RIN2=RLIQ
ENDIF
FLOW1=RHO1*RIN1*VIN1;FLOW2=RHO2*RIN2*VIN2
ENUL=EMULIQ/RHOL
  ** estimate Reynolds number
XGAS=GGAS/(GGAS+GLIQ);XLIQ=1.-XGAS
EMUMIX=1.0/(XGAS/EMUGAS+XLIQ/EMULIQ)
REYMIX=(GGAS+GLIQ)*DIAM/EMUMIX;REAL(FRIC)
FRIC=0.3164/REYMIX**0.25
ENUT=0.035*REYMIX*ENUL*(FRIC/8.)**0.5
    GROUP 10. Inter-phase-transfer processes and properties
IF(CONPHS.EQ.1) THEN
+ CFIPS=GRND7
ELSE
+ CFIPS=GRND8
ENDIF
  ** CFIPA = minimum slip velocity  CFIPB = bubble size
CFIPA=1.E-4;CFIPB=DIAMB;CFIPD=0.
CLIFT=0.5;CLIFTA=0.0
IF(CONPHS.EQ.1) THEN
+ CLIFTB=0.0
ELSE
+ CLIFTB=1.0
ENDIF
INTSOR(LIFT,CLIFT,CLIFTA);STORE(LISU,LISV,LISW)
    GROUP 11. Initialization of variable or porosity fields
FIINIT(W1)=VIN1;FIINIT(W2)=VIN2;FIINIT(R1)=RIN1;FIINIT(R2)=RIN2
    GROUP 12. Unused
    GROUP 13. Boundary conditions and special sources
FLOW1=RHO1*VIN1*RIN1;FLOW2=RHO2*VIN2*RIN2
  ** inlet boundary
INLET(IN,LOW,1,NX,1,NY,1,1,1,1)
VALUE(IN,P1,FLOW1);VALUE(IN,W1,VIN1)
VALUE(IN,P2,FLOW2);VALUE(IN,W2,VIN2)
IF(SWIRL) THEN
+ VALUE(IN,U1,0.2*VIN1);VALUE(IN,U2,0.2*VIN2)
ENDIF
  ** outlet boundary
OUTLET(OUT,HIGH,1,NX,1,NY,NZ,NZ,1,1)
COVAL(OUT,P1,RHO1*VIN1*1.E2,0);COVAL(OUT,P2,RHO2*VIN2*1.E2,0)
  ** gravity
PATCH(GRAVITY,PHASEM,1,NX,1,NY,1,NZ,1,1)
IF(CONPHS.EQ.1) THEN
+ COVAL(GRAVITY,W2,FIXFLU,-9.81*(1.-RHOL/RHOG))
ELSE
+ COVAL(GRAVITY,W1,FIXFLU,-9.81*(1.-RHOL/RHOG))
ENDIF
  ** wall boundary
WALL(NWALL,NORTH,1,NX,NY,NY,1,NZ,1,1)
IF(CONPHS.EQ.2) THEN
+ COVAL(NWALL,U1,ZERO,ZERO);COVAL(NWALL,W1,ZERO,ZERO)
+ COVAL(NWALL,U2,LOGLAW,ZERO);COVAL(NWALL,W2,LOGLAW,ZERO)
ENDIF
    GROUP 15. Termination of sweeps
LSWEEP=60
FLOW1=FLOW1*AREA;FLOW2=FLOW2*AREA;SELREF=T;RESFAC=0.01
    GROUP 16. Termination of iterations
    GROUP 17. Under-relaxation devices
REAL(DTF);DTF=PLEN/VLIQ/NZ
IF(SWIRL) THEN
+ RELAX(U1,FALSDT,DTF);RELAX(U2,FALSDT,DTF)
ENDIF
RELAX(V1,FALSDT,DTF);RELAX(V2,FALSDT,DTF)
RELAX(W1,FALSDT,DTF);RELAX(W2,FALSDT,DTF)
    GROUP 18. Limits on variables or increments to them
    GROUP 19. Data communicated by satellite to GROUND
    GROUP 20. Preliminary print-out
    GROUP 21. Print-out of variables
OUTPUT(CFIP,P,P,P,P,Y,P);NXPRIN=1;NYPRIN=1;NZPRIN=1
    GROUP 22. Spot-value print-out
IZMON=NZ/2;IYMON=NY/2;TSTSWP=-1
    GROUP 23. Field print-out and plot control
    GROUP 24. Dumps for restarts