DISPLAY
  LAMINAR RECTANGULAR CAVITY FLOW WITH HEAT TRANSFER
 
  2-dimensional (x-y), Cartesian, steady, elliptic
 
  This demonstration shows the influence of the Prandtl number of
  the fluid on the temperature distribution within a square cold-
  walled cavity with a moving heated top wall.
 
  You will be asked whether you wish to change the Reynolds number
  or the aspect ratio of the cavity.
 
                ---> moving lid
              +---------+
              |         |
              |         |
              |         |\
    y^        |         | \
     |        +---------+  --stationary walls
     +--->x           \___/
  enddis
 
  PHOTON USE
  p
  phi
 
 
  msg square cold-walled cavity with moving heated top wall
  msg effect of Prandtl number on temperature distribution
  gr z 1;vec z 1 sh
  msg            -
  msg Press  to continue
  pause
  red;vec off;gr ou z 1
  msg temperature contours for Prandtl number = 0.7
  con h1 z 1 fi; 0.001
  msg            -
  msg Press  to continue
  pause
  con off;red
  msg temperature contours for Prandtl number = 0.1
  con a z 1 fi;0.001
  msg            -
  msg Press  to continue
  pause
  con off;red
  msg temperature contours for Prandtl number = 0.01
  con b z 1 fi;0.001
  msg            -
  msg Press  to continue
  pause
  con off;gr off;red;gr ou z 1
  msg streamlines
  stre 2d z 1 sh;int 20
  msg            -
  msg Press e to END
  enduse
 
    GROUP 1. Run title and other preliminaries
TEXT(Rect Cav With Moving Lid;Heat Tran
TITLE
mesg(PC486/50 time last reported as 1.min
    GROUP 3. X-direction grid specification
GRDPWR(X,-10,0.1,2.0)
    GROUP 4. Y-direction grid specification
GRDPWR(Y,-10,0.1,2.0)
    GROUP 5. Z-direction grid specification
zwlast=xulast
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1,H1,a,b)
    GROUP 8. Terms (in differential equations) & devices
TERMS(H1,N,Y,Y,Y,Y,Y)
    GROUP 9. Properties of the medium (or media)
PRNDTL(H1)=0.7; prndtl(a)=0.1; prndtl(b)=0.01
real(rey,rat)
enul=1.e-4
rey=yvlast/enul
mesg(Reynolds number is currently :rey:
mesg(Enter a new Reynolds number or
mesg(press  to accept current value
readvdu(rey,real,rey)
mesg(Reynolds number is now :rey:
enul=yvlast/rey
rat=yvlast/xulast
mesg(height/width ratio is currently :rat:
mesg(Enter a new ratio or
mesg(press  to accept current value
readvdu(rat,real,rat)
mesg(height/width is now :rat:
xulast=yvlast/rat
    GROUP 13. Boundary conditions and special sources
  ** South wall, at rest
WALL (SOUTH,SOUTH,1,NX,1,1,1,1,1,1)
COVAL(SOUTH,U1,1.0,0.0); COVAL(SOUTH,H1,1.0,0.0)
coval(south,a,1.0,0.0); coval(south,b,1.0,0.0)
  ** North wall, moving
WALL (MOVING,NORTH,1,NX,NY,NY,1,1,1,1)
COVAL(MOVING,U1,1.0,1.0); COVAL(MOVING,H1,1.0,1.0)
coval(moving,a,1.0,1.0); coval(moving,b,1.0,1.0)
  ** West wall, at rest
WALL (WEST,WEST,1,1,1,NY,1,1,1,1)
COVAL(WEST,V1,1.0,0.0); COVAL(WEST,H1,1.0,0.0)
COVAL(WEST,A,1.0,0.0); COVAL(WEST,B,1.0,0.0)
  ** East wall, at rest
WALL (EAST,EAST,NX,NX,1,NY,1,1,1,1)
COVAL(EAST,V1,1.0,0.0); COVAL(EAST,H1,1.0,0.0)
COVAL(EAST,A,1.0,0.0); COVAL(EAST,B,1.0,0.0)
  ** Pressure relief
PATCH(RELIEF,CELL,NX/2,NX/2,NY/2,NY/2,1,1,1,1)
COVAL(RELIEF,P1,FIXP,0.0); COVAL(RELIEF,U1,ONLYMS,0.0)
COVAL(RELIEF,V1,ONLYMS,0.0)
    GROUP 15. Termination of sweeps
LSWEEP=30; ISWC1=LSWEEP-4
RESREF(P1)=1.E-8; RESREF(U1)=1.E-6; RESREF(V1)=1.E-6
RESREF(H1)=1.E-6
    GROUP 17. Under-relaxation devices
RELAX(U1,FALSDT,0.1); RELAX(V1,FALSDT,0.1)
    GROUP 22. Spot-value print-out
IXMON=NX/2; IYMON=NY-1
    GROUP 23. Field print-out and plot control
PATCH(MIDX,PROFIL,NX/2,NX/2,1,NY,1,1,1,1)
PLOT(MIDX,U1,-1.0,1.0); PLOT(MIDX,H1,0.0,1.0)
PATCH(MAP,CONTUR,1,NX,1,NY,1,1,1,1)
PLOT(MAP,U1,0.0,10); PLOT(MAP,V1,0.0,10); PLOT(MAP,H1,0.0,10)
tstswp=-1