#Variable declaration
#Type of bond broken:
hh_no=1 #No.of bonds broken
hh_be=436.4 #Bond enthalpy in kJ/mol
hh_ec=436.4 #Energy Change in kJ/mol
cl_no=1 #No.of bonds broken
cl_be=242.7 #Bond enthalpy in kJ/mol
cl_ec=242.7 #Energy Change in kJ/mol
#Type of bonds formed
hcl_no=2 #No.of bonds formed
hcl_be=431.9 #Bond enthalpy in kJ/mol
hcl_ec=863.8 #Energy Change in kJ/mol
#data:
Hf_hcl=-92.3 #Heat of formation of Hcl in kJ/mol
Hf_H2=0 #Heat of formation of H2 in kJ/mol
Hf_Cl2=0 #Heat of formation of Cl2 in kJ/mol
#Calculation
energy_in=hh_ec+cl_ec #Total energy input in kJ/mol
energy_rlsd=hcl_ec #Total energy released
delta_H=energy_in-energy_rlsd #enthalpy change in kJ/mol
delta_Ho=2*(-92.3)-(Hf_H2+Hf_Cl2) #Ethalpy change from eq 6.18
#Result
print "Using equation 9.3,delta_H=",delta_H,"kJ/mol"
print"Alternatively:"
print"Enthalpy change is:",delta_Ho,"kJ/mol"
#Variable declaration
#Type of bond broken:
hh_no=2 #No.of bonds broken
hh_be=436.4 #Bond enthalpy in kJ/mol
hh_Ec=872.8 #Energy Change in kJ/mol
oo_no=1 #No.of bonds broken
oo_be=498.7 #Bond enthalpy in kJ/mol
oo_Ec=498.7 #Energy Change in kJ/mol
#Types of bond formed
nn_oh=4 #No.of bonds formed
nn_be=460 #Bond enthalpy in kJ/mol
bb_Ec=1840 #Energy Change in kJ/mol
#data:
Hf_h2o=-241.8 #Heat of formation of H2O in kJ/mol
Hf_h2=0 #Heat of formation of H2 in kJ/mol
Hf_O2=0 #Heat of formation of O2 in kJ/mol
#Calculation
energy_in=hh_Ec+oo_Ec #Total energy input in kJ/mol
energy_rlsd=bb_Ec #Total energy released
delta_h=energy_in-energy_rlsd #enthalpy change in kJ/mol
delta_Ho=2*(Hf_h2o)-(2*Hf_h2+Hf_O2) #Ethalpy change from eq 6.18
#Result
print"Enthalpy change is",delta_Ho,"kJ/mol"