PHOTON USE AUTOPLOT file phi 5 cl msg LAMINAR PIPE FLOW WITH MASS TRANSFER msg constant wall mass flux msg Reynolds number = 10 Schmidt number = 1.0 msg Velocity (W1) profile msg Blue line --- PHOENICS solution msg crosses --- analytical solution da 1 w1;da 1 w1a col3 1;blb4 2 msg pressto continue pause cl msg constant wall mass flux msg Reynolds number = 10 Schmidt number = 1.0 msg Mass concentration (C1) profile msg Blue line --- PHOENICS solution msg crosses --- analytical solution da 1 c1;da 1 c1a col3 1;blb4 2 msg press to continue pause msg press to end pause end END_USE DISPLAY TEXT(1D Laminar Pipe Flow And Mass Trans TITLE DISPLAY The case considered is laminar flow and mass transfer of an incompressible, constant-property fluid in the developed region of a of a circular tube. The mass transfer problem can be solved either with a constant wall mass flux ( QFCON=T ) or a constant wall mass concentration ( QFCON=F ). The Schmidt number is set to 1.0, but it should be noted that the Sherwood number is a function only of the concentration boundary condition, as follows: Sh = 3.656 for a constant wall mass concentration and Sh = 4.364 for a constant wall mass flux QIN. For the latter case, an analytical solution exists for the radial concentration profile which is programmed below in PIL. The analytical velocity profile, which is parabolic, is also coded below. ENDDIS GROUP 1. Run title and other preliminaries ** QFCON=T sets constant mass-flux boundary condition =F " " wall-concentration " " BOOLEAN(QFCON);QFCON=T REAL(REY,RIN,DIN,WIN,AIN,DPDZ,FLOWIN) REAL(QIN,DCDZ,MDIF,AWAL,CC,CB,CW,BETA,GAM) REY=10.;RIN=0.1;DIN=2.*RIN;WIN=1.0 GROUP 2. Transience; time-step specification CARTES=F GROUP 3. X-direction grid specification AIN=0.5*RIN*RIN*XULAST GROUP 4. Y-direction grid specification NY=30;GRDPWR(Y,NY,RIN,1.0) GROUP 5. Z-direction grid specification ** AWAL is wall surface area per unit length AWAL=RIN*XULAST GROUP 7. Variables stored, solved & named ** W1A used to store analytical solution for W1 SOLVE(W1,C1);STORE(W1A) GROUP 8. Terms (in differential equations) & devices ** deactivate convection and built-in C1 sources TERMS(W1,N,N,P,P,P,P);TERMS(C1,N,N,P,P,P,P) GROUP 9. Properties of the medium (or media) PRNDTL(C1)=1.0;RHO1=1.0;ENUT=0.;ENUL=WIN*DIN/REY FLOWIN=RHO1*WIN*AIN ** compute pressure drop for printout from satellite Q1 DPDZ=8.*RHO1*ENUL*WIN/RIN/RIN DPDZ ** define input parameters for scalar-developed flow IF(QFCON) THEN ** specify wall flux & datum concentration at pipe axis + QIN=1.0;CC=0.0 ** compute d(Cbulk)/dz for input to single-slab scalar solver + DCDZ=QIN*AWAL/FLOWIN ** C1A is a store for analytical concentration solution with constant mass-flux boundary condition + STORE(C1A) + MDIF=ENUL/PRNDTL(C1) + BETA=QIN*2.*RIN/MDIF + CB=CC+7.*BETA/48.;CW=CB+11.*BETA/48. + GAM=4.*QIN*RIN/MDIF ELSE + QIN=1.0 + DCDZ=QIN*AWAL/FLOWIN + CW=0. ENDIF GROUP 11. Initialization of variable or porosity fields FIINIT(W1)=WIN;FIINIT(C1)=0.4*DCDZ*ZWLAST ** compute analytical solutions REAL(WA,TA,GR,GR2);INTEGER(JJM1) DO JJ=1,NY +PATCH(IN:JJ:,INIVAL,1,NX,JJ,JJ,1,NZ,1,1) +GR=0.5*YFRAC(JJ) IF(JJ.NE.1) THEN +JJM1=JJ-1 +GR=YFRAC(JJM1)+0.5*(YFRAC(JJ)-YFRAC(JJM1)) ENDIF +GR=GR*YVLAST;GR2=(GR/RIN)**2 +WA=2.*WIN*(1.-GR2) +INIT(IN:JJ:,W1A,ZERO,WA) IF(QFCON) THEN +TA=CW-GAM*(0.1875+0.0625*(GR2**2)-0.25*GR2) +INIT(IN:JJ:,C1A,ZERO,TA) ENDIF ENDDO GROUP 13. Boundary conditions and special sources PATCH(WALL,NWALL,1,NX,NY,NY,1,NZ,1,1) COVAL(WALL,W1,1.0,0.0) ** activate pressure-drop calculation in single-slab solver FDFSOL=T;USOURC=T PATCH(FDFW1DP,VOLUME,1,NX,1,NY,1,NZ,1,1) COVAL(FDFW1DP,W1,FLOWIN,GRND1) ** concentration equation sources & boundary conditions IF(QFCON) THEN ** constant heat-flux boundary condition + PATCH(FDFCHF,PHASEM,1,NX,1,NY,1,NZ,1,1) + COVAL(FDFCHF,C1,DCDZ,GRND1) + COVAL(WALL,C1,FIXFLU,QIN) ** set centre-line concentration as datum + PATCH(CFIX,CELL,1,NX,1,1,1,NZ,1,1) + COVAL(CFIX,C1,FIXP,CC) ELSE ** constant wall-concentration boundary condition + PATCH(FDFCWT,PHASEM,1,NX,1,NY,1,NZ,1,1) + COVAL(FDFCWT,C1,DCDZ,CW) + COVAL(WALL,C1,1.0/PRNDTL(C1),CW) ENDIF GROUP 15. Termination of sweeps LSWEEP=8;LITHYD=2;LITC=5;ISWC1=4 GROUP 16. Termination of iterations RESREF(W1)=1.E-12*DPDZ*ZWLAST*AIN RESREF(C1)=1.E-12*QIN*ZWLAST*AWAL GROUP 17. Under-relaxation devices REAL(DTF);DTF=50.*(YVLAST/NY)**2/ENUL RELAX(W1,FALSDT,DTF) GROUP 19. Data communicated by satellite to GROUND MDIF=ENUL/PRNDTL(C1) MDIF QIN DIN GROUP 22. Spot-value print-out IYMON=NY;TSTSWP=-1 GROUP 23. Field print-out and plot control NPLT=1;NYPRIN=1;NZPRIN=1 GROUP 24. Dumps for restarts