PHOTON USE P;;;; gr ou y 1 msg Duct geometry msg Press Enter to continue pause; set vec ref .04; red; vec y 1 sh msg Xylene velocity distribution, m/s msg Press ENTER to continue pause; vec off;red; con H1 y 1 fil;.000001 msg Enthalpy contours, J/kg msg Press ENTER to continue pause; con off;red; con T1 y 1 fil;.000001 msg Temperature contours, K msg Press ENTER to continue pause; con off;red; con den1 y 1 fil;.000001 msg Density contours, kg/m^3 msg Press ENTER to continue pause; con off;red; con EMU y 1 fil;.000001 msg Dynamic viscosity contours, N.s/m^2 msg Press ENTER to continue pause; con off;red; con visl y 1 fil;.000001 msg Kinematic viscosity contours, m^2/s msg Press ENTER to continue pause; con off;red; con COND y 1 fil;.000001 msg Thermal conductivity contours, W/(m.K) msg Press ENTER to continue pause; con off;red; con CP y 1 fil;.000001 msg Heat capacity contours, J/(kg.K) msg Press E to finish ENDUSE GROUP 1. Run title #cls TEXT(XYLEN FLOW IN CONV.-DIV, DUCT: Z101 title DISPLAY PLANT Input Library case Z101 This case concerns flow and heat transfer of a fluid having properties which depend on temperature, incuding: * density, * thermal conductivity, * viscosity, * heat capacity and * Prandtl number. All are introduced by way of PLANT statements, which link them with the solved-for variable H1, the enthalpy. ENDDIS REAL(GASCON,GAMMA,PTOTAL,TTOTAL,RHOTOT,MACHI,AGAM1,RGAM) REAL(MACHO,PIN,TIN,POWER,WIN,RHOIN,PEXIT,WEXIT,RHOOUT,GZLE) REAL(CHORD,THROAT,GRADP,GRADW,GRADR,CMASS,VMASS) INTEGER(IZLE,IZTE) GASCON=1.0;GAMMA=1.4;PTOTAL=1.0;TTOTAL=1.0;RHOTOT=1.0;MACHI=0.5 GZLE=0.006;CHORD=.02;THROAT=0.5;MACHO=2.0 IZLE=2 AGAM1=GAMMA-1.;RGAM=1./GAMMA;POWER=GAMMA/AGAM1 PIN=PTOTAL/(1.+AGAM1*MACHI*MACHI/2.)**POWER RHOIN=RHOTOT/(PTOTAL/PIN)**RGAM WIN=MACHI*(GAMMA*PIN/RHOIN)**0.5 TIN=PIN/(GASCON*RHOIN) PEXIT=PTOTAL/(1.+AGAM1*MACHO*MACHO/2.)**POWER RHOOUT=RHOTOT/(PTOTAL/PEXIT)**RGAM WEXIT=MACHO*(GAMMA*PEXIT/RHOOUT)**0.5 GROUP 3. X-direction grid specification NX=20;XULAST=0.005 GROUP 5. Z-direction grid specification NZ=30;ZWLAST=CHORD+GZLE;IZTE=NZ GROUP 6. Body-fitted coordinates or grid distortion BFC=T;NONORT=T REAL(G5,G6,AAA,BBB,AAT,AT,MMO) G5=GAMMA+1.0;G6=G5/(2.0*AGAM1) AAA=2.0/G5;BBB=AGAM1/G5 AAT=((AAA+BBB*MACHI*MACHI)**G6)/MACHI AT=XULAST/AAT MMO=MACHO-MACHI Set nozzle upper surface DOMAIN(NX+1,NX+1,1,2,IZLE+1,NZ+1) SETLIN(XC,AT/(MACHI+MMO*LNK)*(AAA+BBB*(MACHI+MMO*LNK)**2)**G6) Set points along exit boundary DOMAIN(1,NX+1,1,2,NZ+1,NZ+1);SETLIN(XC,LNI*(XL-XF)) Interpolate DOMAIN(1,NX+1,1,2,IZLE+1,NZ+1);MAGIC(T) dumpc(grid);readco(grid) GROUP 7. Variables stored, solved & named SOLVE(P1,U1,W1,H1) SOLUTN(P1,Y,Y,Y,N,N,N) STORE(den1,visl,T1,EMU,COND,CP) GROUP 8. Terms (in differential equations) & devices TERMS(H1,N,Y,Y,N,P,P) GROUP 9. Properties of the medium (or media) REAL(ENULR,RHOR,CPR,CONDR,EMUR,RE) ** Reference ( inlet ) properties CPR=1747.7;CONDR=0.1282;EMUR=7.87e-04 RHOR=1502.;ENULR=EMUR/RHOR;PRNDTL(H1)=EMUR*CPR/CONDR WIN=0.02;RE=WIN*0.005/ENULR PLANTBEGIN ** Field properties variations RHO1=GRND REAL(DENC0,DENC1,DENC2,DENC3) DENC0=1.1386e3;DENC1=1.0388;DENC2=5.81149E-4;DENC3=-6.7765E-7DEN1=:DENC0:+:DENC1:*T1+:DENC2:*T1**2+(:DENC3:)*T1**3 ENUL=GRND VISL=EMU/DEN1 PRNDTL(H1)=GRND LAMPR(H1)=EMU*CP/COND ** Property correlations * Temperature T1=H1/CP * Heat capacity CP=4186.8*(0.616-.0040428*T1+1.8333e-5*T1**2$ -2.38e-08*T1**3) * Dynamic viscosity EMU=4.1868e-04*(69.647-0.5278*T1+1.358e-3*T1$ **2-1.16e-06*T1**3) * Thermal conductivity COND=1.163*(-0.1909+.003155*T1-1.0341e-5*T1**2$ +1.0666e-8*T1**3) PLANTEND GROUP 11. Initialization of variable or porosity fields FIINIT(W1)=0.1;FIINIT(DEN1)=RHOR ;FIINIT(EMU)=EMUR FIINIT(H1)=5.5e5;FIINIT(COND)=CONDR ;FIINIT(CP)=CPR GROUP 13. Boundary conditions and special sources PATCH(INLET,LOW,1,NX,1,1,1,1,1,1) COVAL(INLET,P1,FIXFLU,RHOR*WIN);COVAL(INLET,W1,ONLYMS,WIN) COVAL(INLET,H1,ONLYMS,5.5e5) PATCH(OUTLET,HIGH,1,NX,1,1,NZ,NZ,1,1);COVAL(OUTLET,P1,1.E3,0.0) COVAL(OUTLET,U1,ONLYMS,0.0);COVAL(OUTLET,W1,ONLYMS,0.0) ** Wall friction boundary condition. PATCH(WALL,EWALL,NX,NX,1,1,1,NZ,1,1) COVAL(WALL,W1,1.0,0.) COVAL(WALL,H1,1./(0.00285*1511.2/0.1354),3.34e5) GROUP 15. Termination of sweeps LSWEEP=120 GROUP 16. Termination of iterations GROUP 17. Under-relaxation devices RELAX(P1,LINRLX,0.5);RELAX(H1,FALSDT,10.0) RELAX(W1,FALSDT,0.1);RELAX(U1,FALSDT,0.1) GROUP 18. Limits on variables or increments to them VARMIN(H1)=3.34e5;VARMAX(H1)=5.5e5 GROUP 19. Data communicated by satellite to GROUND NAMSAT=MOSG GROUP 21. Preliminary print-out GROUP 22. Spot-value print-out IXMON=NX-2;IZMON=nz/2 GROUP 23. Field print-out and plot control NPRINT=LSWEEP GROUP 23. Field print-out and plot control PATCH(XZ,CONTUR,1,NX,1,1,1,NZ,1,1) PLOT(XZ,P1,0.0,20.0);PLOT(XZ,W1,0.0,20.0) PATCH(CENTRE,PROFIL,1,1,1,1,1,NZ,1,1) PLOT(CENTRE,P1,0.0,0.0);PLOT(CENTRE,W1,0.0,0.0) NCRT=1 GVIEW(P,0.000000E+00,1.000000E+00,0.000000E+00) GVIEW(UP,1.000000E+00,0.000000E+00,0.000000E+00) tstswp=-1 dmpstk=t DISTIL=T EX(P1)=1.158E-01; EX(U1)=1.161E-03; EX(W1)=2.308E-02 EX(H1)=5.252E+05; EX(CP)=1.723E+03; EX(COND)=1.298E-01 EX(EMU)=9.531E-04; EX(T1)=3.041E+02; EX(VISL)=6.450E-07 EX(DEN1)=1.489E+03; EX(WCRT)=2.281E-02; EX(UCRT)=1.148E-03 LIBREF=101 STOP