GROUP 1. Run title and other preliminaries
TALK=F;RUN(1,1)    
TEXT(2DXZ Duct Flow; Effect Of Pr No. USP Test 14 
TITLE
  DISPLAY
    This run illustrates what happens when a fluid enters a duct
  between two plane walls which are held at unequal temperatures.
    Interesting parametric variations include: entry values of the
  scalar variables; an additional boundary condition at the entry
  section which would give the central region of the stream
  a different set of values of the scalars; change to a flux
  boundary  condition on one of the walls; and the introduction of
  temperature- dependent transport properties.
                 /    /|
       Wall     /    / |
     at temp---/    /  |
       T1     /    /   |
             /    /    |
            |    |Wall |
  Fixed     | ^  |at   |
  mass,     |/   |temp |
  momentum, /    |T2   |
  enthalpy /| ^  |    /
  and conc- |/   |   / ^
  entration /    |  / /z
  fluxes   /| ^  | / /
            |/   |/ /
            x--->
  ENDDIS
 
    GROUP 3. X-direction grid specification
IREGX=1; GRDPWR(X,10,0.01,1.0)
 
    GROUP 5. Z-direction grid specification
   **In addition to pressure, two velocities and enthalpy, three
     additional scalar quantities, C1, C2 and C3, are solved for. They
     can be regarded as concentrations of substances which dissolve
     in the fluid, differing only in their diffusion coefficient.
IREGZ=1; GRDPWR(Z,20,1.0,1.0)
 
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,W1,C1,C2,C3)
    GROUP 8.
USP    = T
UAUTO  = F
USPDBG = F 
UTCPLT = T
USPVTK = T
USPIMB = F
MXLEV  = 0 
MYLEV  = 0
MZLEV  = 0
DOMAT  = -1
MINPRP = -1
MAXPRP = 250
CELLST = 10
FACEST = 10
USPREL = 0.75
PARSOL = F
 
    GROUP 9. Properties of the medium (or media)
DEN1 = 1.
ENUL = 1.E-3
PRNDTL(C1)=1.0; PRNDTL(C2)=0.1; PRNDTL(C3)=10.0
 
    GROUP 13. Boundary conditions and special sources
PATCH (WESTWALL,WWALL,1,1,1,1,1,NZ,1,1)
COVAL(WESTWALL,C1,1./PRNDTL(C1),0.0)
COVAL(WESTWALL,C2,1./PRNDTL(C2),0.0)
COVAL(WESTWALL,C3,1./PRNDTL(C3),0.0)
COVAL(WESTWALL,W1,1.0,0.0)
 
PATCH (EASTWALL,EWALL,NX,NX,1,1,1,NZ,1,1)
COVAL(EASTWALL,C1,1.0,1.0)
COVAL(EASTWALL,C2,10.0,1.0)
COVAL(EASTWALL,C3,0.1,1.0)
COVAL(EASTWALL,W1,1.0,0.0)

PATCH(OUT,HIGH,1,NX,1,NY,NZ,NZ,1,1)
COVAL(OUT,P1,1.e+3,0.)
 
   **Uniform inflow at low boundary
PATCH(IN,LOW,1,NX,1,1,1,1,1,1)
COVAL(IN,P1,FIXFLU,10.0)
COVAL(IN,W1,0.,10.0)
COVAL(IN,C1,1.,0.5)
COVAL(IN,C2,1.,0.5)
COVAL(IN,C3,1.,0.5)

mesg(Do you want to use collocated arrangement (y) or staggered one (n)? (y/n)
readvdu(ans,char,n)
if(:ans:.eq.y)then
 SPEDAT(SET,USP,METHOD,I,1)
 RELAX(P1  ,LINRLX, 1.000000E-01)
 RELAX(U1  ,FALSDT, 1.000000E+02)
 RELAX(V1  ,FALSDT, 1.000000E+02)

mesg(Do you want to use SIMPLEST (y) or SIMPLE (n)? (y/n)
readvdu(ans,char,n)
if(:ans:.eq.y)then
 SPEDAT(SET,USP,SIMPLEST,L,T)
endif

endif

mesg(Do you want to view results in the centres of cells? (y/n)
readvdu(ans,char,n)
if(:ans:.eq.y)then
SPEDAT(SET,USPIO,VERTCENT,L,F)
endif


 
    GROUP 15. Termination of sweeps
LSWEEP=200
RESFAC = 1.E-6 
    GROUP 22. Spot-value print-out
IXMON=NX/2+13
mesg(Do you want to use max&min(y) on monitor instead of default(n)? (y/n)
readvdu(ans,char,n)
if(:ans:.eq.y)then
#maxmin
endif

    GROUP 23. Field print-out and plot control
NXPRIN=3; NZPRIN=10
  * Menu data ... optional
STOP