PHOTON USE
  p
 
 
 
  gr ou z 1;gr ou z 1 x 1 5 y 1 10
  vec z 1 sh
  msg            Velocity distribution
  msg  Press Enter to continue
  pause
  vec off;red
  con h1 z 1 fil;.01
  msg            Temperature contours
  msg  Press Enter to continue
  pause
  con off;red
  con p1 z 1 sh;int 20
  msg            Pressure contours
  msg Press Enter to end
  ENDUSE
 
   *  GROUP 1. Run title and other preliminaries.
TEXT(BENCHMARK  CASE OF MIXED CONVECTION:130
 
  DISPLAY
   Laminar mixed convection in a vertical channel
   with a backstep: a benchmark study of K-12 Aerospace
   Heat Transfer Committee of the Heat Transfer division
   of ASME.
 
   This case shows how to use plant to introduce the influence
   of buoyancy forces and non-uniform inlet velocity profile.
  ENDDIS
 
   *  GROUP 3. X-direction grid specification.
CARTES=T
NX=35
INTEGER(NXF01,NXL01); NXF01=1; NXL01=5
XFRAC(1)= 1.000E+00;XFRAC(2)= 2.000E+00
XFRAC(3)= 3.000E+00;XFRAC(4)= 4.000E+00
XFRAC(5)= 5.000E+00
INTEGER(NXF02,NXL02); NXF02=6; NXL02=35
XFRAC(6)= 6.000E+00;XFRAC(7)= 7.000E+00
XFRAC(8)= 8.000E+00;XFRAC(9)= 9.000E+00
XFRAC(10)= 1.000E+01;XFRAC(11)= 1.100E+01
XFRAC(12)= 1.200E+01;XFRAC(13)= 1.300E+01
XFRAC(14)= 1.400E+01;XFRAC(15)= 1.500E+01
XFRAC(16)= 1.600E+01;XFRAC(17)= 1.700E+01
XFRAC(18)= 1.800E+01;XFRAC(19)= 1.900E+01
XFRAC(20)= 2.000E+01;XFRAC(21)= 2.100E+01
XFRAC(22)= 2.200E+01;XFRAC(23)= 2.300E+01
XFRAC(24)= 2.400E+01;XFRAC(25)= 2.500E+01
XFRAC(26)= 2.600E+01;XFRAC(27)= 2.700E+01
XFRAC(28)= 2.800E+01;XFRAC(29)= 2.900E+01
XFRAC(30)= 3.000E+01;XFRAC(31)= 3.100E+01
XFRAC(32)= 3.200E+01;XFRAC(33)= 3.300E+01
XFRAC(34)= 3.400E+01;XFRAC(35)= 3.500E+01
   *  GROUP 4. Y-direction grid specification.
NY=20
INTEGER(NYF01,NYL01); NYF01=1; NYL01=10
YFRAC(1)= 1.000E-01;YFRAC(2)= 2.000E-01
YFRAC(3)= 3.000E-01;YFRAC(4)= 4.000E-01
YFRAC(5)= 5.000E-01;YFRAC(6)= 6.000E-01
YFRAC(7)= 7.000E-01;YFRAC(8)= 8.000E-01
YFRAC(9)= 9.000E-01;YFRAC(10)= 1.000E+00
 
INTEGER(NYF02,NYL02); NYF02=11; NYL02=20
YFRAC(11)= 1.100E+00;YFRAC(12)= 1.200E+00
YFRAC(13)= 1.300E+00;YFRAC(14)= 1.400E+00
YFRAC(15)= 1.500E+00;YFRAC(16)= 1.600E+00
YFRAC(17)= 1.700E+00;YFRAC(18)= 1.800E+00
YFRAC(19)= 1.900E+00;YFRAC(20)= 2.000E+00
   *  GROUP 7. Variables stored, solved & named.
SOLVE(P1); SOLUTN(P1,Y,Y,Y,N,N,N)
SOLVE(U1,V1,H1)
   *  GROUP 8. Terms (in differential equations) & devices.
TERMS(H1,N,Y,Y,N,Y,N)
RHO1= 1.000E+00
ENUL= 1.000E-02
PRNDTL(H1)=0.7
   *  GROUP 11. Initialization of variable or porosity fields.
FIINIT(P1)= 1.300E-04
FIINIT(U1)= 1.000E+00
FIINIT(H1)=0.5
CONPOR(0.0,CELL,-NXF01,-NXL01,-NYF01,-NYL01,1,1)
   *  GROUP 13. Boundary conditions and special sources.

PATCH(SHOWINL,WEST,NXF01,NXF01,NYF02,NYL02,1,1,1,1)
    PLANTBEGIN
     ** Parabolic profile of streamwise velocity
PATCH(INLET,WEST,1,1,11,20,1,1,1,1)
   VAL=1.0*3./2.*(1.-(3.-2.*YG2D)**2)
COVAL(INLET,P1,FIXFLU,GRND)
   VAL=3./2.*(1.-(3.-2.*YG2D)**2)
COVAL(INLET,U1,ONLYMS,GRND)
COVAL(INLET,H1,ONLYMS, 0.000E+00)
     **  Buoyancy forces
PATCH(BUGR,VOLUME,1,NX,1,NY,1,1,1,1)
    VAL=0.1*H1
COVAL(BUGR,U1,FIXFLU,GRND)
    PLANTEND

     ** Fixed pressure outlet
PATCH(OUTLET,EAST,NXL02,NXL02,NYF01,NYL02,1,1,1,1)
COVAL(OUTLET,P1,1000., 0.000E+00)
     ** Cold top wall
PATCH(TOPWALL,NWALL,NXF01,NXL02,NYL02,NYL02,1,1,1,1)
COVAL(TOPWALL,U1,1., 0.000E+00)
COVAL(TOPWALL,H1,1./PRNDTL(H1), 0.000E+00)
     ** Hot bottom wall downwind of the step
PATCH(BOTWALL,SWALL,NXF02,NXL02,NYF01,NYF01,1,1,1,1)
COVAL(BOTWALL,U1,1., 0.000E+00)
COVAL(BOTWALL,H1,1./PRNDTL(H1), 1.000E+00)

   *  GROUP 15. Termination of sweeps.
LSWEEP=65
RESREF(P1)= 1.000E-06;RESREF(U1)= 1.000E-06
RESREF(V1)= 1.000E-06;RESREF(H1)= 1.000E-06
   *  GROUP 16. Termination of iterations.
LITER(U1)=10; ENDIT(U1)= 1.000E-06
LITER(V1)=10; ENDIT(V1)= 1.000E-06
   *  GROUP 17. Under-relaxation devices.
RELAX(P1,LINRLX, 5.000E-01)
REAL(SCALEL,SCALEU);SCALEL= 10.0;SCALEU= 1.0
RELAX(U1,FALSDT, 1.000E+00*SCALEL/SCALEU)
RELAX(V1,FALSDT, 1.000E+00*SCALEL/SCALEU)
RELAX(H1,FALSDT, 1.000E+00*SCALEL/SCALEU)
   *  GROUP 20. Preliminary print-out.
NAMSAT=MOSG
   *  GROUP 21. Print-out of variables.
OUTPUT(P1,Y,Y,Y,Y,Y,Y);OUTPUT(U1,Y,Y,Y,Y,Y,Y)
OUTPUT(V1,Y,Y,Y,Y,Y,Y);OUTPUT(H1,Y,N,N,N,Y,Y)
   *  GROUP 22. Spot-value print-out.
IXMON=7;IYMON=8
   *  GROUP 23. Field print-out and plot control.
ITABL=3
tstswp=-1
dmpstk=t
DISTIL=T;store(h1,prps,vpor)
EX(P1)=1.666E-01; EX(U1)=5.044E-01; EX(V1)=1.160E-02
EX(H1)=2.395E-01; EX(PRPS)=1.507E+01; EX(VPOR)=9.286E-01
 LIBREF=130
STOP