PHOTON USE p phi 1 5 1 msg grid (scale enlarged 5 times in y direction) gr z 1 msg Pressto continue pause cl msg 1st-phase (vapour) velocity vectors vec z 1 sh gr ou z 1 msg Press to continue pause cl msg 2nd-phase (water) velocity vectors set vec comp au2 bv2 - vec z 1 sh gr ou z 1 msg Press to continue pause cl msg contours of pressure con p1 z 1 fi;0.01 gr ou z 1 msg Press to continue pause cl msg contours of 1st-phase (vapour) volume fraction con gas z 1 fi;0.01 pause cl msg contours of concentration in 1st phase (vapour) con c1 z 1 fi;0.01 pause cl msg contours of concentration in 2nd phase (liquid) con c2 z 1 fi;0.01 pause cl enduse display Liquid flows steadily along a tray from left to right, escaping over a weir. Air bubbles up through the tray, escaping freely to atmosphere. The task is to predict the thickness and the void fraction of the bubbly layer on the tray. | |-------------------------------_________ ---> water ^ ---------__ | air | |____________________________|_____________________| | A PHOTON use file is provided. enddis GROUP 1. Run title TEXT(2D channel flow as in tray column :W775 title REAL(CHATIM,VELCTY,XLEN,SID,AREA) VELCTY=0.1;XLEN=1.0;SID=0.1;AREA=SID*SID mesg(inlet velocity of water = :velcty: mesg(OK? If not, enter new value readvdu(velcty,real,velcty) GROUP 3. X-direction grid specification GRDPWR(X,20,XLEN,1.0) GROUP 4. Y-direction grid specification GRDPWR(Y,10,SID,1.5);ZWLAST=SID GROUP 7. Variables stored, solved & named ONEPHS=F;SOLVE(P1,U1,U2,V1,V2,R1,R2) NAME(R1)=GAS;NAME(R2)=LIQ;NAME(U2)=AU2 NAME(V2)=BV2 GROUP 9. Properties of the medium (or media) RHO2=1.E3;ENUL=1.E-3 GROUP 10. Inter-phase-transfer processes and properties ** Set constant inter-phase friction factor Note that the minus sign is merely a signal to use the second-phase density. CFIPS=-5.E01 ** Set the inter-phase heat transfer coefficients GROUP 11. Initialization of variable or porosity fields FIINIT(GAS)=0.5;FIINIT(LIQ)=0.5 FIINIT(U1)=VELCTY;FIINIT(AU2)=VELCTY GROUP 13. Boundary conditions and special sources ** Inlet at low-x (west) end INLET(INLET,WEST,1,1,1,NY/2,1,1,1,1) VALUE(INLET,P2,VELCTY*RHO2);VALUE(INLET,AU2,VELCTY) ** Outlet at high-x (east) PATCH(OUTLET,CELL,NX,NX,ny/2+1,NY,1,1,1,1) COVAL(OUTLET,P2,0.1*RHO2,0.0) ** gas inlet from below PATCH(SOUTH3,south,1,NX,1,1,1,1,1,1) real(airfac) airfac=1.0 mesg(air velocity = :airfac: * water velocity) mesg(OK? If not, enter new value of multiplication factor readvdu(airfac,real,airfac) COVAL(SOUTH3,p1,FIXFLU,airfac*velcty*rho1) ** open north boundary PATCH(NORTH,NORTH,1,4*NX/5,NY,NY,1,1,1,1) COVAL(NORTH,p1,fixp,0.0) ** Friction at walls PATCH(SOUTH2,SOUTH,1,NX,1,1,1,1,1,1) COVAL(SOUTH2,U1,-0.002,0.0);COVAL(SOUTH2,AU2,-0.002,0.0) PATCH(GRAVITY,PHASEM,1,NX,1,NY,1,1,1,1) COVAL(GRAVITY,V1,FIXFLU,-9.81);COVAL(GRAVITY,BV2,FIXFLU,-9.81) GROUP 15. Termination of sweeps LSWEEP=5000;selref=t;resfac=0.01 GROUP 16. Termination of iterations LITER(U1)=2;LITER(V1)=2;LITER(AU2)=2;LITER(BV2)=2 LITER(LIQ)=2;LITER(GAS)=2 GROUP 17. Under-relaxation devices CHATIM=0.1*(sid/9.81)**0.5 RELAX(U1,FALSDT,CHATIM);RELAX(AU2,FALSDT,0.1*CHATIM) RELAX(V1,FALSDT,0.1*CHATIM);RELAX(BV2,FALSDT,0.01*CHATIM) RELAX(P1,LINRLX,0.5);RELAX(GAS,LINRLX,0.10);RELAX(LIQ,LINRLX,0.10) GROUP 19. Data communicated by satellite to GROUND USEGRX=t;USEGRD=t GROUP 20. Preliminary print-out GROUP 21. Print-out of variables GROUP 22. Spot-value print-out TSTSWP=-10;IXMON=NX-1;IYMON=NY/2 GROUP 23. Field print-out and plot control IPLTF=3;IPLTL=LSWEEP;NPLT=50;NXPRIN=NX/5;NYPRIN=NY/5 GROUP 24. Dumps for restarts ISOLX=1;ISOLY=1;itabl=1;iprof=1 lsweep=1000 mesg(solve for concentration ? (y/n) readvdu(ans,char,n) if(:ans:.eq.y) then mesg(concentration variable being solved mesg(with initial value=1 in liquid and zero in air solve(c1,c2) coval(inlet,c2,onlyms,1.0);coval(south2,c1,onlyms,0.0) cint(c1)=0.5;cint(c2)=0.01 mesg(interphase transfer-coefficient multipliers are mesg(for the air side :cint(c1):; and for the liquid :cint(c2): mesg(press return to continue readvdu(nphi,int,nphi) endif