	PROGRAM FURN
	REAL N2,C(5,13)
	DIMENSION EK(11,13),VRS(11),VRW(11),AMDA(11),TE(13)
	DIMENSION AM(11),TITLE1(6),TITLE2(6),TITLE3(6),TT(11),EPS(11)
	DIMENSION TS(11),TITLE0(6),TITLE4(16),UD(8,11)
	DATA C/1.3004,1.7003,1.5052,1.8728,1.3243,1.3038,1.7873,
     1  1.5223,1.8882,1.3318,1.3109,1.8627,
     2  1.5424,1.9552,1.3423,1.3205,1.9297,
     3  1.5654,2.0180,1.3544,1.3452,2.0411,1.6148,2.1143,1.3829,1.3716,
     4  2.1311,1.6680,2.1813,1.4114,1.3971,2.2035,1.7229,2.2358,1.4373,
     5  1.4202,2.2638,1.7769,2.2776,1.4612,1.4407,2.3136,1.8280,2.3027,
     6  1.4830,1.4587,2.3555,1.8761,2.3279,1.5018,1.4746,2.3915,1.9213,
     7  2.3530,1.5177,1.4888,2.4221,1.9628,2.3823,1.5328,1.5018,2.4484,
     8  2.0009,2.4158,1.5462/
      open(5,file='input')
      open(6,file='output')
	READ(5,113)TITLE1
	READ(5,113)TITLE2
	READ(5,113)TITLE3
	READ(5,113)TITLE0
	READ(5,113)TITLE4
	READ(5,100)SASPR,TL,CS
	READ(5,100)UC1,UH1,US1,UN1,UO1,UW1,HD1,GRAN1
	READ(5,100)UC2,UH2,US2,UN2,UO2,UW2,HD2,GRAN2
	READ(5,100)AOZ0,VLOZ,TLS,PSI,EKSI,EM,TREC
	READ(5,100)ETAK,ENTS,ENTA,D,REC
	SASTAV=0.
	NBROJ=0.
      STRANA=0
	JNN=6
	DO 154 JK=1,JNN
	SASTAV=((JK-1)*SASPR*HD2)/(HD1+(JK-1)*SASPR*HD2-(JK-1)*SASPR*HD1)
	SAS=1.-SASTAV
	STRANA=STRANA+1
	WRITE(6,101)TITLE0
	WRITE(6,117)STRANA
	SASTUS=(JK-1)*SASPR
	UC=SASTAV*UC1+SAS*UC2
	UH=SASTAV*UH1+SAS*UH2
	US=SASTAV*US1+SAS*US2
	UN=SASTAV*UN1+SAS*UN2
	UO=SASTAV*UO1+SAS*UO2
	UW=SASTAV*UW1+SAS*UW2
	UA2=1-UC2-UH2-US2-UN2-UO2-UW2
	UA1=1-UC1-UH1-US1-UN1-UO1-UW1
	UA=SASTAV*UA1+SAS*UA2
	GRAN=SASTAV*GRAN1+SAS*GRAN2
	IF(HD1.GT.0)GO TO 150
	HG2=34000*UC2+142000*(UH2-UO2/8)+10500*US2
	HD2=HG2-2500*(UW2+9*UH2)
	HG1=34000.*UC1+142000*(UH1-UO1/8)+10500*US1
	HD1=HG1-2500*(UW1-9*UH1)
150	CONTINUE
	HG2=HD2+2500*(UW2+9*UH2)
	HG1=HD1+2500*(UW1+9*UH1)
	HD=SASTAV*HD1+SAS*HD2
	HG=SASTAV*HG1+SAS*HG2
	VC2=1.867*UC
	VH2=11.2*UH+1.244*UW
	VS2=.7*US
	BR=D*(ENTS-ENTA)/(HD*ETAK)
	ROK=1
      ROK=1.309
	WRITE(6,123)D
123	FORMAT(//15X,' D = ',F12.5)
	BR1=BR*SASTAV/ROK
	BR2=BR*SAS
	SASTUT=1-SASTUS
	WRITE(6,102)SASTUS,SASTUT
	WRITE(6,120)BR,BR1,BR2
120	FORMAT(//15X,'BR = ',F12.5,/15X,'BR1= ',F12.5,/15X,'BR2= ',F12.5/)
	S=3.6*VLOZ/AOZ0
	WRITE(6,103)(TITLE1(I),I=1,6),UC1,UH1,US1,UN1,UO1,UW1,UA1,HD1,
     1     GRAN1
	WRITE(6,103)(TITLE2(I),I=1,6),UC2,UH2,US2,UN2,UO2,UW2,UA2,HD2,
     1    GRAN2
	WRITE(6,103)(TITLE3(I),I=1,6),UC,UH,US,UN,UO,UW,UA,HD,GRAN
	VO2=VC2+5.6*UH+VS2-.7*UO
      VN2=3.76*VO2+.8*UN
	VLM=VO2/.21
	VPS=VC2+VS2+.8*UN+3.76*VO2
	VPW=VPS+VH2
	WRITE(6,116)
	WRITE(6,104)
	DO 151 I=1,11
	AMDA(I)=1.+FLOAT(I-1)/10.
	VL=VLM*AMDA(I)
	AM(I)=AMDA(I)-1
	VRS(I)=VPS+AM(I)*VLM
	VRW(I)=VPW+AM(I)*VLM
	PCS=VC2/VRS(I)*100
	PCW=VC2/VRW(I)*100
 	POS=VO2*AM(I)/VRS(I)*100
 	POW=VO2*AM(I)/VRW(I)*100
	PHW=VH2/VRW(I)*100
	AA=VRW(I)/HD*1000.
	WRITE(6,114)AMDA(I),VL,VRS(I),VRW(I),PCS,POS,PCW,POW,PHW,AA
151   CONTINUE
C  ENTHALPY
	DO 156 I=1,11
	NBROJ=0
	T=0.000001
	AT=100.
	TS(I)=TLS
	Q0=HD+VLM*AMDA(I)*1.324*TL
	EMI=.95*UA/(1.+UA+1.3*AMDA(I)*VLM/VRW(I))
	RH2O=(11.2*UH+1.244*UW)/VRW(I)
	RN=RH2O+1.867*UC/VRW(I)
157	CONTINUE
	T=0.000001
	AT=100.
	DO 152 K=1,13
	IF(K.GT.4) AT=200
	T=T+AT
	TE(K)=T
	EK(I,K)=T*(C(1,K)*VN2+C(2,K)*VC2+C(3,K)*VH2+C(4,K)*VS2+C(5,K)*
     1VLM*AM(I))
	IF(EK(I,K).GE.Q0) GO TO 158
	TT(I)=T*Q0/EK(I,K)
158	CONTINUE
	IF(T.GT.TS(I)) GO TO 159
	ESUM=EK(I,K)*TS(I)/T
159	CONTINUE
152	CONTINUE
	QL=Q0+REC*ESUM
 	TT(I)=QL/(Q0/TT(I)+REC*ESUM/TS(I))
	EPSIC=((.78+1.6*RH2O)/SQRT(S)-.1)*(1.-.37*.001*(TT(I)+273.))*RN
     1      +5590/(((TT(I)+273.)*16.)**.667)*EMI
c	IF(UC1.GT..8)EPSIC=EPSIC+(UC-UC2)/UH*TT(I)/1000*.05
	EPSF=1.-EXP(-EPSIC*S)
c	IF(UC1.GT..8)EPSIC=EPSIC+(UC-UC1)/UH*TT(I)/1000*.2
	EPS(I)=EPSF/(EPSF+(1-EPSF)*EKSI*PSI)
	QSUM=BR*(Q0-(1.+REC)*ESUM)
	AOZ=1.76E10*QSUM/(EM*EPS(I)*EKSI*(TT(I)+273)**3*(TS(I)+273))*
     1   ((((TT(I)+273)/(TS(I)+273)-1.)/EM)**2)**.333
	IF(ABS(AOZ0-AOZ).LT..05*AOZ0)GO TO 160
	DTLS0=5.
	DTLS=DTLS0
	NBROJ=NBROJ+1
	IF(NBROJ.GT.150)GO TO 160
	IF(AOZ0.GT.AOZ) DTLS=-DTLS0
	TS(I)=TS(I)+DTLS
	GO TO 157
160	CONTINUE
	EMC=186.7*UC/VRW(1)
	CONC0=EMC
	ENC=12*UH/UC*EMC
	REAK=1.45*EXP(-1.E5/(346*(TT(I)+273)))
	PROTOK=BR*VRW(I)*(TT(I)+273)/273
	TPROV=VLOZ/PROTOK
	IF(I.EQ.1) CONC=.001*CONC0*EXP(REAK*TPROV)
	IF(I.GT.1) CONC=CONC1-.5*.001*CONC0*EXP(REAK*TPROV)
	IF(I.EQ.1) CONC1=CONC
	AA1=EMC
	AC1=.5*ENC
	AE1=(AMDA(I)-.99)*(EMC+.25*ENC)
	AF1=AMDA(I)*3.76*(EMC+.25*ENC)
	SUM=AA1+AC1+AE1+AF1
	NBROJK=0
	AK01=EXP(8.45-41.*(1000/(TT(I)+273)))
	AK02=AK01
	AK03=AK02
	AK04=AK03
	AK1=AK01*SQRT(SUM)
	AK2=AK02*SQRT(SUM)
	AK3=AK03*SQRT(SUM)
	AK4=SQRT(AK04)
170	AB1=AK1*AA1/SQRT(AE1)
	AD1=AK2*AC1/SQRT(AE1)
	AD1=ABS(AD1)
	AH1=AK3*AC1/SQRT(AD1)
	AG1=AK4*SQRT(AE1)*SQRT(AF1)
	AA1=AA1-AB1
	AC1=AC1-AD1-.5*AH1
	AE1=ABS(AE1)
	AF1=ABS(AF1)
	NBROJK=NBROJK+1
	IF(NBROJK.LT.5)GO TO 170
	UD(1,I)=AA1/SUM*100
	UD(2,I)=AB1/SUM*100
	UD(3,I)=AC1/SUM*100
	UD(4,I)=AD1/SUM*100
	UD(5,I)=AE1/SUM*100
	UD(6,I)=AF1/SUM*100
      UD(7,I)=AH1/SUM*100
	UD(8,I)=AG1/SUM*100
156	CONTINUE
	STRANA=STRANA+1
	WRITE(6,115)
	WRITE(6,117) STRANA
	WRITE(6,106) (AMDA(I),I=1,11)
	DO 155 K=1,13
	WRITE(6,107) TE(K),(EK(I,K),I=1,11)
155	CONTINUE
	WRITE(6,108)
	WRITE(6,110) (AMDA(I),I=1,11)
	WRITE(6,111) (TT(I),I=1,11)
C  FLAME RADIATION
	WRITE(6,109)
	WRITE(6,110) (AMDA(I),I=1,11)
	WRITE(6,112) (EPS(I),I=1,11)
	WRITE(6,118)
	WRITE(6,110) (AMDA(I),I=1,11)
	WRITE(6,119) (TS(I),I=1,11)
	STRANA=STRANA+1
	WRITE(6,121)
	WRITE(6,117) STRANA
	WRITE(6,110) (AMDA(I),I=1,11)
	DO 171 J=1,8
	WRITE(6,122) TITLE4(2*J-1),TITLE4(2*J),(UD(J,I),I=1,11)
171	CONTINUE
121	FORMAT(1H1,////5X,'COMBUSTION PRODUCTS BALANCE')
122	FORMAT(5X,2A2,2X,11F8.4)
154	CONTINUE
	STOP
100	FORMAT(8F10.1)
101	FORMAT(1H1,////,5X,'MIXING OF AVAILABLE FUELS'/
     1    ///5X,''
     2   /5X,'',6A2,'')
102	FORMAT(////15X,'MIXTURE RATIO   ',F5.3,' : ',F5.3//)
103	FORMAT(5X,6A2,'C=',F6.4,' H=',F6.4,' S=',F6.4,' N=',F6.4,
     1      ' O=',F6.4,' W=',F6.4,' A=',F6.4,' HD=',F6.0,' GR=',F5.3)
104	FORMAT(//5X,'LAMBDA      VL     VRS      VRW     CO2S      O2S'
     1         ,'    C O2W       O2W     H2OW      VRW-HD')
105   FORMAT(5X,F5.2,8F8.3)
115	FORMAT(1H1,////5X,'ENTHALPY OF COMBUSTION PRODUCTS')
106	FORMAT(//7X,'LAM-T',11F8.1)
107	FORMAT(5X,12F8.0)
108	FORMAT(///5X,'THEORETICAL COMBUSTION TEMPERATURE')
109	FORMAT(///5X,'FLAME RADIATION COEFFICIENT')
110	FORMAT(/5X,'LAM   ',11F8.3)
111	FORMAT(5X,'T degC',11F8.1)
112	FORMAT(5X,'EPS   ',11F8.5)
113   FORMAT(20A2)
114	FORMAT(5X,F5.3,9F9.4)
116	FORMAT(////,6X,'AIR AND COMBUSTION PRODUCTS')
118	FORMAT(///,5X,'TEMPERATURE AT THE FURNACE EXIT')
119	FORMAT(5X,'TF2 dC',11F8.1)
117	FORMAT(1H+,75X,'PAGE',F4.0)
	END


