TALK=F;RUN( 1, 1)
CPVNAM=VDI;SPPNAM=Core
 
    GROUP 1. Run title and other preliminaries
TEXT(2D Laminar B-Layer On A Hot Wall  
TITLE
  DISPLAY
  This run shows what happens in a boundary-layer flow adjacent
  to a heated wall. An expanding grid is used in the direction
  normal to the wall so as to match the growth of the boundary
  layer.
 
                        Fixed, zero pressure boundary. W=1.0m/s
  Prescribed  - - - - - - - - - - - - - - - - - - - - - - - - -
  mass inflow
  rate,       ----->             ----->                  ----->
  velocity    ----->             ---->                   ---->
  and         ----->             --->                    -->
  enthalpy    _________________________________________________
           ^  /////////////////////////////////////////////////
          y|                     Wall
           |--->
             z
 
  ENDDIS
 
     Users may like to try changing : the grid-expansion
  rate; the velocity of the fluid at the leading edge
  and the boundary values on the plate.
 
    GROUP 4. Y-direction grid specification
GRDPWR(Y,20,5.0E-3,1.0)
 
    GROUP 5. Z-direction grid specification
  ** Z-direction distances 
GRDPWR(Z,40,0.1,1.0)

REAL(Win,Hin,Hw,Vis,PRND)
Win=1.0
Hin=1.
Hw=0.
Vis=1.E-5
PRND=0.7
 
    GROUP 7. Variables stored, solved & named
SOLVE(P1,V1,W1,H1)
 
    GROUP 8. Terms (in differential equations) & devices
TERMS(H1,N,Y,Y,Y,Y,Y)
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 
PARSOL = F
 
mesg(Default values of problem are:
mesg(Inlet velocity is :Win: m/s
mesg(Inlet enthalpy is :Hin: J/kg
mesg(Enthalpy on wall is :Hw: J/kg
mesg(Viscosity is :Vis: m2/s
mesg(Prandtl number is :PRND:
mesg(Do you change default values? (y/n)
readvdu(ans,char,n)
if(:ans:.eq.y)then
 mesg(Enter inlet velocity
 readvdu(Win,real,Win)
 mesg(New value of inlet velocity is :Win: m/s
 mesg(Enter inlet enthalpy 
 readvdu(Hin,real,Hin)
 mesg(New value of inlet enthalpy is :Hin: J/kg
 mesg(Enter enthalpy on wall
 readvdu(Hw,real,Hw)
 mesg(New value of enthalpy on wall is :Hw: J/kg
 mesg(Enter viscosity 
 readvdu(Vis,real,Vis)
 mesg(New value of viscosity is :Vis: m2/s
 mesg(Enter Prandtl number
 readvdu(PRND,real,PRND)
 mesg(New value of Prandtl number is :PRND: 
endif

    GROUP 9. Properties of the medium (or media)
ENUL=Vis
PRNDTL(H1)=PRND
 
    GROUP 13. Boundary conditions and special sources
 
  ** South wall
PATCH(plte,SWALL,1,1,1,1,1,NZ,1,1)
COVAL(plte,H1,1.0,Hw)
COVAL(plte,W1,1.0,0.0)
 
 
  ** Upstream boundary
PATCH(UPSTREAM,LOW,1,1,1,NY,1,1,1,1)
COVAL(UPSTREAM,P1,FIXFLU,RHO1*Win)
COVAL(UPSTREAM,W1,0.,Win)
COVAL(UPSTREAM,H1,0.,Hin)

  ** Downstream boundary
PATCH(DSTREAM,HIGH,1,1,1,NY,NZ,NZ,1,1)
COVAL(DSTREAM,P1,FIXVAL,0.)

RELAX(P1,LINRLX,0.5)
RELAX(U1,FALSDT,0.001)
RELAX(V1,FALSDT,0.001)

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

LSWEEP = 10000
ENDIT(P1) = 1.e-4
LITER(P1)=200
ENDIT(H1) = 1.e-4
LITER(H1)=200
  
    GROUP 22. Spot-value print-out
IYMON=5; IZMON=5
 
    GROUP 23. Field print-out and plot control
NZPRIN=NZ/2
TSTSWP=-1
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

selref=t; resfac=1.e-6
STOP