talk=f;run(1,1)
  DISPLAY

  Library case H102:

  TRANSIENT FLOW IN A BOX

  This  case  models  simple   two-dimensional  forced  flow
  through a box. The problem is defined as transient with  5
  time-steps.  Results will be displayed at time steps  1, 3
  and 5 showing increase in temperature and velocity. Fan is
  switched on at the beginning of the simulation  to provide
  constant supply of cold air.  Turbulence is modelled using
  the k-e model. (Note that the LVEL turbulence model is
  recommended for HOTBOX simulations, this case shows that
  the k-e model is an option)

  (Use PHOTON to display  results.  Enter  USE Q1  in PHOTON
  command mode,  or create a file called U,  which  contains
  the one line: USE Q1   before typing  RUNPHO.)
  ENDDIS

  PHOTON USE
  p
  h1



  up z
  use patgeo
  msg Temperature contours after first time step.
  msg
  con tem1 y 1 fil;.001
  msg Press  to continue
  pause
  msg Velocity field after first time step.
  vec y 1 sh
  msg
  msg Press return to load results after third time step.
  pause
  p
  h3



  up z
  use patgeo
  msg Temperature contours after third time step.
  msg
  cont tem1 y 1 fil;.001
  msg Velocity field after third time step.
  vec y 1 sh
  msg
  msg Press return to load results after the last time step.
  pause
  p
  h5



  up z
  use patgeo
  msg Temperature contours after the last time step.
  msg
  cont tem1 y 1 fil;.001
  msg
  msg Velocity field after the last time step.
  vec y 1 sh
  msg
  msg Type E to end.
  ENDUSE
 ************************************************************
  Group 1. Run Title
 TEXT(Transient Flow In A Box
 ************************************************************
  Group 2. Transience
 STEADY=F
    * Set overall time and no. of steps
 RSET(U,0.000E+00,5.000E+02,5)
    * Cut regions
 RSET(T,L,0,1.000E+02)
 RSET(T,L,0,2.000E+02)
 RSET(T,L,0,3.000E+02)
 RSET(T,L,0,4.000E+02)
    * Modify regions
 ************************************************************
  Groups 3, 4, 5  Grid Information
    * Overall number of cells, RSET(M,NX,NY,NZ,tolerance)
 RSET(M,10,1,10)
    * Set overall domain extent:
    *        xulast  yvlast  zwlast    name
 XSI= 1.000E+00;YSI= 1.000E+00;ZSI= 1.000E+00;RSET(D,BOX     )
    * Set objects: x0     y0     z0
    *              dx     dy     dz    name
 XPO= 2.000E-01;YPO= 0.000E+00;ZPO= 4.000E-01
 XSI= 2.000E-01;YSI= 1.000E+00;ZSI= 2.000E-01;RSET(B,BLK     )
 XPO= 0.000E+00;YPO= 0.000E+00;ZPO= 0.000E+00
 XSI= 0.000E+00;YSI= 1.000E+00;ZSI= 2.000E-01;RSET(B,FAN     )
 XPO= 6.000E-01;YPO= 0.000E+00;ZPO= 1.000E+00
 XSI= 4.000E-01;YSI= 1.000E+00;ZSI= 0.000E+00;RSET(B,EXIT    )
 ************************************************************
  Group 7. Variables: STOREd,SOLVEd,NAMEd
 ONEPHS  =    T
    * Non-default variable names
 NAME( 45) =EPKE ; NAME( 46) =BLOK
 NAME( 47) =PRPS ; NAME( 48) =DEN1
 NAME( 49) =SPH1 ; NAME( 50) =TEM1
    * Solved variables list
 SOLVE(P1  ,U1  ,W1  ,TEM1)
    * Stored variables list
 STORE(SPH1,DEN1,PRPS,BLOK,EPKE)
    * Additional solver options
 SOLUTN(P1  ,Y,Y,Y,N,N,N)
 SOLUTN(TEM1,Y,Y,Y,N,N,Y)
 IVARBK  =      -1 ;ISOLBK =       1
 TURMOD(KEMODL)
 ************************************************************
  Group 8. Terms & Devices
 NEWRH1  =    T; NEWENL  =    T; NEWENT  =    T
 ISOLX   =       0 ;ISOLY  =       0 ;ISOLZ  =       0
 ************************************************************
  Group 9. Properties
 RHO1    = FILE
 PRESS0  = 1.000E+05; TEMP0   = 2.730E+02
 CP1     = FILE; ENUL    = FILE; DRH1DP  = FILE
 PRNDTL(TEM1) = CONDFILE
 ************************************************************
  Group 11.Initialise Var/Porosity Fields
 FIINIT(KE  ) =  2.500E-03 ;FIINIT(EP  ) =  2.050E-03
 FIINIT(EPKE) =  1.000E+00 ;FIINIT(BLOK) =  1.000E+00
 FIINIT(PRPS) =  2.000E+00 ;FIINIT(TEM1) =  2.000E+01
 CONPOR(BLK     , -1.00,CELL  ,-#2,-#2,-#1,-#1,-#3,-#3)
 INIT(BLK     ,BLOK, 0.000E+00, 2.000E+00)
 INIT(BLK     ,PRPS, 0.000E+00, 1.110E+02)
 INIADD  =    F
 ************************************************************
  Group 13. Boundary & Special Sources
 INLET (FAN     ,WEST  ,#1,#1,#1,#1,#1,#1,#1,#5)
 VALUE (FAN     ,P1  , 1.189E+00)
 VALUE (FAN     ,U1  , 1.000E+00)
 VALUE (FAN     ,KE  , 2.500E-03)
 VALUE (FAN     ,EP  , 2.050E-03)
 VALUE (FAN     ,TEM1, 2.000E+01)

 PATCH (EXIT    ,HIGH  ,#4,#4,#1,#1,#4,#4,#1,#5)
 COVAL (EXIT    ,P1  , 1.000E+00, 0.000E+00)
 COVAL (EXIT    ,KE  , 0.000E+00, SAME     )
 COVAL (EXIT    ,EP  , 0.000E+00, SAME     )
 COVAL (EXIT    ,TEM1, 0.000E+00, 2.000E+01)

 PATCH (HOTBLK  ,VOLUME,#2,#2,#1,#1,#3,#3,#1,#5)
 COVAL (HOTBLK  ,TEM1, FIXFLU   , 3.125E+05)

 PATCH (BUOYANCY,PHASEM,#1,#NREGX,#1,#NREGY,#1,#NREGZ,#1,#NREGT)
 COVAL (BUOYANCY,W1  , FIXFLU   , DENSDIFF    )

 BUOYA   = 0.000E+00 ; BUOYB = 0.000E+00 ; BUOYC =-9.810E+00
 BUOYD   = 1.189E+00
 EGWF    =    T
 ************************************************************
  Group 15. Terminate Sweeps
 LSWEEP  =      25
 RESREF(P1  ) =  1.161E-12 ;RESREF(U1  ) =  1.161E-12
 RESREF(W1  ) =  1.161E-12 ;RESREF(KE  ) =  2.903E-15
 RESREF(EP  ) =  2.380E-15 ;RESREF(TEM1) =  3.539E-07
 SELREF  =    T; RESFAC  = 1.000E-02
 ************************************************************
  Group 16. Terminate Iterations
 LITER (TEM1) =   15
 ************************************************************
  Group 17. Relaxation
 RELAX(P1  ,LINRLX, 1.000E+00); RELAX(U1  ,FALSDT, 1.000E-01)
 RELAX(W1  ,FALSDT, 1.000E-01); RELAX(KE  ,LINRLX, 4.000E-01)
 RELAX(EP  ,LINRLX, 4.000E-01); RELAX(TEM1,FALSDT, 1.000E+03)
 KELIN   =       1
 ************************************************************
  Group 19. EARTH Calls To GROUND Station
 NAMGRD  =HTBX
 ************************************************************
  Group 21. Print-out of Variables
 OUTPUT(BLOK,N,N,N,N,N,N); OUTPUT(PRPS,N,N,N,N,N,N)
 ************************************************************
  Group 22. Monitor Print-Out
 IXMON   =       6 ;IYMON  =       1 ;IZMON  =       5
 TSTSWP=-1
 ************************************************************
  Group 24. Dumps For Restarts
 IDISPA  =       1; CSG1    =H
STOP