TALK=T;RUN(1,1)
        PHOTON USE
         p;;;;;;

        block;1;13 20 1 15 1 9
        gr ou z 1;gr ou z m;gr ou x 1;gr ou x m
        gr ou x 13 z 1 9;gr ou x m z 1 9;gr ou z 10 x 13 m
        GR OU Z     1 X     1    12 Y     1     8 COL     4
        GR OU X    13 Y     1     8 Z     1     9 COL     5
        GR OU Z    10 X    13    20 Y     1     8 COL     6
        GR OU Z    21 X     1    20 Y     1     8 COL     7
        GR OU Y     9 X     1    20 Z     1    20 COL     8
        GR OU Z     1 X     1    12 Y     9    15 COL     9
        GR OU X    21 Y     9    15 Z    10    20 COL    10
        GR OU X    21 Y     1     8 Z    10    20 COL    11
        vec y 12 sh
        msg Air flow vectors
        pause
        vec cl;red;set vec ref .002
        vec y 3 sh
        msg Glass flow vectors - the glass is very viscous.
        pause
        vec cl;red;set con sca pl
        con tem1 y 3 sh;int 14
        msg Temperature in the glass - Glass enters at 1150K.
        msg Walls and floor are losing heat at 2kW/m**2.
        msg Heat transfer to the air above is by laminar contact.
        pause
        con cl;red
        con tem1 y 12 sh;int 14
        msg Temperature in the air - The walls and roof in the
        msg airspace are adiabatic
        pause
        con cl;red
        con tem1 x m 1 1 8 fi;.001
        msg Glass temperature at exit
        ENDUSE
  DISPLAY
   **********************************************************
   This Q1 concerns the flow of molten glass through a channel
   lined with refractory brick, and the air above it.

   The glass enters at 1150 deg C, and loses heat to the walls
   and floor at 2kW/m**2. Some heat is transferred by contact
   to the air. The glass (userm1) has a viscosity of 0.1.

   The case takes about 10 min to run the 30 sweeps set on
   a 486/33, but requires several hundred sweeps to converge.

   Results can be viewed in PHOTON by typing 'use q1'
  ENDDIS
 ************************************************************
  Group 1. Run Title and Number
 ************************************************************
 ************************************************************
 
 TEXT(Flow Of Glass In T-shaped Channel       )
 
 ************************************************************
 ************************************************************
 
 IRUNN = 1 ;LIBREF = 0
 ************************************************************
  Group 2. Time dependence
 STEADY = T
 ************************************************************
  Group 3. X-Direction Grid Spacing
 CARTES = T
 NX = 20
 XULAST =1.25
 XFRAC(1)=0.05 ;XFRAC(2)=0.1
 XFRAC(3)=0.15 ;XFRAC(4)=0.2
 XFRAC(5)=0.25 ;XFRAC(6)=0.3
 XFRAC(7)=0.35 ;XFRAC(8)=0.4
 XFRAC(9)=0.45 ;XFRAC(10)=0.5
 XFRAC(11)=0.55 ;XFRAC(12)=0.6
 XFRAC(13)=0.65 ;XFRAC(14)=0.7
 XFRAC(15)=0.75 ;XFRAC(16)=0.8
 XFRAC(17)=0.85 ;XFRAC(18)=0.9
 XFRAC(19)=0.95 ;XFRAC(20)=1.
 ************************************************************
  Group 4. Y-Direction Grid Spacing
 NY = 15
 YVLAST =0.3
 YFRAC(1)=0.063333 ;YFRAC(2)=0.126667
 YFRAC(3)=0.19 ;YFRAC(4)=0.253333
 YFRAC(5)=0.316667 ;YFRAC(6)=0.38
 YFRAC(7)=0.443333 ;YFRAC(8)=0.506667
 YFRAC(9)=0.577143 ;YFRAC(10)=0.647619
 YFRAC(11)=0.718095 ;YFRAC(12)=0.788571
 YFRAC(13)=0.859048 ;YFRAC(14)=0.929524
 YFRAC(15)=1.
 ************************************************************
  Group 5. Z-Direction Grid Spacing
 PARAB = F
 NZ = 20
 ZWLAST =2.
 ZFRAC(1)=0.05 ;ZFRAC(2)=0.1
 ZFRAC(3)=0.15 ;ZFRAC(4)=0.2
 ZFRAC(5)=0.25 ;ZFRAC(6)=0.3
 ZFRAC(7)=0.35 ;ZFRAC(8)=0.4
 ZFRAC(9)=0.45 ;ZFRAC(10)=0.5
 ZFRAC(11)=0.55 ;ZFRAC(12)=0.6
 ZFRAC(13)=0.65 ;ZFRAC(14)=0.7
 ZFRAC(15)=0.75 ;ZFRAC(16)=0.8
 ZFRAC(17)=0.85 ;ZFRAC(18)=0.9
 ZFRAC(19)=0.95 ;ZFRAC(20)=1.
 ************************************************************
  Group 6. Body-Fitted Coordinates
 ************************************************************
  Group 7. Variables: STOREd,SOLVEd,NAMEd
 ONEPHS = T
 NAME(1)=P1 ;NAME(3)=U1
 NAME(5)=V1 ;NAME(7)=W1
 NAME(46)=ENUL ;NAME(47)=BLOK
 NAME(48)=PRPS ;NAME(49)=DEN1
 NAME(50)=TEM1
    * Y in SOLUTN argument list denotes:
    * 1-stored 2-solved 3-whole-field
    * 4-point-by-point 5-explicit 6-harmonic averaging 
 SOLUTN(P1,Y,Y,Y,N,N,N)
 SOLUTN(U1,Y,Y,N,N,N,Y)
 SOLUTN(V1,Y,Y,N,N,N,Y)
 SOLUTN(W1,Y,Y,N,N,N,Y)
 SOLUTN(ENUL,Y,N,N,N,N,Y)
 SOLUTN(BLOK,Y,N,N,N,N,Y)
 SOLUTN(PRPS,Y,N,N,N,N,Y)
 SOLUTN(DEN1,Y,N,N,N,N,Y)
 SOLUTN(TEM1,Y,Y,Y,N,N,Y)
 DEN1 = 49
 VISL = 46
 IVARBK = -1 ;ISOLBK = 1
 PRNITS= F ;OPTRLX= F ;NOSIP= F ;ALLVBC= F
 DBSOLV= F ;IMPINI= F ;EARL1D= F
 PRPS = 48
 ************************************************************
  Group 8. Terms & Devices
    * Y in TERMS argument list denotes:
    * 1-built-in source 2-convection 3-diffusion 4-transient
    * 5-first phase variable 6-interphase transport         
 TERMS(P1,Y,Y,Y,N,Y,Y)
 TERMS(U1,Y,Y,Y,Y,Y,Y)
 TERMS(V1,Y,Y,Y,Y,Y,Y)
 TERMS(W1,Y,Y,Y,Y,Y,Y)
 TERMS(TEM1,N,Y,Y,Y,Y,Y)
 DIFCUT =0.5 ;ZDIFAC =1.
 GALA = F ;ADDDIF = F
 ISOLX = 0 ;ISOLY = 0 ;ISOLZ = 0
 ************************************************************
  Group 9. Properties used if PRPS is not
  stored, and where PRPS = -1.0 if it is!
 RHO1 = FILE ;TMP1 =0. ;EL1 =0.
 TSURR =0. ;TEMP0 =273. ;PRESS0 =1.0E+05
 DVO1DT =0. ;DRH1DP = FILE
 EMISS =0. ;SCATT =0.
 RADIA =0. ;RADIB =0.
 ENUL = FILE ;ENUT =0.
 PRNDTL(U1)=1. ;PRNDTL(V1)=1.
 PRNDTL(W1)=1. ;PRNDTL(TEM1)=1.
 PRT(U1)=1. ;PRT(V1)=1.
 PRT(W1)=1. ;PRT(TEM1)=1.
 CP1 =1. ;CP2 =1.
   *  List of user-defined materials to be read by EARTH
    MATFLG=T;IMAT=2   
   *  Name
   *Ind. Dens.  Viscos.  Spec.heat  Conduct.  Expans.  Compr.
   *  
    90 2480 1.0081E-01 840 1.7000E+00 0.0
   *  
    161 1.0000E+06 0.0 1.0000E-06 1.0000E-06 0.0
 ************************************************************
  Group 10.Inter-Phase Transfer Processes
 ************************************************************
  Group 11.Initial field variables (PHIs)
 FIINIT(P1)=1.0E-10 ;FIINIT(U1)=1.0E-10
 FIINIT(V1)=1.0E-10 ;FIINIT(W1)=1.0E-10
 FIINIT(ENUL)=1.0E-10 ;FIINIT(BLOK)=1.
 FIINIT(PRPS)=2. ;FIINIT(DEN1)=1.0E-10
 FIINIT(TEM1)=1150.
 
 PATCH(GLASS ,INIVAL, 1, 20, 1, 8, 1, 20, 1, 1)
 INIT(GLASS ,BLOK,0. ,2. )
 INIT(GLASS ,PRPS,0. ,90. )
 
 PATCH(BLOK1 ,INIVAL, 13, 20, 1, 15, 1, 9, 1, 1)
 INIT(BLOK1 ,BLOK,0. ,3. )
 INIT(BLOK1 ,PRPS,0. ,161. )
 INIADD = F
 FSWEEP = 1
 NAMFI =CHAM
 ************************************************************
  Group 12. Patchwise adjustment of terms
  Patches for this group are printed with those
  for Group 13.
  Their names begin either with GP12 or &
 ************************************************************
  Group 13. Boundary & Special Sources
 
 PATCH(ING ,LOW , 1, 12, 1, 8, 1, 1, 1, 1)
 COVAL(ING ,P1 , FIXFLU ,3.626 )
 COVAL(ING ,U1 ,0. ,0. )
 COVAL(ING ,V1 ,0. ,0. )
 COVAL(ING ,W1 ,0. ,1.462E-03 )
 COVAL(ING ,TEM1,0. ,1150. )
 
 PATCH(WALL1 ,EAST , 12, 12, 1, 8, 1, 9, 1, 1)
 COVAL(WALL1 ,TEM1, FIXFLU ,-2000. )
 
 PATCH(WALL2 ,LOW , 13, 20, 1, 8, 10, 10, 1, 1)
 COVAL(WALL2 ,TEM1, FIXFLU ,-2000. )
 
 PATCH(WALL3 ,HIGH , 1, 20, 1, 8, 20, 20, 1, 1)
 COVAL(WALL3 ,TEM1, FIXFLU ,-2000. )
 
 PATCH(FIXV ,NORTH , 1, 20, 8, 8, 1, 20, 1, 1)
 COVAL(FIXV ,V1 , FIXVAL ,0. )
 
 PATCH(INA ,LOW , 1, 12, 9, 15, 1, 1, 1, 1)
 COVAL(INA ,P1 , FIXFLU ,0.303 )
 COVAL(INA ,U1 ,0. ,0. )
 COVAL(INA ,V1 ,0. ,0. )
 COVAL(INA ,W1 ,0. ,1. )
 COVAL(INA ,TEM1,0. ,1150. )
 
 PATCH(OUTA ,EAST , 20, 20, 9, 15, 10, 20, 1, 1)
 COVAL(OUTA ,P1 ,1000. ,0. )
 COVAL(OUTA ,U1 ,0. ,0. )
 COVAL(OUTA ,V1 ,0. ,0. )
 COVAL(OUTA ,W1 ,0. ,0. )
 COVAL(OUTA ,TEM1,0. ,1150. )
 
 PATCH(OUTG ,EAST , 20, 20, 1, 8, 10, 20, 1, 1)
 COVAL(OUTG ,P1 ,1000. ,0. )
 COVAL(OUTG ,U1 ,0. ,0. )
 COVAL(OUTG ,V1 ,0. ,0. )
 COVAL(OUTG ,W1 ,0. ,0. )
 COVAL(OUTG ,TEM1,0. ,1150. )
 
 PATCH(FLOOR ,SWALL , 1, 20, 1, 1, 1, 20, 1, 1)
 COVAL(FLOOR ,U1 , GRND2 ,0. )
 COVAL(FLOOR ,W1 , GRND2 ,0. )
 
 PATCH(HOTFLOOR,SOUTH , 1, 20, 1, 1, 1, 20, 1, 1)
 COVAL(HOTFLOOR,TEM1, FIXFLU ,-2000. )
 
 PATCH(BLOK1A ,CELL , 13, 20, 1, 15, 1, 9, 1, 1)
 COVAL(BLOK1A ,TEM1, FIXVAL ,1150. )
 XCYCLE = F
 EGWF = T
 WALLCO = GRND2
 ************************************************************
  Group 14. Downstream Pressure For PARAB
 ************************************************************
  Group 15. Terminate Sweeps
 LSWEEP = 30 ;ISWC1 = 1
 LITHYD = 1 ;LITFLX = 1 ;LITC = 1 ;ITHC1 = 1
 SELREF = T
 RESFAC =1.0E-03
 ************************************************************
  Group 16. Terminate Iterations
 LITER(P1)=20 ;LITER(U1)=20
 LITER(V1)=20 ;LITER(W1)=20
 LITER(TEM1)=20
 ENDIT(P1)=1.0E-03 ;ENDIT(U1)=1.0E-03
 ENDIT(V1)=1.0E-03 ;ENDIT(W1)=1.0E-03
 ENDIT(TEM1)=1.0E-03
 ************************************************************
  Group 17. Relaxation
 RELAX(P1,LINRLX,0.8)
 RELAX(U1,FALSDT,0.02)
 RELAX(V1,FALSDT,0.02)
 RELAX(W1,FALSDT,0.02)
 RELAX(ENUL,LINRLX,1.)
 RELAX(BLOK,LINRLX,1.)
 RELAX(PRPS,LINRLX,1.)
 RELAX(DEN1,LINRLX,1.)
 RELAX(TEM1,FALSDT,2.0E+04)
 OVRRLX =0.
 EXPERT = F ;NNORSL = F
 ************************************************************
  Group 18. Limits
 VARMAX(P1)=1.0E+10 ;VARMIN(P1)=-1.0E+10
 VARMAX(U1)=1.0E+06 ;VARMIN(U1)=-1.0E+06
 VARMAX(V1)=1.0E+06 ;VARMIN(V1)=-1.0E+06
 VARMAX(W1)=1.0E+06 ;VARMIN(W1)=-1.0E+06
 VARMAX(ENUL)=1.0E+10 ;VARMIN(ENUL)=-1.0E+10
 VARMAX(BLOK)=1.0E+10 ;VARMIN(BLOK)=-1.0E+10
 VARMAX(PRPS)=1.0E+10 ;VARMIN(PRPS)=-1.0E+10
 VARMAX(DEN1)=1.0E+10 ;VARMIN(DEN1)=-1.0E+10
 VARMAX(TEM1)=1.0E+10 ;VARMIN(TEM1)=-1.0E+10
 ************************************************************
  Group 19. Data transmitted to GROUND
 PARSOL = F
 ISG62 = 1
 CSG10   ='Q1'
 SPEDAT(SET,GXMONI,PLOTALL,L,T)
 SPEDAT(SET,MATERIAL,2,L,T)
 SPEDAT(SET,MATERIAL,90,L,T)
 SPEDAT(SET,MATERIAL,161,L,T)
 ************************************************************
  Group 20. Preliminary Printout
 ************************************************************
  Group 21. Print-out of Variables
 INIFLD = F ;SUBWGR = F
    * Y in OUTPUT argument list denotes:
    * 1-field 2-correction-eq. monitor 3-selective dumping      
    * 4-whole-field residual 5-spot-value table 6-residual table
 OUTPUT(P1,Y,N,Y,Y,Y,Y)
 OUTPUT(U1,Y,N,Y,Y,Y,Y)
 OUTPUT(V1,Y,N,Y,Y,Y,Y)
 OUTPUT(W1,Y,N,Y,Y,Y,Y)
 OUTPUT(ENUL,Y,N,Y,N,N,N)
 OUTPUT(BLOK,Y,N,Y,N,N,N)
 OUTPUT(PRPS,Y,N,Y,N,N,N)
 OUTPUT(DEN1,Y,N,Y,N,N,N)
 OUTPUT(TEM1,Y,N,Y,Y,Y,Y)
 ************************************************************
  Group 22. Monitor Print-Out
 IXMON = 3 ;IYMON = 3 ;IZMON = 10
 NPRMON = 100000 ;NPRMNT = 1 ;TSTSWP = -1
 UWATCH = T ;USTEER = T
 HIGHLO = F
 ************************************************************
  Group 23.Field Print-Out & Plot Control
 NPRINT = 100000 ;NUMCLS = 5
 NXPRIN = -1 ;IXPRF = 1 ;IXPRL = 10000
 NYPRIN = -1 ;IYPRF = 1 ;IYPRL = 10000
 NZPRIN = -1 ;IZPRF = 1 ;IZPRL = 10000
 XZPR = F ;YZPR = F
 IPLTF = 1 ;IPLTL = -1 ;NPLT = 1
 ISWPRF = 1 ;ISWPRL = 100000
 ITABL = 3 ;IPROF = 1
 ABSIZ =0.5 ;ORSIZ =0.4
 NTZPRF = 1 ;NCOLPF = 50
 ICHR = 2 ;NCOLCO = 45 ;NROWCO = 20
   No PATCHes yet used for this Group
 ************************************************************
  Group 24. Dumps For Restarts
 SAVE = T ;NOWIPE = T
 NSAVE =CHAM
STOP