       SUBROUTINE GASF 
C *** GAS FURNACE MODEL--SIMPLIFIED 
C * * * REVISED BY REMOVING PLENUM EQNS TO SEPARATE PROGRAM (RDF 10/31/8
C - - - CONSTANTS 
CMDK CPAIR
CMDK NZN
C - - - COMMON BLOCKS 
CMDK AFUE
CMDK BLK10
CMDK BLK81
CMDK BLK83
CMDK BLK85
CMDK BLK87
CMDK BLKCM1
CMDK BLKCM2
CMDK BLKGS1
CMDK BLKGS2
CMDK BLKHX
CMDK BLKOIL
CMDK BLKQGS
CMDK BLKQHX
CMDK BLKSK
CMDK BLKTVD
CMDK COLCT
CMDK COLLEC
CMDK DTRQ
CMDK FANBLK
CMDK FUEL1
CMDK GASFC
CMDK HUMIDC
CMDK IELCB
CMDK INDIC1
CMDK IZZQ
CMDK MZON1
CMDK OILB
CMDK OWETHR
CMDK PRT1
CMDK TEMP1
CMDK TIMEB
      DIMENSION AHXC(4),BCON(6),C10XS(6),DWAIR(2),DTM(3),EMISP(6),
     +          EXC(3),HACW(4),HAG(4),HAOFF(3),HAON(3,2),HAS(5),
     +          HGOFF(3),HGON(3,2),HXVP(6),QEXTT(3),RHOGOF(2),
     +          TFILM(3),TGO(3),TM(4),TMFU(6),TMFUH(6),TMFUL(6),WAOT(2),
     +          WGTO(2),XLDC(4),XLDCH(4,2),XLL(4),XV5(5),XVD(5),
     +          XVP(5),ZA2D(4),ZHX1D(4),ZHX2D(4,2)
C       CHANGED ALL BONNET(B) MNENOMICS TO PLENUM(PL) ON 11/11/83 
C  *  *  *
C       CHANGED ALL STACK(S) MNENOMICS TO VENT(V) ON 11/11/83 
C   NOTE:  DEFAULT VALUES FOR MANY OF THESE VARIABLES ARE SET IN
C          BLOCK DATA IN SUBPROGRAM BLKDAT.FOR
C  BCON - SEE WFLMIN ( UP TO SIX VALUES)
C  CPMACL VALUES ARE COMPOSITE MASS X CP FOR A-COIL MATERIALS,BTU/F
C  DTRJC,DTRPL - TEMP ELEVATION OF JACK AND PLEN SURF ABOVE TAIN, F
C                (USED FOR CALCULATING RADIATION HEAT LOSS)
C  EFFHXV - TEMPERATURE EFFECTIVENESS OF HEAT EXCH BETWEEN VENT AND
C           COMBUSTION AIR(SEE IDV), FRACTION
C  EMISJC AND EMISPL ARE EMISSIVITY OF JACK AND PLEN SURFACES 
C  FANTOF IS PLENUM-OUTLET TEMP AT BLOWER TURN OFF,F
C  FANTON IS PLENUM-OUTLET TEMP AT BLOWER TURN ON,F 
C  HAACL - H * TOTAL HT AREA IN A-COIL FOR BLOWER ON AND OFF,BTU/HR-F
C  HIPL2 - CONVECTIVE HEAT TRANSFER COEF AT INSIDE WALL OF PLENUM W/
C          BLOWER OFF, BTU/HR-FT2-F
C  HOJ   - NATURAL CONVECTION HEAT TRANSFER COEF AT OUTSIDE WALL OF 
C          PLENUM, BTU/HR-FT2-F
C    NOTE: INPUT HOJ ONLY WHEN JACK HAS DIFF CONV H OUTSIDE THAN PLEN 
C  IDV   - =1, COUNTER FLOW HEAT EXCHANGER BETWEEN COMB AIR AND VENT
C          OF A DIRECT-VENT FURNACE; =0 OTHERWISE
C  IELC=1  FOR ELECTRIC FURNACE; =0 OTHERWISE
C  IVFA - CALC PART LOAD FACTOR USING TDESL AND TDESH (NOT USED BY BCL)
C  LINWFL - =1 FOR LINEAR CHANGE IN OFF-CYCLE FLUE FLOW(SEE WFLMIN)
C  NACL  - < 50 TO GET (50 - NACL) DEBUG PRINTS FROM A-COIL MODEL
C  NFLT  - NO. OF TIME(TMFLT)-FLUE TEMP(TFLT) VALUES FOR CONDENSING
C          FURNACE
C  NHXITR - =1 FOR ITERATION ON HEAT EXCH METAL TEMPS;=0 OTHERWISE
C  NINTGF - NO. OF INTEGRATON STEPS WITHIN ONE TIME STEP FOR 
C           INTEGRATING ENERGY INPUT TO METAL OF CONDENSING HEAT
C           EXCHANGER
C  NTBB   - <50 TO PRINT (50-NTBB) DEBUG PRINTS OF MASS FLOWS; =0 
C           OTHERWISE
C  NTHX   - <50 TO PRINT (50-NTHX) DEBUG PRINTS FROM HEAT EXCHANGER 
C           MODEL
C  NTJJ   - < 50 TO PRINT (50-NTJJ) DEBUG PRINTS FROM JACKET MODEL
C  PCTJAC - HEAT LOSS FROM JACKET FOR CONDENSING OR ELECTRIC FURNACE,
C           PERCENT OF FIRING RATE
C  PCLOSE - CLOSING TIME PERIOD FOR THERMAL VENT DAMPER, SEC
C  POPEN  - OPENING TIME PERIOD FOR THERMAL VENT DAMPER, SEC
C    SET POPEN,PCLOSE=100.,120. FOR A THERM VENT DAMP 
C  RCLOSE - VEL HEAD LOSS WITH THERMAL VENT DAMPER CLOSED
C  RNSLS1 - R-FACTOR FOR INSULATION OF 1ST VERTICAL VENT SECTION
C           FOR AFUE TEST( NOTE XV(3) MUST BE < .16 FT TO USE RNSLS1)
C  ROPEN  - VEL HEAD LOSS WITH THERMAL VENT DAMPER OPEN
C  TCYCOF - TIME CONSTANT FOR GAS-SIDE FLOW DURING OFF CYCLE,HR
C  TCYCON - TIME CONSTANT FOR GAS-SIDE FLOW DURING ON CYCLE,HR
C    NOTE: BOTH TCYCOF AND TCYCON WERE NEVER USED AFTER DEVELOPMENT
C  TDESH  - DESIGN OUTDOOR TEMP DURING HEATING FOR THE BUILDING, F
C  TDESL  - DESIGN INDOOR TEMP DURING HEATING FOR THE BUILDING, F
C  TFILM  - FILM TEMP FOR CALC GAS PROPERTIES IN EACH OF THREE
C           HEAT EXCH SECTIONS, F  
C  TFLT   - FLUE TEMP VALUES AT TMFLT TIME FOR CONDENSING FURN, F
C  TFLUE  - INITIAL VALUE OF FLUE TEMP, F
C  THLOFF - HIGH LIMIT SENSOR SWITCH WILL OPEN WHEN SENSOR TEMP EXCEEDS
C           THIS VALUE (SEE HILIM.FOR LISTING), F
C  THLON  - HIGH LIMIT SWITCH WILL REMAIN OPEN UNTIL SENSOR TEMP FALLS 
C           BELOW THIS VALUE, F
C  TIME1  - BLOWER ON DELAY,SEC
C  TIME3  - BLOWER OFF DELAY,SEC 
C  TIMOVD IS TIME FOR VENT DAMPER TO CLOSE AFTER BURNER OFF,SEC 
C  TJSV   - INITIAL VALUE OF JACKET METAL TEMP, F
C  TMACSV - INITAL VALUE OF A-COIL METAL TEMP, F
C  TMFLT  - TIME AT TFLT FOR CONDENSING FURNACE FLUE TEMPS, HR
C  TMSV   - INITIAL VALUE OF METAL TEMPS IN 3 HEAT EXCH SECTIONS,F
C  TMV    - INITAL VALUE OF MATERIAL TEMPS IN 5 VENT SECTIONS,F
C  TSHLIM - > 0. HIGH-LIMIT SENSOR TIME CONSTANT, HR; =0. NO HILIMIT OP.
C  TVENTI - INITIAL GAS TEMP AT INLET TO 1ST VENT SECTION, F
C  TWFMAX - SEE WFLMIN
C  UAHXON,UAHXOF - UA FOR COND FURN WITH BLOWER ON OR OFF, BTU/HR-F
C  UAHXV  - UA FOR COUNTERFLOW HEAT EXCHANGER(SEE IDV), BTU/HR-F
C  VOUTSD IS FRACTION OF VENT EXPOSED TO OUTSIDE. 
C      =.5 FOR HOUSE A    = 0.0 FOR HOUSE B 
C  WFL1 -  FLUE FLOW AT 20 SEC AFTER BURNER OFF,FRACT OF "ON"CYCLE WGT
C  WFLMIN - MINIMUM FLUE FLOW W/ BURNER OFF:
C           >=0., IF LINWFL=1, THEN FLUE FLOW DECAYS LINEARLY FROM
C                 BURNER ON TO WFLMIN AT TIME TWFMAX BY INTERNALLY 
C                 SETTING VALUES FOR BCON.
C           IF LINWFL NOT = 1, FLUE FLOW DECAYS WITH A 2ND ORDER
C           POLYNOMIAL FROM A FLOW OF WFL1*WGT ON FIRST 20 SEC TO 
C           WFLMIN AT TWFMAX BY INTERNALLY SETTING VALUES FOR BCON.
C   NOTE: IF CYCLE TIME (TCYCLE) < TWFMAX, CALC FLUE FLOW FROM 
C         A POLYNOMIAL USING COEFFICIENTS BCON.
C         IF CYCLE TIME (TCYCLE) >= TWFMAX, FLUE FLOW = WFLMIN.
C  WGTHX  - MASS OF HEAT EXCHANGER METAL IN CONDENSING FURNACE, LBM
C  ZAJ    - THREE VALUES FOR MULTIPLIER ON CONVECTIVE HEAT TR COEF
C           AT INNER WALL OF JACKET FOR BLOWER SPEEDS OF HIGH,LOW,& OFF
C  ZKBND2 - NO. VEL HEAD LOST IN ELBOWS,ETC IN THE VENT WITH BURNER OFF 
C  ZRELFI - NO. OF VEL HDS LOST WITH FLOW INTO RELIEF OPENING 
C  ZRELFO - NO. OF VEL HDS LOST WITH FLOW OUT RELIEF OPENING(SPILLAGE)
C   MUST ADD 1.0 VEL HDS TO THESE VALUES FOR CONVERSION TO STATIC PRESS 
C  NOTE: ZRELFI=3,USED ORIG, WAS RED TO 2 (12/12/83) TO INCR RELIEF FLOW
C MISCELLANEOUS INFO:
C  TAIN   - FURNACE-ENVIRON TEMP 
C  TCOMB  - COMBUSTION-AIR TEMP
C  TRAREF - REF. TAIN USED FOR INITIAL CALCULATIONS 
C  TWBI IS WET BULB TEMP AT FURNACE ENVIRONMENT 
      NAMELIST /INPGSF/  BCON, CPMACL, DTRJC, DTRPL, EFFHXV,
     + EMISJC, EMISPL, FANTOF, FANTON, HAACL,
     + HIPL2, HOJ, IDV, IELC, IVFA,
     + LINWFL, NACL, NFLT, NHXITR, NINTGF,
     + NTBB, NTHX, NTJJ, PCLOSE, PCTJAC,    
     + POPEN, RCLOSE, RNSLS1, ROPEN, TCMOF1, 
     + TCMOF2, TCYCOF, TCYCON, TDESH, TDESL,
     + TFILM, TFLT, TFLUE, THLOFF,THLON,
     + TIME1,TIME3,TIMOVD, TJSV, TMACSV, 
     + TMFLT, TMPLSV, TMSV, TMV, TSHLIM,
     + TVENTI, TWFMAX, UAHXOF, UAHXON, UAHXV,
     + VOUTSD, WFL1, WFLMIN, WGTHX, ZAJ,
     + ZKBND2, ZRELFI, ZRELFO
C     
      ZKF(Z)=1.18E-4*(Z+FTR)**.774
      ZUF(ZZ)=6.948E-4*(ZZ+FTR)**.664 
C  *  *  *
      DATA BCON/6*0./
      DATA DTM/3*0./
      DATA DTMTOL/.01/
C  DTMTOL IS TOLERANCE ON CONVERGENCE OF CHANGE IN METAL TEMP 
      DATA DTRJC/10./
      DATA EMISJC/.87/
      DATA FANTON/0./
      DATA GC,FTR/32.174,459.7/ 
      DATA HOJ/0./
      DATA IDV/0./
      DATA IVFA/0/
      DATA LINWFL/0/
      DATA NTFAN/0/ 
      DATA NTHX,NHXITR,NACL,NTJJ,NTBB/100,1,100,100,100/
      DATA PCTJAC/0./
      DATA PCTPLN/0./ 
      DATA TCYCOF/0./
      DATA TFILM/1280.,780.,430./
      DATA TFLUSV/470./ 
      DATA TIMOVD/0./
      DATA TMHXC/70./ 
      DATA WFLMIN,TWFMAX/48.,.44444/
      DATA ZRELFI,ZRELFO/2.,2./
      DATA WH2O,WVH,THMIX,CPH,TH2O,RHOW,QHAIR,HVOUT 
     +/0.,0.,0.,0.,0.,39.75,0.,0./
C     
      IF(IVFA.EQ.1)PRTLD=1.-0.6*(TODDB-TDESL)/(TDESH-TDESL) 
      IF(PRTLD.LT.0.4)PRTLD=0.4 
      IF(PRTLD.GT.1.0)PRTLD=1.0 
C      
      IF(ISKIP.EQ.1)GO TO 160
      IF(NRDF1.GT.0)GO TO 2 
      GCTRM=2.*GC*5.2*3600.*3600. 
C      
       OPEN(12,FILE='TAPE12',STATUS='OLD',IOSTAT=IO12)
       IF(IO12.NE.0)THEN
         WRITE(60,*)' GASF: CANT OPEN TAPE12 WITH NAMELIST INPGSF'
         STOP ' GASF: CANT OPEN TAPE12 WITH NAMELIST INPGSF '
         END IF
       READ(12,INPGSF,END=999,IOSTAT=IO12)
       IF(IO12.NE.0)THEN
         WRITE(60,*)' GASF: TROUBLE ON NAMELIST INPGSF,IO12= ',IO12
         STOP ' GASF: TROUBLE ON NAMELIST INPGSF'
         ENDIF
C       WRITE(60,INPGSF)
       CLOSE(12)
    2 IF ((IDEBUG .GT. 0) .AND. ((IH2O .EQ.1) .OR. (IOIL .EQ. 0)))
     +  WRITE(60,3006) 
C  SET TIME BOUNDS FOR RETRIEVING AFUE TEMPS
      DTHAF=DTIME*.5
      DO 3 I=1,6
      TMFU(I)=TMAFU(I)/60.
      TMFUL(I)=TMFU(I)-DTHAF
    3 TMFUH(I)=TMFU(I)+DTHAF
      DTIMQ=DTIME 
      EHXC=0. 
      PI= 3.14159 
C *** INITIALIZE VALUES 
      IF (IOIL .EQ. 0) IFAN=0 
      IF ( IFAN .EQ. 1) IDAMP=0 
      IF (IFAN .EQ. 1) AFCL=0.
      IF (IFAN .EQ. 1) WD=WDPOW 
      AST = PI/4.*DVENT**2
      DATA NTIMRZ/0/
      IF(NTIMRZ.GT.0)GO TO 5
      IF(TIME1.EQ.0.)THEN 
      TIME1=0.00001 
      ELSE
          TIME1=TIME1/3600.-.000001 
          ENDIF 
      TIME3= TIME3/3600.-.00001 
      TIMOV=TIMOVD/3600.-.00001 
      XV1=XV(1) 
      EXCESV=EXCESS 
      IF(HOJ.EQ.0.)HOJ=HOPL1
      NTIMRZ=1
      AFCL=AFCL/144.
      AFCL2=(AFCL*.56)**2 
    5 AFDL=1. 
      XV(1)=XV1 
      EXCESS=EXCESV 
      ADIL2=ADIL**2 
      IF ((IDAMP .EQ.1).AND.(AFCL.LE. 0.)) AFDL=0.
      IF(AFCL.NE.0..AND.ADIL.NE.0.)AFDL=(AFCL*.56/ADIL)**2
      IF(TRAREF.GT.0.)THEN
          TCOMB=TRAREF
          TAIN=TRAREF 
          TWBI=TRAREF-3. 
      END IF
      THM=TCOMB 
      IBURN=1 
      IEFAN= 0
      IF(TIME1.LT.0.0001)IEFAN=1
      IF(FANTON.GT.0.)IEFAN=0 
      IEFNHX=IEFAN
      IFN=0 
      IFANCL= IFAN*ICL
      IB=1
      IH2O1=1-IH2O
      IDAMP1=1-IDAMP
      IDIL=1
      IDPON=0 
      IF (IFAN .EQ. 0) GO TO 6
      IDPON=3 
      IF (IH2O .EQ.0) IDPON=4 
6     IDPOFF=0
      IF ((IDAMP .EQ. 0) .AND. (IFAN .EQ. 0)) GO TO 8 
      IDPOFF=3
      IF (AFCL .GT. 0.) GO TO 7 
      IF (IH2O .EQ. 0) IDPOFF=4 
      GO TO 8 
7     IDPOFF=2
      IF (IH2O .EQ. 1) IDPOFF=1 
8     IF ((IFAN .EQ. 1).OR. (ADIL .GT. 0.)) GO TO 9 
      AFCL=0. 
      IDPON= 4
      IF(IFAN.EQ.1)WD=0.
      IDIL=0
      IF(IH2O .EQ. 1) IDPON=3 
      IDPOFF=IDPON
9     IDP=IDPON 
      INC=1 
      TAINR= TAIN+FTR 
      ZKAA=ZKF(TAIN)
      UAA=ZUF(TAIN) 
      RHOA= .075*530./TAINR 
      ZKGOF=ZKF(290.) 
      ZKG=ZKF(1040.)
      ZKA=ZKF(200.) 
      ZKGS=ZKF(140.)
C  VISCOSITY IN LBM/FT-HR 
      UG=ZUF(TFILM(2))
      UA=ZUF(200.)
      UGS=ZUF(140.) 
      IQEXT=0 
      ISAVE=0 
      EXCEST= EXCESS
      EXCESS=0. 
      CALL FUEL 
      IQEXT=1 
      ISAVE=1 
      EXCESS= EXCEST
C  WSA IS NO. OF MOLES OF STOICH AIR
C  WNF IS NO. OF MOLES OF FUEL
      HGO= ENINF+ENAIR*WSA
      QEXTT(1)= (HGO-HFACT-HFACTA*WSA+FB)*WNF 
      QEXTT(2)= PRTLD*QEXTT(1)
      WRITE(60,*) 'LINE 1680'
      WRITE(60,*) 'QEXTT(1)= ',QEXTT(1)
      QIN=QEXTT(1)*(1.-(PCTJAC+PCTPLN)*.01) 
      CALL FUEL 
      ISAVE=0 
      WAO=WSTO*(1.+EXCESS)
      WAOT(1)=WAO 
      WGQ=WAO+WFUEL 
      WRITE(60,3012)EXCESS,WSTO,WAO,WFUEL,WGQ
      IF (IDEBUG.GT.0)WRITE(60,3003)
      WNF=WNF/NCELLS
      WSTO= WSTO/NCELLS 
      WFUEL= WFUEL/NCELLS 
      WAO= WSTO*(1.+EXCESS) 
      WAOFF=WAO 
      WAOFT=WAOFF*NCELLS
      RHOGOF(1)= (.079+.075*EXCESS)/(1.105+EXCESS)*530. 
      WGO(1)= WAO+WFUEL 
      WGTO(1)= WGO(1)*NCELLS
      WGTOF= WAOFF*NCELLS 
      WNFWG=WNF/WGO(1)
      WMSA= WSA*(1.+EXCESS) 
      HGO= ENINF+ENAIR*WMSA 
      ASP= AS+WMSA*AAIR 
      BSP= BS+WMSA*BAIR 
      CSP= CS+WMSA*CAIR 
      DSP= DS+WMSA*DAIR 
      THGL= THG-200.
      WHG=QHINPT/QEXTT(1)*WGTO(1) 
      CPHG= (((ASP*THG+BSP)*THG+CSP)*THG-((ASP*THGL+BSP)*THGL+CSP)* 
     + THGL)/200.*WNFWG 
      WHGCP= WHG*CPHG 
      WVH= WFUEL*NCELLS*QHINPT/QEXTT(1) 
      TGO(1)= 2500. 
      IG=1
      IPR=0 
10     LGO=0
20    IGO=1 
C  SOLVE FOR TGO FROM KNOWN VALUE OF HGO
30    HGO1= ((ASP*TGO(IG)+BSP)*TGO(IG)+CSP)*TGO(IG)+DSP 
      DHGO= HGO1-HGO
      IF ( ABS(DHGO) .GE. TOLDH) THEN
        IF(IGO.EQ.1)THEN
          DHG1= DHGO
          TGO(IG)= TGO(IG)+1. 
          IGO=2 
          GO TO 30
        ELSE IF(IGO.EQ.2)THEN
          SLOPT=(-1.)*1. /(DHGO-DHG1) 
          TGO(IG)= TGO(IG)+SLOPT*DHGO 
          LGO= LGO+1
          IF ( LGO .LT. 7) GO TO 20 
          WRITE(60,3000)
          STOP ' GASF: NO CONVG IN TGO'
        ENDIF
      ENDIF
      TGO(IG)=TGO(IG)+SLOPT*DHGO
      TGMID=(TGO(IG)+500.)*.5 
      CPG(IG)= (((ASP*TGMID+BSP)*TGMID+CSP)*TGMID-((ASP*500.+BSP)*
     + 500.+CSP)*500.)/(TGMID-500.) 
      TGO(IG)=500.+(HGO-(((ASP*500.+BSP)*500.+CSP)*500.+DSP))/CPG(IG) 
     + -TCOMB 
      CPG(IG)= CPG(IG)*WNFWG
      CPFLU=(((ASP*TFLUE+BSP)*TFLUE+CSP)*TFLUE- 
     +((ASP*TVENTI+BSP)*TVENTI+CSP)*TVENTI)/(TFLUE-TVENTI+.000001)
     +*WNFWG
      IF(IPR.EQ.0)WRITE(60,3014)TGO(1),CPG(1),HGO,CPFLU
      IF ( IPR .EQ. 1) GO TO 70 
      IPR=1 
      EXC(1)= EXCESS
      FUELCS=FUELCM 
C *** PART LOAD CALCULATIONS
      EXC(2)= (1.+EXC(1))/PRTLD-1.
      EXCESS= EXC(2)
      FUELCM= FUELCM*PRTLD
      CALL FUEL 
      WNF= WNF/NCELLS 
      WSTO= WSTO/NCELLS 
      WFUEL= WFUEL/NCELLS 
      WAO= WSTO*(1.+EXC(2)) 
      RHOGOF(2)= (.079+.075*EXC(2))/(1.105+EXC(2))*530. 
      WGO(2)= WAO+WFUEL 
      WAOT(2)=WAO*NCELLS
      WGTO(2)= WGO(2)*NCELLS
      WNFWG= WNF/WGO(2) 
      WMSA= WSA*(1.+EXC(2)) 
      HGO= ENINF+ENAIR*WMSA 
      ASP= AS+WMSA*AAIR 
      BSP= BS+WMSA*BAIR 
      CSP= CS+WMSA*CAIR 
      DSP= DS+WMSA*DAIR 
      TGO(2)= 1000. 
      IG= 2 
      GO TO 10
70    TGO(3)= 0.
      FUELCM=FUELCS 
      QEXTT(3)= 0.
      EXC(3)= 0.
      PR=.7 
      PR2= SQRT(PR) 
      PR3= .7**.333 
      PR4=(.861+.7)**.25
      PRD4= PR**.4
      C1=U45*BARPSI/(NCELLS*14.7) 
      WAIRF(1)=CFM(1)*C1
      WAON=WAIRF(1)*NCELLS
      WAIRN= ECFMC2*C1
      WAOF=WAIRN*NCELLS 
      DWAIR(1)= WAIRF(1)-WAIRN
      WAIRF(2)=CFM(2)*C1
      DWAIR(2)=WAIRF(2)-WAIRN 
C - - - - - - -  SINGLE-SPEED BLOWER SET BELOW
      IBL=1 
      XLT=0.
      DO 80 I=1,3 
      XLT= XLT+XL(I)
   80 DCELLA(I)=DCELL-D(I)
      TODR=TODDB+FTR
      TODRS=TODR
      WSPEDS=9. 
      RHOD=.075*530./TODR 
      UAOD=ZUF(TODDB) 
      ZKAOD=ZKF(TODDB)
      REOD=DVENT*WSPEDS*5280.*RHOD/UAOD 
      HASOD=.26*PR**.3*REOD**.6*ZKAOD/DVENT 
      HIGH=XLT-XL(1)
      HIGH=HIGH+XV1 
      DO 90  I=3,5
90    HIGH= HIGH+XV(I)
      PAMBC=(-1.)*39.75*(XLT-XL(1))/5.2 
      IF (IDIRCT .EQ. 1) PHI=0. 
      IF (IFLOC.EQ.7) PHI=0.
      TCYCLE=DTIME
      TCYCQ=TCYCLE
      DTJ=0.
      DVENTP= DVENT*PI
      ZHX1= ZHX34*8.23*.5*SOOT
      ZHX2= ZHX*1.4*PR3*SOOT
      ZHX3= .023*PRD4/DVENT 
      ZA1= ZA*.05 
  102 ZA2=ZA14*.5*8.23*ZKA
  103 CONST1=DTIME/(CPM*RHOMT)
      CONST4=ADIL*SQRT(GCTRM*RHOA/ZRELFI) 
      IF(IDIL .EQ. 1) CONST4= 1./CONST4**2
      CONSV4=CONST4 
      CONST5= 1./(AST*AST*3600.*1203002.) 
      CONST6= GC*3600.**2/TAINR*(RHOA/UAA)**2/4.**.25 
      CONST7= .676*PR2/PR4*ZKAA 
      CONST8= CONST6*(4.*PR)**.25*DVENT**3
      CONST9= .47*ZKAA/DVENT
      CONS10= DTIME/DVENTP
      CONS20=1.E37
      CONS21= 1.
      IF(HAACL(1).EQ.0.)GO TO 104 
C  SET A-COIL TIME CONSTANTS
      HACL1=HAACL(1)/(CPAIR*WAIRF(1)*NCELLS)
      IF(HACL1.GT.173.)HACL1=173. 
      HACLON=1./EXP(HACL1)
      HACL2=HAACL(2)/(CPAIR*WAIRF(2)*NCELLS)
      HACLOF=HACL2*.5 
      DTMAC=0.
C   - - -  SET INITIAL RELIEF FLOW FOR CALC OF VENT HT TR COEF
  104 IF (IFAN .EQ. 0) WD= WGO(1)*NCELLS*IDIL 
      WV=WD+WGO(1)*NCELLS 
      AF11=1./GCTRM 
      IF ( IH2O .EQ. 0) GO TO 110 
C  WATER HEATER CONSTANTS 
      WH2O= WGO(1)*NCELLS 
      IF(IDIL .EQ. 1) WH2O= WD*PI*DH2O**2/(4.*ADIL) 
      FH2O= .3164*XLH2O/DH2O/(4.*WH2O/(PI*UAA*DH2O))**.25 
      IF (IDIL .EQ. 0) GO TO 105
      WH2O= WD*(PI*DH2O**2)/(4.*ADIL)*SQRT(ZRELFI/(ZRELFO+FH2O))
      FH2O= .3164*XLH2O/DH2O/(4.*WH2O/(PI*UAA*DH2O))**.25 
105   AH2O= XLH2O*PI*DH2O 
      CPH= CPAIR*WH2O 
      HH2O= (ZKAA*ZHX3*DVENT/DH2O*(4.*WH2O/(PI*UAA*DH2O))**.8)
      HAG(4)=1./EXP(AH2O*HH2O/CPH)
      EMISP(6)= EMIS(6)*.171D-8*.5*AH2O 
      HXVP(6)= AH2O*ZAVB*.47*ZKAA/DH2O*(CONST6*(4.*PR)**.25*DH2O**3 
     + *110.)**.25
      C10XS(6)= DTIME/(AH2O*CPMV(6)*RHOMV(6)) 
      CONS20=(ZRELFO+FH2O)*(4./(PI*DH2O**2))**2/(GCTRM*RHOA)
      CONS21= 1.+SQRT(CONST4/CONS20)
      CONS20=CONS20*.5/TAINR
      IF (AFCL .LE. 0.) GO TO 110 
      AH= PI*DH2O**2/4. 
      AH2= AH*AH
      FH2O2= FH2O+ZRELFO
      AF1= AH2/(AFCL2*FH2O2)
      AF2= ZRELFO*AH2/(ADIL2*FH2O2) 
      AF3= AH2/FH2O2*(1./AFCL2-ZRELFO/ADIL2)
      AF4= (1./AFCL2-ZRELFO/ADIL2)/GCTRM
      AF6= ZRELFO/(GCTRM*ADIL2) 
      AF7= -AF2 
      AF8= -AF6 
      AF10=AH2/FH2O2
      AF12= ZRELFI*AH2*TAINR/(FH2O2*ADIL2)
      AF13= ZRELFI*AF11/(RHOA*ADIL2)
      AF17= AH2/(FH2O2*AFCL2) 
  110 CONS23= (CONS21-1.)*SQRT(2.*TAINR)
      IF (IOIL .EQ. 0) WH2O=WH2O*.001 
      IF ((IH2O .EQ. 1) .OR. (AFCL .LE. 0.)) GO TO 115
      AF1= (1./AFCL2-ZRELFO/ADIL2)/GCTRM
      AF2= ZRELFO/(GCTRM*ADIL2) 
 115  CONTINUE
      AJP= AJ/NCELLS
      CONS13= DTIME/(CJ*RHOJ*AJP) 
      HJOA= AJP*(HOJ+EMISJC*.171E-8*4.*(TAIN+DTRJC*.5+459.7)**3)
      CALL PLENUM 
      XLS= XM 
      HIJON(1)= 0.
      HIJON(2)=0. 
      HIJOF=0.
      AJHX=0. 
C      WRITE(60,3020) (TFILM(I),I=1,3) 
      DO 120 I=1,3
      HGOFF(I)=ZHX1/D(I)*ZKGOF*AHX(I) 
      ZKG=ZKF(TFILM(I)) 
      UG=ZUF(TFILM(I))
      RE3=(WGO(1)/(BHX*UG))**.333 
      RE32=(WGO(2)/(BHX*UG))**.333
      HGON(I,1)=(ZHX2/D(I)*RE3*ZKG+HRAD(I))*AHX(I)
      HGON(I,2)=(ZHX2/D(I)*RE32*ZKG+HRAD(I))*AHX(I) 
C  NOTE ZHX1D VALUES CALC FOR EACH TIMESTEP LATER 
C    BY CHANGE ON 11/11/83
      ZHX1D(I)= HGOFF(I)/(CPAIR*(WAOFF+.000001))
      ZHX2D(I,1)=HGON(I,1)/(CPG(1)*WGO(1))
      ZHX2D(I,2)=HGON(I,2)/(CPG(2)*WGO(2))
      XLL(I)= XLS+XL(I) 
      XLS= XLL(I) 
      XLDC(I)= XLL(I)/DCELLA(I) 
      REA= (XLDC(I)*WAIRF(1)/(BHX*UA))**.8
      HAON(I,1)=ZA1*ZKA*REA*AHX(I)/XLL(I) 
  116 HAOFF(I)=ZA2*AHX(I)/DCELLA(I) 
  117 XLDCH(I,1)=HAON(I,1)/(CPAIR*WAIRF(1)) 
      ZA2D(I)= HAOFF(I)/(CPAIR*WAIRN) 
      AHXC(I)= CONST1/AHX(I)
      HIJON(1)=HIJON(1)+HAON(I,1) 
      REA= (XLDC(I)*WAIRF(2)/(BHX*UA))**.8
      HAON(I,2)=ZA1*ZKA*REA*AHX(I)/XLL(I) 
      XLDCH(I,2)= HAON(I,2)/(CPAIR*WAIRF(2))
      HIJON(2)=HIJON(2)+HAON(I,2) 
      HIJOF=HIJOF+HAOFF(I)
120   AJHX= AJHX+AHX(I) 
C *** LAST LUMP HAS ARBITARY GAP FOR HEAT TRANSFER
      ZHX1D(3)= ZHX1D(3)*D(3)/DGAPHT
      ZHX2D(3,1)= ZHX2D(3,1)*D(3)/DGAPHT
      ZHX2D(3,2)= ZHX2D(3,2)*D(3)/DGAPHT
      DO 130 I=1,3
      IF (ZHX2D(I,2) .GT. 173.) ZHX2D(I,2)=173. 
      ZHX2D(I,2)=1./EXP(ZHX2D(I,2)) 
      IF (ZHX1D(I) .GT. 173.) ZHX1D(I)=173. 
      ZHX1D(I)=1./EXP(ZHX1D(I)) 
      IF (ZHX2D(I,1) .GT. 173.) ZHX2D(I,1)=173. 
      ZHX2D(I,1)=1./EXP(ZHX2D(I,1)) 
      IF ( XLDCH(I,1) .GT. 173. ) XLDCH(I,1) =173.
      XLDCH(I,1)=1./EXP(XLDCH(I,1)) 
      IF ( XLDCH(I,2) .GT. 173.) XLDCH(I,2)= 173. 
      XLDCH(I,2)=1./EXP(XLDCH(I,2)) 
      IF (ZA2D(I) .GT. 173.) ZA2D(I)=173. 
  130 ZA2D(I)=1./EXP(ZA2D(I)) 
C CONVECTIVE HT COEF ON OUTSIDE OF VENT SECTIONS
      HAS(1)= ZAVB*CONST7*(CONST6*130./XV(1))**.25
C   FOR AFUE TEST, ADD INSULATION TO FIRST SECTION OF VENT
      IF(XV(3).LT..16)HAS(1)=1./(RNSLS1+1./HAS(1))
      HAS(2)= ZAVB*CONST9*(CONST8*110.)**.25
      HAS(3)= ZAVH*CONST7*(CONST6*90./XV(3))**.25 
      HAS(4)= ZAVA*CONST7*(CONST6*110./XV(4))**.25
      DATA NHAS/0/
      NHAS=NHAS+1 
      HAS(5)= HASOD 
C      IF(NHAS.LT.10)WRITE(60,3016)HAS
C  NOTE 2 X WGT FOW ASSUMED FOR VENT FLOW HERE
      RES= WV*4./UGS/DVENTP 
      HF= RES**.8*ZHX3*ZKGS*DVENTP*.5 
      F= .3164/RES**.25 
      DO 140 I=1,5
      XVD(I)= XV(I)*F/DVENT 
      C10XS(I)= CONS10/(XV(I)*CPMV(I)*RHOMV(I)) 
      XVP(I)= DVENTP*XV(I)
      EMISP(I)= EMIS(I)*.171E-8*.5*XVP(I) 
      HXVP(I)= XVP(I)*HAS(I)
140   XV5(I)= XV(I)/5.20
      XV5(2)=0. 
C     COMBINE HOR. WITH 1ST VERTICAL OF VENT
      HXVP(1)= HXVP(1)+HXVP(2)
      XVP(1)= XVP(1)+XVP(2) 
      XVD(1)= XVD(1)+XVD(2) 
      XV1SV=XV(1) 
      XV(1)= XV1+XV(2)
C  ASSUMES CP*RHO OF SECTIONS 1 AND 2 ARE THE SAME
      C10XS(1)= CONS10/(XV(1)*CPMV(1)*RHOMV(1)) 
      IEFAN1=1-IEFAN
      IBURN1= 1-IBURN 
      PUMPWP= PUMPW*QEXTT(1)/140000.
      RON= AOUT**(60.*DTIME)
      ROFF= AIN**(60.*DTIME)
      HACON(1)=0. 
      HACON(2)=0. 
      HACOFF=0. 
      FOIL=0. 
      FOILS=0.
      IMODE=1 
      IF(IOIL.NE.1)THEN
        IBGO=1
        CALL OILBR(ADIL,IBGO,IDIL,ZRELFI)
      ENDIF
C  -  -  -  -   -   -   -   -   -   -   -   -   - 
      HIJON(1)= HIJON(1)/AJHX*ZAJ(1)
      HIJON(2)=HIJON(2)/AJHX*ZAJ(2) 
      HIJOF=HIJOF/AJHX*ZAJ(3) 
C  EFFECT OF JACKET INSULATION
      HIJON(1)= AJP/(1./HIJON(1)+XJ/ZKJ)
      HIJON(2)= AJP/(1./HIJON(2)+XJ/ZKJ)
      HIJOF= AJP /(1./HIJOF+XJ/ZKJ) 
C * * * * * 
C  BEGIN CALCULATIONS AT EACH TIMESTEP
  160 CONTINUE
      WAIRF(1)=CFM(1)*C1
      WAON=WAIRF(1)*NCELLS
      DWAIR(1)=WAIRF(1)-WAIRN 
      WAIRF(2)=CFM(2)*C1
      DWAIR(2)=WAIRF(2)-WAIRN 
      IBURN1= 1-IBURN 
      IEFAN1= 1-IEFAN 
      IB=2-IAC1 
      IF(ISKIP.EQ.0)GO TO 170 
      IMODE= IBURN+2*IBURNO 
C  IMODE=1  --  BURNER JUST CAME ON 
C       =2  --  BURNER JUST WENT OFF
      IF(IMODE.EQ.1)GO TO 170
      IF(IMODE.EQ.2)GO TO 200
      IB= IB*IBURN+3*IBURN1 
C  SECOND STAGE BURNER CAME ON WHEN IB NE IBO 
      IF ( IB .NE. IBO) GO TO 180 
      ISWITH= (IEFAN-IEFANO)**2+1 
      IF(ISWITH.EQ.1)GO TO 260
      IF(ISWITH.EQ.2)GO TO 240
C     BURNER JUST CAME ON 
170   IDP=IDPON 
      IDPP=1
      IFN=0 
C  ITFL IS INDEX PAR FOR CONDENSING FURNACE 
      ITFL=0
      TCYCLE=DTIME
      TCYCQ=TCYCLE
180   CP=CPG(IB)
      WG=WGO(IB)
      WGT= WGTO(IB) 
      WAOQ=WAOT(IB) 
      WGTSV=WAOQ
C      QEXXT=QEXTT(IB)/NCELLS
C  SET FLUE FLOW CONSTANTS FOR OFF CYCLE
      IF(WFLMIN.GE.0..AND.LINWFL.NE.1.AND.BCON(1).EQ.0.)THEN
          WFL1A=WFL1
          IF(WFL1.LE.1.)WFL1A=WFL1*WGT
          BCON(3)=(WFL1A-WFLMIN)/(TWFMAX-DTIME)**2
          BCON(1)=WFLMIN+BCON(3)*TWFMAX**2
          BCON(2)=(-2.)*BCON(3)*TWFMAX
          ENDIF 
      IBQ=1 
      IBS=IB
      ZKBND=ZKBEND
      IF ((IFAN .EQ. 0).AND.(IOIL.EQ.0)) WD=WGT*IDIL
      QPILOP=0. 
      RHOG5=RHOGOF(IB)
      DO 190 I=1,3
190   HAG(I)= ZHX2D(I,IB) 
      GO TO 240 
C     BURNER JUST WENT OFF
200   IDP=IDPOFF
      IFN= IFANCL 
      IDPP=IDAMP1 
      IBQ=2 
      IB=3
      ZKBND=ZKBND2
C  NEXT THREE PARAMETER GET RESET BELOW (11/11/83)
      WG= WAOFF 
      WGT=WGTOF 
      WAOQ=WAOFT
      IF (IDAMP.EQ.1.AND.TIMOVD.EQ.0.)WD=WGT*(AFDL-1.)
      CP=CPAIR
      QPILOP=QPILOT
C      QEXXT=QPILOT/NCELLS 
      RHOG5= 39.75
      DO 210 I=1,3
210   HAG(I)= ZHX1D(I)
      TCYCLE=DTIME
      TCYCQ=TCYCLE
C *** DETERMINE ENTERING FLOWS TO HX
  240 WAIR=WAIRN+IEFAN*DWAIR(IBL) 
      CPWAIR= CPAIR*WAIR
      DO 250 I=1,3
250   HACW(I)= XLDCH(I,IBL)*IEFAN+ZA2D(I)*IEFAN1
      HACWO= (HACON(IBL)*IEFAN+HACOFF*IEFAN1) 
  260 TODR=TODDB+FTR
      POD=(-1.)*.075*530./TODR*(HIGH/5.2+0.5/GCTRM*(WSPED*5280.)**2)
      CPAIN=CPAIR*TCOMB 
      TCOMBR=TCOMB+FTR
      PAMB= PAMBC/TCOMBR
      PODPMB= POD-PAMB
C  SET FLUE FLOW WITH BURNER OFF
      IF(IBURN.EQ.0)THEN
          IF(WFLMIN.LT.0.)THEN
              DTFLU=TFLUE-TCOMB 
C  EQNS SET FOR QPILOT = 674 BTU/HR (AFUE VALUE FOR HOUSE A FURNACE)
              WGT=.00001
              IF(DTFLU.GT.39.2)WGT=EXP(3.616+.18*ALOG(DTFLU)) 
              IF(DTFLU.LT.39.2.AND.DTFLU.GT.0.) 
     +        WGT=EXP(5.68*ALOG(DTFLU)-16.57) 
              IF(WGT.GT.WGTSV)WGT=WGTSV 
              ENDIF 
          IF(WFLMIN.GE.0.)THEN
             IF(LINWFL.EQ.1)THEN
                 BCON(1)=WGTO(1)
                 BCON(2)=(WFLMIN-BCON(1))/TWFMAX
                 BCON(3)=0. 
                 ENDIF
          IF(TCYCLE.LE.TWFMAX)THEN
                 WGT=BCON(1)+TCYCLE*(BCON(2)+TCYCLE*(BCON(3)+ 
     +           TCYCLE*(BCON(4)+TCYCLE*(BCON(5)+TCYCLE*BCON(6))))) 
          ELSE
                 WGT=WFLMIN 
                 ENDIF
             ENDIF
          WG=WGT/NCELLS 
          WAOQ=WGT
          ENDIF 
C  -  - -  --    ---    ----
C   WITH TIME CONSTANT ON GAS-SIDE FLOW BELOW 
      IF(TCYCON.EQ.0..AND.TCYCOF.EQ.0.)GO TO 270
C  NOTE WAOQ (COMB AIR) SHOULD BE CORRECTED FOR DELAY, IF TCYCON USED 
C       WAOQ IS USED IN CALC MAKEUP AIR FOR INFILTRATION CALC 
      TCYC=TCYCLE+DTIME 
      DWGQ=WGO(IBS)-WAOFF 
      IF(IBQ.EQ.2)GO TO 266 
      IF(TCYCON.EQ.0.)GO TO 270 
C  BURNER ON
      RAT=TCYC/TCYCON 
      ETRM=1. 
      IF(RAT.LT.7.0) ETRM=1.-1./EXP(RAT)
      WG=WAOFF+ETRM*DWGQ
      WGT=WG*NCELLS 
      RAT=WGO(IBS)/WG 
      DO 262 I=1,3
      ZHXQ=ALOG(1./ZHX2D(I,IBS))
  262 HAG(I)=1./(EXP(ZHXQ*RAT)) 
      IF(IFAN.EQ.0.AND.IOIL.EQ.0)WD=WGT*IDIL
      GO TO 270 
C  DONT PERMIT TCYCOF OPERATION  11/11/83 
C   LEAVE CODE FOR NOW
  266 CONTINUE
      IF(TCYCOF.EQ.0.)GO TO 270 
C  BURNER OFF 
      RAT=TCYC/TCYCOF 
      ETRM=1.0
      IF(RAT.LT.7.0) ETRM=1.-1./EXP(RAT)
      WG=WGO(IBS)-DWGQ*ETRM 
      WGT=WG*NCELLS 
      RAT=WAOFF/WG
      DO 268 I=1,3
      ZHXQ=ALOG(1./ZHX1D(I))
      ZHXQ=ZHXQ*RAT 
      HAG(I)=0. 
      IF(ZHXQ.LT.7.0) HAG(I)=1./EXP(ZHXQ) 
  268 CONTINUE
      IF(IDAMP.EQ.1.AND.IMODE.EQ.2.AND.TIMOVD.EQ.0.)WD=WGT*(AFDL-1.)
C  END OF TIME CONSTANT CALC
C  -   -   -   -   -   -   -   -   -   -   -
  270 WV=WD+WGT 
      CPWG=CP*WG
      CPWGT=CP*WGT
      TCOMBO=TCOMB
      ITIMHX=0
  271 CONTINUE
      TG1=TCOMB+TGO(IB)+QPILOP/(CPWGT+.00001) 
      TG2=TG1 
      TA1= TRETP
C 
      IF(IELC.EQ.1)THEN 
C  ELECTRIC FURNACE - - - 
          CALL ELCFUR(IBURN,TCYCLE,WAON,TA1,PCTJAC,TA2,QINQ)
          QVSLOS=0. 
          QVLLOS=0. 
          QJACK=PCTJAC*QINQ*0.01/NCELLS 
          WV=0.00000001 
          WGT=0.00000001
          WD=0.00000001 
          TJ=TAIN 
          TM(1)=TAIN
          TM(2)=TAIN
          TM(3)=TAIN
          TG2=TG1 
          TAHX=TA2
          GO TO 319 
          ENDIF 
C  END OF ELECTRIC FURNACE - - - - -
      IF(WGTHX.GT.0.)THEN 
C  - - - - - - -
C  CONDENSING PWR-VENT FURNACE
      IF(IBURN.EQ.1)THEN
C  * * * * * * *  BURNER ON 
C GET FLUE TEMP 
          CALL TFLC 
          TFLUSV=TFLUE
C   GET ENERGY INPUT TO HX AND FLUE LOSSES FOR THIS TIMESTEP
          CALL QINHX(EHXC)
C  GET PLENUM TEMP WITH THERMAL LAG DUE TO HX METAL 
          CALL HXMTL(EHXC,TMHXC,TRETP,TA2)
C  SET VALUES FOR MISCELLANEOUS PARAMETERS
          TFLUE=TFLUSV
          QJACK=PCTJAC*QEXTT(1)*.01/NCELLS
      ELSE
C * * * * * * *  BURNER OFF 
          EHXC=0. 
          CALL HXMTL(EHXC,TMHXC,TRETP,TA2)
          TFLUE=88. 
          IF(TMHXC.LT.88.)TFLUE=TMHXC 
          QVSLOS=0. 
          QVLLOS=0. 
          QJACK=0.
          WV=0. 
          ENDIF 
      TJ=TAIN 
      TM(2)=TMHXC 
      TM(3)=TMHXC 
      TM(1)=TMHXC 
      TG2=TFLUE 
      TG1=TG2 
      TAHX=TA2
      GO TO 319 
      ENDIF 
C  * * * * * * * * * * *  END OF CONDENSING FURNACE 
      IF(IOIL.NE.1)THEN
        IBGO=2
        CALL OILBR(ADIL,IBGO,IDIL,ZRELFI)
      ENDIF
C  * * * HEAT EXCHANGER EQUATIONS 
C  TMSV IS MEAN METAL TEMP FOR LUMP AT LAST TIMESTEP
C  TM IS MEAN METAL TEMP FOR LUMP 
      DO 310 L=1,3
      NBQ=0 
      IF(NHXITR.EQ.0)DTM(L)=0.
  282 TM(L)=TMSV(L)+0.5*DTM(L)
      IF(IFN.NE.1)THEN
C *** FIND PROPER GAS TEMP LVG LUMP & HEAT TRANSFER 
        IF(IBURN.EQ.0)THEN
          TFILMG=.5*(TM(L)+.5*(TG2+TG1))
          ZKGOF=ZKF(TFILMG) 
          HGOFF(L)=ZHX1/D(L)*ZKGOF*AHX(L) 
          ZHX1D(L)=HGOFF(L)/(CPAIR*(WG+1E-6)) 
          IF(L.EQ.3)ZHX1D(3)=ZHX1D(3)*D(3)/DGAPHT 
          IF(ZHX1D(L).GT.173.)ZHX1D(L)=173. 
          HAG(L)=1./EXP(ZHX1D(L)) 
        ENDIF 
        TG2=(TG1-TM(L))*HAG(L)+TM(L)
        QG= CPWG*(TG1-TG2)
        GO TO 300 
      ENDIF
C *** POWER COMBUSTION WITH FAN OFF. SKIP GAS SIDE HT 
      TG2= TG1
      QG=0. 
C *** CALCULATE AIR SIDE HEAT TRANSFER
C *** FAN IS OFF-- NATURAL CONVECTION 
  300 TA2=TM(L)-(TM(L)-TA1)*HACW(L) 
      QA= CPWAIR*(TA2-TA1)
      QM= QG-QA 
      DTMQ=QM*AHXC(L) 
      IF(NTHX.LT.50)THEN
        WRITE(60,512)L,DTMQ,DTM(L),TMSV(L),TM(L) 
     +              ,TG1,TG2,TA1,TA2,HAG(L),HACW(L) 
        NTHX=NTHX+1
        ENDIF
  512 FORMAT(1X,'L,DTMQ,DTM(L),TMSV(L),TM(L)= ',I5,4G13.5,
     +/1X,'TG1,TG2,TA1,TA2,HAG(L),HACW(L)= ',6G13.5)
      IF(NHXITR.EQ.0)GO TO 306
      IF(ABS(DTMQ-DTM(L)).LE.DTMTOL)GO TO 306 
      DTM(L)=DTMQ 
      NBQ=NBQ+1 
      IF(NBQ.EQ.11)GO TO 306
      GO TO 282 
C *** END OF HX LUMP CAL.; RESET FOR NEXT LUMP
  306 TMSV(L)=TMSV(L)+DTM(L)
      IF(NHXITR.EQ.0)TM(L)=TMSV(L)
      IF(IBURN.EQ.1)TFILM(L)=.5*(TM(L)+.5*(TG1+TG2))
      QMHX(L)=QM
      TG1= TG2
      TA1=TA2 
  310 CONTINUE
C  * * * END OF HEAT EXCH CALC
      TFLUE=(TFLUSV+TG2)*0.5
      IF(IBURN.EQ.1)THEN
C  - - - - -
C  CALC SENSIBLE(QVSLOS) AND LATENT(QVLLOS) FLUE LOSSES 
C  NOT CODED FOR PART LOAD BURNER OPERATION 
C    (SEE COMMON BLOCK FUEL1) 
      CALL FUELA
      ELSE
          QVLLOS=0. 
          QVSLOS=CPAIR*WGT*(TFLUE-TCOMB)
      ENDIF 
      TFLUE=TG2 
      TFLUSV=TFLUE
C  *  *  *  JACKET LOSSES 
      HIJ= HIJOF*IEFAN1+HIJON(IBL)*IEFAN
      TAHX=TA2
      TAJAC=TA2 
      TAJ=0.5*(TRETP+TA2) 
      NTJQ=0
  311 TJ=TJSV+0.5*DTJ 
      QJACK=HJOA*(TJ-TAIN)
      QJACK1=HIJ*(TAJ-TJ) 
      TA2N=TA2-QJACK1/CPWAIR
      IF(TA2N.LT.TJ)THEN
          TA2N=TJ 
          QJACK1=CPWAIR*(TA2-TA2N)
      END IF
      QMJ=QJACK1-QJACK
      DTJQ=QMJ*CONS13 
      NTJQ=NTJQ+1 
      IF(NTJJ.LT.50)THEN
        WRITE(60,514)NTJQ,TJ,DTJQ,DTJ,TA2,TA2N 
        NTJJ=NTJJ+1
        ENDIF
  514 FORMAT(1X,' NTJQ,TJ,DTJQ,DTJ,TA2,TA2N= ',I5,5G13.5) 
      IF(ABS(DTJQ-DTJ).LE.DTMTOL)GO TO 312
      IF(NTJQ.GT.15)GO TO 312 
      DTJ=DTJQ
      TAJAC=TA2N
      GO TO 311 
  312 TJSV=TJSV+DTJ 
      TA2=TA2N
  319 CONTINUE
      TAJAC=TA2 
      IF(HAACL(1).EQ.0.)GO TO 316 
C  *  *  *  *  A-COIL IN PLENUM 
      HACL=HACLON*IEFAN+HACLOF*IEFAN1 
      TAAC=TA2
C HEAT EXCHANGE WITH A-COIL (Q=H*A*LOG MEAN DELTA TEMP W/ BLWR ON)
C                           (Q=H*A*AVG DELTAT W/ BLWR OFF)
      NBQ=0 
  313 TMAC=TMACSV+0.5*DTMAC 
      IF(IEFAN.EQ.1)TA2N=HACL*(TA2-TMAC)+TMAC 
      IF(IEFAN1.EQ.1)THEN 
           TA2N=(TA2+HACL*(2.*TMAC-TA2))/(1.+HACL)
           IF(TA2.GT.TMAC)THEN
                IF(TA2N.LT.TMAC)TA2N=TA2-HACL*(TA2-TMAC)
                IF(TA2N.LT.TMAC)TA2N=TMAC 
                 ENDIF
           IF(TA2.LT.TMAC)THEN
                IF(TA2N.GT.TMAC)TA2N=TA2-HACL*(TA2-TMAC)
                IF(TA2N.GT.TMAC)TA2N=TMAC 
                 ENDIF
      END IF
      QACL=CPWAIR*NCELLS*(TA2-TA2N) 
      DTMAQ=QACL*DTIME/CPMACL 
      IF(NACL.LT.50)THEN
        WRITE(60,586)NBQ,DTMAQ,DTMAC,TMACSV,TMAC,
     +              TA2,TA2N,HACL 
        NACL=NACL+1
        ENDIF
  586 FORMAT(1X,'NBQ,DTMAQ,DTMAC,TMACSV,TMAC,TA2,TA2N,HACL= '/
     +1X,I5,7G13.5) 
      IF(ABS(DTMAQ-DTMAC).LE.DTMTOL)GO TO 314 
      DTMAC=(DTMAQ+DTMAC)*0.5 
      TAAC=TA2N 
      NBQ=NBQ+1 
      IF(NBQ.LT.11)GO TO 313
  314 TMACSV=TMACSV+DTMAC 
      TA2=TA2N
      TAAC=TA2
C  *  *  *  *  *  PLENUM EQNS 
C 
  316 CALL PLENM1 
C  *  *  *  *  WATERHEATER VENT EQNS
  320 IF(IH2O1.NE.1)THEN
C  *  *  *  * 
C   ASSUMES WATERHEATER IS LOCATED BY FURNACE AND RECEIVES
C     FURNACE COMBUSTION AIR
        THGP=THG+TCOMB
        CPH= (WHGCP-CPAIR*WHG)*IHON+WH2O*CPAIR
        THMIX= ((WHGCP*THGP-WHG*CPAIN)*IHON+WH2O*CPAIN)/CPH 
        TH2O=(THMIX-THM)*HAG(4)+THM 
        QH2O= CPH*(THMIX-TH2O)
        QHAIR= (HXVP(6)+EMISP(6)*(THM+TCOMB+920.)**3)*(THM-TCOMB) 
        THM= C10XS(6)*(QH2O-QHAIR)+ THM 
        RHOW= 39.75*(1-IHON)+ RHOGOF(1)*IHON
      ENDIF
C     DILUTION AIR
      WV=WD+WGT+WH2O
      IF (WV .LE. 0.) GO TO 330 
      IF(WD.LT.0.)THEN
           CPWD=CP*WD 
           CPWDT=CPWD*TG1 
      ELSE
           CPWD=CPAIR*WD
C            **  ** 
C            ASSUMES RELIEF INLET IS CONNECTED TO COMBUSTION AIR
           CPWDT=CPWD*TCOMB 
      END IF
      CPF=CPWGT+CPWD+CPH
      TV1= (CPWGT*TG1+CPWDT+CPH*TH2O)/CPF 
      TVOR= TV1+FTR 
      RHOTRM=39.75
      IF(WD.LT.0.)RHOTRM=RHOG5
      RHOFT= WV/ (WGT/RHOG5+WD/RHOTRM+WH2O/RHOW)
      HFASF= HF/CPF 
      IF(IDV.EQ.0)GO TO 330 
      IF(ITIMHX.EQ.1)GO TO 330
C  *** COUNTERFLOW HEAT EXCHANGE BETWEEN COMBUSTION AIR AND VENT
      CMIN=CPAIR*WAO
      CRAT=CMIN/CPWG
      IF(CRAT.GT.1.0)CRAT=1.0 
      IF(EFFHXV.GE.0.1)GO TO 329
      EXPO=1.0/EXP(UAHXV*(1.0-CRAT)/CMIN) 
      EFFHXV=(1.-EXPO)/(1.-EXPO*CRAT) 
  329 TCOMB=EFFHXV*(TV1-TCOMBO)+TCOMBO
      TV1=TV1-EFFHXV*CRAT*(TV1-TCOMBO)
      ITIMHX=1
      GO TO 271
  330 CONTINUE
C 
C *** COLLECT DATA FOR WRITING
      IF(ICOLL.NE.0) THEN 
          CDATA(2)=TM(2)
          CDATA(3)=TJ 
          CDATA(4)=TFLUE
          CDATA(5)=TV1
C          CDATA 6  7  8  ... SEE BELOW 
          CDATA(9)=TM(1)
          CDATA(10)=TM(3) 
          CDATA(11)=WV
C                12...SEE PLENUM 
          CDATA(13)=TMPL
          CDATA(14)=WGT 
      ENDIF 
C 
C     L LUMPS AND NVER VERTICAL LUMPS WITH 90 BENDS IN BETWEEN
C *** FIRST VERTICAL LUMP 
C *** VENT LOSS ENTRANCE IS 1 VEL HEAD
C  VEL HD LOSSES ARE BASED ON 1 LB/HR IN BELOW EQNS 
      HVIN= CONST5/RHOFT*TVOR 
340   TAIR= TAIN
      TVENTI=TV1
      QS=0. 
      TV2=TODDB 
      DPB=0.
      DPF=0.
      L=1 
350   IF (WV .LE. 0.) GO TO 360 
C *** FIND LVG LUMP VENT TEMP 
      HFAS= HFASF*XV(L) 
      TV2=(TV1+HFAS*(2.*TMV(L)-TV1))/(1.+HFAS)
C 
C *** COLLECT CHIMNEY TEMPERATURES
      IF(ICOLL.NE.0) THEN 
          IF(3.LE.L.AND.L.LE.5) CDATA(L+3)=TV2
      ENDIF 
C 
      QS= CPF*(TV1-TV2) 
      TVA= (TV1+TV2)*.5 
C *** PRESS DROP
      RHOF= RHOFT/(TVA+FTR) 
      HV= CONST5/RHOF 
C  FRICTION PRESSURE DROP(DPF)
      DPF= DPF+HV*XVD(L)
C  ELEVATION PRESS DROP(DPB)
      DPB= RHOF*XV5(L)+DPB
C *** AIR SIDE HEAT TRANSFER--IF ANY
C *** NATURAL CONVECTION ALONG VERTICAL VENT
C *** FORCED CONVECTION OVER OUTDOOR VERTICAL VENT WHEN WSPED GT 0.;
C ***   OTHERWISE, NATURAL CONVECTION AT OUTDOOR SECTION
  360 HRAT=1. 
      HAVXP=HXVP(L) 
      IF(L.EQ.5)THEN
          IF(WSPED.EQ.0.)THEN 
C             USE NATURAL CONVECTION CORRELATION (RATIO TO HAS(1))
              DTMV=TMV(5)-TODDB 
              IF(DTMV.LE.0.)THEN
                  HRAT=0. 
              ELSE
                  HRAT=(TAINR/TODR)**.308/ZAVB*(DTMV*XV1SV/ 
     +                 (130.*XV(5)))**.25 
                  ENDIF 
              HAVXP=XVP(5)*HAS(1)*HRAT
          ELSE
              HRAT=(WSPED/WSPEDS)**.6*(TODRS/TODR)**.49 
              HAVXP=HRAT*HXVP(5)
              ENDIF 
          ENDIF 
      
      QAV= (HAVXP+EMISP(L)*(TMV(L)+TAIR+920.)**3)*(TMV(L)-TAIR) 
      IF(L.EQ.3)THEN
          QAVS=QAV*(1.-VOUTSD)
          QAV=QAVS+VOUTSD*(HXVP(L)+EMISP(L)*(TMV(L)+TODDB+920.)**3) 
     +    *(TMV(L)-TODDB) 
          ENDIF 
      QMS= QS-QAV 
      QMSV(L)=QMS 
      TMV(L)= QMS*C10XS(L)+TMV(L) 
C *** RESET FOR NEXT LUMP 
      TV1= TV2
C *** SECTION DONE: SET UP VALUES FOR NEXT SECTION
      GO TO (370,370,380,390,410),L 
C     1ST VERTICAL &HORIZONTAL DONE, FIND DP FOR 90 BENDS 
  370 IF(POPEN.NE.0.)THEN 
C  THERMAL VENT DAMPER IN VENT
          TCYCVD=TCYCLE 
          IBRNVD=IBURN
          CALL TVD
          ENDIF 
      DPF=DPF+(ZKBND+VHLTVD)*HV 
      L=3 
      QVENTB= QAV+QHAIR 
      IF(NRMVNT.EQ.1)THEN 
         IRMVT1=IRMVNT(1) 
         TAIR=TI(IRMVT1)
      ELSE IF (NRMVNT.EQ.2)THEN 
         IRMVT1=IRMVNT(1) 
         IRMVT2=IRMVNT(2) 
         TAIR=FRCVNT(1)*TI(IRMVT1)+FRCVNT(2)*TI(IRMVT2) 
         ENDIF
      GO TO 350 
C *** VERTICAL ATTIC SECTION
  380 TVH=TV2 
      QVNTLS=QAVS 
      TAIR= TATTC(NATVNT) 
      L=4 
      GO TO 350 
C *** VERTICAL OUTDOOR SECTION
390   L=5 
      TAIR= TODDB 
      QVENTA=QAV
      GO TO 350 
C *** END OF VENT CAL.
C *** TOP OF VENT LOSS=1 VEL HEAD+ 1 VEL FOR STATIC PRESS 
410   HVOUT= ZVT*HV 
C     NEW RELIEF FLOW 
      DPT= DPF+HVOUT+HVIN 
C ***  ***  SELECT VENT-CONFIGURATION OPTION
      IF(IDAMP.GT.0)THEN
          IF(IBURN.EQ.1)GO TO 414 
          IF(AFCL.GT.0.)GO TO 412 
          WV=0. 
          IF(TCYCLE.GT.TIMOV)GO TO 440
          GO TO 414 
          ENDIF 
      GO TO (412,412,430,440),IDP 
      GO TO 414 
  412 IF(TCYCLE.GT.TIMOV)GO TO (420,425)IDP 
  414 CON23P=CONS23/SQRT(TH2O+THMIX+920.) 
      GO TO (419),IOIL
      IBGO=3
      CALL OILBR(ADIL,IBGO,IDIL,ZRELFI)
C  IDP=0  OR  = GT 4
C  WITH OR WITHOUT WATER HEATER,  NO VENT DAMPER
419   CON21P= 1.+CON23P 
      CON22P=CON21P**2
      DPTA= DPT*CON22P+CONST4 
      DPTB= WGT*DPT*CON21P/DPTA 
      DPTC= (DPT*WGT**2+DPB+PODPMB)/DPTA
      SQTRM=DPTB**2-DPTC
      IF(SQTRM.GT.0.)GO TO 409
      GO TO 424 
  409 WD=(-1.)*DPTB+SQRT(SQTRM) 
424   WH2O= WD*CON23P 
      WV=WD+WGT 
      GO TO 440 
C  IDP=1
C  WATER HEATER EQNS NOT CHECKED YET(9/13/83) 
420   TH2OA= (TH2O+THMIX+920.)*.5 
      TG2R= TG2+FTR 
      RHOGP= 39.75/TG2R 
      DPTA= 1.+AF3*TG2R/TH2OA+AF4/(DPT*RHOGP) 
      DPTB= (WH2O+AF2*WGT*TG2R/TH2OA+AF6*WGT/(DPT*RHOGP))/DPTA
      DPTC= (WGT**2*TG2R/TH2OA*AF7+(PODPMB+DPB+AF8*WGT**2/RHOGP)/DPT)/
     + DPTA 
C     NEW WATERHEATER FLOW WITH VENT DAMPER INCOMPLETELY CLOSED 
      WV= -DPTB+SQRT(DPTB**2-DPTC)
      WH2O= SQRT((AF1*WV**2-AF2*(WGT -WV)**2)*TG2R/TH2OA) 
      IF (WV .LT. WGT) GO TO 440
C     FLOW COMES IN RELIEF OPENING TOO
      RHOP=39.75/TH2OA
      RHOD= WV/(WGT/RHOGP+(WV-WGT)/RHOA)
      ARHO= ZRELFI/(RHOA*ADIL2)+1./(RHOD*AFCL2) 
      DPTA= 1.+(AF10*RHOP+AF11/DPT)*ARHO
      DPTB= (WH2O-(AF12/TH2OA+AF13/DPT)*WGT)/DPTA 
      DPTC= ((AF12/TH2OA+AF13/DPT)*WGT**2+(PODPMB+DPB)/DPT)/DPTA
      DPTBC= DPTB**2-DPTC 
      IF (DPTBC .GE. 0.) GO TO 423
      WV=WGT
      GO TO 432 
423   WV= -DPTB+SQRT(DPTBC) 
432   WH2O= SQRT((AF12*(WV-WGT)**2+WV**2*AF17*TG2R)/TH2OA)
      GO TO 440 
C     NO WATERHEATER BUT VENT DAMPER INCOMPLETELY CLOSED
C  IDP=2
 425  RHOGP=39.75/(TG1+FTR )
      DPTA= DPT+AF1/RHOGP 
      DPTB=AF2*WGT/(RHOGP*DPTA) 
      DPTC= (DPB+PODPMB-AF2*WGT**2/RHOGP)/DPTA
      WV= -DPTB+SQRT(DPTB**2-DPTC)
      IF (WV .LT. WGT) GO TO 440
C     FLOW COMES IN RELIEF OPENING TOO
      RHOD=WV/(WGT/RHOGP+(WV-WGT)/RHOA) 
      DPTA= DPT+AF11*(1./(RHOD*AFCL2)+ZRELFI/(RHOA*ADIL2))
      DPTB= -WGT*AF2*1.5/(RHOA*DPTA)
C  WGT*DPTB DIVIDED BY DPTA ON 9/13/83 BELOW
      DPTC=(DPB+PODPMB-WGT*DPTB)/DPTA 
      DPTBC=DPTB**2-DPTC
      IF (DPTBC .GE. 0.) GO TO 433
      WV=WGT
      GO TO 440 
433   WV= -DPTB+SQRT(DPTBC) 
      GO TO 440 
C  IDP=3
430   WH2O= SQRT((-PODPMB-DPB)/(DPT+CONS20*(TH2O +THMIX+920.))) 
  440 CONTINUE
      IF(NTBB.LT.50)THEN
        WRITE(60,537)WD,WAOQ,WH2O,WVH,WV 
        NTBB=NTBB+1
        ENDIF
  537 FORMAT(1X,' WD,WAO,WH2O,WVH,WV= ',5G13.5) 
C  WAIRB IS USED IN INFILTRATION LOSS IN BASEMENT 
      WAIRB= WD+WAOQ+WH2O-WVH*IHON
C  SET WD FOR NEXT TIMESTEP 
      WD=WV-WGT 
      QDRAFT=0. 
C  QDRAFT IS SPILLAGE HEAT FLOW 
C   ASSUMES RELIEF INLET IS CONNECTED TO COMBUSTION AIR 
      IF(WD .LT. 0.)THEN
          QDRAFT=(-1.)*CP*WD*(TFLUE-TCOMB)*IDIRCT1
          ENDIF 
      IF(IDPP.NE.1)THEN
C  WG DECAYS TO WGMIN AFTER BURNER SHUTS OFF WITH VENT DAMPER 
C  *  *  *
        RR= (ROFF*IEFAN1+RON*IEFAN) 
        IF ( WG .LT. WGMIN) RR=1. 
        WG= WG*RR 
        WGT= WGT*RR 
        IF (AFDL .LE. 0.) WD=(-1.)*WGT
        CPWG= CPWG*RR 
        CPWGT= CPWGT*RR 
      ENDIF
      IBURNO=IBURN
      IEFANO=IEFAN
      IBO=IB
      IF(INC.LT.500)INC=INC+1 
      QEXT=QEXTT(IB)
      EXCESS=EXC(IB)
      QUSEFL=CPAIR*DTRA*(WAON*IEFAN+WAOF*(1.-IEFAN))
     ++(QJACK+QPLEN)*NCELLS 
      IF(IELC.EQ.1)THEN 
          QEXT=QINQ 
          QPILOP=0. 
          IF(IBURN.EQ.0)THEN
              QEXT=0. 
              QPILOP=QINQ 
              ENDIF 
          ENDIF 
      QINPUT=QEXT*IBURN+QPILOP+WAON*CPAIR*DTBLR*IEFAN
      IF(IBURN.NE.1)GO TO 470 
      IF(TCYCLE.GT.TMFUL(1).AND.TCYCLE.LT.TMFUH(1))TFON1C=TG2 
      IF(TCYCLE.GT.TMFUL(2).AND.TCYCLE.LT.TMFUH(2))TFON2C=TG2 
      EFFSSA=0. 
      IF(TCYCLE.GT.TMFUL(3))THEN
           DTRA2C=DTRA
           TFSSC=TG2
           EFFSSA=100.*QUSEFL/QINPUT
           ENDIF
      GO TO 480 
  470 IF(TCYCLE.GT.TMFUL(4).AND.TCYCLE.LT.TMFUH(4))TFFF3C=TG2 
      IF(TCYCLE.GT.TMFUL(5).AND.TCYCLE.LT.TMFUH(5))TFFF4C=TG2 
      IF(TCYCLE.GT.TMFUL(6).AND.TCYCLE.LT.TMFUH(6))DTRA4C=DTRA
  480 TFFF5C=TG2
      DTRA3C=DTRA 
      TCYP=TCYCLE*60. 
      TCYCLE=TCYCLE+DTIME 
      TCYCQ=TCYCLE
C         SET THE STATE OF THE BLOWER FOR THE NEXT TIMESTEP      
      IF(IBURN.EQ.1)THEN
          IF(TIME1.GT.0.)THEN 
                 IF(TCYCLE.GT.TIME1)IEFAN=1 
                 ENDIF
          IF(FANTON.GT.0.)THEN
                 IF(TPL.GT.FANTON)IEFAN=1 
                 ENDIF
      ELSE
          IF(TIME3.GT.0.)THEN 
                 IF(TCYCLE.GT.TIME3)IEFAN=0 
                 ENDIF
          IF(FANTOF.GT.0.)THEN
                 IF(IEFANO.EQ.1.AND.TPL.LT.FANTOF)THEN
                             NTFAN=NTFAN+1
                             IF(NTFAN.LT.5)WRITE(60,3015)TCYCLE,TPL
                             IEFAN=0
                             ENDIF
                 ENDIF
      ENDIF 
      IEFNHX=IEFAN
C      
C         SET THE STATE OF THE HI-LIMIT SWITCH, IF ANY
      IF(TSHLIM.GT.0.)THEN
        CALL HILIM(THLOFF,THLON,TSHLIM,TPL)
      ENDIF        
      ISKIP=1 
      IF ( INC .GT. IDEBUG)GO TO 481
      WRITE(60,3002) TCYP,TG2,DTRA,WGT,WD,WV,TM(2),TVENTI,TVH,
     +TAHX,TAJAC,TAAC,TPL,TJ,TMAC,TMPL,IBURN,IEFANO 
C     WRITE(60,3021) (TM(I),I=1,3)
      IF((IH2O.EQ.1).OR.(IOIL.EQ.0))WRITE(60,3005) THMIX,TH2O,THM,QHAIR,
     +               QH2O
     + ,WVH,WHG,CPH,THETA,FOIL,FOILS,IHON 
  481 CONTINUE
      RETURN
  999 STOP ' GASF: EOF ON TAPE12 WITH NAMELIST INPGSF'
3000  FORMAT (/' NO CONV IN TGO') 
 3002 FORMAT(1X,F7.2,F7.0,F6.1,3F7.1,F7.0,9F7.1,2I4)
 3003 FORMAT(1H1,'TIME,MN   TG2   DTA   WGT    WD     WV',
     +'     TM(2) TVENTI   TVH   TAHX   TAJAC  TAAC', 
     +'   TAPL    TJ    TMAC   TMPL  BURN BLWR')
3004  FORMAT (//'  TOTAL HEAT INPUT=',F10.0,' BTU/HR'/) 
3005  FORMAT (F7.2,2F10.2,2F10.1,2F10.3,4F10.4,I5)
3006  FORMAT ('  THMIX      TH2O      THM      QHAIR      QH2O' 
     + ,'      WVH       WHG       CPH     THETA     FOIL      FOILS
     +    IHON'/) 
3010  FORMAT ('  WD,WDP,DWD,WGT,FOILS,TCYCLE',6F10.3/)
 3012 FORMAT(1X,'EXCESS AIR= ',F7.4,' STOIC AIR FLOW= ',
     +F7.1,' LB/HR   TOTAL AIR FLOW= ',F7.1,' LB/HR'/ 
     +'  FUEL FLOW= ',F7.1,' LB/HR',' FLUE FLOW= ',F7.1,' LB/HR') 
 3014 FORMAT(1H0,'TGO(1),CPG(1),HGO,CPFLU= ',4G13.5)
 3015 FORMAT(1H0,'BLOWER OFF AT TIME,PLEN TEMP= ',2G13.5) 
 3016 FORMAT(1H0,'HAS= ',6G13.5)
 3017 FORMAT(1H0,'TCYCLE,TG1= ',2G13.5) 
 3019 FORMAT(1X,'TFILM IN GAS SIDE OF HX= ',3F8.0)
 3020 FORMAT(1X,'TFILM USED FOR PROP CALC= ',3F8.0) 
 3021 FORMAT(1X,'TM= ',3F8.0) 
      END 
