TALK=T;RUN(1,1)
  DISPLAY
  This parameterised q1 defines a steady-state representation of a
  fire in a room having an open door and two apertures, through
  which air or smoke can escape.

  introduced late in 2007, and which prevents the satellite, when it
  writes the Q1 file at the end of a session, from removing the
  declarations, settings and relationships which the original q1
  contained.

  The formulation is unusual in having x as the vertical direction.
  Therefore the PIL boolean variable zUP has been introduced.
  By default it is false; but if it is set to true, changes are made
  which restore the more usual z-vertical orientation.

  In order to preserve the right-hand-rule convention, this entails:
  changing: x-direction data to z-direction i.e. high
  changing: y-direction data to x-direction i.e. wide
  changing: z-direction data to y-direction i.e. long

  This is effected by departing somewhat from the conventional
  expression of the position and size attributes in order that
  zUP can act through repeated lines:
    if(zUP) then
    dummy=zpos; zpos=xpos; xpos=ypos; ypos=dummy
    dummy=zsiz; zsiz=xsiz; xsiz=ysiz; ysiz=dummy
    endif
  where the initial settings of xpos etc are those which
  correspond to the original non-standard coordinate system,
  and the POSITION and SIZE lines are expressed for all objects as:
    > OBJ,    POSITION,    :xpos:, :ypos:, :zpos:
    > OBJ,    SIZE,        :xsiz:, :ysiz:, :zsiz:
  The ability to do those demonstrates the power of the PHOENICS
  Input Language, when its logic-handling fatures are exploited , to
  make changes which it would be extremely laborious to to effect
  via the graphical user interface.

  Another boolean variable is fourwall. This has been introduced so
  as to demonstrate that it suffices to introduce four complete
  walls, provided that the objects representing the apertures in
  them are introduced below them in the Q1. If this is not done, as
  was the case in earlier versions of PHOENICS, the user may waste
  time in creating four partial walls which leave space tor the
  aperture.

  fourwall=t is the recommended option; but it may interest some
  users to satisfy themselves that fourwall=f leads to the same
  solution.


  
  FIRE-DRIVEN ROOM AIR FLOWS
  ENDDIS
 ************************************************************
  Group 1. Run Title and Number
 ************************************************************
 ************************************************************
 
 TEXT( Room air flows; I201;  zUP=T           )
 
 ************************************************************
 ************************************************************
 
 IRUNN = 1 ;LIBREF = 0
 ************************************************************
  Group 2. Time dependence
 STEADY = T
 ************************************************************
  Group 3. X-Direction Grid Spacing
 CARTES = T
 NX = 30
 XULAST =6.4008
 XFRAC(1)=0.035752 ;XFRAC(2)=0.071504
 XFRAC(3)=0.107255 ;XFRAC(4)=0.143007
 XFRAC(5)=0.178759 ;XFRAC(6)=0.214511
 XFRAC(7)=0.250262 ;XFRAC(8)=0.286014
 XFRAC(9)=0.321766 ;XFRAC(10)=0.357518
 XFRAC(11)=0.38099 ;XFRAC(12)=0.404781
 XFRAC(13)=0.428571 ;XFRAC(14)=0.452381
 XFRAC(15)=0.47619 ;XFRAC(16)=0.5
 XFRAC(17)=0.535714 ;XFRAC(18)=0.571429
 XFRAC(19)=0.607143 ;XFRAC(20)=0.642857
 XFRAC(21)=0.678571 ;XFRAC(22)=0.714286
 XFRAC(23)=0.75 ;XFRAC(24)=0.785714
 XFRAC(25)=0.821429 ;XFRAC(26)=0.857143
 XFRAC(27)=0.892857 ;XFRAC(28)=0.928571
 XFRAC(29)=0.964286 ;XFRAC(30)=1.
 ************************************************************
  Group 4. Y-Direction Grid Spacing
 NY = 40
 YVLAST =8.5344
 YFRAC(1)=0.022392 ;YFRAC(2)=0.044783
 YFRAC(3)=0.067175 ;YFRAC(4)=0.089567
 YFRAC(5)=0.107143 ;YFRAC(6)=0.124719
 YFRAC(7)=0.151551 ;YFRAC(8)=0.178384
 YFRAC(9)=0.205217 ;YFRAC(10)=0.232049
 YFRAC(11)=0.258882 ;YFRAC(12)=0.285714
 YFRAC(13)=0.3125 ;YFRAC(14)=0.339286
 YFRAC(15)=0.366071 ;YFRAC(16)=0.392857
 YFRAC(17)=0.419643 ;YFRAC(18)=0.446429
 YFRAC(19)=0.473214 ;YFRAC(20)=0.5
 YFRAC(21)=0.517857 ;YFRAC(22)=0.544643
 YFRAC(23)=0.571429 ;YFRAC(24)=0.598214
 YFRAC(25)=0.625 ;YFRAC(26)=0.651786
 YFRAC(27)=0.678571 ;YFRAC(28)=0.702381
 YFRAC(29)=0.72619 ;YFRAC(30)=0.75
 YFRAC(31)=0.773809 ;YFRAC(32)=0.797619
 YFRAC(33)=0.821429 ;YFRAC(34)=0.848214
 YFRAC(35)=0.875 ;YFRAC(36)=0.901786
 YFRAC(37)=0.928571 ;YFRAC(38)=0.952381
 YFRAC(39)=0.97619 ;YFRAC(40)=1.
 ************************************************************
  Group 5. Z-Direction Grid Spacing
 PARAB = F
 NZ = 20
 ZWLAST =2.8956
 ZFRAC(1)=0.051803 ;ZFRAC(2)=0.103605
 ZFRAC(3)=0.151603 ;ZFRAC(4)=0.199601
 ZFRAC(5)=0.247598 ;ZFRAC(6)=0.295596
 ZFRAC(7)=0.343593 ;ZFRAC(8)=0.391591
 ZFRAC(9)=0.439589 ;ZFRAC(10)=0.487586
 ZFRAC(11)=0.535584 ;ZFRAC(12)=0.583581
 ZFRAC(13)=0.631579 ;ZFRAC(14)=0.68421
 ZFRAC(15)=0.736842 ;ZFRAC(16)=0.789474
 ZFRAC(17)=0.842105 ;ZFRAC(18)=0.894737
 ZFRAC(19)=0.947368 ;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(12)=KE ;NAME(13)=EP
 NAME(147)=PRPS ;NAME(148)=NPOR
 NAME(149)=EPKE ;NAME(150)=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,Y)
 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(KE,Y,Y,N,N,N,N)
 SOLUTN(EP,Y,Y,N,N,N,N)
 SOLUTN(PRPS,Y,N,N,N,N,N)
 SOLUTN(NPOR,Y,N,N,N,N,N)
 SOLUTN(EPKE,Y,N,N,N,N,Y)
 SOLUTN(TEM1,Y,Y,Y,N,N,Y)
 EPOR = 0 ;HPOR = 0 ;NPOR = 148 ;VPOR = 0
 PRPS = 147
 ************************************************************
  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(KE,N,Y,Y,Y,Y,N)
 TERMS(EP,N,Y,Y,Y,Y,N)
 TERMS(TEM1,N,Y,Y,Y,Y,Y)
 DIFCUT =0.5 ;ZDIFAC =1.
 GALA = F ;ADDDIF = F
 NEWENT = T
 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.189 ;TMP1 =0. ;EL1 = GRND4
 TSURR =0. ;TEMP0 =273. ;PRESS0 =1.0E+05
 DVO1DT =3.41E-03 ;DRH1DP =0.
 EMISS =0. ;SCATT =0.
 RADIA =0. ;RADIB =0.
 EL1A =0. ;EL1B =0. ;EL1C =0.
 ENUL =1.544E-05 ;ENUT = GRND3
 ENUTA =0. ;ENUTB =0. ;ENUTC =0.
 IENUTA = 0
 PRNDTL(U1)=1. ;PRNDTL(V1)=1.
 PRNDTL(W1)=1. ;PRNDTL(KE)=1.
 PRNDTL(EP)=1. ;PRNDTL(TEM1)=-0.0258
 PRT(U1)=1. ;PRT(V1)=1.
 PRT(W1)=1. ;PRT(KE)=1.
 PRT(EP)=1.314 ;PRT(TEM1)=1.
 CP1 =1005. ;CP2 =1.
 ************************************************************
  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(KE)=5.691294E-03 ;FIINIT(EP)=3.086278E-03
 FIINIT(PRPS)=-1. ;FIINIT(NPOR)=1.
 FIINIT(EPKE)=1. ;FIINIT(TEM1)=20.
 
 PATCH(OB8 ,INIVAL, 27, 30, 37, 37, 1, 20, 1, 1)
 INIT(OB8 ,NPOR,0. ,0. )
 
 PATCH(OB9 ,INIVAL, 1, 15, 21, 21, 1, 13, 1, 1)
 INIT(OB9 ,PRPS,0. ,198. )
 
 PATCH(OBA ,INIVAL, 16, 16, 1, 12, 1, 13, 1, 1)
 INIT(OBA ,PRPS,0. ,198. )
 
 PATCH(OBB ,INIVAL, 16, 16, 17, 27, 1, 13, 1, 1)
 INIT(OBB ,PRPS,0. ,198. )
 
 PATCH(^OBC ,INIVAL, 12, 0, 0, 0, 0, 0, 1, 1)
 INIT(^OBC ,PRPS,0. ,0. )
 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(KESOURCE,PHASEM, 1, 30, 1, 40, 1, 20, 1, 1)
 COVAL(KESOURCE,KE , GRND4 , GRND4 )
 COVAL(KESOURCE,EP , GRND4 , GRND4 )
 
 PATCH(BUOYANCY,PHASEM, 1, 30, 1, 40, 1, 20, 1, 1)
 COVAL(BUOYANCY,U1 , FIXFLU , GRND3 )
 COVAL(BUOYANCY,V1 , FIXFLU , GRND3 )
 COVAL(BUOYANCY,W1 , FIXFLU , GRND3 )
 
 PATCH(OB1 ,SWALL , 1, 30, 1, 1, 1, 20, 1, 1)
 COVAL(OB1 ,U1 , GRND2 ,0. )
 COVAL(OB1 ,W1 , GRND2 ,0. )
 COVAL(OB1 ,KE , GRND2 , GRND2 )
 COVAL(OB1 ,EP , GRND2 , GRND2 )
 
 PATCH(OB2 ,NWALL , 1, 30, 40, 40, 1, 20, 1, 1)
 COVAL(OB2 ,U1 , GRND2 ,0. )
 COVAL(OB2 ,W1 , GRND2 ,0. )
 COVAL(OB2 ,KE , GRND2 , GRND2 )
 COVAL(OB2 ,EP , GRND2 , GRND2 )
 
 PATCH(OB3 ,EWALL , 30, 30, 1, 40, 1, 20, 1, 1)
 COVAL(OB3 ,V1 , GRND2 ,0. )
 COVAL(OB3 ,W1 , GRND2 ,0. )
 COVAL(OB3 ,KE , GRND2 , GRND2 )
 COVAL(OB3 ,EP , GRND2 , GRND2 )
 
 PATCH(OB4 ,WWALL , 1, 1, 1, 40, 1, 20, 1, 1)
 COVAL(OB4 ,V1 , GRND2 ,0. )
 COVAL(OB4 ,W1 , GRND2 ,0. )
 COVAL(OB4 ,KE , GRND2 , GRND2 )
 COVAL(OB4 ,EP , GRND2 , GRND2 )
 
 PATCH(OB5 ,SOUTH , 14, 18, 1, 1, 14, 15, 1, 1)
 COVAL(OB5 ,P1 , FIXFLU ,1.79398 )
 COVAL(OB5 ,V1 ,0. ,1.508814 )
 COVAL(OB5 ,KE ,0. ,5.691294E-03 )
 COVAL(OB5 ,EP ,0. ,3.086278E-03 )
 COVAL(OB5 ,TEM1,0. ,15. )
 
 PATCH(OB6 ,NORTH , 14, 18, 40, 40, 14, 15, 1, 1)
 COVAL(OB6 ,P1 ,In-Form:source - see Grp 19)
 COVAL(OB6 ,KE ,0. ,3.642515E-03 )
 COVAL(OB6 ,EP ,0. ,1.58023E-03 )
 COVAL(OB6 ,TEM1,0. ,15. )
 
 PATCH(OB7 ,EAST , 30, 30, 34, 37, 1, 20, 1, 1)
 COVAL(OB7 ,P1 ,1000. ,0. )
 COVAL(OB7 ,U1 ,0. ,0. )
 COVAL(OB7 ,V1 ,0. ,0. )
 COVAL(OB7 ,W1 ,0. ,0. )
 COVAL(OB7 ,KE ,0. , SAME )
 COVAL(OB7 ,EP ,0. , SAME )
 COVAL(OB7 ,TEM1,0. ,15. )
 
 PATCH(OB8-L ,NWALL , 27, 30, 37, 37, 1, 20, 1, 1)
 COVAL(OB8-L ,U1 , GRND2 ,0. )
 COVAL(OB8-L ,V1 , FIXVAL ,0. )
 COVAL(OB8-L ,W1 , GRND2 ,0. )
 COVAL(OB8-L ,KE , GRND2 , GRND2 )
 COVAL(OB8-L ,EP , GRND2 , GRND2 )
 
 PATCH(OB8-H ,SWALL , 27, 30, 38, 38, 1, 20, 1, 1)
 COVAL(OB8-H ,U1 , GRND2 ,0. )
 COVAL(OB8-H ,W1 , GRND2 ,0. )
 COVAL(OB8-H ,KE , GRND2 , GRND2 )
 COVAL(OB8-H ,EP , GRND2 , GRND2 )
 
 PATCH(^OCC ,CELL , 12, 19, 0, 0, 0, 0, 1, 1)
 COVAL(^OCC ,TEM1, FIXFLU ,7.0E+04 )
 
 PATCH(OBD ,HWALL , 1, 30, 1, 40, 20, 20, 1, 1)
 COVAL(OBD ,U1 , GRND2 ,0. )
 COVAL(OBD ,V1 , GRND2 ,0. )
 COVAL(OBD ,KE , GRND2 , GRND2 )
 COVAL(OBD ,EP , GRND2 , GRND2 )
 XCYCLE = F
 EGWF = T
 WALLCO = GRND2
 BUOYA =0. ; BUOYB =0. ; BUOYC =-9.81
 BUOYD =3.41E-03
 BUOYE =20.
 ************************************************************
  Group 14. Downstream Pressure For PARAB
 ************************************************************
  Group 15. Terminate Sweeps
 LSWEEP = 200 ;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)=10
 LITER(V1)=10 ;LITER(W1)=10
 LITER(KE)=20 ;LITER(EP)=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(KE)=1.0E-03 ;ENDIT(EP)=1.0E-03
 ENDIT(TEM1)=1.0E-03
 ************************************************************
  Group 17. Relaxation
 RELAX(P1,LINRLX,1.)
 RELAX(U1,FALSDT,1.)
 RELAX(V1,FALSDT,1.)
 RELAX(W1,FALSDT,1.)
 RELAX(KE,LINRLX,0.5)
 RELAX(EP,LINRLX,0.5)
 RELAX(PRPS,LINRLX,1.)
 RELAX(EPKE,LINRLX,1.)
 RELAX(TEM1,FALSDT,1.0E+09)
 KELIN = 0
 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(KE)=1.0E+10 ;VARMIN(KE)=1.0E-10
 VARMAX(EP)=1.0E+10 ;VARMIN(EP)=1.0E-10
 VARMAX(PRPS)=1.0E+10 ;VARMIN(PRPS)=-1.0E+10
 VARMAX(NPOR)=1.0E+10 ;VARMIN(NPOR)=-1.0E+10
 VARMAX(EPKE)=1.0E+10 ;VARMIN(EPKE)=-1.0E+10
 VARMAX(TEM1)=100. ;VARMIN(TEM1)=-1.0E+11
 ************************************************************
  Group 19. Data transmitted to GROUND
 NAMGRD =FLAR
 GENK = T
 PARSOL = F
 CONWIZ = T
 ISG52 = 1
 ISG62 = 1
 SPEDAT(SET,DOMAIN,PHASE_1_MAT,I,0)
 SPEDAT(SET,FACETDAT,NUMOBJ,I,13)
 SPEDAT(SET,GXMONI,PLOTALL,L,T)
 SPEDAT(SET,OBJNAM,!OB1,C,WALL-LOW)
 SPEDAT(SET,OBJTYP,!OB1,C,PLATE)
 SPEDAT(SET,OBJNAM,!OB2,C,WALL-HIGH)
 SPEDAT(SET,OBJTYP,!OB2,C,PLATE)
 SPEDAT(SET,OBJNAM,!OB3,C,WALL-NORTH)
 SPEDAT(SET,OBJTYP,!OB3,C,PLATE)
 SPEDAT(SET,OBJNAM,!OB4,C,WALL-SOUTH)
 SPEDAT(SET,OBJTYP,!OB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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,Y,Y,N,Y,Y)
 OUTPUT(U1,Y,Y,Y,N,Y,Y)
 OUTPUT(V1,Y,Y,Y,N,Y,Y)
 OUTPUT(W1,Y,Y,Y,N,Y,Y)
 OUTPUT(KE,Y,N,Y,Y,Y,Y)
 OUTPUT(EP,Y,N,Y,Y,Y,Y)
 OUTPUT(PRPS,Y,N,Y,N,N,N)
 OUTPUT(NPOR,Y,N,Y,N,N,N)
 OUTPUT(EPKE,Y,N,Y,N,N,N)
 OUTPUT(TEM1,Y,N,Y,Y,Y,Y)
 ************************************************************
  Group 22. Monitor Print-Out
 IXMON = 3 ;IYMON = 3 ;IZMON = 4
 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 = F
 NSAVE =CHAM
STOP