import math
from scipy.integrate import quad
# Variables
T_1 = 298.15; #[K] - standard temperature
T_2 = 880; #[K] - Reaction temperature
a_SO2 = 6.157;
a_SO3 = 3.918;
a_O2 = 6.732;
b_SO2 = 1.384*10**(-2);
b_SO3 = 3.483*10**(-2);
b_O2 = 0.1505*10**(-2);
c_SO2 = -0.9103*10**(-5);
c_SO3 = -2.675*10**(-5);
c_O2 = -0.01791*10**(-5);
d_SO2 = 2.057*10**(-9);
d_SO3 = 7.744*10**(-9);
delta_H_rkn_298 = -23.45*10**(3); #[cal] - Rkn enthalpy at 298.15 K
delta_H_SO2_for_298 = -70.94*10**(3); #[cal/mol] - Enthalpy of formation of S02 at 298.15 K
delta_H_SO3_for_298 = -94.39*10**(3); #[cal/mol] - Enthalpy of formation of SO3 at 298.15 K
delta_G_SO2_for_298 = -71.68*10**(3); #[cal/mol] - Gibbs free energy change for formation of SO2 at 298.15 K
delta_G_SO3_for_298 = -88.59*10**(3); #[cal/mol] - Gibbs free energy change for formation of SO3 at 298.15 K
# Calculations and Results
#(1)
#standard enthalpy change of reaction at temperature T is given by,
#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T
delta_a = a_SO3 - a_SO2 - (a_O2/2);
delta_b = b_SO3 - b_SO2 - (b_O2/2);
delta_c = c_SO3 - c_SO2 - (c_O2/2);
delta_d = d_SO3 - d_SO2;
#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));
#Therefore we get,
def f44(T):
return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))
delta_H_rkn_880 = delta_H_rkn_298 + quad(f44,T_1,T_2)[0]
#On manual simplification of the above expression,we will get the expression for 'delta_H_rkn_880' as a function of T,
print " 1.The expression for smath.tan(math.radiansard enthalpy change of reaction as a function of temperature is given by";
print " delta_H_rkn_880 = -22534.57 - 5.605*T + 1.012*10**-2*T**2 - 0.585*10**-5*T**3 + 1.422*10**-9*T**4"
print " 2).Staandard enthalpy change of reaction at 880 K is %f cal"%(delta_H_rkn_880);
#(3)
#Let us determine the smath.tan(math.radiansard entropy change of reaction at 298.15 K
delta_S_SO2_298 = (delta_H_SO2_for_298 - delta_G_SO2_for_298)/298.15; #[cal/mol-K]
delta_S_SO3_298 = (delta_H_SO3_for_298 - delta_G_SO3_for_298)/298.15; #[cal/mol-K]
delta_S_O2_298 = 0; #[cal/mol-K]
delta_S_rkn_298 = delta_S_SO3_298 - delta_S_SO2_298 - (delta_S_O2_298/2); #[cal/K]
def f45(T):
return (delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3))/T
delta_S_rkn_880 = delta_S_rkn_298 + quad(f45,T_1,T_2)[0]
print " 3).Standard entropy change of reaction at 880 K is %f cal/K"%(delta_S_rkn_880);
#(4)
delta_G_rkn_880 = delta_H_rkn_880 - 880*delta_S_rkn_880; #[cal]
print " 4).Standard Gibbs free energy change of reaction at 880 K is %f cal"%(delta_G_rkn_880);
T_1 = 298.15; #[K] - standard temperature
T_2 = 400; #[K] - Reaction temperature
a_CH3OH = 4.55;
a_CO = 6.726;
a_H2 = 6.952;
b_CH3OH = 2.186*10**(-2);
b_CO = 0.04001*10**(-2);
b_H2 = -0.04576*10**(-2);
c_CH3OH = -0.291*10**(-5);
c_CO = 0.1283*10**(-5);
c_H2 = 0.09563*10**(-5);
d_CH3OH = -1.92*10**(-9);
d_CO = -0.5307*10**(-9);
d_H2 = -0.2079*10**(-9);
delta_H_rkn_298 = -21.6643*10**(3); #[cal] - Reaction enthalpy at 298.15 K
delta_H_CO_for_298 = -26.4157*10**(3); #[cal/mol] - Enthalpy of formation of CO at 298.15 K
delta_H_CH3OH_for_298 = -48.08*10**(3); #[cal/mol] - Enthalpy of formation of CH3OH at 298.15 K
delta_G_CO_for_298 = -32.8079*10**(3); #[cal/mol] - Gibbs free energy change for formation of CO at 298.15 K
delta_G_CH3OH_for_298 = -38.69*10**(3); #[cal/mol] - Gibbs free energy change for formation of CH3OH at 298.15 K
# Calculations and Results
#Smath.tan(math.radiansard enthalpy change of reaction at temperature T is given by,
#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T
delta_a = a_CH3OH - a_CO - 2*(a_H2);
delta_b = b_CH3OH - b_CO - 2*(b_H2);
delta_c = c_CH3OH - c_CO - 2*(c_H2);
delta_d = d_CH3OH - d_CO - 2*(d_H2);
#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));
#Therefore we get,
def f56(T):
return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))
delta_H_rkn_400 = delta_H_rkn_298 + quad(f56,T_1,T_2)[0]
print " Standard enthalpy change of reaction at 400 K is %f cal"%(delta_H_rkn_400);
#Let us determine the standard Gibbs free energy change of reaction at 298.15 K
delta_G_rkn_298 = delta_G_CH3OH_for_298 - delta_G_CO_for_298; #[cal]
#Now determining the standard entropy change of reaction at 298.15 K
delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15; #[cal/mol-K]
def f57(T):
return (delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3))/T
delta_S_rkn_400 = delta_S_rkn_298 + quad(f57,T_1,T_2)[0]
#Therefore,the standard Gibbs free energy change of the reaction is given by,
delta_G_rkn_400 = delta_H_rkn_400 - 400*delta_S_rkn_400; #[cal]
print " Standard Gibbs free energy change of reaction at 400 K is %f cal"%(delta_G_rkn_400);
T_1 = 298.15; #[K] - Smath.tan(math.radiansard temperature
T_2 = 1200; #[K] - Reaction temperature
a_CO2 = 5.316;
a_H2 = 6.952;
a_CO = 6.726;
a_H2O = 7.700;
b_CO2 = 1.4285*10**(-2);
b_H2 = -0.04576*10**(-2);
b_CO = 0.04001*10**(-2);
b_H2O = 0.04594*10**(-2);
c_CO2 = -0.8362*10**(-5);
c_H2 = 0.09563*10**(-5);
c_CO = 0.1283*10**(-5);
c_H2O = 0.2521*10**(-5);
d_CO2 = 1.784*10**(-9);
d_H2 = -0.2079*10**(-9);
d_CO = -0.5307*10**(-9);
d_H2O = -0.8587*10**(-9);
# Calculations and Results
delta_H_rkn_298 = -9.8382*10**(3); #[cal] - Reaction enthalpy at 298.15 K
delta_H_CO2_for_298 = -94.0518*10**(3); #[cal/mol-K] - Enthalpy of formation of CO2 at 298.15 K
delta_H_CO_for_298 = -26.4157*10**(3); #[cal/mol-K] - Enthalpy of formation of CO at 298.15 K
delta_H_H2O_for_298 = -57.7979*10**(3); #[cal/mol-K] - Enthalpy of formation of H2O at 298.15 K
delta_G_CO2_for_298 = -94.2598*10**(3); #[cal/mol] - Gibbs free energy change for formation of CO at 298.15 K
delta_G_CO_for_298 = -32.8079*10**(3); #[cal/mol] - Gibbs free energy change for formation of CH3OH at 298.15 K
delta_G_H2O_for_298 = -54.6357*10**(3); #[cal/mol] - Gibbs free energy change for formation of H2O at 298.15 K
#standard enthalpy change of reaction at temperature T is given by,
#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T
delta_a = a_CO2 + a_H2 - a_CO - a_H2O;
delta_b = b_CO2 + b_H2 - b_CO - b_H2O;
delta_c = c_CO2 + c_H2 - c_CO - c_H2O;
delta_d = d_CO2 + d_H2 - d_CO - d_H2O;
#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));
#Therefore we get,
def f11(T):
return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))
delta_H_rkn_1200 = delta_H_rkn_298 + quad(f11,T_1,T_2)[0]
print " Standard enthalpy change of reaction at 1200 K is %f cal"%(delta_H_rkn_1200);
#Let us determine the standard Gibbs free energy change of reaction at 298.15 K
delta_G_rkn_298 = delta_G_CO2_for_298 - delta_G_CO_for_298 - delta_G_H2O_for_298; #[cal]
#Now determining the standard entropy change of reaction at 298.15 K
delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15; #[cal/mol-K]
def f12(T):
return (delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3))/T
delta_S_rkn_1200 = delta_S_rkn_298 + quad(f12,T_1,T_2)[0]
#Therefore,the standard Gibbs free energy change of the reaction is given by,
delta_G_rkn_1200 = delta_H_rkn_1200 - 1200*delta_S_rkn_1200; #[cal]
print " Standard Gibbs free energy change of reaction at 1200 K is %f cal"%(delta_G_rkn_1200);
T_1 = 298.15; #[K] - Smath.tan(math.radiansard temperature
T_2 = 500; #[K] - Reaction temperature
a_NH3 = 6.5846;
a_N2 = 6.903;
a_H2 = 6.952;
b_NH3 = 0.61251*10**(-2);
b_N2 = -0.03753*10**(-2);
b_H2 = -0.04576*10**(-2);
c_NH3 = 0.23663*10**(-5);
c_N2 = 0.1930*10**(-5);
c_H2 = 0.09563*10**(-5);
d_NH3 = -1.5981*10**(-9);
d_N2 = -0.6861*10**(-9);
d_H2 = -0.2079*10**(-9);
delta_H_rkn_298 = -22.08*10**(3); #[cal] - Reaction enthalpy at 298.15 K
delta_H_NH3_for_298 = -11.04*10**(3); #[cal/mol] - Enthalpy of formation of NH3 at 298.15 K
delta_G_NH3_for_298 = -3.976*10**(3); #[cal/mol] - Gibbs free energy change for formation of NH3 at 298.15 K
# Calculations and Results
#standard enthalpy change of reaction at temperature T is given by,
#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T
delta_a = 2*a_NH3 - a_N2 - 3*a_H2;
delta_b = 2*b_NH3 - b_N2 - 3*b_H2;
delta_c = 2*c_NH3 - c_N2 - 3*c_H2;
delta_d = 2*d_NH3 - d_N2 - 3*d_H2;
#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));
#Therefore we get,
def f5(T):
return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))
delta_H_rkn_500 = delta_H_rkn_298 + quad(f5,T_1,T_2)[0]
print " Standard enthalpy change of reaction at 500 K is %f cal"%(delta_H_rkn_500);
#Let us determine the standard Gibbs free energy change of reaction at 298.15 K
delta_G_rkn_298 = 2*delta_G_NH3_for_298; #[cal]
#Now determining the standard entropy change of reaction at 298.15 K
delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15; #[cal/mol-K]
def f6(T):
return (delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3))/T
delta_S_rkn_500 = delta_S_rkn_298 + quad(f6,T_1,T_2)[0]
#Therefore,the standard Gibbs free energy change of the reaction is given by,
delta_G_rkn_500 = delta_H_rkn_500 - 500*delta_S_rkn_500; #[cal]
print " Standard Gibbs free energy change of reaction at 500 K is %f cal"%(delta_G_rkn_500);
delta_H_rkn_298 = -57.7979*10**(3); #[cal/mol] - Reaction enthalpy at 298.15 K
delta_G_rkn_298 = -54.6351*10**(3); #[cal/mol] - Gibbs free energy change for formation of H2O at 298.15 K
#Smath.tan(math.radiansard enthalpy change of reaction at temperature T is given by,
#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T
T_1 = 298.15; #[K] - Smath.tan(math.radiansard temperature
T_2_1 = 873.15; #[K] - Reaction temperature
T_2_2 = 1000; #[K] - Reaction temperature
# Calculations and Results
#Therefore we get,
def f34(T):
return 7.7+0.04594*10**(-2)*T+0.2521*10**(-5)*T**(2)-0.8587*10**(-9)*T**(3)
delta_H_rkn_873 = delta_H_rkn_298 + quad(f34,T_1,T_2_1)[0]
def f35(T):
return 7.7+0.04594*10**(-2)*T+0.2521*10**(-5)*T**(2)-0.8587*10**(-9)*T**(3)
delta_H_rkn_1000 = delta_H_rkn_298 + quad(f35,T_1,T_2_2)[0]
print " Standard enthalpy change of reaction at 873 K is %f cal/mol"%(delta_H_rkn_873);
print " Standard enthalpy change of reaction at 1000 K is %f cal/mol"%(delta_H_rkn_1000);
#Now determining the smath.tan(math.radiansard entropy change of reaction at 298.15 K
delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15; #[cal/mol-K]
def f36(T):
return (7.7+0.04594*10**(-2)*T+0.2521*10**(-5)*T**(2)-0.8587*10**(-9)*T**(3))/T
delta_S_rkn_873 = delta_S_rkn_298 + quad(f36,T_1,T_2_1)[0]
def f37(T):
return (7.7+0.04594*10**(-2)*T+0.2521*10**(-5)*T**(2)-0.8587*10**(-9)*T**(3))/T
delta_S_rkn_1000 = delta_S_rkn_298 + quad(f37,T_1,T_2_2)[0]
#Therefore,the smath.tan(math.radiansard Gibbs free energy change of the reaction is given by,
delta_G_rkn_873 = (delta_H_rkn_873 - 873.15*delta_S_rkn_873)*10**(-3); #[kcal/mol]
delta_G_rkn_1000 = (delta_H_rkn_1000 - 1000*delta_S_rkn_1000)*10**(-3); #[kcal/mol]
print " Standard Gibbs free energy change of reaction at 873 K is %f kcal/mol"%(delta_G_rkn_873);
print " Standard Gibbs free energy change of reaction at 1000 K is %f kcal/mol"%(delta_G_rkn_1000);
T_1 = 298.15; #[K] - Smath.tan(math.radiansard temperature
T_2 = 500.; #[K] - Reaction temperature
a_C2H6 = 1.648;
a_O2 = 6.085;
a_CO2 = 5.316;
a_H2O = 7.700;
b_C2H6 = 4.124*10**(-2);
b_O2 = 0.3631*10**(-2);
b_CO2 = 1.4285*10**(-2);
b_H2O = 0.04594*10**(-2);
c_C2H6 = -1.530*10**(-5);
c_O2 = -0.1709*10**(-5);
c_CO2 = -0.8362*10**(-5);
c_H2O = 0.2521*10**(-5);
d_C2H6 = 1.740*10**(-9);
d_O2 = 0.3133*10**(-9);
d_CO2 = 1.784*10**(-9);
d_H2O = -0.8587*10**(-9);
# Calculations and Results
delta_H_C2H6_for_298 = -20.236*10**(3); #[cal/mol] - Enthalpy of formation of C2H6 at 298.15 K
delta_H_CO2_for_298 = -94.0518*10**(3); #[cal/mol] - Enthalpy of formation of CO2 at 298.15 K
delta_H_H2O_for_298 = -57.7979*10**(3); #[cal/mol] - Enthalpy of formation of H2O at 298.15 K
delta_H_rkn_298 = 2*delta_H_CO2_for_298 + 3*delta_H_H2O_for_298 - delta_H_C2H6_for_298; #[cal] - Reaction enthalpy at 298.15 K
#standard enthalpy change of reaction at temperature T is given by,
#delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T
delta_a = 2*a_CO2 + 3*a_H2O - a_C2H6 - 7./2*(a_O2);
delta_b = 2*b_CO2 + 3*b_H2O - b_C2H6 - 7./2*(b_O2);
delta_c = 2*c_CO2 + 3*c_H2O - c_C2H6 - 7./2*(c_O2);
delta_d = 2*d_CO2 + 3*d_H2O - d_C2H6 - 7./2*(d_O2);
#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));
#Therefore we get,
def f55(T):
return delta_a+(delta_b*T)+(delta_c*T**(2))+(delta_d*T**(3))
delta_H_rkn_500 = delta_H_rkn_298 + quad(f55,T_1,T_2)[0]
delta_H_rkn_500 = delta_H_rkn_500*10**(-3); #[kcal]
print " The heat exchange of the reaction at 500 K is %f kcal"%(delta_H_rkn_500);
T_1 = 298.15; #[K] - Smath.tan(math.radiansard temperature
T_2 = 600.; #[K] - Reaction temperature
a_C2H6 = -8.65;
a_H2O = 7.700;
a_CH4 = 4.750;
a_O2 = 6.085;
b_C2H6 = 11.578*10**(-2);
b_H2O = 0.04594*10**(-2);
b_CH4 = 1.200*10**(-2);
b_O2 = 0.3631*10**(-2);
c_C2H6 = -7.540*10**(-5);
c_H2O = 0.2521*10**(-5);
c_CH4 = 0.3030*10**(-5);
c_O2 = -0.1709*10**(-5);
d_C2H6 = 18.54*10**(-9);
d_H2O = -0.8587*10**(-9);
d_CH4 = -2.630*10**(-9);
d_O2 = 0.3133*10**(-9);
delta_S_CH4_for_298 = 44.50; #[cal/mol-K] - Entropy of formation of CH4 at 298.15 K
delta_S_O2_for_298 = 49.00; #[cal/mol-K] - Entropy of formation of O2 at 298.15 K
delta_S_C2H6_for_298 = 64.34; #[cal/mol-K] - Entropy of formation of C2H6 at 298.15 K
delta_S_H2O_for_298 = 45.11; #[cal/mol-K] - Entropy of formation of C2H6 at 298.15 K
# Calculations and Results
#Cp_0 = delta_a + (delta_b*T) + (delta_c*T**(2)) + (delta_d*T**(3));
#Smath.tan(math.radiansard entropy change of reaction at temperature T is given by,
#delta_S_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T
delta_a = 1./6*(a_C2H6) + 3./2*(a_H2O) - a_CH4 - 3./4*(a_O2);
delta_b = 1./6*(b_C2H6) + 3./2*(b_H2O) - b_CH4 - 3./4*(b_O2);
delta_c = 1./6*(c_C2H6) + 3./2*(c_H2O) - c_CH4 - 3./4*(c_O2);
delta_d = 1./6*(d_C2H6) + 3./2*(d_H2O) - d_CH4 - 3./4*(d_O2);
delta_S_rkn_298 = 1./6*(delta_S_C2H6_for_298) + 3./2*(delta_S_H2O_for_298) - delta_S_CH4_for_298 - 3./4*(delta_S_O2_for_298); #[cal/K]
def f27(T):
return (delta_a+delta_b*T+delta_c*T**(2)+delta_d*T**(3))/T
delta_S_rkn_600 = delta_S_rkn_298 + quad(f27,T_1,T_2)[0]
print " Change in entropy of the reaction at 298.15 K is %f cal/K"%(delta_S_rkn_298);
print " Standard entropy change of reaction at 600 K is %f cal/K"%(delta_S_rkn_600);
T_1 = 298.15; #[K] - Smath.tan(math.radiansard temperature
T_2 = 973.15; #[K] - Reaction temperature
#At 298.15 K
delta_H_CH4_for_298 = -17.889*10**(3); #[cal/mol] - Enthalpy of formation of CH4 at 298.15 K
delta_H_C_for_298 = 0.00; #[cal/mol] - Enthalpy of formation of C (s, graphite) at 298.15 K
delta_H_H2_for_298 = 0.00; #[cal/mol] - Enthalpy of formation of H2 at 298.15 K
delta_G_CH4_for_298 = -12.140*10**(3); #[cal/mol] - Gibbs free energy change for formation of H2 at 298.15 K
delta_G_C_for_298 = 0.00; #[cal/mol] - Gibbs free energy change for formation of C (s, graphite) at 298.15 K
delta_G_H2_for_298 = 0.00; #[cal/mol] - Gibbs free energy change for formation of H2 at 298.15 K
# Calculations and Results
#/standard heat capacity data in cal/mol-K are given below, T is in K
#Cp_0_CH4 = 4.75 + 1.2*10**(-2)*T + 0.303*10**(-5)*T**(2) - 2.63*10**(-9)*T**(3)
#Cp_0_C = 3.519 + 1.532*10**(-3)*T - 1.723*10**(5)*T**(-2)
#Cp_0_H2 = 6.952 - 0.04576*10**(-2)*T + 0.09563*10**(-5)*T**(2) - 0.2079*10**(-9)*T**(3)
#Therefore standard heat capacity of reaction is given by,
#Cp_0_rkn = 2*Cp_0_H2 + Cp_0_C - Cp_0_CH4
#On simplification,we get the relation
#Cp_0_rkn = 12.673 - 0.0113832*T - 1.1174*10**(-6)*T**(2) + 2.2142*10**(-9)*T**(3) - 1.723*10**(5)*T**(-2)
delta_H_rkn_298 = -delta_H_CH4_for_298; #[cal] - Enthalpy of reaction at 298.15 K
delta_G_rkn_298 = -delta_G_CH4_for_298; #[cal] - Gibbs free energy of the reaction at 298.15 K
def f63(T):
return 12.673-0.0113832*T-1.1174*10**(-6)*T**(2)+2.2142*10**(-9)*T**(3)-1.723*10**(5)*T**(-2)
delta_H_rkn_973 = delta_H_rkn_298 + quad(f63,T_1,T_2)[0]
print " Standard enthalpy change of reaction at 973.15 K is %f cal"%(delta_H_rkn_973);
#Now determining the smath.tan(math.radiansard entropy change of reaction at 298.15 K
delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15; #[cal/K]
def f64(T):
return (12.673-0.0113832*T-1.1174*10**(-6)*T**(2)+2.2142*10**(-9)*T**(3)-1.723*10**(5)*T**(-2))/T
delta_S_rkn_973 = delta_S_rkn_298 + quad(f64,T_1,T_2)[0]
#Therefore,the smath.tan(math.radiansard Gibbs free energy change of the reaction is given by,
delta_G_rkn_973 = delta_H_rkn_973 - 973.15*delta_S_rkn_973; #[cal]
print " Standard Gibbs free energy change of reaction at 973 K is %f cal"%(delta_G_rkn_973);
T_1 = 298.15; #[K] - Smath.tan(math.radiansard temperature
T_2 = 1000; #[K] - Reaction temperature
#At 298.15 K
delta_H_C_for_298 = 0.00; #[cal/mol] - Enthalpy of formation of C(s,graphite) at 298.15 K
delta_H_H2O_for_298 = -57.7979*10**(3); #[cal/mol] - Enthalpy of formation of H2O at 298.15 K
delta_H_CO_for_298 = -26.4157*10**(3); #[cal/mol] - Enthalpy of formation of CO at 298.15 K
delta_H_H2_for_298 = 0.00; #[cal/mol] - Enthalpy of formation of H2 at 298.15 K
delta_G_C_for_298 = 0.00; #[cal/mol] - Gibbs free energy change for formation of C(s, graphite) at 298.15 K
delta_G_H2O_for_298 = -54.6357*10**(3); #[cal/mol] - Gibbs free energy change for formation of H2O at 298.15 K
delta_G_CO_for_298 = -32.8079*10**(3); #[cal/mol] - Gibbs free energy change for formation of CO at 298.15 K
delta_G_H2_for_298 = 0.00; #[cal/mol] - Gibbs free energy change for formation of H2 at 298.15 K
# Calculations and Results
#/standard heat capacity data in cal/mol-K are given below, T is in K
#Cp_0_C = 3.519 + 1.532*10**(-3)*T - 1.723*10**(5)*T**(-2)
#Cp_0_H2O = 7.7 + 0.04594*10**(-2)*T + 0.2521*10**(-5)*T**(2) - 0.8587*10**(-9)*T**(3)
#Cp_0_CO = 6.726 + 0.04001*10**(-2)*T + 0.1283*10**(-5)*T**(2) - 0.5307*10**(-9)*T**(3)
#Cp_0_H2 = 6.952 - 0.04576*10**(-2)*T + 0.09563*10**(-5)*T**(2) - 0.2079*10**(-9)*T**(3)
#Therefore standard heat capacity of reaction is given by,
#Cp_0_rkn = 2.459 - 2.0489*10**(-3)*T - 2.817*10**(-7)*T**(2) + 1.201*10**(-10)*T**(3) + 1.723*10**(5)*T**(-2)
delta_H_rkn_298 = delta_H_CO_for_298 + delta_H_H2_for_298 - delta_H_C_for_298 - delta_H_H2O_for_298; #[cal] - Enthalpy of reaction at 298.15 K
delta_G_rkn_298 = delta_G_CO_for_298 + delta_G_H2_for_298 - delta_G_C_for_298 - delta_G_H2O_for_298; #[cal] - Gibbs free energy of the reaction at 298.15 K
def f13(T):
return 2.459-2.0489*10**(-3)*T-2.817*10**(-7)*T**(2)+1.201*10**(-10)*T**(3)+1.723*10**(5)*T**(-2)
delta_H_rkn_1000 = delta_H_rkn_298 + quad(f13,T_1,T_2)[0]
print " Standard enthalpy change of reaction at 1000 K is %f cal"%(delta_H_rkn_1000);
#Now determining the smath.tan(math.radiansard entropy change of reaction at 298.15 K
delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15; #[cal/K]
def f14(T):
return (2.459-2.0489*10**(-3)*T-2.817*10**(-7)*T**(2)+1.201*10**(-10)*T**(3)+1.723*10**(5)*T**(-2))/T
delta_S_rkn_1000 = delta_S_rkn_298 + quad(f14,T_1,T_2)[0]
#Therefore,the smath.tan(math.radiansard Gibbs free energy change of the reaction is given by,
delta_G_rkn_1000 = delta_H_rkn_1000 - 1000*delta_S_rkn_1000; #[cal]
print " Standard Gibbs free energy change of reaction at 1000 K is %f cal"%(delta_G_rkn_1000);
T_1 = 298.15; #[K] - Smath.tan(math.radiansard temperature
T_2 = 1042; #[K] - Reaction temperature
#At 298.15 K
delta_H_CaCO3_for_298 = -289.5*10**(3); #[cal/mol] - Enthalpy of formation of CaCO3 at 298.15 K
delta_H_CaO_for_298 = -151.7*10**(3); #[cal/mol] - Enthalpy of formation of CaO at 298.15 K
delta_H_CO2_for_298 = -94.052*10**(3); #[cal/mol] - Enthalpy of formation of CO2 at 298.15 K
delta_G_CaCO3_for_298 = -270.8*10**(3); #[cal/mol] - Gibbs free energy change for formation of CaCO3 at 298.15 K
delta_G_CaO_for_298 = -144.3*10**(3); #[cal/mol] - Gibbs free energy change for formation of CaO at 298.15 K
delta_G_CO2_for_298 = -94.260*10**(3); #[cal/mol] - Gibbs free energy change for formation of CO2 at 298.15 K
# Calculations and Results
#/Smath.tan(math.radiansaerd heat capacity data in cal/mol-K are given below, T is in K
#Cp_0_CO2 = 5.316 + 1.4285*10**(-2)*T - 0.8362*10**(-5)*T**(2) + 1.784*10**(-9)*T**(3)
#Cp_0_CaO = 12.129 + 0.88*10**(-3)*T + 2.08*10**(5)*T**(-2)
#Cp_0_CaCO3 = 24.98 + 5.240*10**(-3)*T + 6.199*10**(5)*T**(-2)
#Therefore smath.tan(math.radiansard heat capacity of reaction is given by,
#Cp_0_rkn = -7.535 + 9.925*10**(-3)*T - 0.8362*10**(-5)*T**(2) + 1.784*10**(-9)*T**(3) + 4.119*10**(5)*T**(-2)
delta_H_rkn_298 = delta_H_CaO_for_298 + delta_H_CO2_for_298 - delta_H_CaCO3_for_298; #[cal] - Enthalpy of reaction at 298.15 K
delta_G_rkn_298 = delta_G_CaO_for_298 + delta_G_CO2_for_298 - delta_G_CaCO3_for_298; #[cal] - Gibbs free energy of the reaction at 298.15 K
def f38(T):
return -7.535+9.925*10**(-3)*T-0.8362*10**(-5)*T**(2)+1.784*10**(-9)*T**(3)+4.119*10**(5)*T**(-2)
delta_H_rkn_1042 = delta_H_rkn_298 + quad(f38,T_1,T_2)[0]
print " Standard enthalpy change of reaction at 1042 K is %f cal"%(delta_H_rkn_1042);
#Now determining the smath.tan(math.radiansard entropy change of reaction at 298.15 K
delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15; #[cal/K]
def f39(T):
return (-7.535+9.925*10**(-3)*T-0.8362*10**(-5)*T**(2)+1.784*10**(-9)*T**(3)+4.119*10**(5)*T**(-2))/T
delta_S_rkn_1042 = delta_S_rkn_298 + quad(f39,T_1,T_2)[0]
#Therefore,the smath.tan(math.radiansard Gibbs free energy change of the reaction is given by,
delta_G_rkn_1042 = delta_H_rkn_1042 - 1042*delta_S_rkn_1042; #[cal]
print " Standard Gibbs free energy change of reaction at 1042 K is %f cal"%(delta_G_rkn_1042);