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

  gr ou y 1
  msg the solid regions, displayed via the prl values
  con prl y 1 fi;0.1;pause
  msg the velocity vectors
  vec y 1;pause;vec off;con off;red
  msg temperature contours
  con temp y 1 fi;0.01
  enduse
  DISPLAY
   The following cases concern the calculation of the temperature
   field within and around several metal plates and blocks, over
   which and around which air is flowing. The conductivity of the
   metal is supplied by the field named PRL, the information for
   is transferred to EARTH via the GREX-called subroutine GXPRL.

   The geometry and flow are depicted diagramatically below:
    ____________________________________________________________
    |             Zero Pressure OUTLET3            ^            |
    |----->                                      NX5 cells      |
    |                                            1.0m           |
    |                                              |       Zero |
    |----->                             <--0.2m--> |       Pressure
    |                                   _________  v       OUTLET1
    |Air                                |BLOCK 2 | ^            |
    |INLET1                             |NZ6+NZ7 | 0.2m NX4     |
    |(WIN,T1IN)       __________________|_cells__| v    cells   |
    |----->     ^0.05m|  | P L A T E 2        |  |              |
    |           v NX3 |P |____________________|P |              |
    |           ^     |l |                    |l |              |
    |----->    1.0 m  |a |                    |a |              |
    |          NX1+NX2|t |      <-1.0m->      |t |              |
    |          cells  |e |      ________      |e |              |
    |           |     |  | ^  ^ |BLOCK1| ^    |  |              |
    |           |     |1 | |  | |NZ4   |0.5m  |3 |              |
    |_adiabatic_v_____|__|_|__|_|NX1___|_v____|__|___adiabatic__|
                           Air          Zero
                  (UIN,T2IN) INLET2       Pressure OUTLET2

                      NZ2 cells                NZ7 cells
    <----2.0m--------><  ><----- 2.0 m ------><  ><----2.0 m --->
         NZ1 cells   0.05m  NZ3+NZ4+NZ5+NZ6   0.05m    NZ8 cells
                                cells

        _
    ^   /|
    |  y (1.0m)
    x /
    |/
     -- z -->

   Solution for the air-flow is performed first in isolation from
   the heat-transfer problem: all of the different heat-transfer
   cases are based upon this flow-field. The flow-field, once
   obtained, is frozen, and the heat-transfer problem is solved.

   Users might find it instructive to try varying the inlet
   velocities, and thereby vary the amount of cooling or heating of
   the plates and blocks by the air. In particular, reduction of UIN
   will cause BLOCK1 to become much hotter. Similarly, the strength
   of the heat sources, their location, and the conductivities,
   heat capacities and densities of the plates can be adjusted
   to produce rather different problems. Imperfect contact between
   the plates and blocks might be simulated by introducing the
   relevant surface porosities with values less than one in
   appropriate places.
  ENDDIS
 ************************************************************
  Group 1. Run Title and Number
 ************************************************************
 ************************************************************
 
 TEXT(Conjugate Heat Transfer Problem 2       )
 
 ************************************************************
 ************************************************************
 
 IRUNN = 1 ;LIBREF = 261
 ************************************************************
  Group 2. Time dependence
 STEADY = T
 ************************************************************
  Group 3. X-Direction Grid Spacing
 CARTES = T
 NX = 26
 XULAST =2.25
 XFRAC(1)=0.044444 ;XFRAC(2)=0.088889
 XFRAC(3)=0.133333 ;XFRAC(4)=0.177778
 XFRAC(5)=0.222222 ;XFRAC(6)=0.266667
 XFRAC(7)=0.311111 ;XFRAC(8)=0.355556
 XFRAC(9)=0.4 ;XFRAC(10)=0.444444
 XFRAC(11)=0.451852 ;XFRAC(12)=0.459259
 XFRAC(13)=0.466667 ;XFRAC(14)=0.496296
 XFRAC(15)=0.525926 ;XFRAC(16)=0.555556
 XFRAC(17)=0.6 ;XFRAC(18)=0.644444
 XFRAC(19)=0.688889 ;XFRAC(20)=0.733333
 XFRAC(21)=0.777778 ;XFRAC(22)=0.822222
 XFRAC(23)=0.866667 ;XFRAC(24)=0.911111
 XFRAC(25)=0.955556 ;XFRAC(26)=1.
 ************************************************************
  Group 4. Y-Direction Grid Spacing
 NY = 1
 YVLAST =1.
 YFRAC(1)=1.
 ************************************************************
  Group 5. Z-Direction Grid Spacing
 PARAB = F
 NZ = 38
 ZWLAST =6.1
 ZFRAC(1)=0.032787 ;ZFRAC(2)=0.065574
 ZFRAC(3)=0.098361 ;ZFRAC(4)=0.131148
 ZFRAC(5)=0.163934 ;ZFRAC(6)=0.196721
 ZFRAC(7)=0.229508 ;ZFRAC(8)=0.262295
 ZFRAC(9)=0.295082 ;ZFRAC(10)=0.327869
 ZFRAC(11)=0.330601 ;ZFRAC(12)=0.333333
 ZFRAC(13)=0.336066 ;ZFRAC(14)=0.363525
 ZFRAC(15)=0.390984 ;ZFRAC(16)=0.418443
 ZFRAC(17)=0.445902 ;ZFRAC(18)=0.473361
 ZFRAC(19)=0.50082 ;ZFRAC(20)=0.528279
 ZFRAC(21)=0.555738 ;ZFRAC(22)=0.582787
 ZFRAC(23)=0.609836 ;ZFRAC(24)=0.636885
 ZFRAC(25)=0.663934 ;ZFRAC(26)=0.666667
 ZFRAC(27)=0.669399 ;ZFRAC(28)=0.672131
 ZFRAC(29)=0.704918 ;ZFRAC(30)=0.737705
 ZFRAC(31)=0.770492 ;ZFRAC(32)=0.803279
 ZFRAC(33)=0.836066 ;ZFRAC(34)=0.868852
 ZFRAC(35)=0.901639 ;ZFRAC(36)=0.934426
 ZFRAC(37)=0.967213 ;ZFRAC(38)=1.
 ************************************************************
  Group 6. Body-Fitted Coordinates
 ************************************************************
  Group 7. Variables: STOREd,SOLVEd,NAMEd
 ONEPHS = T
 NAME(1)=P1 ;NAME(3)=U1
 NAME(7)=W1 ;NAME(14)=TEMP
 NAME(149)=PRL ;NAME(150)=BLOK
    * 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,N,N,N,N,N)
 SOLUTN(U1,Y,N,N,N,N,N)
 SOLUTN(W1,Y,N,N,N,N,N)
 SOLUTN(TEMP,Y,Y,Y,N,N,Y)
 SOLUTN(PRL,Y,N,N,N,N,Y)
 SOLUTN(BLOK,Y,N,N,N,N,Y)
 IVARBK = 14 ;ISOLBK = 1
 PRNITS= F ;OPTRLX= F ;NOSIP= F ;ALLVBC= F
 DBSOLV= F ;IMPINI= F ;EARL1D= F
 ************************************************************
  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(TEMP,N,Y,Y,Y,Y,Y)
 DIFCUT =0.5 ;ZDIFAC =1.
 GALA = F ;ADDDIF = F
 ISOLX = -1 ;ISOLY = -1 ;ISOLZ = 1
 ************************************************************
  Group 9. Properties used if PRPS is not
  stored, and where PRPS = -1.0 if it is!
 RHO1 =1. ;TMP1 =0.
 EL1 =0.
 TSURR =0. ;TEMP0 =0.
 PRESS0 =0.
 DVO1DT =0. ;DRH1DP =0.
 EMISS =0. ;SCATT =0.
 RADIA =0. ;RADIB =0.
 ENUL =2.0E-05 ;ENUT =9.999999E-04
 PRNDTL(TEMP)=-GRND1
 PRLH1A =0. ;PRLH1B =0.
 PRLH1C =0.
 PRT(TEMP)=1.
 CP1 =1. ;CP2 =1.
 ************************************************************
  Group 10.Inter-Phase Transfer Processes
 ************************************************************
  Group 11.Initial field variables (PHIs)
 FIINIT(P1)=READFI ;FIINIT(U1)=READFI
 FIINIT(W1)=READFI ;FIINIT(TEMP)=READFI
 FIINIT(PRL)=READFI ;FIINIT(BLOK)=READFI
 
 PATCH(PLTE1 ,INIVAL, 1, 13, 1, 1, 11, 13, 1, 1)
 INIT(PLTE1 ,PRL ,0. ,0.04 )
 INIT(PLTE1 ,BLOK,0. ,2. )
 
 PATCH(PLTE2 ,INIVAL, 11, 13, 1, 1, 14, 25, 1, 1)
 INIT(PLTE2 ,PRL ,0. ,0.04 )
 INIT(PLTE2 ,BLOK,0. ,2. )
 
 PATCH(PLTE3 ,INIVAL, 1, 13, 1, 1, 26, 28, 1, 1)
 INIT(PLTE3 ,PRL ,0. ,1.0E-03 )
 INIT(PLTE3 ,BLOK,0. ,2. )
 
 PATCH(INAIR ,INIVAL, 1, 10, 1, 1, 14, 25, 1, 1)
 INIT(INAIR ,BLOK,0. ,4. )
 
 PATCH(BLOCK1 ,INIVAL, 1, 5, 1, 1, 18, 21, 1, 1)
 INIT(BLOCK1 ,PRL ,0. ,0.04 )
 INIT(BLOCK1 ,BLOK,0. ,3. )
 
 PATCH(BLOCK2 ,INIVAL, 14, 16, 1, 1, 24, 28, 1, 1)
 INIT(BLOCK2 ,PRL ,0. ,0.04 )
 INIT(BLOCK2 ,BLOK,0. ,5. )
 INIADD = F
 FSWEEP = 50
 NAMFI =flow
 ************************************************************
  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(INLET1 ,LOW , 1, 26, 1, 1, 1, 1, 1, 1)
 COVAL(INLET1 ,P1 , FIXFLU ,5. )
 COVAL(INLET1 ,U1 ,0. ,0. )
 COVAL(INLET1 ,W1 ,0. ,5. )
 COVAL(INLET1 ,TEMP,0. ,20. )
 
 PATCH(INLET2 ,WEST , 1, 1, 1, 1, 14, 17, 1, 1)
 COVAL(INLET2 ,P1 , FIXFLU ,1. )
 COVAL(INLET2 ,U1 ,0. ,1. )
 COVAL(INLET2 ,W1 ,0. ,0. )
 COVAL(INLET2 ,TEMP,0. ,50. )
 
 PATCH(OUTLET1 ,HIGH , 1, 26, 1, 1, 38, 38, 1, 1)
 COVAL(OUTLET1 ,P1 ,1000. ,0. )
 COVAL(OUTLET1 ,U1 ,0. ,0. )
 COVAL(OUTLET1 ,W1 ,0. ,0. )
 COVAL(OUTLET1 ,TEMP,0. , SAME )
 
 PATCH(OUTLET2 ,WEST , 1, 1, 1, 1, 22, 25, 1, 1)
 COVAL(OUTLET2 ,P1 ,1000. ,0. )
 COVAL(OUTLET2 ,U1 ,0. ,0. )
 COVAL(OUTLET2 ,W1 ,0. ,0. )
 COVAL(OUTLET2 ,TEMP,0. , SAME )
 
 PATCH(OUTLET3 ,EAST , 26, 26, 1, 1, 2, 37, 1, 1)
 COVAL(OUTLET3 ,P1 ,1000. ,0. )
 COVAL(OUTLET3 ,U1 ,0. ,0. )
 COVAL(OUTLET3 ,W1 ,0. ,0. )
 COVAL(OUTLET3 ,TEMP,0. , SAME )
 
 PATCH(PLT1W1 ,CELL , 1, 13, 1, 1, 10, 13, 1, 1)
 COVAL(PLT1W1 ,W1 , FIXVAL ,0. )
 
 PATCH(PLT1U1 ,CELL , 1, 13, 1, 1, 11, 13, 1, 1)
 COVAL(PLT1U1 ,U1 , FIXVAL ,0. )
 
 PATCH(PLT2W1 ,CELL , 11, 13, 1, 1, 14, 25, 1, 1)
 COVAL(PLT2W1 ,W1 , FIXVAL ,0. )
 
 PATCH(PLT2U1 ,CELL , 10, 13, 1, 1, 14, 25, 1, 1)
 COVAL(PLT2U1 ,U1 , FIXVAL ,0. )
 
 PATCH(PLT3U1 ,CELL , 1, 13, 1, 1, 26, 28, 1, 1)
 COVAL(PLT3U1 ,U1 , FIXVAL ,0. )
 
 PATCH(PLT3W1 ,CELL , 1, 13, 1, 1, 25, 28, 1, 1)
 COVAL(PLT3W1 ,W1 , FIXVAL ,0. )
 
 PATCH(BLK1W1 ,CELL , 1, 5, 1, 1, 17, 21, 1, 1)
 COVAL(BLK1W1 ,W1 , FIXVAL ,0. )
 
 PATCH(BLK1U1 ,CELL , 1, 5, 1, 1, 18, 21, 1, 1)
 COVAL(BLK1U1 ,U1 , FIXVAL ,0. )
 
 PATCH(BLK2W1 ,CELL , 14, 16, 1, 1, 23, 28, 1, 1)
 COVAL(BLK2W1 ,W1 , FIXVAL ,0. )
 
 PATCH(BLK2U1 ,CELL , 14, 16, 1, 1, 24, 28, 1, 1)
 COVAL(BLK2U1 ,U1 , FIXVAL ,0. )
 
 PATCH(HEATSOR ,CELL , 6, 6, 1, 1, 13, 13, 1, 1)
 COVAL(HEATSOR ,TEMP, FIXFLU ,1. )
 
 PATCH(VELUR1 ,PHASEM, 1, 26, 1, 1, 1, 10, 1, 1)
 COVAL(VELUR1 ,U1 ,130. , SAME )
 COVAL(VELUR1 ,W1 ,190. , SAME )
 
 PATCH(VELUR2 ,PHASEM, 14, 26, 1, 1, 11, 28, 1, 1)
 COVAL(VELUR2 ,U1 ,130. , SAME )
 COVAL(VELUR2 ,W1 ,190. , SAME )
 
 PATCH(VELUR3 ,PHASEM, 1, 26, 1, 1, 29, 38, 1, 1)
 COVAL(VELUR3 ,U1 ,130. , SAME )
 COVAL(VELUR3 ,W1 ,190. , SAME )
 
 PATCH(VELUR4 ,PHASEM, 1, 10, 1, 1, 14, 25, 1, 1)
 COVAL(VELUR4 ,U1 ,13.013 , SAME )
 COVAL(VELUR4 ,W1 ,12.012001 , SAME )
 
 PATCH(HSORBL1 ,CELL , 3, 3, 1, 1, 19, 20, 1, 1)
 COVAL(HSORBL1 ,TEMP, FIXFLU ,0.15 )
 XCYCLE = F
 EGWF = T
 WALLCO = GRND2
 ************************************************************
  Group 14. Downstream Pressure For PARAB
 ************************************************************
  Group 15. Terminate Sweeps
 LSWEEP = 51 ;ISWC1 = 1
 LITHYD = 1 ;LITFLX = 1 ;LITC = 1 ;ITHC1 = 1
 SELREF = T
 RESFAC =1.0E-02
 ************************************************************
  Group 16. Terminate Iterations
 LITER(TEMP)=-100
 ENDIT(TEMP)=1.0E-03
 ************************************************************
  Group 17. Relaxation
 RELAX(P1,LINRLX,1.)
 RELAX(U1,LINRLX,1.)
 RELAX(W1,LINRLX,1.)
 RELAX(TEMP,LINRLX,1.)
 RELAX(PRL,LINRLX,1.)
 RELAX(BLOK,LINRLX,1.)
 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(W1)=1.0E+06 ;VARMIN(W1)=-1.0E+06
 VARMAX(TEMP)=1.0E+10 ;VARMIN(TEMP)=-1.0E+10
 VARMAX(PRL)=1.0E+10 ;VARMIN(PRL)=-1.0E+10
 VARMAX(BLOK)=1.0E+10 ;VARMIN(BLOK)=-1.0E+10
 ************************************************************
  Group 19. Data transmitted to GROUND
 PARSOL = F
 ISG62 = 1
 ************************************************************
  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,N,N,N,N,N,N)
 OUTPUT(U1,N,N,N,N,N,N)
 OUTPUT(W1,N,N,N,N,N,N)
 OUTPUT(TEMP,Y,N,Y,Y,Y,Y)
 OUTPUT(PRL,Y,N,Y,N,N,N)
 OUTPUT(BLOK,Y,N,Y,N,N,N)
 ************************************************************
  Group 22. Monitor Print-Out
 IXMON = 1 ;IYMON = 1 ;IZMON = 22
 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 = 16
 NZPRIN = -1 ;IZPRF = 8 ;IZPRL = 30
 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
 
 PATCH(MAP1 ,CONTUR, 1, 26, 1, 1, 1, 38, 1, 1)
 PLOT(MAP1 ,TEMP,0. ,20. )
 ************************************************************
  Group 24. Dumps For Restarts
 SAVE = T ;NOWIPE = F
 NSAVE =CHAM
STOP