Dan Harter Combustion HW 4 1. "a C3H8O0 + b O2 + c N2 -> d H2O + e CO2 + f N2 + g O2 + h CO + i NO + j H2 + k OH + l H + m O + n N" "Fuel Properties" Carbon=3 Hydrogen=8 Oxygen=0 nfuelr=1 a=nfuelr "100% Theoretical Air" b=Hydrogen/4+Carbon b=percentair*no2r percentair=1 "Air is 79% N2, 21% O2" c=3.76*b "Carbon Balance" Carbon*a=e+h e=nco2p h=ncop "Hydrogen Balance" Hydrogen*a=2*d+2*j+k+l d=nh2op j=nh2p l=nhp "Oxygen Balance" Oxygen*a+2*b=d+2*e+2*g+h+i+k+m g=no2p k=nohp m=nop "Nitrogen Balance" 2*c=2*f+i+n c=nn2r f=nn2p i=nnop n=nnp "nnp=.001" "Temperature Settings" Tfuel=298 Tair=298 "Tp=2264" "Energy Equation" 0=nfuelr*hfuelr+no2r*ho2r+nn2r*hn2r-nh2op*hh2op-nco2p*hco2p-nn2p*hn2p-no2p*ho2p-ncop*hcopnnop*hnop-nh2p*hh2p-nohp*hohp-nhp*hhp-nop*hop-nnp*hnp "Enthalpies" hfuelr=enthalpy(C3H8,T=Tfuel) ho2r=enthalpy(O2,T=Tair) hn2r=enthalpy(N2,T=Tair) hh2op=enthalpy(H2O,T=Tp) hco2p=enthalpy(CO2,T=Tp) hn2p=enthalpy(N2,T=Tp) ho2p=enthalpy(O2,T=Tp) hcop=enthalpy(CO,T=Tp) hnop=enthalpy(NO,T=Tp) hh2p=enthalpy(H2,T=Tp) hohp=enthalpy(OH,T=Tp) hhp=enthalpy(H,T=Tp) hop=enthalpy(O,T=Tp) hnp=enthalpy(N,T=Tp) "Equilibrium Equations" gco2p-gcop-go2p/2=0 2*gnop-go2p-gn2p=0 gh2op-gh2p-go2p/2=0 gh2op-gohp-gh2p/2=0 gh2p-2*ghp=0 go2p-2*gop=0 gn2p-2*gnp=0 "Gibbs Free Energy" gco2p=hco2p-Tp*sco2p gcop=hcop-Tp*scop go2p=ho2p-Tp*so2p gnop=hnop-Tp*snop gn2p=hn2p-Tp*sn2p gh2op=hh2op-Tp*sh2op gh2p=hh2p-Tp*sh2p gohp=hohp-Tp*sohp ghp=hhp-Tp*shp gop=hop-Tp*sop gnp=hnp-Tp*snp "Entropies" sco2p=entropy(CO2,T=Tp,P=pco2p) scop=entropy(CO,T=Tp,P=pcop) so2p=entropy(O2,T=Tp,P=po2p) snop=entropy(NO,T=Tp,P=pnop) sn2p=entropy(N2,T=Tp,P=pn2p) sh2op=entropy(H2O,T=Tp,P=ph2op) sh2p=entropy(H2,T=Tp,P=ph2p) sohp=entropy(OH,T=Tp,P=pohp) shp=entropy(H,T=Tp,P=php) sop=entropy(O,T=Tp,P=pop) snp=entropy(N,T=Tp,P=pnp) "Partial Pressures" p=1 pco2p=xco2p*p pcop=xcop*p po2p=xo2p*p pnop=xnop*p pn2p=xn2p*p ph2op=xh2op*p ph2p=xh2p*p pohp=xohp*p php=xhp*p pop=xop*p pnp=xnp*p "Molar Fractions" ntotp=nh2op+nco2p+nn2p+no2p+ncop+nnop+nh2p+nohp+nhp+nop+nnp xco2p=nco2p/ntotp xcop=ncop/ntotp xo2p=no2p/ntotp xnop=nnop/ntotp xn2p=nn2p/ntotp xh2op=nh2op/ntotp xh2p=nh2p/ntotp xohp=nohp/ntotp xhp=nhp/ntotp xop=nop/ntotp xnp=nnp/ntotp 2. "a C3H8O0 + b O2 + c N2 -> d H2O + e CO2 + f N2 + g O2 + h CO + i NO + j H2 + k OH + l H + m O + n N" "Fuel Properties" Carbon=3 Hydrogen=8 Oxygen=0 nfuelr=1 a=nfuelr "100% Theoretical Air" b=Hydrogen/4+Carbon b=no2r "Air is 79% N2, 21% O2" c=3.76*b "Carbon Balance" Carbon*a=e+h e=nco2p h=ncop "Hydrogen Balance" Hydrogen*a=2*d+2*j+k+l d=nh2op j=nh2p l=nhp "Oxygen Balance" Oxygen*a+2*b=d+2*e+2*g+h+i+k+m g=no2p k=nohp m=nop "Nitrogen Balance" 2*c=2*f+i+n c=nn2r f=nn2p i=nnop n=nnp "nnp=.001" "Temperature Settings" Tfuel=298 Tair=298 "Tp=2264" "Energy Equation" 0=nfuelr*hfuelr+no2r*ho2r+nn2r*hn2r-nh2op*hh2op-nco2p*hco2p-nn2p*hn2p-no2p*ho2p-ncop*hcopnnop*hnop-nh2p*hh2p-nohp*hohp-nhp*hhp-nop*hop-nnp*hnp "Enthalpies" hfuelr=enthalpy(C3H8,T=Tfuel) ho2r=enthalpy(O2,T=Tair) hn2r=enthalpy(N2,T=Tair) hh2op=enthalpy(H2O,T=Tp) hco2p=enthalpy(CO2,T=Tp) hn2p=enthalpy(N2,T=Tp) ho2p=enthalpy(O2,T=Tp) hcop=enthalpy(CO,T=Tp) hnop=enthalpy(NO,T=Tp) hh2p=enthalpy(H2,T=Tp) hohp=enthalpy(OH,T=Tp) hhp=enthalpy(H,T=Tp) hop=enthalpy(O,T=Tp) hnp=enthalpy(N,T=Tp) "Equilibrium Equations" gco2p-gcop-go2p/2=0 {2*gnop-go2p-gn2p=0} gh2op-gh2p-go2p/2=0 gh2op-gohp-gh2p/2=0 gh2p-2*ghp=0 go2p-2*gop=0 {gn2p-2*gnp=0} "Gibbs Free Energy" gco2p=hco2p-Tp*sco2p gcop=hcop-Tp*scop go2p=ho2p-Tp*so2p gnop=hnop-Tp*snop gn2p=hn2p-Tp*sn2p gh2op=hh2op-Tp*sh2op gh2p=hh2p-Tp*sh2p gohp=hohp-Tp*sohp ghp=hhp-Tp*shp gop=hop-Tp*sop gnp=hnp-Tp*snp "Entropies" sco2p=entropy(CO2,T=Tp,P=pco2p) scop=entropy(CO,T=Tp,P=pcop) so2p=entropy(O2,T=Tp,P=po2p) snop=entropy(NO,T=Tp,P=pnop) sn2p=entropy(N2,T=Tp,P=pn2p) sh2op=entropy(H2O,T=Tp,P=ph2op) sh2p=entropy(H2,T=Tp,P=ph2p) sohp=entropy(OH,T=Tp,P=pohp) shp=entropy(H,T=Tp,P=php) sop=entropy(O,T=Tp,P=pop) snp=entropy(N,T=Tp,P=pnp) "Partial Pressures" p=1.01325 pco2p=xco2p*p pcop=xcop*p po2p=xo2p*p pnop=xnop*p pn2p=xn2p*p ph2op=xh2op*p ph2p=xh2p*p pohp=xohp*p php=xhp*p pop=xop*p pnp=xnp*p "Molar Fractions" ntotp=nh2op+nco2p+nn2p+no2p+ncop+nnop+nh2p+nohp+nhp+nop+nnp xco2p=nco2p/ntotp xcop=ncop/ntotp xo2p=no2p/ntotp xnop=nnop/ntotp xn2p=nn2p/ntotp xh2op=nh2op/ntotp xh2p=nh2p/ntotp xohp=nohp/ntotp xhp=nhp/ntotp xop=nop/ntotp xnp=nnp/ntotp "Molar Concentrations" vtotp=ntotp*R*Tp/p R=8.314e-2 mn2p=nn2p/vtotp mo2p=no2p/vtotp mop=nop/vtotp mohp=nohp/vtotp mhp=nhp/vtotp mnop=nnop/vtotp mnp=nnp/vtotp "Reaction Rates" k1=1.8e11*exp(-38370/Tp) k2=3.8e10*exp(-425/Tp) k3=1.8e7*Tp*exp(-4680/Tp) k4=3.8e6*Tp*exp(-20820/Tp) k5=7.1e10*exp(-450/Tp) k6=1.7e11*exp(-24560/Tp) "N Production" dndt=k1*mop*mn2p-k2*mnop*mnp-k3*mnp*mo2p+k4*mnop*mop-k5*mnp*mohp+k6*mnop*mhp dndt=0 "NO Production" dnodt=k1*mop*mn2p-k2*mnop*mnp+k3*mnp*mo2p-k4*mnop*mop+k5*mnp*mohp-k6*mnop*mhp mnop=integral(dnodt,time)