DISPLAY
 
  FULLY-DEVELOPED FLOW IN A DUCT OF RECTANGULAR CROSS-SECTION
 
  This case is similar to case 249 (the square cavity with a moving
  lid); but it is here supposed that there is flow normal to the
  square cross-section, and that the duct is long enough for the
  velocity distribution to have become fully developed.
 
  Opportunities are provided to change:-
  * the non-dimensional longitudinal pressure drop,
  * the Reynolds number based on lid velocity and lid width,
  * and the aspect ratio of the duct cross-section.
 
  PHOTON USE commands are supplied for ease of display.
 
  enddis
  PHOTON USE
  p
 
 
 
  view z
  msg Grid
  gr z m
  msg            -
  msg Press  to continue
  pause
  gr off;gr ou z 1;red
  msg Contours of longitudinal velocity
  con w1 z m fi;0.001
  msg            -
  msg Press  to continue
  pause
  con off;red
  msg Contours of temperature
  con h1 z m fi;0.001
  msg            -
  msg Press e to END
  enduse
  file name squduct.q1 used in Minnesota lectures on June 25 1991
    GROUP 1. Run title and other preliminaries
TEXT(Fully-Developed, Moving-Wall Duct 
TITLE
libref=896
NX=10;NY=10
mesg(The grid is coarse. NX=:NX:, NY=:NY:  OK? (y/n)
ans=y
readvdu(ans,char,y)
if(:ans:.eq.n) then
 mesg(What NX do you want?
 readvdu(nx,int,nx)
 mesg(What NY do you want?
 readvdu(ny,int,ny)
endif
 
     GROUP 3. X-direction grid specification
GRDPWR(X,-NX,0.1,2.0)
    GROUP 4. Y-direction grid specification
GRDPWR(Y,-NY,0.1,2.0)
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1,W1,H1)
    GROUP 8. Terms (in differential equations) & devices
TERMS(H1,N,Y,Y,Y,Y,Y);TERMS(W1,N,Y,Y,Y,Y,Y)
    GROUP 9. Properties of the medium (or media)
ENUL=1.E-5;PRNDTL(H1)=0.7
    GROUP 13. Boundary conditions and special sources
  ** South wall, at rest
WALL (SOUTH,SOUTH,1,NX,1,1,1,NZ,1,LSTEP)
COVAL(SOUTH,U1,1.0,0.0);COVAL(SOUTH,H1,1.0/PRNDTL(H1),0.0)
COVAL(SOUTH,W1,1.0,0.0)
  ** North wall, moving
WALL (MOVING,NORTH,1,NX,NY,NY,1,NZ,1,LSTEP)
COVAL(MOVING,U1,1.0,1.0);COVAL(MOVING,H1,1.0/PRNDTL(H1),1.0)
COVAL(MOVING,W1,1.0,0.0)
  ** West wall, at rest
WALL (WEST,WEST,1,1,1,NY,1,NZ,1,LSTEP)
COVAL(WEST,V1,1.0,0.0);COVAL(WEST,H1,1.0/PRNDTL(H1),0.0)
COVAL(WEST,W1,1.0,0.0)
  ** East wall, at rest
WALL (EAST,EAST,NX,NX,1,NY,1,NZ,1,LSTEP)
COVAL(EAST,V1,1.0,0.0);COVAL(EAST,H1,1.0/PRNDTL(H1),0.0)
COVAL(EAST,W1,1.0,0.0)
  ** longitudinal pressure drop
PATCH(PRESDROP,HIGH,1,NX,1,NY,1,1,1,LSTEP)
COVAL(PRESDROP,W1,FIXFLU,0.01)
  ** 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=150;ISWC1=LSWEEP-100;SELREF=T;RESFAC=0.01
   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;TSTSWP=-10
    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);PLOT(MAP,W1,0.0,0.0)
  ********************************** varying properties logic
MESG(Make viscosity increase with temperature  ? (Y/N)
READVDU(ANS,CHAR,N)
IF(:ANS:.EQ.Y) THEN
 STORE(ENUL,TMP1)
 ENUL=LINTEM;ENULA=0.5*1.E-4;ENULB=0.5*1.E-4
 TMP1=LINH;TMP1A=0.0;CP1=1
ENDIF