Function ENTHALPY_O (T)
{$ENTHALPY_O
Enthaply of monatomic oxygen units kJ/kgmol}
a1=0.0254e2
a2=-0.02755e-3
a3=-0.03103e-7
a4=0.04551e-10
a5=-0.0455106e-14
a6=0.02923e6
ENTHALPY_O = 8.314*T*(a1+a2*T/2+a3*T^2/3+a4*T^3/4+a5*T^4/5+a6/T)
END
Function ENTROPY_O (T)
{$ENTROPY_O
Entropy of monatomic oxygen units kJ/kgmol-K}
a1=0.0254e2
a2=-0.02755e-3
a3=-0.03103e-7
a4=0.04551e-10
a5=-0.0455106e-14
a7=0.04920e2
ENTROPY_O = 8.314*(a1*ln(T)+a2*T+a3*T^2/2+a4*T^3/3+a5*T^4/4+a7)
END
Function ENTHALPY_OH (T)
{$ENTHALPY_OH
Enthaply of OH units kJ/kgmol}
a1=0.02883e2
a2=0.101397e-2
a3=-0.022769e-5
a4=0.021747e-9
a5=-0.051263e-14
a6=0.038869e5
ENTHALPY_OH = 8.314*T*(a1+a2*T/2+a3*T^2/3+a4*T^3/4+a5*T^4/5+a6/T)
END
Function ENTROPY_OH (T)
{$ENTROPY_OH
Entropy of OH units kJ/kgmol-K}
a1=0.02883e2
a2=0.101397e-2
a3=-0.022769e-5
a4=0.021747e-9
a5=-0.051263e-14
a7=0.055957e2
ENTROPY_OH = 8.314*(a1*ln(T)+a2*T+a3*T^2/2+a4*T^3/3+a5*T^4/4+a7)
END
Function ENTHALPY_H (T)
{$ENTHALPY_H
Enthaply of monatomic hydrogen units kJ/kgmol}
a1=0.025e2
a2=0
a3=0
a4=0
a5=0
a6=0.02547e6
ENTHALPY_H = 8.314*T*(a1+a2*T/2+a3*T^2/3+a4*T^3/4+a5*T^4/5+a6/T)
END
Function ENTROPY_H (T)
{$ENTROPY_H
Entropy of monatomic hydrogen units kJ/kgmol-K}
a1=0.025e2
a2=0
a3=0
a4=0
a5=0
a7=-0.04601e1
ENTROPY_H = 8.314*(a1*ln(T)+a2*T+a3*T^2/2+a4*T^3/3+a5*T^4/4+a7)
END
P1=101.3 {kpa}
P=1000/101.3 {atm}
R=8.314 {kJ/kmol-K}
{ Reaction:
a (C3H8 +5/Phi(O2 + 3.76 N2)) + b(3 CO2 + 4 H2O +0.26 O2 + 19.76 N2) -->
3(a+b) CO2 + 4(a+b) H2O + 0.26(a+b)
O2 + 19.76(a+b) N2 }
26.06*a+27.06*b=1 {1 total mole of reactants }
X_res=27.06*b {residual mole fraction -
note there is one total mole of reactants}
hc3=Enthalpy(C3H8, T=298)
hco2=Enthalpy(CO2, T=T1)
hh2o=Enthalpy(H2O, T=T1)
ho2=Enthalpy(O2, T=T1)
hn2=Enthalpy(N2, T=T1)
{T1 is the product temperature
H_reactants = H_products }
a*hc3+3*b*Enthalpy(CO2,T=298)+4*b*Enthalpy(H2O,T=298)=(a+b)*(3*hco2+4*hh2o+0.26*ho2+19.8*hn2)
{Equilibrium calculation - note P1 = reference pressure = 101.3 kPa = 1 atm}
go2=Enthalpy(O2,T=T1)-T1*Entropy(O2,T=T1,P=P1)
go=ENTHALPY_O(T1)-T1*ENTROPY_O(T1)
gn2=Enthalpy(N2,T=T1)-T1*Entropy(N2,T=T1,P=P1)
gno=Enthalpy(NO,T=T1)-T1*Entropy(NO,T=T1,P=P1)
goh=ENTHALPY_OH(T1)-T1*ENTROPY_OH(T1)
gh2o=Enthalpy(H2O,T=T1)-T1*Entropy(H2O,T=T1,P=P1)
gh=ENTHALPY_H(T1)-T1*ENTROPY_H(T1)
3*(a+b)=nco2 {C balance }
8*(a+b)=2*nh2o+noh+nh {H balance}
(2*0.26+4+6)*(a+b)=2*nco2+nh2o+2*no2+no+noh+nno {O balance}
19.8*(a+b)=2*nn2+nno {N balance}
ntot=nco2+nh2o+no2+nn2+nno+no+noh+nh
{
O2 -> 2O Equilibruim
}
kpo=exp(-(2*go-go2)/R/T1)
kpo=no^2/no2 * (P/ntot)
{
N2 + O2 = 2NO Equilibrium
}
kpno=exp(-(2*gno-gn2-go2)/R/T1)
kpno=nno^2/nn2/no2
{
H2O +1/2 O2 = 2OH Equilibrium
}
kpoh=exp(-(2*goh-gh2o-0.5*go2)/R/T1)
kpoh=noh^2/nh2o/sqrt(no2) * (P/ntot)^0.5
{
H2O = OH + H Equilibrium
}
kph=exp(-(goh+gh-gh2o)/R/T1)
kph=noh*nh/nh2o * (P/ntot)
{Conversion to concentrations }
C_O=no*P*101.3/(ntot*R*T1) {kmol/m^3}
C_OH=noh*P*101.3/(ntot*R*T1)
C_H=nh*P*101.3/(ntot*R*T1)
C_NO=nno*P*101.3/(ntot*R*T1)
C_O2=no2*P*101.3/(ntot*R*T1)
C_N2=nn2*P*101.3/(ntot*R*T1)
xno=nno/ntot*1e6 {NO in parts per million}