summaryrefslogtreecommitdiff
path: root/Chemical_Engineering_Thermodynamics_by_P_Ahuja/6-Chemical_reactions.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Chemical_Engineering_Thermodynamics_by_P_Ahuja/6-Chemical_reactions.ipynb')
-rw-r--r--Chemical_Engineering_Thermodynamics_by_P_Ahuja/6-Chemical_reactions.ipynb720
1 files changed, 720 insertions, 0 deletions
diff --git a/Chemical_Engineering_Thermodynamics_by_P_Ahuja/6-Chemical_reactions.ipynb b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/6-Chemical_reactions.ipynb
new file mode 100644
index 0000000..f452ee9
--- /dev/null
+++ b/Chemical_Engineering_Thermodynamics_by_P_Ahuja/6-Chemical_reactions.ipynb
@@ -0,0 +1,720 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6: Chemical reactions"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.10: Determination_of_standard_enthalpy_change_and_Gibbs_free_energy_change.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"//Example - 6.10\n",
+"//Page number - 228\n",
+"printf('Example - 6.10 and Page number - 228\n\n');\n",
+"\n",
+"//Given\n",
+"T_1 = 298.15;//[K] - Standard temperature\n",
+"T_2 = 1042;//[K] - Reaction temperature\n",
+"\n",
+"//At 298.15 K\n",
+"delta_H_CaCO3_for_298 = -289.5*10^(3);//[cal/mol] - Enthalpy of formation of CaCO3 at 298.15 K\n",
+"delta_H_CaO_for_298 = -151.7*10^(3);//[cal/mol] - Enthalpy of formation of CaO at 298.15 K\n",
+"delta_H_CO2_for_298 = -94.052*10^(3);//[cal/mol] - Enthalpy of formation of CO2 at 298.15 K\n",
+"delta_G_CaCO3_for_298 = -270.8*10^(3);//[cal/mol] - Gibbs free energy change for formation of CaCO3 at 298.15 K\n",
+"delta_G_CaO_for_298 = -144.3*10^(3);//[cal/mol] - Gibbs free energy change for formation of CaO at 298.15 K\n",
+"delta_G_CO2_for_298 = -94.260*10^(3);//[cal/mol] - Gibbs free energy change for formation of CO2 at 298.15 K\n",
+"\n",
+"///Standaerd heat capacity data in cal/mol-K are given below, T is in K\n",
+"//Cp_0_CO2 = 5.316 + 1.4285*10^(-2)*T - 0.8362*10^(-5)*T^(2) + 1.784*10^(-9)*T^(3)\n",
+"//Cp_0_CaO = 12.129 + 0.88*10^(-3)*T + 2.08*10^(5)*T^(-2)\n",
+"//Cp_0_CaCO3 = 24.98 + 5.240*10^(-3)*T + 6.199*10^(5)*T^(-2)\n",
+"\n",
+"//Therefore standard heat capacity of reaction is given by,\n",
+"//Cp_0_rkn = Cp_0_CO2 + Cp_0_CaO - Cp_0_CaCO3\n",
+"//On simplification,we get the relation\n",
+"//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)\n",
+"\n",
+"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\n",
+"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\n",
+"\n",
+"delta_H_rkn_1042 = delta_H_rkn_298 + integrate('-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',T_1,T_2);//[cal]\n",
+"\n",
+"printf(' Standard enthalpy change of reaction at 1042 K is %f cal\n\n',delta_H_rkn_1042);\n",
+"\n",
+"//Now determining the standard entropy change of reaction at 298.15 K\n",
+"delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;//[cal/K]\n",
+"delta_S_rkn_1042 = delta_S_rkn_298 + integrate('(-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','T',T_1,T_2);//[cal/K]\n",
+"\n",
+"//Therefore,the standard Gibbs free energy change of the reaction is given by,\n",
+"delta_G_rkn_1042 = delta_H_rkn_1042 - 1042*delta_S_rkn_1042;//[cal]\n",
+"\n",
+"printf(' Standard Gibbs free energy change of reaction at 1042 K is %f cal',delta_G_rkn_1042);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.1: Determination_of_enthalpy_entropy_and_Gibbs_free_energy_change_of_reaction.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"//Example - 6.1\n",
+"//Page number - 217\n",
+"printf('Example - 6.1 and Page number - 217\n\n');\n",
+"\n",
+"\n",
+"//Given\n",
+"T_1 = 298.15;//[K] - Standard temperature\n",
+"T_2 = 880;//[K] - Reaction temperature\n",
+"\n",
+"a_SO2 = 6.157;\n",
+"a_SO3 = 3.918;\n",
+"a_O2 = 6.732;\n",
+"b_SO2 = 1.384*10^(-2);\n",
+"b_SO3 = 3.483*10^(-2);\n",
+"b_O2 = 0.1505*10^(-2);\n",
+"c_SO2 = -0.9103*10^(-5);\n",
+"c_SO3 = -2.675*10^(-5);\n",
+"c_O2 = -0.01791*10^(-5);\n",
+"d_SO2 = 2.057*10^(-9);\n",
+"d_SO3 = 7.744*10^(-9);\n",
+"\n",
+"delta_H_rkn_298 = -23.45*10^(3);//[cal] - Rkn enthalpy at 298.15 K\n",
+"delta_H_SO2_for_298 = -70.94*10^(3);//[cal/mol] - Enthalpy of formation of S02 at 298.15 K\n",
+"delta_H_SO3_for_298 = -94.39*10^(3);//[cal/mol] - Enthalpy of formation of SO3 at 298.15 K\n",
+"delta_G_SO2_for_298 = -71.68*10^(3);//[cal/mol] - Gibbs free energy change for formation of SO2 at 298.15 K\n",
+"delta_G_SO3_for_298 = -88.59*10^(3);//[cal/mol] - Gibbs free energy change for formation of SO3 at 298.15 K\n",
+"\n",
+"//(1)\n",
+"//Standard enthalpy change of reaction at temperature T is given by,\n",
+"//delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
+"delta_a = a_SO3 - a_SO2 - (a_O2/2);\n",
+"delta_b = b_SO3 - b_SO2 - (b_O2/2);\n",
+"delta_c = c_SO3 - c_SO2 - (c_O2/2);\n",
+"delta_d = d_SO3 - d_SO2;\n",
+"\n",
+"//Cp_0 = delta_a + (delta_b*T) + (delta_c*T^(2)) + (delta_d*T^(3));\n",
+"//Therefore we get,\n",
+"delta_H_rkn_880 = delta_H_rkn_298 + integrate('delta_a+(delta_b*T)+(delta_c*T^(2))+(delta_d*T^(3))','T',T_1,T_2);\n",
+"\n",
+"//On manual simplification of the above expression,we will get the expression for 'delta_H_rkn_880' as a function of T,\n",
+" \n",
+"printf(' (1).The expression for standard enthalpy change of reaction as a function of temperature is given by\n');\n",
+"printf(' 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)\n\n')\n",
+"\n",
+"printf(' (2).Standard enthalpy change of reaction at 880 K is %f cal\n\n',delta_H_rkn_880);\n",
+"\n",
+"//(3)\n",
+"//Let us determine the standard entropy change of reaction at 298.15 K\n",
+"delta_S_SO2_298 = (delta_H_SO2_for_298 - delta_G_SO2_for_298)/298.15;//[cal/mol-K]\n",
+"delta_S_SO3_298 = (delta_H_SO3_for_298 - delta_G_SO3_for_298)/298.15;//[cal/mol-K]\n",
+"delta_S_O2_298 = 0;//[cal/mol-K]\n",
+"\n",
+"delta_S_rkn_298 = delta_S_SO3_298 - delta_S_SO2_298 - (delta_S_O2_298/2);//[cal/K]\n",
+"delta_S_rkn_880 = delta_S_rkn_298 + integrate('(delta_a+delta_b*T+delta_c*T^(2)+delta_d*T^(3))/T','T',T_1,T_2);//[cal/K]\n",
+"\n",
+"printf(' (3).Standard entropy change of reaction at 880 K is %f cal/K\n\n',delta_S_rkn_880);\n",
+"\n",
+"//(4)\n",
+"delta_G_rkn_880 = delta_H_rkn_880 - 880*delta_S_rkn_880;//[cal]\n",
+"\n",
+"printf(' (4).Standard Gibbs free energy change of reaction at 880 K is %f cal\n\n',delta_G_rkn_880);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.2: Determination_of_standard_enthalpy_and_Gibbs_free_energy_change_of_reaction.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"//Example - 6.2\n",
+"//Page number - 219\n",
+"printf('Example - 6.2 and Page number - 219\n\n');\n",
+"\n",
+"//Given\n",
+"T_1 = 298.15;//[K] - Standard temperature\n",
+"T_2 = 400;//[K] - Reaction temperature\n",
+"\n",
+"a_CH3OH = 4.55;\n",
+"a_CO = 6.726;\n",
+"a_H2 = 6.952;\n",
+"b_CH3OH = 2.186*10^(-2);\n",
+"b_CO = 0.04001*10^(-2);\n",
+"b_H2 = -0.04576*10^(-2);\n",
+"c_CH3OH = -0.291*10^(-5);\n",
+"c_CO = 0.1283*10^(-5);\n",
+"c_H2 = 0.09563*10^(-5);\n",
+"d_CH3OH = -1.92*10^(-9);\n",
+"d_CO = -0.5307*10^(-9);\n",
+"d_H2 = -0.2079*10^(-9);\n",
+"\n",
+"delta_H_rkn_298 = -21.6643*10^(3);//[cal] - Reaction enthalpy at 298.15 K\n",
+"delta_H_CO_for_298 = -26.4157*10^(3);//[cal/mol] - Enthalpy of formation of CO at 298.15 K\n",
+"delta_H_CH3OH_for_298 = -48.08*10^(3);//[cal/mol] - Enthalpy of formation of CH3OH at 298.15 K\n",
+"delta_G_CO_for_298 = -32.8079*10^(3);//[cal/mol] - Gibbs free energy change for formation of CO at 298.15 K\n",
+"delta_G_CH3OH_for_298 = -38.69*10^(3);//[cal/mol] - Gibbs free energy change for formation of CH3OH at 298.15 K\n",
+"\n",
+"//Standard enthalpy change of reaction at temperature T is given by,\n",
+"//delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
+"delta_a = a_CH3OH - a_CO - 2*(a_H2);\n",
+"delta_b = b_CH3OH - b_CO - 2*(b_H2);\n",
+"delta_c = c_CH3OH - c_CO - 2*(c_H2);\n",
+"delta_d = d_CH3OH - d_CO - 2*(d_H2);\n",
+"\n",
+"//Cp_0 = delta_a + (delta_b*T) + (delta_c*T^(2)) + (delta_d*T^(3));\n",
+"//Therefore we get,\n",
+"delta_H_rkn_400 = delta_H_rkn_298 + integrate('delta_a+(delta_b*T)+(delta_c*T^(2))+(delta_d*T^(3))','T',T_1,T_2);\n",
+"\n",
+"printf(' Standard enthalpy change of reaction at 400 K is %f cal\n\n',delta_H_rkn_400);\n",
+"\n",
+"//Let us determine the standard Gibbs free energy change of reaction at 298.15 K\n",
+"delta_G_rkn_298 = delta_G_CH3OH_for_298 - delta_G_CO_for_298;//[cal]\n",
+"\n",
+"//Now determining the standard entropy change of reaction at 298.15 K\n",
+"delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;//[cal/mol-K]\n",
+"\n",
+"delta_S_rkn_400 = delta_S_rkn_298 + integrate('(delta_a+delta_b*T+delta_c*T^(2)+delta_d*T^(3))/T','T',T_1,T_2);//[cal/K]\n",
+"//Therefore,the standard Gibbs free energy change of the reaction is given by,\n",
+"delta_G_rkn_400 = delta_H_rkn_400 - 400*delta_S_rkn_400;//[cal]\n",
+"\n",
+"printf(' Standard Gibbs free energy change of reaction at 400 K is %f cal\n',delta_G_rkn_400);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.3: Determination_of_standard_enthalpy_and_Gibbs_free_energy_change_of_reaction.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"//Example - 6.3\n",
+"//Page number - 220\n",
+"printf('Example - 6.3 and Page number - 220\n\n');\n",
+"\n",
+"//Given\n",
+"T_1 = 298.15;//[K] - Standard temperature\n",
+"T_2 = 1200;//[K] - Reaction temperature\n",
+"\n",
+"\n",
+"a_CO2 = 5.316;\n",
+"a_H2 = 6.952;\n",
+"a_CO = 6.726;\n",
+"a_H2O = 7.700;\n",
+"b_CO2 = 1.4285*10^(-2);\n",
+"b_H2 = -0.04576*10^(-2);\n",
+"b_CO = 0.04001*10^(-2);\n",
+"b_H2O = 0.04594*10^(-2);\n",
+"c_CO2 = -0.8362*10^(-5);\n",
+"c_H2 = 0.09563*10^(-5);\n",
+"c_CO = 0.1283*10^(-5);\n",
+"c_H2O = 0.2521*10^(-5);\n",
+"d_CO2 = 1.784*10^(-9);\n",
+"d_H2 = -0.2079*10^(-9);\n",
+"d_CO = -0.5307*10^(-9);\n",
+"d_H2O = -0.8587*10^(-9);\n",
+"\n",
+"delta_H_rkn_298 = -9.8382*10^(3);//[cal] - Reaction enthalpy at 298.15 K\n",
+"delta_H_CO2_for_298 = -94.0518*10^(3);//[cal/mol-K] - Enthalpy of formation of CO2 at 298.15 K\n",
+"delta_H_CO_for_298 = -26.4157*10^(3);//[cal/mol-K] - Enthalpy of formation of CO at 298.15 K\n",
+"delta_H_H2O_for_298 = -57.7979*10^(3);//[cal/mol-K] - Enthalpy of formation of H2O at 298.15 K\n",
+"delta_G_CO2_for_298 = -94.2598*10^(3);//[cal/mol] - Gibbs free energy change for formation of CO at 298.15 K\n",
+"delta_G_CO_for_298 = -32.8079*10^(3);//[cal/mol] - Gibbs free energy change for formation of CH3OH at 298.15 K\n",
+"delta_G_H2O_for_298 = -54.6357*10^(3);//[cal/mol] - Gibbs free energy change for formation of H2O at 298.15 K\n",
+"\n",
+"//Standard enthalpy change of reaction at temperature T is given by,\n",
+"//delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
+"delta_a = a_CO2 + a_H2 - a_CO - a_H2O;\n",
+"delta_b = b_CO2 + b_H2 - b_CO - b_H2O;\n",
+"delta_c = c_CO2 + c_H2 - c_CO - c_H2O;\n",
+"delta_d = d_CO2 + d_H2 - d_CO - d_H2O;\n",
+"\n",
+"//Cp_0 = delta_a + (delta_b*T) + (delta_c*T^(2)) + (delta_d*T^(3));\n",
+"//Therefore we get,\n",
+"delta_H_rkn_1200 = delta_H_rkn_298 + integrate('delta_a+(delta_b*T)+(delta_c*T^(2))+(delta_d*T^(3))','T',T_1,T_2);\n",
+"\n",
+"printf(' Standard enthalpy change of reaction at 1200 K is %f cal\n\n',delta_H_rkn_1200);\n",
+"\n",
+"//Let us determine the standard Gibbs free energy change of reaction at 298.15 K\n",
+"delta_G_rkn_298 = delta_G_CO2_for_298 - delta_G_CO_for_298 - delta_G_H2O_for_298;//[cal]\n",
+"\n",
+"//Now determining the standard entropy change of reaction at 298.15 K\n",
+"delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;//[cal/mol-K]\n",
+"\n",
+"delta_S_rkn_1200 = delta_S_rkn_298 + integrate('(delta_a+delta_b*T+delta_c*T^(2)+delta_d*T^(3))/T','T',T_1,T_2);//[cal/K]\n",
+"//Therefore,the standard Gibbs free energy change of the reaction is given by,\n",
+"delta_G_rkn_1200 = delta_H_rkn_1200 - 1200*delta_S_rkn_1200;//[cal]\n",
+"\n",
+"printf(' Standard Gibbs free energy change of reaction at 1200 K is %f cal',delta_G_rkn_1200);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.4: Determination_of_standard_enthalpy_and_Gibbs_free_energy_change_of_reaction.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"//Example - 6.4\n",
+"//Page number - 221\n",
+"printf('Example - 6.4 and Page number - 221\n\n');\n",
+"\n",
+"//Given\n",
+"T_1 = 298.15;//[K] - Standard temperature\n",
+"T_2 = 500;//[K] - Reaction temperature\n",
+"\n",
+"a_NH3 = 6.5846;\n",
+"a_N2 = 6.903;\n",
+"a_H2 = 6.952;\n",
+"b_NH3 = 0.61251*10^(-2);\n",
+"b_N2 = -0.03753*10^(-2);\n",
+"b_H2 = -0.04576*10^(-2);\n",
+"c_NH3 = 0.23663*10^(-5);\n",
+"c_N2 = 0.1930*10^(-5);\n",
+"c_H2 = 0.09563*10^(-5);\n",
+"d_NH3 = -1.5981*10^(-9);\n",
+"d_N2 = -0.6861*10^(-9);\n",
+"d_H2 = -0.2079*10^(-9);\n",
+"\n",
+"delta_H_rkn_298 = -22.08*10^(3);//[cal] - Reaction enthalpy at 298.15 K\n",
+"delta_H_NH3_for_298 = -11.04*10^(3);//[cal/mol] - Enthalpy of formation of NH3 at 298.15 K\n",
+"delta_G_NH3_for_298 = -3.976*10^(3);//[cal/mol] - Gibbs free energy change for formation of NH3 at 298.15 K\n",
+"\n",
+"//Standard enthalpy change of reaction at temperature T is given by,\n",
+"//delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
+"delta_a = 2*a_NH3 - a_N2 - 3*a_H2;\n",
+"delta_b = 2*b_NH3 - b_N2 - 3*b_H2;\n",
+"delta_c = 2*c_NH3 - c_N2 - 3*c_H2;\n",
+"delta_d = 2*d_NH3 - d_N2 - 3*d_H2;\n",
+"\n",
+"//Cp_0 = delta_a + (delta_b*T) + (delta_c*T^(2)) + (delta_d*T^(3));\n",
+"//Therefore we get,\n",
+"delta_H_rkn_500 = delta_H_rkn_298 + integrate('delta_a+(delta_b*T)+(delta_c*T^(2))+(delta_d*T^(3))','T',T_1,T_2);\n",
+"\n",
+"printf(' Standard enthalpy change of reaction at 500 K is %f cal\n\n',delta_H_rkn_500);\n",
+"\n",
+"//Let us determine the standard Gibbs free energy change of reaction at 298.15 K\n",
+"delta_G_rkn_298 = 2*delta_G_NH3_for_298;//[cal]\n",
+"\n",
+"//Now determining the standard entropy change of reaction at 298.15 K\n",
+"delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;//[cal/mol-K]\n",
+"\n",
+"delta_S_rkn_500 = delta_S_rkn_298 + integrate('(delta_a+delta_b*T+delta_c*T^(2)+delta_d*T^(3))/T','T',T_1,T_2);//[cal/K]\n",
+"//Therefore,the standard Gibbs free energy change of the reaction is given by,\n",
+"delta_G_rkn_500 = delta_H_rkn_500 - 500*delta_S_rkn_500;//[cal]\n",
+"\n",
+"printf(' Standard Gibbs free energy change of reaction at 500 K is %f cal',delta_G_rkn_500);\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.5: Determination_of_standard_enthalpy_and_Gibbs_free_energy_change_of_reaction.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"//Example - 6.5\n",
+"//Page number - 222\n",
+"printf('Example - 6.5 and Page number - 222\n\n');\n",
+"\n",
+"//Given\n",
+"//Cp_0 = 7.7 + 0.04594*10^(-2)*T + 0.2521*10^(-5)*T^(2) - 0.8587*10^(-9)*T^(3)\n",
+"\n",
+"delta_H_rkn_298 = -57.7979*10^(3);//[cal/mol] - Reaction enthalpy at 298.15 K\n",
+"delta_G_rkn_298 = -54.6351*10^(3);//[cal/mol] - Gibbs free energy change for formation of H2O at 298.15 K\n",
+"\n",
+"//Standard enthalpy change of reaction at temperature T is given by,\n",
+"//delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
+"T_1 = 298.15;//[K] - Standard temperature\n",
+"T_2_1 = 873.15;//[K] - Reaction temperature\n",
+"T_2_2 = 1000;//[K] - Reaction temperature\n",
+"\n",
+"//Therefore we get,\n",
+"delta_H_rkn_873 = delta_H_rkn_298 + integrate('7.7+0.04594*10^(-2)*T+0.2521*10^(-5)*T^(2)-0.8587*10^(-9)*T^(3)','T',T_1,T_2_1);;//[cal/mol]\n",
+"delta_H_rkn_1000 = delta_H_rkn_298 + integrate('7.7+0.04594*10^(-2)*T+0.2521*10^(-5)*T^(2)-0.8587*10^(-9)*T^(3)','T',T_1,T_2_2);//[cal/mol]\n",
+"\n",
+"printf(' Standard enthalpy change of reaction at 873 K is %f cal/mol\n\n',delta_H_rkn_873);\n",
+"printf(' Standard enthalpy change of reaction at 1000 K is %f cal/mol\n\n',delta_H_rkn_1000);\n",
+"\n",
+"//Now determining the standard entropy change of reaction at 298.15 K\n",
+"delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;//[cal/mol-K]\n",
+"\n",
+"delta_S_rkn_873 = delta_S_rkn_298 + integrate('(7.7+0.04594*10^(-2)*T+0.2521*10^(-5)*T^(2)-0.8587*10^(-9)*T^(3))/T','T',T_1,T_2_1);//[cal/mol-K]\n",
+"delta_S_rkn_1000 = delta_S_rkn_298 + integrate('(7.7+0.04594*10^(-2)*T+0.2521*10^(-5)*T^(2)-0.8587*10^(-9)*T^(3))/T','T',T_1,T_2_2);//[cal/mol-K]\n",
+"//Therefore,the standard Gibbs free energy change of the reaction is given by,\n",
+"delta_G_rkn_873 = (delta_H_rkn_873 - 873.15*delta_S_rkn_873)*10^(-3);//[kcal/mol]\n",
+"delta_G_rkn_1000 = (delta_H_rkn_1000 - 1000*delta_S_rkn_1000)*10^(-3);//[kcal/mol]\n",
+"\n",
+"printf(' Standard Gibbs free energy change of reaction at 873 K is %f kcal/mol\n\n',delta_G_rkn_873);\n",
+"printf(' Standard Gibbs free energy change of reaction at 1000 K is %f kcal/mol\n',delta_G_rkn_1000);\n",
+"\n",
+""
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.6: Calculation_of_heat_exchange.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"//Example - 6.6\n",
+"//Page number - 223\n",
+"printf('Example - 6.6 and Page number - 223\n\n');\n",
+"\n",
+"//Given\n",
+"T_1 = 298.15;//[K] - Standard temperature\n",
+"T_2 = 500;//[K] - Reaction temperature\n",
+"\n",
+"a_C2H6 = 1.648;\n",
+"a_O2 = 6.085;\n",
+"a_CO2 = 5.316;\n",
+"a_H2O = 7.700;\n",
+"b_C2H6 = 4.124*10^(-2);\n",
+"b_O2 = 0.3631*10^(-2);\n",
+"b_CO2 = 1.4285*10^(-2);\n",
+"b_H2O = 0.04594*10^(-2);\n",
+"c_C2H6 = -1.530*10^(-5);\n",
+"c_O2 = -0.1709*10^(-5);\n",
+"c_CO2 = -0.8362*10^(-5);\n",
+"c_H2O = 0.2521*10^(-5);\n",
+"d_C2H6 = 1.740*10^(-9);\n",
+"d_O2 = 0.3133*10^(-9);\n",
+"d_CO2 = 1.784*10^(-9);\n",
+"d_H2O = -0.8587*10^(-9);\n",
+"\n",
+"//Since excess is entering and leaving at the same temperature,therefore it does not take or give any heat to the system.\n",
+"//Therefore the heat exchange is only due to heat of raction at temperature T, or Q = delta_H_rkn_T\n",
+"\n",
+"delta_H_C2H6_for_298 = -20.236*10^(3);//[cal/mol] - Enthalpy of formation of C2H6 at 298.15 K\n",
+"delta_H_CO2_for_298 = -94.0518*10^(3);//[cal/mol] - Enthalpy of formation of CO2 at 298.15 K\n",
+"delta_H_H2O_for_298 = -57.7979*10^(3);//[cal/mol] - Enthalpy of formation of H2O at 298.15 K\n",
+"\n",
+"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\n",
+"\n",
+"//Standard enthalpy change of reaction at temperature T is given by,\n",
+"//delta_H_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
+"delta_a = 2*a_CO2 + 3*a_H2O - a_C2H6 - 7/2*(a_O2);\n",
+"delta_b = 2*b_CO2 + 3*b_H2O - b_C2H6 - 7/2*(b_O2);\n",
+"delta_c = 2*c_CO2 + 3*c_H2O - c_C2H6 - 7/2*(c_O2);\n",
+"delta_d = 2*d_CO2 + 3*d_H2O - d_C2H6 - 7/2*(d_O2);\n",
+"\n",
+"//Cp_0 = delta_a + (delta_b*T) + (delta_c*T^(2)) + (delta_d*T^(3));\n",
+"//Therefore we get,\n",
+"delta_H_rkn_500 = delta_H_rkn_298 + integrate('delta_a+(delta_b*T)+(delta_c*T^(2))+(delta_d*T^(3))','T',T_1,T_2);//[cal]\n",
+"delta_H_rkn_500 = delta_H_rkn_500*10^(-3);//[kcal]\n",
+"\n",
+"printf(' The heat exchange of the reaction at 500 K is %f kcal',delta_H_rkn_500);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.7: Calculation_of_change_in_entropy.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"//Example - 6.7\n",
+"//Page number - 224\n",
+"printf('Example - 6.7 and Page number - 224\n\n');\n",
+"\n",
+"//Given\n",
+"T_1 = 298.15;//[K] - Standard temperature\n",
+"T_2 = 600;//[K] - Reaction temperature\n",
+"\n",
+"a_C2H6 = -8.65;\n",
+"a_H2O = 7.700;\n",
+"a_CH4 = 4.750;\n",
+"a_O2 = 6.085;\n",
+"b_C2H6 = 11.578*10^(-2);\n",
+"b_H2O = 0.04594*10^(-2);\n",
+"b_CH4 = 1.200*10^(-2);\n",
+"b_O2 = 0.3631*10^(-2);\n",
+"c_C2H6 = -7.540*10^(-5);\n",
+"c_H2O = 0.2521*10^(-5);\n",
+"c_CH4 = 0.3030*10^(-5);\n",
+"c_O2 = -0.1709*10^(-5);\n",
+"d_C2H6 = 18.54*10^(-9);\n",
+"d_H2O = -0.8587*10^(-9);\n",
+"d_CH4 = -2.630*10^(-9);\n",
+"d_O2 = 0.3133*10^(-9);\n",
+"\n",
+"delta_S_CH4_for_298 = 44.50;//[cal/mol-K] - Entropy of formation of CH4 at 298.15 K\n",
+"delta_S_O2_for_298 = 49.00;//[cal/mol-K] - Entropy of formation of O2 at 298.15 K\n",
+"delta_S_C2H6_for_298 = 64.34;//[cal/mol-K] - Entropy of formation of C2H6 at 298.15 K\n",
+"delta_S_H2O_for_298 = 45.11;//[cal/mol-K] - Entropy of formation of C2H6 at 298.15 K\n",
+"\n",
+"//Cp_0 = delta_a + (delta_b*T) + (delta_c*T^(2)) + (delta_d*T^(3));\n",
+"\n",
+"//Standard entropy change of reaction at temperature T is given by,\n",
+"//delta_S_rkn_T = delta_rkn_298 + delta_Cp_0*delta_T\n",
+"delta_a = 1/6*(a_C2H6) + 3/2*(a_H2O) - a_CH4 - 3/4*(a_O2);\n",
+"delta_b = 1/6*(b_C2H6) + 3/2*(b_H2O) - b_CH4 - 3/4*(b_O2);\n",
+"delta_c = 1/6*(c_C2H6) + 3/2*(c_H2O) - c_CH4 - 3/4*(c_O2);\n",
+"delta_d = 1/6*(d_C2H6) + 3/2*(d_H2O) - d_CH4 - 3/4*(d_O2);\n",
+"\n",
+"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]\n",
+"delta_S_rkn_600 = delta_S_rkn_298 + integrate('(delta_a+delta_b*T+delta_c*T^(2)+delta_d*T^(3))/T','T',T_1,T_2);//[cal/K]\n",
+"\n",
+"printf(' Change in entropy of the reaction at 298.15 K is %f cal/K\n\n',delta_S_rkn_298);\n",
+"printf(' Standard entropy change of reaction at 600 K is %f cal/K',delta_S_rkn_600);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.8: Calculation_of_standard_enthalpy_change_and_Gibbs_free_energy_change.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"//Example - 6.8\n",
+"//Page number - 225\n",
+"printf('Example - 6.8 and Page number - 225\n\n');\n",
+"\n",
+"//Given\n",
+"T_1 = 298.15;//[K] - Standard temperature\n",
+"T_2 = 973.15;//[K] - Reaction temperature\n",
+"\n",
+"//At 298.15 K\n",
+"delta_H_CH4_for_298 = -17.889*10^(3);//[cal/mol] - Enthalpy of formation of CH4 at 298.15 K\n",
+"delta_H_C_for_298 = 0.00;//[cal/mol] - Enthalpy of formation of C (s, graphite) at 298.15 K\n",
+"delta_H_H2_for_298 = 0.00;//[cal/mol] - Enthalpy of formation of H2 at 298.15 K\n",
+"delta_G_CH4_for_298 = -12.140*10^(3);//[cal/mol] - Gibbs free energy change for formation of H2 at 298.15 K\n",
+"delta_G_C_for_298 = 0.00;//[cal/mol] - Gibbs free energy change for formation of C (s, graphite) at 298.15 K\n",
+"delta_G_H2_for_298 = 0.00;//[cal/mol] - Gibbs free energy change for formation of H2 at 298.15 K\n",
+"\n",
+"///Standaerd heat capacity data in cal/mol-K are given below, T is in K\n",
+"//Cp_0_CH4 = 4.75 + 1.2*10^(-2)*T + 0.303*10^(-5)*T^(2) - 2.63*10^(-9)*T^(3)\n",
+"//Cp_0_C = 3.519 + 1.532*10^(-3)*T - 1.723*10^(5)*T^(-2)\n",
+"//Cp_0_H2 = 6.952 - 0.04576*10^(-2)*T + 0.09563*10^(-5)*T^(2) - 0.2079*10^(-9)*T^(3)\n",
+"\n",
+"//Therefore standard heat capacity of reaction is given by,\n",
+"//Cp_0_rkn = 2*Cp_0_H2 + Cp_0_C - Cp_0_CH4\n",
+"//On simplification,we get the relation\n",
+"//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)\n",
+"\n",
+"delta_H_rkn_298 = -delta_H_CH4_for_298;//[cal] - Enthalpy of reaction at 298.15 K\n",
+"delta_G_rkn_298 = -delta_G_CH4_for_298;//[cal] - Gibbs free energy of the reaction at 298.15 K\n",
+"\n",
+"delta_H_rkn_973 = delta_H_rkn_298 + integrate('12.673-0.0113832*T-1.1174*10^(-6)*T^(2)+2.2142*10^(-9)*T^(3)-1.723*10^(5)*T^(-2)','T',T_1,T_2);//[cal]\n",
+"\n",
+"printf(' Standard enthalpy change of reaction at 973.15 K is %f cal\n\n',delta_H_rkn_973);\n",
+"\n",
+"//Now determining the standard entropy change of reaction at 298.15 K\n",
+"delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;//[cal/K]\n",
+"delta_S_rkn_973 = delta_S_rkn_298 + integrate('(12.673-0.0113832*T-1.1174*10^(-6)*T^(2)+2.2142*10^(-9)*T^(3)-1.723*10^(5)*T^(-2))/T','T',T_1,T_2);//[cal/K]\n",
+"\n",
+"//Therefore,the standard Gibbs free energy change of the reaction is given by,\n",
+"delta_G_rkn_973 = delta_H_rkn_973 - 973.15*delta_S_rkn_973;//[cal]\n",
+"\n",
+"printf(' Standard Gibbs free energy change of reaction at 973 K is %f cal\n',delta_G_rkn_973);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.9: Calculation_of_standard_enthalpy_change_and_Gibbs_free_energy_change.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"//Example - 6.9\n",
+"//Page number - 226\n",
+"printf('Example - 6.9 and Page number - 226\n\n');\n",
+"\n",
+"//Given\n",
+"T_1 = 298.15;//[K] - Standard temperature\n",
+"T_2 = 1000;//[K] - Reaction temperature\n",
+"\n",
+"//At 298.15 K\n",
+"delta_H_C_for_298 = 0.00;//[cal/mol] - Enthalpy of formation of C(s,graphite) at 298.15 K\n",
+"delta_H_H2O_for_298 = -57.7979*10^(3);//[cal/mol] - Enthalpy of formation of H2O at 298.15 K\n",
+"delta_H_CO_for_298 = -26.4157*10^(3);//[cal/mol] - Enthalpy of formation of CO at 298.15 K\n",
+"delta_H_H2_for_298 = 0.00;//[cal/mol] - Enthalpy of formation of H2 at 298.15 K\n",
+"delta_G_C_for_298 = 0.00;//[cal/mol] - Gibbs free energy change for formation of C(s, graphite) at 298.15 K\n",
+"delta_G_H2O_for_298 = -54.6357*10^(3);//[cal/mol] - Gibbs free energy change for formation of H2O at 298.15 K\n",
+"delta_G_CO_for_298 = -32.8079*10^(3);//[cal/mol] - Gibbs free energy change for formation of CO at 298.15 K\n",
+"delta_G_H2_for_298 = 0.00;//[cal/mol] - Gibbs free energy change for formation of H2 at 298.15 K\n",
+"\n",
+"///Standaerd heat capacity data in cal/mol-K are given below, T is in K\n",
+"//Cp_0_C = 3.519 + 1.532*10^(-3)*T - 1.723*10^(5)*T^(-2)\n",
+"//Cp_0_H2O = 7.7 + 0.04594*10^(-2)*T + 0.2521*10^(-5)*T^(2) - 0.8587*10^(-9)*T^(3)\n",
+"//Cp_0_CO = 6.726 + 0.04001*10^(-2)*T + 0.1283*10^(-5)*T^(2) - 0.5307*10^(-9)*T^(3)\n",
+"//Cp_0_H2 = 6.952 - 0.04576*10^(-2)*T + 0.09563*10^(-5)*T^(2) - 0.2079*10^(-9)*T^(3)\n",
+"\n",
+"//Therefore standard heat capacity of reaction is given by,\n",
+"//Cp_0_rkn = Cp_0_H2 + Cp_0_CO - Cp_0_C - Cp_0_H2O\n",
+"//On simplification,we get the relation\n",
+"//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)\n",
+"\n",
+"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\n",
+"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\n",
+"\n",
+"delta_H_rkn_1000 = delta_H_rkn_298 + integrate('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',T_1,T_2);//[cal]\n",
+"\n",
+"printf(' Standard enthalpy change of reaction at 1000 K is %f cal\n\n',delta_H_rkn_1000);\n",
+"\n",
+"//Now determining the standard entropy change of reaction at 298.15 K\n",
+"delta_S_rkn_298 = (delta_H_rkn_298 - delta_G_rkn_298)/298.15;//[cal/K]\n",
+"delta_S_rkn_1000 = delta_S_rkn_298 + integrate('(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','T',T_1,T_2);//[cal/K]\n",
+"\n",
+"//Therefore,the standard Gibbs free energy change of the reaction is given by,\n",
+"delta_G_rkn_1000 = delta_H_rkn_1000 - 1000*delta_S_rkn_1000;//[cal]\n",
+"\n",
+"printf(' Standard Gibbs free energy change of reaction at 1000 K is %f cal\n',delta_G_rkn_1000);"
+ ]
+ }
+],
+"metadata": {
+ "kernelspec": {
+ "display_name": "Scilab",
+ "language": "scilab",
+ "name": "scilab"
+ },
+ "language_info": {
+ "file_extension": ".sce",
+ "help_links": [
+ {
+ "text": "MetaKernel Magics",
+ "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
+ }
+ ],
+ "mimetype": "text/x-octave",
+ "name": "scilab",
+ "version": "0.7.1"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}