PHOTON USE p gr ou z 1 msg temperature contours and velocity vectors con temp z 1 fi;0.001 vec z 1 ENDUSE GROUP 1. Run title and other preliminaries TEXT(Benard Convection TITLE DISPLAY This case concerns the steady flow of a fluid heated from below and cooled at the top. At the prescribed Rayleigh number a steady state can be attained, but this may not be so at higher Rayleigh numbers, because the flow is essentially unstable. XCYCLE is true, so the flow is free to have a convection-cell size which differs from that of the width ot the integration domain. The conjugate-gradient solver is used. The Q1 contains PHOTON USE commands. ENDDIS REAL(RAYLNO,LHGHT,ASPECT) GROUP 2. Transience; time-step specification GROUP 3. X-direction grid specification NX=20; LHGHT=0.012; ASPECT=2.0 GRDPWR(X,NX,LHGHT*ASPECT,1.0); XCYCLE=T ASPECT GROUP 4. Y-direction grid specification NY=20; GRDPWR(Y,NY,LHGHT,1.0) GROUP 5. Z-direction grid specification GROUP 6. Body-fitted coordinates or grid distortion GROUP 7. Variables stored, solved & named NAME(H1)=TEMP; SOLVE(P1,U1,V1,TEMP) GROUP 8. Terms (in differential equations) & devices CSG3=CNGR GROUP 9. Properties of the medium (or media) ENUL=1.81E-5; RHO1=1.1905; RAYLNO=1.0E+4; PRNDTL(TEMP)=0.71 RAYLNO GROUP 10. Inter-phase-transfer processes and properties GROUP 11. Initialization of variable or porosity fields FIINIT(TEMP)=0.0 GROUP 13. Boundary conditions and special sources ** Lower hotter surface WALL (HOT,SOUTH,1,NX,1,1,1,1,1,1) COVAL(HOT,U1,1.0,0.0) COVAL(HOT,TEMP,1.0,1.0) ** Upper cooler surface WALL (COLD,NORTH,1,NX,NY,NY,1,1,1,1) COVAL(COLD,U1,1.0,0.0) COVAL(COLD,TEMP,1.0,0.0) ** Buoyancy terms BUOYB=-1.0 BUOYE=0.0; DVO1DT=CP1*ENUL*ENUL*RAYLNO/(PRNDTL(TEMP)*LHGHT**3) PATCH(BUOYANCY,PHASEM,1,NX,1,NY,1,1,1,1) COVAL(BUOYANCY,V1,FIXFLU,BOUSS) ** Fix pressure in one cell PATCH(FIXPRESS,CELL,1,1,1,1,1,1,1,1) COVAL(FIXPRESS,P1,FIXP,0.0) COVAL(FIXPRESS,U1,ONLYMS,0.0); COVAL(FIXPRESS,V1,ONLYMS,0.0) GROUP 14. Downstream pressure for PARAB=.TRUE. GROUP 15. Termination of sweeps LSWEEP=100; selref=t; resfac=0.1 GROUP 16. Termination of iterations LITER(P1)=100; LITER(U1)=20; LITER(V1)=20 GROUP 17. Under-relaxation devices RELAX(U1,FALSDT,1.0); RELAX(V1,FALSDT,1.0); RELAX(TEMP,FALSDT,1.0) GROUP 18. Limits on variables or increments to them GROUP 19. Data communicated by satellite to GROUND GROUP 20. Preliminary print-out GROUP 21. Print-out of variables GROUP 22. Spot-value print-out IXMON=3; IYMON=3; TSTSWP=-1 GROUP 23. Field print-out and plot control ITABL=1; NPRINT=LSWEEP; NPLT=5 PATCH(PLOT,CONTUR,1,NX,1,NY,1,1,1,1) PLOT(PLOT,P1,0.0,5.0); PLOT(PLOT,TEMP,0.0,5.0) PLOT(PLOT,U1,0.0,5.0); PLOT(PLOT,V1,0.0,5.0)