# solution
# Variables
# basis one day operation
# Cl2 is the limiting component
n1 = 4536./71 #[kmol] Cl2 charged
# 1mol MCA requires 1 mol Cl2, so
n2 = 5000/94.5 # [kmol] Cl2 used for MCA production
# Calculation
# 1 mol DCA requires 2 mol of Cl2
n3 = 263*2./129 #[kmol] Cl2 used for DCA production
n4 = n2+n3 # total Cl2 used
a = n4*100/n1 # conversion %age
b = n2*100/n4 # yield % of MCA
s = n2/n3
# Result
print "Percentage conversion = ",a
print " Percentage yield of MCA = ",b
print " selectivity of MCA = ",s
# solution
# Variables
m = 700. #[kg] ONT charged to reactor (basis)
m1 = 505*.99 # [kg] OT produced
# Calculation
m2 = (4*137.*500)/(4.*107) #[kg] ONT required
m3 = m*.98 # [kg] ONT reacted
n1 = m1*100/m3 # yield of OT
m4 = (9*56*m)/(4.*137) # [kg] theoretical iron reqiurement
m5 = 800*.9 #[kg] iron charged
E = (m5-m4)*100/m4 # excess iron
# Result
print "a Yield of OT = ",n1
print " b Excess quantity of iron powder = ",E
# solution
# Variables
print "a "
m = 100. #kg chlorobenzene (basis)
m1 = 106.5*.655 #kg HNO3
m2 = 108*.936 # kg H2SO4
# Calculation and Result
m3 = 106.5*.345 +108*.064 #kg water
M = m1+m2+m3
print " Analysis of charge: "
print "Component mass percent"
print "Chlorobenzene ",m*100/M
print "HNO3 ",m1*100/M
print "H2SO4 ",m2*100/M
print "H2O ",m3*100/M
print "b "
# (b)
# total charge mass is constant
m4 = 314.5*.02 #[kg] unreacted CB in the product
m5 = 100-m4 # [kg] CB that reacted
c = m5*100./100 # conversion of CB
print "Percent conversion of Chloro benzene is ",c
print "c "
# (c)
m6 = 63*c/112.5 #[kg] HNO3 consumed
m7 = m1-m6 # unreacted HNO3
m7 = 157.5*c/112.5 # [kg] total NCB produced
m8 = m7*.66 #[kg] p-NCB
m9 = m7*.34 #[kg] o-NCB
m10 = 18*c/112.5 #[kg] water produced
m11 = m10+m3 # total water in product
m12 = m4+m8+m9+m7+m2+m11
print " Composition of product stream :"
print "Component mass percent"
print " CB ",m4*100/m12
print " p-NCB ",m8*100/m12
print " o-NCB ",m9*100/m12
print " HNO3 ",m7*100/m12
print " H2SO4 ",m2*100/m12
print " H2O ",m11*100/m12
# solution
# Variables
n=100. #[kmol] outgoing gas from 2nd scrubber
n1=.852*n #[kmol] N2
n2=21*n1/79. #[kmol] O2
n3=n2-2.1 # [kmol] reacted O2
# O2 balance
# O2 consumed in rxn (ii),(iii),(v) - O2 produced by rxn (iv) = 20.55 kmol
# let a,b,c be ethanol reacted (ii),(iii),(iv) and d be H2 reacted in (v)
# Calculation
# CO balance
a=2.3/2 #kmol
#CO2 balance
b = .7/2
#CH4 balance
c=2.6/2
#O2 balance
d = 41.1-a-3*b+c
#H2 balance
e = 7.1 +c+d #kmol (total H2 produced)
f = e-(3*b + 3*a) #kmol (H2 produced in (i) = ethanol reacted in (i))
g = f+a+b+c # total ethanol reacted
h = 2*(n1+n2) # total ethanol entering
c1 = g*100/h
# Result
print "a Conversion percent of ethanol = ",c1
y = f*100/g
print "b Yield of acetaldehyde = ",y
# solution
# Variables
v = 1. #[l] water (basis)
# 1 mol (100mg) CaCO3 gives 1 mol (56) Cao
# use table 3.3 and eg 3.9
# Calculation
x = 56*390.6/100 #[mg/l] lime produced
# Result
print "Amount of lime required = ",x," mg/l."
from numpy import array, linalg
# solution
# Variables
m=100. #[kmol] (basis) dry mixed gas
# x = kmol of water gas
# y =kmol of producer gas
# overall material balance :
# x+y = 100 (i)
#r2 =.43x+.25y # H2 formed by shift rxn
#r2=.51x+.25y # H2 entering with water and producer gas
#r = r1+r2 # taoal H2
#/n =.02x+.63y # N2 entering
#N2:H2=1:3
# ==> x-1.807y = 0(ii)
#solving (i) and (ii)
A = array([[1, 1],[1, -1.807]])
d = array([100,0])
# Calculation
x = linalg.solve(A,d)
s = .43*x[0]+.25*x[1] # steam req.
# Result
print "x = ",x[0]
print " and y = ",x[1]
print "Amount of steam required = ",s," kmol"
# solution
# Variables
m = 100. #[kg] Tallow
# Calculation
m1 = 3*403*m/890. # [kg]
m2 = 92*m/890.
# Result
print "a NaOH required = ",m1," kg \nb amount of glycerine liberated = ",m2," kg."
# solution
# Variables
n = 100. #[kmol] SO3 free gas basis
n1 = 16.5 #[kmol] SO2
n2 = 3. #[kmol] O2
n3 = 80.5 #[kmol] N2
# Calculation
# S + O2 = SO2
# S + 3/2 O2 = SO3
n4 = (21/79.)*80.5 #[kmol] O2 supplied
n5 = n4-n1-n2 # [kmol] Unaccounted O2
# O2 used in 2nd eq is m5
n6 = (2./3)*n5 #[kmol] SO3 produced
n7 = n1+n6 # sulphur burnt
m7 = n7*32 #[kg]
f1 = n6/n7 # fraction of SO3 burnt
# O2 req. for complete combustion of S = n7
n8 = n4-n7 #[kmol] excess O2
p1 = n8*100/n7 # %age of excess air
n9 = n4+n3 #[kmol/s] air supplied
F1 = n9*.3/n7 # air supply rate
v = 22.414*(303.15/273.15)*(101.325/100) #[m**3/kmol] sp. vol of air
V1 = F1*v #[m**3/s] flow rate of fresh air
n10 = n+n7 #[kmol] total gas from burner
n11 = n10*.3/m7 # [kmol/s] gas req. for .3 kg/s S
V2 = 220414*1073.15*n11/273.15 # flowrate of burner gases
# Result
print "a The fraction of S burnt = ",f1
print "b percentage of excess air over the amount req. for S oxidising to SO2 = ",p1
print "c volume of dry air = ",V1," m**3/s \nd volume of burner gases = ",V2," m**3/s."
# solution
# Variables
m = 100. #[kg] soya fatty acid (basis)
# use table 4.6
M1 = m/.3597 # M(avg) of soya fatty acid
# Calculation
#3 mol of fatty acid + 1 mol of glycerol = 1 mol triglyceride + 3 mol of water
M2 = M1*3+92.09-3*18.02 # Mavg of soyabean oil
q1 = M2*m/(M1*3) # soyabean oil per 100kg fatty acid
# based on reactions occuring
q2 = .0967+.1822*2+.0241*3 # kmol H2 req. per 100 kg soya fatty acid
q3 = .5101 # kmol H2 req. per 100 kg soyabean oil
q4 = 11.434 # Nm**3/100kg soyabean oil
# x = linoleic acid converted to oleic acid
# y = oleic acid converted to stearic acid
q5 = 282.46*6.7/278.43
#q6 = 282.46*x/280.15 = 1.00717x [kg] oleic acid by linoleic acid
#q7 = 284.48*y/282.46 = 1.00715y [kg] stearic acid by oleic acid
#q8 = 100.097 + .00717x + .00715y total fatty acid
#stearic balance : -.00105x + 1.00611y = 10.8142 (i)
#linoleic balance : 1.0019x + .00019y = 48.4975 (ii)
# solving (i) and (ii) we get
x = 48.5 #kg
y = 10.8 #kg
M3 = 100.52/.3596 # Mavg of fatty acid
H2req1 = .5334-.2864 # per 100kg fatty acid
H2req = 52.95 #Nm**3/t
I2s = 129.5 #kg I2 per 100 kg soyabean oil # for soyabean oil
I2h = 69.2 #kg I2 per 100 kg of fat
# Result
print "a theoretical H2 required = ",q4," Nm**3/100kg soyabean oil"
print "b actual H2 required = ",H2req
print "c Iodine value for soyabean oil = ",I2s
print "d Iodine value of hardened fat = ",I2h
# solution
# Variables
F1 = 4000. #kg/h methanol (basis)
F2 = F1/32 #kmol/h
F3 = F2/.084 #kmol/h gaseous mix flowrate
F4 = F2-F3 #kmol/h flow of wet air
n1 = .011*29/18. # kmol/kmol dry air
F5 = F4/(1+n1) # kmol/h dry air flowrate
O2 = F5*.21 #kmol/h
N2 = F5-O2 #kmol/h
Mreacted1 = F2*.99 #kmol/h
Munreacted1 = F2-Mreacted1 #kmol/h
# Calculation
# reaction (i)
Mreacted2 = Mreacted1*.9 #kmol/h
HCHOproduced1 = 111.375
O2consumed1 = 111.375/2
H2Oproduced1 = 111.375
# for rxn ii to iv
Mconsumed = Mreacted1*.1
#rxn (ii)
CH3OHreacted1 = Mconsumed*.71
O2consumed2 = 8.786*1.5
CO2produced = 8.786
H2Oproduced2 = 8.786*2
#rxn(iii)
CH3OHreacted2 = 12.375*.08
COproduced = .99
H2produced = 2*.99
#rxn(iv)
CH3OHreacted3 = 12.375*.05
CH4produced = .619
O2produced = .619/2
#rxn(v)
CH3OHreacted4 = 12.375-CH3OHreacted1-CH3OHreacted2-CH3OHreacted3
DMEproduced = 1.98/2
H2Oproduced3 = 1.98/2
O2 = 281.27-O2consumed1-O2consumed2+O2produced
H2O = 23.73+H2Oproduced1+H2Oproduced2+H2Oproduced3
# Result
print "Composition of exit gas stream : CH3OH = ",Munreacted1
print " HCHO = ",HCHOproduced1
print " CO2 = ",CO2produced
print " CO = ",COproduced
print " H2 = ",H2produced
print " CH4 = ",CH4produced
print " CH32O = ",DMEproduced
print " O2 = ",O2
print " N2 = ",N2
print " H2O = ",H2O
# solution
# Variables
m = 100. #kg pyrites (basis)
#(a)
print "a ",
S1 = 42. #kg
i1 = 58. #kg inerts
# Calculation
# 8 moll S = 3 mol O2 in Fe2O3
m1 = 3*32*42./8.*32 #kg O2 converted to Fe2O3
m2 = i1+m1 # mass of SO3 free cinder
#2.3 kg S is in 100kg cinder
m3 = 100-(2.3*80./32)
m4 = (100./m3)*m2
m5 = m4*.023 #kg S in cinder
p1 = 1.8*100/42.
# Result
print "percentage of cinder remained in cinder = ",p1,". \nb ",
#(b)
m6 = 100. #kmol SO3 free roaster gas (basis)
m7 = 7.12 #kmol O2 as SO2
m8 = 10.6 #O2
m9 = 100-m8-m7 #N2
m10 = (21/79.)*m9 # O2 entering roaster along N2
m11 = m7+m8+(3*7.12/8) # accounted O2
m12 = m10-m11 # unaccounted O2
m13 = (8/15.)*m12 # SO3 formed
m14 = m13+m7 # S burnt
p2 = (m13/m14)*100.
print "percentage of S burnt to form SO3 = ",p2," \nc ",
# (c)
# basis 100kg pyrite
m15 = 37.81/32 # SO2 formed
m16 = (m9+m10)*1.181/m7 # air supplied
# 4 kg pyrite is roasted
m17 = m16*4/100. #kmol/s total air supplied
v1 = m17*24.957
print "volumetric flow rate of air = ",v1," m**3/s \nd ",
# (d)
m18 = (100.455*m17)/(m9+m10) # roaster gases
v2 = m18*66.386
print "volumetric flow rate of roaster gases = ",v2," m**3/s \nf ",
#(f)
m19 = 4.838*10**-2*.98 # SO3 absorbed in absorber
# SO3 + H2O = H2SO4
m20 = (m19*98*24*3600)/(.98*1000) #[t/d]
print "Amount of 98 percent acid strength produced = ",m20," t/d."
# solution
# Variables
# basis 100kg mixed charge = 75 kg pyrite + 25kg ZnS
# pyrites
m1 = 75*.92 #[kg] FeS2
G1 = 75-m1 # gangue
# 4FeS2 + 11O2 = 2Fe2O3 + 8SO2
# 4FeS2 + 15O2 = 2Fe2O3 + 8SO3
#Zn ore
m2 = 25*.68 # ZnS
I1 = 25-m2 # inerts
# Calculation
# 2ZnS + 3 O2 = 2 ZnO + 2 SO2
I2 = I1+6 # total inerts
# new basis : 100kg cinder
m3 = 3.5*.7 # S as SO3
m4 = 3.5-m3 # S as FeS2
m5 = 100-m3-m4 # S free cinder
m6 = (81.4/97.4)*17 # ZnO
# FeS2 reacted = x
# (FeS2 in cinder/S free cinder) = (69-x)/(28.2+.667x) = 1.969/91.906
# solving this we get
x = 67.43 #kg
m7 = m6 + .667*x + 14 # S free cinder
m8 = 69-x # FeS2 in cinder
m9 = 6.125*m7/m5 # SO3
m10 = .667*x # Fe2O3
m11 = m6+m10+m8+m9+I2
# Result
print "a "
print "Total cinder produced = ",m11,"kg \nComposition of cinder : ZnO = ",m6,\
"kg \nFe2O3 = ",m10,"kg \nS as FeS2 = ",m8,"kg \nS as SO3 = ",m9,"kg \ninerts = ",I2,"kg \nb "
S1 = (64./120)*69 + (32./97.4)*17 #[kg] S charged to burner
S2 = .035*79.63 # S in cinder
p = S2*100/S1
print "percentage of S left in cinder = ",p
# solution
# Variables
m1 = 1200*1.2 #[kg] mass of reactants
pOH1 = 14-6 #pOH of reactants
pOH = 14-9 #pOH of final mass
# ROWs = 1/sigma(Wi/ROWsi)
#Ms = mass of .5% NaOH required
#ROWs = density of final solution
# Calculation
#ROWs = 1/{((m1*10**3*1)/(((m1*10**3+Ms)*1.2)+(Ms/((m1*10**3+Ms)*1.005))} (i)
#balance of OH- ions
#1200*10**-8 +Ms*10**-1.15/(1.005*10**-5) = (1200*1.2*10**3+Ms)*10**-5/ROWs*10**-5 (ii)
#solving (i) and (ii)
Ms = 170.21 #g
ROWs = 1.2016 #[kg/l]
# Result
print "Mass of 0.5 percnt NaOH required to be added to raise the pH = ",Ms,"g."
from numpy import array, linalg
# solution
# Variables
# using equations of example 4.10
# soving 4.10 by linear model method
M = array([[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0 ,1 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,1 ,1 ,1 ,1 ,2],
[0, 0, 1, 0, 0, 0, 0, 0, 0, 0, .5, 1.5, 0, -.5, 0],
[0 ,0 ,0 ,1 ,0 ,0, 0, 0, 0, 0, -1, -2 ,0 ,0 ,-1],
[0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, -2, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, -1],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, .5, 1.5, 0, -.5, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -2, 0, 0, -1],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2]])
V = array([1058.1,125,281.27,23.73,0,0,0,0,0,0,.99*125,.2437*281.27,-5.4756*23.73,.61875,1.98])
# Calculation
X = linalg.lstsq(M,V)
# Result
print (X[0])
# solution
# Variables
# basis = 1.12 M63 O2 at NTP
m1 = 1.12*1000*32/22.4 #[g] O2
m2 = m1/8. # g eq O2
# Calculation
#at cathode : Cu++ +2e = Cu
#at anode : SO4-- - 2e = SO4
eqwtCu = 63.5/2
depositedCu = eqwtCu*m2
E = (1130*18000.)/96485 #faradays Total energy passed to cell
libCu = (1130*18000*eqwtCu)/96485. #[g] theoritical liberation of Cu
eff = (depositedCu/libCu)*100. # current efficiency
# Result
print "a Amount of Cu lberated = ",libCu
print "b Current efficiency of the cell = ",eff," percent."
# solution
# Variables
# basis : 1day operation
# NaCl = Na+ + Cl-
#H2O = H+ + OH-
#Na+ + OH- = NaOH
#H+ + e = (1/2)H2
#Cl- - e = (1/2)Cl2
E = (15000.*3600*24)/96485 # faraday/day Total energy passed thrrough cell
NaOH = (15000*3600*24*40)/(96485*1000.) #[kg/day] theoretical NaOH
eff = (514.1/NaOH)*100 # current efficiency
Cl2 = (35.5/40)*514.1
H2 = (456.3*2)/(35.5*2)
# Calculation
#40 g NaOH = 58.5g NaCl
consNaCl = (58.5/40)*514.1 # NaCl consumed
Tliquor = 514.1/.11 #[kg/day] total cell liquor
remNaCl = 514.1*1.4
totalNaCl = consNaCl+remNaCl
Fbrine = totalNaCl/.266 #feed rate of brine
consH2O = (18./40)*514.1
lossH2O = Fbrine-Tliquor-consH2O
# Result
print "a Current efficiency of the cell = ",eff,
print " percent. \nb Cl2 produced = ",Cl2,
print " kg/day H2 produced = ",H2,
print " kg/day \nc loss of water = ",lossH2O," kg/day"
# solution
# Variables
#M = mix feed rate, F = fresh feed rate , R = recycle stream
# using fig 4.3
# N2 balance
# a = 24.75M/(.25M+7.5M) (i)
# P = (4.15M + 17.75a)/M (ii)
# .585M -1.775a +(4.15M+17.75a)/M = 100 (iii)
#solving (i,) (ii), (iii)
M = 438.589 #[kmol/s]
# Calculation
a = (24.75*M)/((.25*M)+7.5) #kmol/s
P = (4.15*438.589+17.75*92.662)/M #kmol/s
R = M-100 # kmol/s
r = R/100 # recycle ratio
NH3 = (.585*M-2.275*a)*17.0305 #kg/s
# Result
print "a recycle feed rate = ",R," kmol/s \nb purge gas rate = ",P,\
" kmol/s \nc mass rate of NH3 = ",NH3," kg/s"
# solution
# Variables
# given
# (.1*M*R1)/(.415M+1.775a) + (.1125a*P)/(.415M + 1.775a) + 1 = .1M
# R1*(.315M-1.225a)/(.415M + 1.775a) = .9M-4a
# M = 100 + R1 + (2.25a*p)/(.415M + 1.775a)
# .1M*P/(.415M + 1.775a) - (.1125a*P)/(.415M1.775a)
#solving them
M = 457.011 # kmol/s
R1 = 350.771 # kmol/s
P = 10.368 # kmol/s
a = 96.608 # kmol/s
# Calculation
R2 = 2.25*96.608*10.369/(.415*457.011 + 1.775*96.608) # kmol/s
F = M -R1 - R2
# Result
print "Mixed feed rate = ",M," kmol/s \nRecycle stream = ",R1,\
" kmol/s \nRecovered H2 stream = ",R2," kmol/s \nFresh feed rate = ",F,\
" kmol/s \nRecycle ratio = ",R1+R2/F," kmol/kmol of fresh feed."
# solution
# Variables
m1 = (50/35.5)*312 #[mg/l] Cl2 expressed as equivalent CaCO3
m2 = (50/48)*43.2 #[mg/l] Sulphates as equivalent CaCO3
A = m1+m2 #[mg/l as CaCO3] EMA in raw water
M1 = 550. # alkalinity of raw water
M2 = 50. # alkalinity of blend water
# Calculation
#let 100 l of raw water enters both ion exchangers
# balancing neutrilasion
x = 100.*(M1-M2)/(A+M1) # raw water inlet to H2 ion echanger
# Result
print x," percent of total raw water is passed through the H ion exchanger."
# solution
# Variables
m1 = 1488.1 #kmol/h gas mix to reactor1 (basis)
m2 = m1*.0625 # CH3OH
m3 = m1-m2 # ambient air flow
m4 = m3/1.01772 # dry air flow rate
m5 = m3-m4 # moisture
m6 = m2*.99 # CH3OH conversion in R1
m7 = m2-m6 # unreacted CH3OH
# Calculation
#rxn i
m8 = m7*.9 # CH3OH reacted = HCHO produced = H2O produced
m9 = m8/2 # O2 consumed
m10 = m6-m8 # CH3OH reacted in rxn ii to v
#rxn ii
m11 = m10*.71 # CH3OH reacted = CO2 produced
m12 = m11*1.5 # O2 consumed
m13 = 2*m11 # H2O produced
#rxn iii
m14 = m10*.08 # CH3OH reacted = CO produced
m15 = 2*m14 # H2 produced
#rxn iv
m16 = m10*.05 # Ch3OH reacted = CH4 produced
m17 = m16/2 # O2 produced
#rxn v
m18 = m10-m16-m14-m11 # CH3OH reacted
m19 = m18/2 # (CH3)2O = H2O produced
m20 = 287.87-m9-m12+m17 # O2 in R1 exit stream
m21 = m5+m8+m13+m19 # H2O in R1
m = m7+m8+m11+m14+m15+m16+m19+m20+1082.93+m21
# R2
# x kmol/h CH3OH is added b/w reactors
# (m7+x)/(m+x) = .084 solving it
x = 140.548 #[kmol/h]
m22 = x+m7 # CH3OH entering R2
m23 = m22*.99 #CH3OH reacted
m24 = m22-m23 # CH3OH unreacted
#rxn i
m25 = m23*.9 # CH3OH reacted = HCHO produced = H2O produced
m26 = m25/2 # O2 consumed
m27 = m23 - m25 # CH3OH reacted in rxn ii to v
#rxn ii
m28 = m27*.71 # CH3OH reacted = CO2 produced
m29 = m28*1.5 # O2 consumed
m30 = m28*2 # H2O produced
#rxn iii
m31 = m27*.08 # CH3OH reacted = CO produced
m32 = m31*2 # H2 produced
#rxn iv
m33 = m27*.05 # Ch3OH reacted = CH4 produced
m34 = m33/2 # O2 produced
#rxn v
m35 = m27-m28-m31-m33 # CH3OH reacted
m36 = m35/2 # (CH3)2O = H2O produced
m37 = m20 - m26-m29+m34 # O2 in R2 exit stream
m38 = m21+m25+m36 # H2O in R2
m39 = 92.07+m25 # HCHO in R2
m40 = m24+m39+m28+m31+m32+m33+m36+m37+m38+1082.93
m41 = m39*30 # kg/h HCHO produced
m42 = m41/.37 # bottom sol floe rate
c = (m42-9030.4)*100/9030.4 # increase in capacity
# Result
print "Increase in capacity = ",c," percent."
# solution
# Variables
# basis 1 tonne of pig iron
coke = 1000. #kg
flux = 400. #kg
Fe1 = 1000*.95 # Fe in pig iron
# Calculation and Result
Fe2 = (112/160.)*.8 # Fe available per kg of ore
ore = Fe1/Fe2 # kg
Si = .014*1000 #kg #Si in pig iron
si1 = (60/28.)*14 # silica present in pig iron
si2 = ore*.12 # silica in ore
si3 = .1*coke # silica in coke
si4 = si2+si3-si1 # silica in slag
alumina = ore*.08 # Al2O3 in ore = Al2O3 in slag
CaO = flux*(56/100.)
slag = si4+alumina+CaO
print "a Mass of slag made = ",slag," kg. \nb Mass of ore required = ",ore,\
" kg. \nc Composition of slag : SiO2 = ",si4," kg Al2O3 = ",alumina," kg CaO = ",CaO," kg. \nd ",
C = .9*coke+(12/100.)*flux-36 # total C available
# CO:CO2 = 2:1
C1 = C/3 # C converted to CO2
C2 = 2*C/3 # C converted to CO
O21 = C1*(32/12.)+C2*(16./12) # O2 required for CO and CO2 formation
O22 = (32/28.)*Si # O2 from SiO2
O23 = ore*(.8*48/160) # O2 from Fe2O3
O24 = flux*(32/100.) # O2 from CaCO3
O25 = O21-O22-O23-O24 #kg O2 to be supplied
O26 = O25/32 #kmol
air = O26/.21 #kmol
V = air*22.414 #m**3
print " Volume of air to be supplied = ",V," m**3."