PHOTON USE P gr ou x 1 rot x ang 270 set vec ref 4. 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 z 1 20 fil;.01 msg( Air volume fraction contours msg( Press E to finish ENDUSE GROUP 1. Run title and other preliminaries TEXT(PHASE DISTRIBUTION IN A SMOOTH EXPANSION:103 DISPLAY Two-phase air-water mixture flows through the smooth expansion of a duct. PLANT is used to perform the GROUND condings for the introduction of linear interphase friction law. ENDDIS REAL(AA,RE,CT,B,VV,UU,ZZ,POWERZ,POWERY,C,DD,Y0,Y1,YY) RE=25.0;CT=0.9640275 GROUP 4. Y-direction grid specification NY=21;POWERY=1.3 GROUP 5. Z-direction grid specification NZ=21;POWERZ=1.5;ZWLAST=RE/3. GROUP 6. Body-fitted coordinates or grid distortion BFC=T DO JJ=1,3 + AA=JJ-1;ZZ=ZWLAST*(AA/NZ)**POWERZ + SETPT(1,1,JJ,0.0,0.0,ZZ);SETPT(2,1,JJ,1.0,0.0,ZZ) ENDDO DO JJ=4,22 + AA=JJ-1; ZZ=ZWLAST*(AA/NZ)**POWERZ; B=2-30*ZZ/RE + VV=2.7182818**B; UU=1.0/VV; DD=((VV-UU)/(VV+UU)-CT)/2. + SETPT(1,1,JJ,0.0,DD,ZZ) + SETPT(2,1,JJ,1.0,DD,ZZ) ENDDO ** Set high boundary grid DOMAIN(1,1,1,NY+1,NZ+1,NZ+1) SETLIN(YC,YF+(YL-YF)*LNJ**POWERY) ** Set low boundary grid DOMAIN(1,2,1,NY+1,1,1) SETLIN(YC,YF+(YL-YF)*LNJ**POWERY) ** Set north boundary grid DOMAIN(1,1,NY+1,NY+1,1,NZ+1) SETLIN(ZC,ZF+(ZL-ZF)*LNK**POWERZ) ** Apply algebraic interpolation over domain DOMAIN(1,2,1,NY+1,1,NZ+1);MAGIC(T) ** Apply Laplace solver for K greater than 2 to preserve shape of first two slabs for simple inlet conditions SLIDN=T;JMON=10;KMON=10;MSWP=50 DOMAIN(1,2,1,NY+1,3,NZ+1);MAGIC(L) dumpc(grid);readco(grid) 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 PLANTBEGIN ** Set an inter-phase friction coefficient CFIPS=GRNDINTFRC=500.*R2*MASS1 PLANTEND GROUP 11. Initialization of variable or porosity fields FIINIT(W1)=2.5;FIINIT(W2)=2.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.8*RHO1*2.5) COVAL(INLET,P2,FIXFLU,0.2*RHO2*2.5) COVAL(INLET,W1,ONLYMS,2.5) COVAL(INLET,W2,ONLYMS,2.5) **Wall friction boundary condition. PATCH(WALL,SWALL,1,1,1,1,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.071) COVAL(EXIT,P2,1.*RHO2,0.071) ** Gravity PATCH(GRAVITY,PHASEM,1,NX,1,NY,1,NZ,1,LSTEP) COVAL(GRAVITY,W1,FIXFLU,-9.81) COVAL(GRAVITY,W2,FIXFLU,-9.81) GROUP 15. Termination of sweeps LSWEEP=150 GROUP 17. Under-relaxation devices RELAX(P1,LINRLX,0.5);RELAX(R1,LINRLX,0.5) RELAX(R2,LINRLX,0.5) RELAX(V1,FALSDT,.01);RELAX(W1,FALSDT,.01) RELAX(V2,FALSDT,.01);RELAX(W2,FALSDT,.01) NAMSAT=MOSG 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 tstswp=-1 dmpstk=t DISTIL=T EX(P1)=3.621E+04; EX(V1)=4.288E-02; EX(V2)=4.326E-02 EX(W1)=1.596E+00; EX(W2)=1.617E+00; EX(R1)=8.022E-01 EX(R2)=1.978E-01; EX(W2CR)=1.597E+00; EX(V2CR)=9.936E-02 EX(WCRT)=1.577E+00; EX(VCRT)=9.813E-02 LIBREF=103 STOP