PHOTON USE p up 1 0 0;vi 0.5 1 0.75 gr ou x 1;gr ou y 1;gr ou z 1 gr ou x m;gr ou y m;gr ou z m gr ou x 1 y 1 2 z 2 2 col 2 gr ou x 6 y 1 2 z 7 7 col 2 gr ou z 4 x 1 4 y 1 3 col 6 gr ou z 6 x 2 5 y 1 3 col 6 ve y 2 sh msg 3D SHELL-AND-TUBE HEAT EXCHANGER msg -------------------------------- msg Velocity 1 phase: msg Press Enter to continue pause;vi 0 1 0 msg 3D SHELL-AND-TUBE HEAT EXCHANGER msg -------------------------------- msg Temperature distribution 1 phase: con 1sth y 2 sh;in 50 msg Press Enter to continue pause con off;red msg 3D SHELL-AND-TUBE HEAT EXCHANGER msg -------------------------------- msg Temperature distribution 2 phase: con 2ndh y 2 sh;in 50 msg Press e to END ENDUSE GROUP 1. Run title TEXT( 3D SHELL-AND-TUBE HEAT EXCHANGER:122 DISPLAY The heat exchanger considered has two baffles within the shell and with the tubes arranged if five passes. The case is similar to 796 of PHOENICS library one but the same resistance to flow exerted by tubes is introduced by PLANT settings. ============================ User-defined variables T1IN = inlet temperature of shell fluid T2IN = inlet temperature of tube fluid FLO1 = mass-flow rate of shell fluid FLO2 = mass-flow rate of tube fluid COEF1 = heat-transfer coefficient on shell-fluid side COEF2 = heat-transfer coefficient on tube-fluid side COEF12 = overall heat-transfer coefficient from fluid 1 to fluid 2 RESCO = flow-resistance coefficient of the tube bank ENDDIS REAL(T1IN,T2IN,FLO1,FLO2,COEF1,COEF2,COEF12) T1IN=1.0;T2IN=0.0;FLO1=0.1;FLO2=0.1;COEF1=0.1;COEF2=0.4 COEF12=1.0/(1.0/COEF1+1.0/COEF2);RG(1)=COEF12 REAL(RESCO);RESCO=1.E2;RG(2)=RESCO GROUP 2. Transience; time-step specification GROUP 3. X-direction grid specification The heat exchanger is a rectangular box, 1m high, 1m wide and 4m long. A uniform 5*3*8 grid is used, as was done by Patankar and Spalding. Only one half of the exchanger is included in the calculation domain, because of the symmetry of the geometry. GRDPWR(X,5,1.0,1.0) GROUP 4. Y-direction grid specification GRDPWR(Y,3,0.5,1.0) GROUP 5. Z-direction grid specification GRDPWR(Z,8,4.0,1.0) GROUP 6. Body-fitted coordinates or grid distortion GROUP 7. Variables stored, solved & named The shell-side fluid is a single-phase one, for which five variables must be solved; only the enthalpy needs be computed for the tube-side fluid. SOLVE(P1,U1,V1,W1,H1,H2) NAME(H1)=1STH;NAME(H2)=2NDH STORE(EPOR,NPOR,HPOR) GROUP 8. Terms (in differential equations) & devices The "diffusion" terms are cut out for all vaiables, and the built-in sources for the enthalpies. TERMS(U1,Y,Y,N,Y,Y,Y);TERMS(V1,Y,Y,N,Y,Y,Y) TERMS(W1,Y,Y,N,Y,Y,Y);TERMS(1STH,N,Y,N,Y,Y,Y) TERMS(2NDH,N,N,N,Y,N,N) GROUP 9. Properties of the medium (or media) GROUP 10. Inter-phase-transfer processes and properties GROUP 11. Initialization of variable or porosity fields FIINIT(W1)=FLO1;FIINIT(U1)=0.0;FIINIT(V1)=0.0 FIINIT(1STH)=T1IN;FIINIT(2NDH)=T2IN FIINIT(EPOR)=0.5;FIINIT(NPOR)=0.5;FIINIT(HPOR)=0.5 GROUP 12. Convection and diffusion adjustments GROUP 13. Boundary conditions and special sources West boundary; shell fluid inlet ; 2 cells in west wall PATCH(INLET1,CELL,1,1,2,3,2,2,1,1000) COVAL(INLET1,P1,FIXFLU,FLO1/2.0);COVAL(INLET1,1STH,ONLYMS,T1IN) COVAL(INLET1,2NDH,ONLYMS,SAME) East boundary; shell fluid outlet; 2 cells in east wall PATCH(OUTLET1,EAST,NX,NX,2,3,NZ-1,NZ-1,1,1000) COVAL(OUTLET1,P1,FIXP,0.0) High boundary, tube fluid inlet; 5 cells in high wall PATCH(INLET2,CELL,1,1,1,NY,NZ,NZ,1,1000) COVAL(INLET2,2NDH,FLO2/3.0,T2IN) Note how the giving of special names to patches, beginning NE (for neighbour), coupled with LOCNE (GRND8) in the "value" location, produces sources which simulate along- the-tube convection fluid-to-metal heat transfer etc, by activating special calls to GROUND, the relevant extract from which appears in an appendix to this file. Flow of tube fluid in first pass PATCH(NEH1,CELL,1,1,1,NY,1,NZ-1,1,1000) COVAL(NEH1,2NDH,FLO2/3.0,LOCNE) Flow of tube fluid in first bend PATCH(NEW1,CELL,2,2,1,NY,1,1,1,1000) COVAL(NEW1,2NDH,FLO2/3.0,LOCNE) Flow of tube fluid in second pass PATCH(NEL1,CELL,2,2,1,NY,2,NZ,1,1000) COVAL(NEL1,2NDH,FLO2/3.0,LOCNE) Flow of tube fluid in second bend PATCH(NEW2,CELL,3,3,1,NY,NZ,NZ,1,1000) COVAL(NEW2,2NDH,FLO2/3.0,LOCNE) Flow of tube fluid in third pass PATCH(NEH2,CELL,3,3,1,NY,1,NZ-1,1,1000) COVAL(NEH2,2NDH,FLO2/3.0,LOCNE) Flow of tube fluid in third bend PATCH(NEW3,CELL,4,4,1,NY,1,1,1,1000) COVAL(NEW3,2NDH,FLO2/3.0,LOCNE) Flow of tube fluid in fourth pass PATCH(NEL2,CELL,4,4,1,NY,2,NZ,1,1000) COVAL(NEL2,2NDH,FLO2/3.0,LOCNE) Flow of tube fluid in fourth bend PATCH(NEW4,CELL,NX,NX,1,NY,NZ,NZ,1,1000) COVAL(NEW4,2NDH,FLO2/3.0,LOCNE) Flow of tube fluid in fifth pass PATCH(NEH3,CELL,NX,NX,1,NY,1,NZ-1,1,1000) COVAL(NEH3,2NDH,FLO2/3.0,LOCNE) Heat-exchange with tube fluid, throughout the exchanger. PATCH(NEPLUS,VOLUME,1,NX,1,NY,1,NZ,1,1000) COVAL(NEPLUS,1STH,COEF12,LOCNE) Heat-exchange with shell fluid, throughout the exchanger. PATCH(NEMINUS,VOLUME,1,NX,1,NY,1,NZ,1,1000) COVAL(NEMINUS,2NDH,COEF12,LOCNE) Baffle 1 at NZ=3 PATCH(BAFFLE1,HIGH,1,NX-1,1,NY,3,3,1,1000) COVAL(BAFFLE1,W1,FIXVAL,0.0) Baffle 2 at NZ=5 PATCH(BAFFLE2,HIGH,2,NX,1,NY,5,5,1,1000) COVAL(BAFFLE2,W1,FIXVAL,0.0) PLANTBEGIN Resistance to flow exerted by tubes, throughout the shell. PATCH(RESIST,PHASEM,1,NX,1,NY,1,NZ,1,1000)CO=RG(2) COVAL(RESIST,U1,GRND,0.0) CO=RG(2) COVAL(RESIST,V1,GRND,0.0) CO=0.5*RG(2) COVAL(RESIST,W1,GRND,0.0) PLANTEND GROUP 14. Downstream pressure for PARAB=.TRUE. GROUP 15. Termination of sweeps LSWEEP=50 GROUP 16. Termination of iterations LITER(P1)=100 GROUP 17. Under-relaxation devices RELAX(U1,FALSDT,1.0);RELAX(V1,FALSDT,1.0) RELAX(W1,FALSDT,1.0) GROUP 18. Limits on variables or increments to them GROUP 19. Data communicated by satellite to GROUND NAMSAT=MOSG GROUP 20. Preliminary print-out GROUP 21. Print-out of variables Print-out of porosities is suppressed. OUTPUT(EPOR,N,N,N,N,N,N);OUTPUT(NPOR,N,N,N,N,N,N) OUTPUT(HPOR,N,N,N,N,N,N) OUTPUT(1STH,N,N,Y,Y,Y,Y);OUTPUT(2NDH,N,N,Y,Y,Y,Y) GROUP 22. Spot-value print-out IXMON=5;IYMON=5;TSTSWP=5 GROUP 23. Field print-out and plot control IPLTL=LSWEEP;IPROF=1;ORSIZ=0.4;XZPR=T;NPLT=1 PATCH(PASS1,PROFIL,1,1,2,2,1,NZ,1,1000) PLOT(PASS1,1STH,T2IN,T1IN);PLOT(PASS1,2NDH,T2IN,T1IN) PATCH(PASS2,PROFIL,2,2,2,2,1,NZ,1,1000) PLOT(PASS2,1STH,T2IN,T1IN);PLOT(PASS2,2NDH,T2IN,T1IN) PATCH(PASS3,PROFIL,3,3,2,2,1,NZ,1,1000) PLOT(PASS3,1STH,T2IN,T1IN);PLOT(PASS3,2NDH,T2IN,T1IN) PATCH(PASS4,PROFIL,4,4,2,2,1,NZ,1,1000) PLOT(PASS4,1STH,T2IN,T1IN);PLOT(PASS4,2NDH,T2IN,T1IN) PATCH(PASS5,PROFIL,5,5,2,2,1,NZ,1,1000) PLOT(PASS5,1STH,T2IN,T1IN);PLOT(PASS5,2NDH,T2IN,T1IN) PATCH(TABMAP,CONTUR,1,NX,1,NY,4,4,1,1000) PLOT(TABMAP,1STH,0.0,10.0);PLOT(TABMAP,2NDH,0.0,10.0) PATCH(TABYEQ3,CONTUR,1,NX,3,3,1,NZ,1,1000) PLOT(TABYEQ3,P1,0.0,10.0);PLOT(TABYEQ3,1STH,0.0,10.0) PLOT(TABYEQ3,2NDH,0.0,10.0) tstswp=-1 dmpstk=t DISTIL=T EX(P1)=1.191E+02; EX(U1)=3.000E-01 EX(V1)=2.262E-02; EX(W1)=3.339E-01 LIBREF=122 STOP