summaryrefslogtreecommitdiff
path: root/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder
diff options
context:
space:
mode:
authorPrashant S2020-04-14 10:25:32 +0530
committerGitHub2020-04-14 10:25:32 +0530
commit06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch)
tree2b1df110e24ff0174830d7f825f43ff1c134d1af /Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder
parentabb52650288b08a680335531742a7126ad0fb846 (diff)
parent476705d693c7122d34f9b049fa79b935405c9b49 (diff)
downloadall-scilab-tbc-books-ipynb-master.tar.gz
all-scilab-tbc-books-ipynb-master.tar.bz2
all-scilab-tbc-books-ipynb-master.zip
Merge pull request #1 from prashantsinalkar/masterHEADmaster
Initial commit
Diffstat (limited to 'Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder')
-rw-r--r--Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/1-Introduction_and_Basic_Concepts.ipynb558
-rw-r--r--Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/10-Vapour_Liquid_Equilibrium.ipynb1057
-rw-r--r--Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/11-Additional_Topics_in_Phase_Equilibrium.ipynb325
-rw-r--r--Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/12-Chemical_Reaction_Equilibria.ipynb1138
-rw-r--r--Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/2-First_Law_of_Thermodynamics.ipynb1045
-rw-r--r--Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/3-Properties_Of_Pure_Substances.ipynb526
-rw-r--r--Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/4-Heat_Effects.ipynb497
-rw-r--r--Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/5-Second_Law_of_Thermodynamics.ipynb1094
-rw-r--r--Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/6-Thermodynamic_Property_Relations.ipynb836
-rw-r--r--Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/7-Thermodynamics_to_Flow_Processes.ipynb549
-rw-r--r--Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/8-Refrigeration_and_Liquefaction_Processes.ipynb500
-rw-r--r--Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/9-Solution_Thermodynamics_Properties.ipynb897
12 files changed, 9022 insertions, 0 deletions
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/1-Introduction_and_Basic_Concepts.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/1-Introduction_and_Basic_Concepts.ipynb
new file mode 100644
index 0000000..41a1d22
--- /dev/null
+++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/1-Introduction_and_Basic_Concepts.ipynb
@@ -0,0 +1,558 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1: Introduction and Basic Concepts"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.10: Power.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 1.10\n",
+"// Page: 12\n",
+"\n",
+"// Solution\n",
+"\n",
+"printf('Example: 1.10 - Page: 12\n\n');\n",
+"\n",
+"//*****Data*****//\n",
+"m = 1200;// [kg]\n",
+"v1 = 10;// [km/h]\n",
+"v2 = 100;// [km/h]\n",
+"time = 1;// [min]\n",
+"//***************//\n",
+"\n",
+"v1 = 10*1000/3600;// [m/s]\n",
+"v2 = 100*1000/3600;// [m/s]\n",
+"W = (1/2)*m*(v2^2 - v1^2);// [J]\n",
+"time = time*60;// [s]\n",
+"P = W/time;// [W]\n",
+"printf('Power required is %.2f kW\n',P/1000);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.11: Power.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 1.11\n",
+"// Page: 13\n",
+"\n",
+"printf('Example: 1.11 - Page: 13\n\n');\n",
+"\n",
+"//*****Data*****//\n",
+"dia = 0.3;// [m]\n",
+"m = 100;// [kg]\n",
+"P_atm = 1.013*10^5;// [N/square m]\n",
+"g = 9.792;// [m/square s]\n",
+"//**************//\n",
+"\n",
+"Area = (%pi/4)*dia^2;// [square m]\n",
+"//Solution (a)(i)\n",
+"// Force exerted by the atmosphere:\n",
+"F_atm = P_atm*Area;// [N]\n",
+"// Force exerted by piston & metal block:\n",
+"F_mass = m*g;// [N]\n",
+"// Total force acting upon the gas:\n",
+"F = F_atm + F_mass;// [N]\n",
+"printf('Total Force eacting upon the gas is %.1f N\n',F);\n",
+"\n",
+"// Solution (a)(ii)\n",
+"Pressure = F/Area;// [N/square m]\n",
+"printf('Pressure exerted is %.3f kPa\n\n',Pressure/1000);\n",
+"\n",
+"// Solution (b)\n",
+"// The gas expands on application of heat, the volume of the gas goes on increasing and the piston moves upward.\n",
+"Z = 0.5;// [m]\n",
+"// Work done due to expansion of gas:\n",
+"W = F*Z;// [J]\n",
+"printf('Work due to expansion by the gas is %.3f kJ\n\n',W/1000);\n",
+"\n",
+"// Solution (c)\n",
+"// Change in potential energy of piston and weight after expansion process:\n",
+"Ep = m*g*Z;// [J]\n",
+"printf('Change in Potential Energy is %.1f J\n',Ep);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.12: Temperature_and_Ideal_Gas_Temperature_Scale.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 1.12\n",
+"// Page: 24\n",
+"\n",
+"printf('Example: 1.12 - Page: 24\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"// The relation is:\n",
+"// (C/5) = ((F - 32)/9)\n",
+"// For C = F\n",
+"C = - (32*5/4); // [degree Celsius]\n",
+"printf('The temperature which has the same value on both the centigrade and Fahrenheit scales is %d degree Celsius or %d degree Fahrenheit\n',C,C);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.13: Temperature_and_Ideal_Gas_Temperature_Scale.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 1.13\n",
+"// Page: 24\n",
+"\n",
+"printf('Example: 1.13 - Page: 24\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"delta_T_C = 30;// [OC]\n",
+"//*************//\n",
+"\n",
+"// The relation between the Kelvin temperature scale and the Celsius temperature scale:\n",
+"// T(K) = T(OC) + 273.15\n",
+"// Here, the temperature rise is to be expressed in terms of K, but the difference in temperature will be the same in the Kelvin and Celsius scales of temperature:\n",
+"delta_T_K = delta_T_C;// [K]\n",
+"printf('The rise in temperature in the Kelvin scale is %d K\n',delta_T_K);\n",
+"// The emperical relationship between the Rankine and Kelvin scales is given by:\n",
+"delta_T_R = 1.8*delta_T_K;// [R]\n",
+"printf('The rise in temperature in the Rankine scale is %d R\n',delta_T_R);\n",
+"delta_T_F = delta_T_R;// [OF]\n",
+"printf('The rise in temperature in the Fahrenheit scale is %d OF\n',delta_T_F);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.1: Importance_of_Units_and_Dimensions.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 1.1\n",
+"// Page: 4\n",
+"\n",
+"// Solution\n",
+"\n",
+"printf('Example: 1.1 - Page: 4\n\n');\n",
+"\n",
+"//*****Data*****//\n",
+"g_Earth = 9.83;// [m/square s]\n",
+"F_Earth = 800;// [N]\n",
+"g_Moon = 3.2;// [m/square s]\n",
+"//************//\n",
+"\n",
+"// From the expression of force, the force on the man on the Eath's surface is given by:\n",
+"// F = m*g_Earth\n",
+"m = F_Earth/g_Earth;// [kg]\n",
+"\n",
+"// On the moon, the weight of the mass is equal to the force acting on the mass on the moon and is given by\n",
+"F_Moon = m*g_Moon;// [N]\n",
+"\n",
+"printf('Weight of the man on the moon is %f N\n',F_Moon);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.2: Importance_of_Units_and_Dimensions.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 1.2\n",
+"// Page: 5\n",
+"\n",
+"// Solution\n",
+"\n",
+"printf('Example: 1.2 - Page: 5\n\n');\n",
+"\n",
+"//*****Data*****//\n",
+"m1 = 1.5;// [mass of the body, kg]\n",
+"m2 = 6*10^(24);// [mass of the Earth, kg]\n",
+"G = 6.672*10^(-11);// [N.square m/square.kg]\n",
+"r = 6000*10^(3);// [m]\n",
+"//************//\n",
+"\n",
+"// According to Newton's universal law of gravity:\n",
+"F = G*m1*m2/r^2;// [N]\n",
+"printf('Gravitational force on the body is %.2f N\n',F);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.3: Importance_of_Units_and_Dimensions.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 1.3\n",
+"// Page: 5\n",
+"\n",
+"// Solution\n",
+"\n",
+"printf('Example: 1.3 - Page: 5\n\n');\n",
+"\n",
+"//*****Data*****//\n",
+"r_Moon = 0.3;// [km]\n",
+"r_Earth = 1;// [km]\n",
+"m2 = 1;// [mass of body, kg]\n",
+"mMoon_By_mEarth = 0.013;// [kg/kg]\n",
+"//***************//\n",
+"\n",
+"// According to the Newton's universal law of gravitation:\n",
+"Fe_By_Fm = (1/mMoon_By_mEarth)*(r_Moon/r_Earth)^2;\n",
+"printf('Mass of 1 kg will weigh %.2f kg on moon\n',Fe_By_Fm);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.4: Importance_of_Units_and_Dimensions.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 1.4\n",
+"// Page: 6\n",
+"\n",
+"// Solution\n",
+"\n",
+"printf('Example: 1.4 - Page: 6\n\n');\n",
+"\n",
+"//*****Data*****//\n",
+"h = 40;// [cm]\n",
+"density = 14.02;// [g/cubic cm]\n",
+"g = 9.792;// [m/square s]\n",
+"//*************//\n",
+"\n",
+"P = h*density*g/1000;// [N/square cm]\n",
+"P = P*10;// [kPa]\n",
+"\n",
+"printf('The absolute pressure is %.3f kPa\n',P);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.5: Pressure.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 1.5\n",
+"// Page: 7\n",
+"\n",
+"// Solution\n",
+"\n",
+"printf('Example: 1.5 - Page: 7\n\n');\n",
+"\n",
+"//*****Data*****//\n",
+"Patm = 112;// [kPa]\n",
+"density = 1200;// [kg/cubic m]\n",
+"g = 9.81;// [m/sqaure s]\n",
+"h = 0.62;// [m]\n",
+"//**************//\n",
+"\n",
+"P = Patm + (density*g*h/1000);// [kPa]\n",
+"\n",
+"printf('The absolute pressure within the container is %.3f kPa\n',P);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.6: Work.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 1.6\n",
+"// Page: 9\n",
+"\n",
+"// Solution\n",
+"\n",
+"printf('Example: 1.6 - Page: 9\n\n');\n",
+"\n",
+"//*****Data*****//\n",
+"F = 150;// [N]\n",
+"Displacement = 10;// [m]\n",
+"//**************//\n",
+"\n",
+"W = F*Displacement;// [J]\n",
+"\n",
+"printf('Work done by the system is %d J\n',W);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.7: Work.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 1.7\n",
+"// Page: 9\n",
+"\n",
+"// Solution\n",
+"\n",
+"printf('Example: 1.7 - Page: 9\n\n');\n",
+"\n",
+"//*****Data*****//\n",
+"P = 560*10^3;// [Pa]\n",
+"Vinit = 3;// [cubic m]\n",
+"Vfinal = 5;// [cubic m]\n",
+"Wext = 210*10^3;// [J]\n",
+"//*************//\n",
+"\n",
+"W = P*(Vfinal - Vinit);// [J]\n",
+"// Again the system receives 210 kJ of work from the external agent.\n",
+"W = W - Wext;// [J]\n",
+"\n",
+"printf('Actual Work done by the system is %.1e J\n',W);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.8: Energy.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 1.8\n",
+"// Page: 11\n",
+"\n",
+"// Solution\n",
+"\n",
+"printf('Example: 1.8 - Page: 11\n\n');\n",
+"\n",
+"//*****Data*****//\n",
+"g = 9.81;// [m/square s]\n",
+"Z = 100;//[m]\n",
+"//***************//\n",
+"\n",
+"// Basis: 1 kg of water\n",
+"m = 1;// [kg]\n",
+"Ep = m*g*Z;// [J]\n",
+"printf('Change in potential Energy is %d J\n',Ep)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.9: Energy.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 1.9\n",
+"// Page: 11\n",
+"\n",
+"// Solution\n",
+"\n",
+"printf('Example: 1.9 - Page: 11\n\n');\n",
+"\n",
+"//*****Data*****//\n",
+"m = 15; // [kg]\n",
+"g = 9.81;// [m/square s]\n",
+"V1 = 0;// [m/square s]\n",
+"Z1 = 12;// [m]\n",
+"Z2 = 0;// [m]\n",
+"//***************//\n",
+"\n",
+"// At initial condition, V1 = 0, so kinetic energy is zero.\n",
+"// At final condition, Z2 = 0, so potential energy is zero.\n",
+"// Ep1 + Ek1 = Ep2 + Ek2\n",
+"deff('[y] = f(V2)','y = ((1/2)*m*V1^2) + (m*g*Z1) - (((1/2)*m*V2^2) + (m*g*Z2))');\n",
+"V2 = fsolve(7,f);\n",
+"\n",
+"printf('The velocity of the metal block is %.2f m/s\n',V2);\n",
+"\n",
+"Ek2 = (1/2)*m*V2^2;// [J]\n",
+"printf('The final Kinetic Energy is %.1f J\n',Ek2);"
+ ]
+ }
+],
+"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
+}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/10-Vapour_Liquid_Equilibrium.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/10-Vapour_Liquid_Equilibrium.ipynb
new file mode 100644
index 0000000..9cc9525
--- /dev/null
+++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/10-Vapour_Liquid_Equilibrium.ipynb
@@ -0,0 +1,1057 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10: Vapour Liquid Equilibrium"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.10: van_Laar_Equation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 10.10\n",
+"// Page: 412\n",
+"\n",
+"printf('Example: 10.10 - Page: 412\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"P = 101.3;// [kPa]\n",
+"P1sat = 100.59;// [kPa]\n",
+"P2sat = 99.27;// [kPa]\n",
+"x1 = 0.532;\n",
+"//****************//\n",
+"\n",
+"x2 = 1 - x1;\n",
+"gama1 = P/P1sat;\n",
+"gama2 = P/P2sat;\n",
+"A = log(gama1)*(1 + (x2*log(gama2))/(x1*log(gama1)))^2;\n",
+"B = log(gama2)*(1 + (x1*log(gama1))/(x2*log(gama2)))^2;\n",
+"\n",
+"// For solution containing 10 mol percent benzene:\n",
+"x1 = 0.10;\n",
+"x2 = 1 - x1;\n",
+"gama1 = exp(A/(1 + (A*x1/(B*x2))^2));\n",
+"gama2 = exp(B/(1 + (B*x2/(A*x1))^2));\n",
+"printf('Activity Coeffecient\n');\n",
+"printf('gama1 = %.3f\n',gama1);\n",
+"printf('gama2 = %.3f\n',gama2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.11: van_Laar_Equation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 10.11\n",
+"// Page: 413\n",
+"\n",
+"printf('Example: 10.11 - Page: 413\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"P = 760;// [mm of Hg]\n",
+"P1sat = 995;// [mm of Hg]\n",
+"P2sat = 885;// [mm of Hg]\n",
+"x1 = 0.335;\n",
+"T = 64.6;// [OC]\n",
+"//****************//\n",
+"\n",
+"x2 = 1 - x1;\n",
+"gama1 = P/P1sat;\n",
+"gama2 = P/P2sat;\n",
+"A = log(gama1)*(1 + (x2*log(gama2))/(x1*log(gama1)))^2;\n",
+"B = log(gama2)*(1 + (x1*log(gama1))/(x2*log(gama2)))^2;\n",
+"\n",
+"// For solution containing 11.1 mol percent acetone:\n",
+"x1 = 0.111;\n",
+"x2 = 1 - x1;\n",
+"gama1 = exp((A*x2^2)/(x2 + (A*x1/(B))^2));\n",
+"gama2 = exp((B*x1^2)/(x1 + (B*x2/(A))^2));\n",
+"y1 = 1/(1 + (gama2*x2*P2sat/(gama1*x1*P1sat)));\n",
+"y2 = 1 - y1;\n",
+"printf('Equilibrium Composition\n');\n",
+"printf('Acetone Composition = %.2f %%\n',y1*100);\n",
+"printf('Chloform composition = %.2f %%\n',y2*100);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.12: van_Laar_Equation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 10.12\n",
+"// Page: 414\n",
+"\n",
+"printf('Example: 10.12 - Page: 414\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 10.12 on page number 414 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 10.12 on page 414 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.13: Wilson_and_NTRL_Equation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 10.13\n",
+"// Page: 418\n",
+"\n",
+"printf('Example: 10.13 - Page: 418\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"// 1: iso - butanol\n",
+"// 2: iso - propanol\n",
+"T = 50 + 273;// [K]\n",
+"x1 = 0.3;\n",
+"V1 = 65.2;// [cubic cm/mol]\n",
+"V2 = 15.34;// [cubic cm/mol]\n",
+"// For Wilson equation:\n",
+"a12 = 300.55;// [cal/mol]\n",
+"a21 = 1520.32;// [cal/mol]\n",
+"// For NTRL equation:\n",
+"b12 = 685.21;// [cal/mol]\n",
+"b21 = 1210.21;// [cal/mol]\n",
+"alpha = 0.552;\n",
+"R = 2;// [cal/mol K]\n",
+"//******************//\n",
+"\n",
+"x2 = 1 - x1;\n",
+"// A: Estimation of activity coeffecient using Wilson equation:\n",
+"// From Eqn. 10.65:\n",
+"A12 = (V2/V1)*exp(-a12/(R*T));\n",
+"// From Eqn. 10.66:\n",
+"A21 = (V1/V2)*exp(-a21/(R*T));\n",
+"// From Eqn. 10.67:\n",
+"gama1 = exp(-log(x1 + A12*x2) + x2*((A12/(x1 + A12*x2)) - (A21/(A21*x1 + x2))));\n",
+"// From Eqn. 10.68:\n",
+"gama2 = exp(-log(x2 + A21*x1) - x1*((A12/(x1 + A12*x2)) - (A21/(A21*x1 + x2))));\n",
+"printf('Wilson equation\n');\n",
+"printf('Activity Coeffecient of iso - butanol is %.3f\n',gama1);\n",
+"printf('Activity Coeffecient of iso - propanol is %.3f\n',gama2);\n",
+"printf('\n');\n",
+"\n",
+"// A: Estimation of activity coeffecient using NTRL equation:\n",
+"t12 = b12/(R*T);\n",
+"t21 = b21/(R*T);\n",
+"G12 = exp(-alpha*t12);\n",
+"G21 = exp(-alpha*t21);\n",
+"// From Eqn. 10.70:\n",
+"gama1 = exp((x2^2)*(t21*(G21/(x1 + x2*G21))^2 + (t12*G12/(x2 + x1*G12)^2)));\n",
+"// From Eqn. 10.71:\n",
+"gama2 = exp((x1^2)*(t12*(G12/(x2 + x1*G12))^2 + (t21*G21/(x1 + x2*G21)^2)));\n",
+"printf('NTRL equation\n');\n",
+"printf('Activity Coeffecient of iso - butanol is %.3f\n',gama1);\n",
+"printf('Activity Coeffecient of iso - propanol is %.3f\n',gama2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.14: Bubble_Point_Calculation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 10.14\n",
+"// Page: 426\n",
+"\n",
+"printf('Example: 10.14 - Page: 426\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"x1 = 0.4;// [mole fraction of ethane in vapour phase]\n",
+"x2 = 0.6;// [mole fraction of propane in vapour phase]\n",
+"P = 1.5;// [MPa]\n",
+"//***************//\n",
+"\n",
+"// Assume T = 10 OC\n",
+"T = 10;// [OC]\n",
+"// From Fig. 10.14 (Pg 426):\n",
+"K1 = 1.8;\n",
+"K2 = 0.5;\n",
+"// From Eqn. 10.83:\n",
+"y1 = K1*x1;\n",
+"y2 = K2*x2;\n",
+"// Since y1 + y2 > 1, so we assume another value of T = 9 OC.\n",
+"T = 9;// [OC]\n",
+"// From Fig. 10.14 (Pg 426):\n",
+"K1 = 1.75;\n",
+"K2 = 0.5;\n",
+"// From Eqn. 10.83:\n",
+"y1 = K1*x1;\n",
+"y2 = K2*x2;\n",
+"// Since y1 + y2 = 1. Therefore:\n",
+"printf('Bubble Temperature is %d OC\n',T);\n",
+"printf('Composition of the vapour bubble:\n y1 = %.2f\n y2 = %.2f',y1,y2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.15: Dew_Point_Calculation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 10.15\n",
+"// Page: 428\n",
+"\n",
+"printf('Example: 10.15 - Page: 428\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"y1 = 0.20;// [mole fraction of methane in vapour phase]\n",
+"y2 = 0.30;// [mole fraction of ethane in vapour phase]\n",
+"y3 = 0.50;// [mole fraction of propane in vapour phase]\n",
+"T = 30;// [OC]\n",
+"//*************//\n",
+"\n",
+"// Assume P = 2.0 MPa\n",
+"P = 2.0;// [MPa]\n",
+"// From Fig. 10.14 (Pg 426):\n",
+"K1 = 8.5;\n",
+"K2 = 2.0;\n",
+"K3 = 0.68;\n",
+"// From Eqn. 10.83:\n",
+"x1 = y1/K1;\n",
+"x2 = y2/K2;\n",
+"x3 = y3/K3;\n",
+"// Since x1 + x2 +x3 < 1, so we assume another value of P = 2.15 MPa at 30 OC.\n",
+"P = 2.15;// [MPa]\n",
+"// From Fig. 10.14 (Pg 426):\n",
+"K1 = 8.1;\n",
+"K2 = 1.82;\n",
+"K3 = 0.62;\n",
+"// From Eqn. 10.83:\n",
+"x1 = y1/K1;\n",
+"x2 = y2/K2;\n",
+"x3 = y3/K3;\n",
+"// Since x1 + x2 +x3 = 1. Therefore:\n",
+"printf('Dew Pressure is %.2f MPa\n',P);\n",
+"printf('Composition of the liquid drop:\n x1 = %.4f\n x2 = %.4f\n x3 = %.4f',x1,x2,x3);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.16: Dew_Point_Calculation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 10.16\n",
+"// Page: 429\n",
+"\n",
+"printf('Example: 10.16 - Page: 429\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"// Dew point Pressure\n",
+"//*****Data******//\n",
+"y1 = 0.10;// [mole fraction of methane in vapour phase]\n",
+"y2 = 0.20;// [mole fraction of ethane in vapour phase]\n",
+"y3 = 0.70;// [mole fraction of propane in vapour phase]\n",
+"T = 10;// [OC]\n",
+"//*************//\n",
+"\n",
+"// Assume P = 690 kPa\n",
+"P = 690;// [kPa]\n",
+"// From Fig. 10.14 (Pg 426):\n",
+"K1 = 20.0;\n",
+"K2 = 3.25;\n",
+"K3 = 0.92;\n",
+"// From Eqn. 10.83:\n",
+"x1 = y1/K1;\n",
+"x2 = y2/K2;\n",
+"x3 = y3/K3;\n",
+"// Since x1 + x2 +x3 < 1, so we assume another value of P = 10135 kPa at 10 OC.\n",
+"P = 10135;// [kPa]\n",
+"// From Fig. 10.14 (Pg 426):\n",
+"K1 = 13.20;\n",
+"K2 = 2.25;\n",
+"K3 = 0.65;\n",
+"// From Eqn. 10.83:\n",
+"x1 = y1/K1;\n",
+"x2 = y2/K2;\n",
+"x3 = y3/K3;\n",
+"// Since x1 + x2 +x3 > 1, so we assume another value of P = 870 kPa at 10 OC.\n",
+"P = 870;// [kPa]\n",
+"// From Fig. 10.14 (Pg 426):\n",
+"K1 = 16.0;\n",
+"K2 = 2.65;\n",
+"K3 = 0.762;\n",
+"// From Eqn. 10.83:\n",
+"x1 = y1/K1;\n",
+"x2 = y2/K2;\n",
+"x3 = y3/K3;\n",
+"// Since x1 + x2 +x3 = 1. Therefore:\n",
+"printf('Dew Pressure is %d kPa\n',P);\n",
+"printf('Composition of the liquid drop:\n x1 = %.4f\n x2 = %.4f\n x3 = %.4f\n',x1,x2,x3);\n",
+"printf('\n');\n",
+"\n",
+"// Bubble point Pressure\n",
+"//*****Data******//\n",
+"x1 = 0.10;// [mole fraction of methane in vapour phase]\n",
+"x2 = 0.20;// [mole fraction of ethane in vapour phase]\n",
+"x3 = 0.70;// [mole fraction of propane in vapour phase]\n",
+"T = 10;// [OC]\n",
+"//*************//\n",
+"\n",
+"// Assume P = 2622 kPa\n",
+"P = 2622;// [kPa]\n",
+"// From Fig. 10.14 (Pg 426):\n",
+"K1 = 5.60;\n",
+"K2 = 1.11;\n",
+"K3 = 0.335;\n",
+"// From Eqn. 10.83:\n",
+"y1 = K1*x1;\n",
+"y2 = K2*x2;\n",
+"y3 = K3*x3;\n",
+"// Since x1 + x2 +x3 > 1, so we assume another value of P = 2760 kPa at 10 OC.\n",
+"P = 2760;// [kPa]\n",
+"// From Fig. 10.14 (Pg 426):\n",
+"K1 = 5.25;\n",
+"K2 = 1.07;\n",
+"K3 = 0.32;\n",
+"// From Eqn. 10.83:\n",
+"y1 = K1*x1;\n",
+"y2 = K2*x2;\n",
+"y3 = K3*x3;\n",
+"// Since x1 + x2 +x3 < 1, so we assume another value of P = 2656 kPa at 10 OC.\n",
+"P = 2656;// [kPa]\n",
+"// From Fig. 10.14 (Pg 426):\n",
+"K1 = 5.49;\n",
+"K2 = 1.10;\n",
+"K3 = 0.33;\n",
+"// From Eqn. 10.83:\n",
+"y1 = K1*x1;\n",
+"y2 = K2*x2;\n",
+"y3 = K3*x3;\n",
+"// Since x1 + x2 +x3 = 1. Therefore:\n",
+"printf('Bubble Pressure is %d kPa\n',P);\n",
+"printf('Composition of the vapour bubble:\n y1 = %.4f\n y2 = %.4f\n y3 = %.4f',y1,y2,y3);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.17: Flash_Calculatio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 10.17\n",
+"// Page: 432\n",
+"\n",
+"printf('Example: 10.17 - Page: 432\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"// 1: acetone 2: acetonitrile 3: nitromethane\n",
+"z1 = 0.45;\n",
+"z2 = 0.35;\n",
+"z3 = 0.20;\n",
+"P1sat = 195.75;// [kPa]\n",
+"P2sat = 97.84;// [kPa]\n",
+"P3sat = 50.32;// [kPa]\n",
+"//***************//\n",
+"\n",
+"// Bubble Point Calculation:\n",
+"Pbubble = z1*+P1sat + z2*P2sat +z3*P3sat;// [kPa]\n",
+"\n",
+"// Dew Point Calculation:\n",
+"Pdew = 1/((z1/P1sat) + (z2/P2sat) + (z3/P3sat));// [kPa]\n",
+"K1 = P1sat/Pdew;\n",
+"K2 = P2sat/Pdew;\n",
+"K3 = P3sat/Pdew;\n",
+"// Overall Material balance:\n",
+"// For 1 mol of the feed.\n",
+"// L + V = 1......................................... (1)\n",
+"// F*zi = L*xi + V*yi ............................... (2)\n",
+"// zi = (1 - V)*xi + V*yi ........................... (3)\n",
+"// Substituting xi = yi/K in eqn. (3)\n",
+"// yi = zi*Ki/(1 + V*(Ki - 1))\n",
+"// Since, Sum(yi) = 1.\n",
+"deff('[y] = f(V)','y = (z1*K1/(1 + V*(K1 - 1))) + (z2*K2/(1 + V*(K2 - 1))) + (z3*K3/(1 + V*(K3 - 1))) - 1');\n",
+"V = fsolve(0.8,f);\n",
+"L = 1 - V;\n",
+"y1 = z1*K1/(1 + V*(K1 - 1));\n",
+"y2 = z2*K2/(1 + V*(K2 - 1));\n",
+"y3 = z3*K3/(1 + V*(K3 - 1));\n",
+"// From Eqn. 10.83:\n",
+"x1 = y1/K1;\n",
+"x2 = y2/K2;\n",
+"x3 = y3/K3;\n",
+"printf(' L = %e mol\n',L);\n",
+"printf(' V = %e mol\n',V);\n",
+"printf(' y1 = %.4f\n y2 = %.4f\n y3 = %.4f\n',y1,y2,y3);\n",
+"printf(' x1 = %.4f\n x2 = %.4f\n x3 = %.4f\n',x1,x2,x3);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.18: Flash_Calculatio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 10.18\n",
+"// Page: 433\n",
+"\n",
+"printf('Example: 10.18 - Page: 433\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"// 1: Benzene 2: Toulene\n",
+"z1 = 0.81;\n",
+"Temp = 60;// [OC]\n",
+"P = 70;// [kPa]\n",
+"// Antonine Constants:\n",
+"A1 = 14.2321;\n",
+"B1 = 2773.61;\n",
+"C1 = 220.13;\n",
+"A2 = 15.0198;\n",
+"B2 = 3102.64;\n",
+"C2 = 220.02;\n",
+"//******************//\n",
+"\n",
+"deff('[P1] = f1(T)','P1 = exp(A1 - B1/(T + C1))');\n",
+"P1sat = f1(Temp);// [kPa]\n",
+"deff('[P2] = f2(T)','P2 = exp(A2 - B2/(T + C2))');\n",
+"P2sat = f2(Temp);// [kPa]\n",
+"// P = x1*P1sat + x2*P2sat;\n",
+"// x2 = 1 - x1;\n",
+"deff('[y] = f3(x1)','[y] = P - (x1*P1sat + (1 - x1)*P2sat)');\n",
+"x1 = fsolve(7,f3);\n",
+"y1 = x1*P1sat/P;\n",
+"x2 = 1 - x1;\n",
+"y2 = 1 - y1;\n",
+"\n",
+"// Basis: 1 mol of feed stream.\n",
+"F = 1;// [mol]\n",
+"// F*zi = L*xi + V*yi = L*xi + (1 - L)*yi\n",
+"deff('[y] = f4(L)','[y] = F*z1 - (L*x1 + (1 - L)*y1)');\n",
+"L = fsolve(7,f4);// [mol]\n",
+"V = 1 - L;// [mol]\n",
+"printf(' L = %.4f mol\n',L);\n",
+"printf(' V = %.4f mol\n',V);\n",
+"printf(' y1 = %.4f\n y2 = %.4f\n',y1,y2);\n",
+"printf(' x1 = %.4f\n x2 = %.4f\n',x1,x2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.19: Thermodynamic_Consistency_of_VLE_Data.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 10.19\n",
+"// Page: 413\n",
+"\n",
+"printf('Example: 10.11 - Page: 436\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"// (1): acetone (2): carbon tetrachloride\n",
+"T = 45;// [OC]\n",
+"// Data = [P (torr), x1, y1]\n",
+"Data = [315.32 0.0556 0.2165;339.70 0.0903 0.2910;397.77 0.2152 0.4495;422.46 0.2929 0.5137; 448.88 0.3970 0.5832;463.92 0.4769 0.6309;472.84 0.5300 0.6621;485.16 0.6047 0.7081;498.07 0.7128 0.7718;513.20 0.9636 0.9636];\n",
+"//*************//\n",
+"\n",
+"// From the standard data (Pg 531):\n",
+"// For Acetone:\n",
+"A1 = 14.2342;\n",
+"B1 = 2691.46;\n",
+"C1 = 230.00;\n",
+"// For carbon tetrachloride:\n",
+"A2 = 13.6816;\n",
+"B2 = 2355.82;\n",
+"C2 = 220.58;\n",
+"P1sat = exp(A1 - B1/(T + C1));// [kPa]\n",
+"P2sat = exp(A2 - B2/(T + C2));// [kPa]\n",
+"P1sat = P1sat*760/101.325;// [torr]\n",
+"P2sat = P2sat*760/101.325;// [torr]\n",
+"P = Data(:,1);\n",
+"x1 = Data(:,2);\n",
+"y1 = Data(:,3);\n",
+"x2 = 1 - x1;\n",
+"y2 = 1 - y1;\n",
+"gama1 = (y1.*P./x1)/P1sat;\n",
+"gama2 = (y2.*P./x2)/P2sat;\n",
+"Value = log(gama1./gama2);\n",
+"scf(2);\n",
+"plot(x1,Value);\n",
+"xgrid();\n",
+"xlabel('x1');\n",
+"ylabel('ln(y1/y2)');\n",
+"// Since the whole area is above X - axis:\n",
+"printf('The data is not consistent thermodynamically\n');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.1: Clausius_Clapeyron_Equation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 10.1\n",
+"// Page: 390\n",
+"\n",
+"printf('Example: 10.1 - Page: 390\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 10.1 on page number 390 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 10.1 on page 390 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.2: Raoults_Law.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 10.2\n",
+"// Page: 399\n",
+"\n",
+"printf('Example: 10.2 - Page: 399\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 10.2 on page number 399 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 10.2 on page 399 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.3: Raoults_Law.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 10.3\n",
+"// Page: 400\n",
+"\n",
+"printf('Example: 10.3 - Page: 400\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"x1 = 0.6;// [mole fraction of ethylene]\n",
+"x2 = 0.4;// [mole fraction of propylene]\n",
+"T = 423;// [K]\n",
+"P1_sat = 15.2;// [vapour pressure of ethylene, atm]\n",
+"P2_sat = 9.8;// [vapour pressure of propylene, atm]\n",
+"//**************//\n",
+"\n",
+"P = x1*P1_sat + x2*P2_sat;// [atm]\n",
+"printf('The total pressure is %.2f atm\n',P);\n",
+"// In vapour phase:\n",
+"y1 = x1*P1_sat/P;// [mole fraction of ethylene]\n",
+"y2 = x2*P2_sat/P;// [mole fraction of propylene]\n",
+"printf('Mole fraction of ethylene in vapour phase is %.1f\n',y1);\n",
+"printf('Mole fraction of propylene in the vapour phase is %.1f\n',y2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.4: Raoults_Law.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 10.4\n",
+"// Page: 400\n",
+"\n",
+"printf('Example: 10.4 - Page: 400\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"Temp = 77;// [OC]\n",
+"P = 75;// [kPa]\n",
+"deff('[P1] = f1(T)','P1 = exp(14.35 - 2942/(T + 220))');\n",
+"deff('[P2] = f2(T)','P2 = exp(14.25 - 2960/(T + 210))');\n",
+"//*************//\n",
+"\n",
+"P1sat = f1(Temp);// [kPa]\n",
+"P2sat = f2(Temp);// [kPa]\n",
+"deff('[y] = f3(x1)','y = P - (x1*P1sat) - (1 - x1)*P2sat');\n",
+"x1 = fsolve(7,f3);\n",
+"x2 = 1 - x1;\n",
+"printf('In Liquid phase\n');\n",
+"printf('The mole fraction of X is %.3f\n',x1);\n",
+"printf('The mole fraction of Y is %.3f\n',x2);\n",
+"\n",
+"y1 = x1*P1sat/P;\n",
+"y2 = 1 - y1;\n",
+"printf('In Vapour phase\n');\n",
+"printf('The mole fraction of X is %.3f\n',y1);\n",
+"printf('The mole fraction of Y is %.3f\n',y2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.5: Raoults_Law.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 10.5\n",
+"// Page: 401\n",
+"\n",
+"printf('Example: 10.5 - Page: 401\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"deff('[P1] = f1(T)','P1 = exp(14.3916 - 2795/(T + 230))');\n",
+"deff('[P2] = f2(T)','P2 = exp(14.2724 - 2945.47/(T + 224))');\n",
+"deff('[P3] = f3(T)','P3 = exp(14.2043 - 2972.64/(T + 209))');\n",
+"//*************//\n",
+"\n",
+"// Solution (i)\n",
+"\n",
+"//*****Data******//\n",
+"Temp = 75;// [OC]\n",
+"P = 75;// [kPa]\n",
+"x1 = 0.30;\n",
+"x2 = 0.40;\n",
+"//*************//\n",
+"\n",
+"x3 = 1 - (x1 + x2);\n",
+"P1sat = f1(Temp);// [kPa]\n",
+"P2sat = f2(Temp);// [kPa]\n",
+"P3sat = f3(Temp);// [kPa]\n",
+"P = x1*P1sat + x2*P2sat + x3*P3sat;// [kPa]\n",
+"y1 = x1*P1sat/P;\n",
+"y2 = x2*P2sat/P;\n",
+"y3 = x3*P3sat/P;\n",
+"printf('Solution (i)\n');\n",
+"printf('The mole fraction of acetone is %.3f\n',y1);\n",
+"printf('The mole fraction of acetonitrile is %.3f\n',y2);\n",
+"printf('The mole fraction of nitromethane is %.3f\n',y3);\n",
+"\n",
+"// Solution (ii)\n",
+"\n",
+"//*****Data*****//\n",
+"Temp = 80;// [OC]\n",
+"y1 = 0.45;\n",
+"y2 = 0.35;\n",
+"//**************//\n",
+"\n",
+"y3 = 1 - (y1 + y2);\n",
+"P1sat = f1(Temp);// [kPa]\n",
+"P2sat = f2(Temp);// [kPa]\n",
+"P3sat = f3(Temp);// [kPa]\n",
+"P = 1/((y1/P1sat) + (y2/P2sat) + (y3/P3sat));// [kPa]\n",
+"x1 = y1*P/P1sat;\n",
+"x2 = y2*P/P2sat;\n",
+"x3 = y3*P/P3sat;\n",
+"printf('Solution (ii)\n');\n",
+"printf('The mole fraction of acetone is %.3f\n',x1);\n",
+"printf('The mole fraction of acetonitrile is %.3f\n',x2);\n",
+"printf('The mole fraction of nitromethane is %.3f\n',x3);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.6: Raoults_Law.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 10.6\n",
+"// Page: 403\n",
+"\n",
+"printf('Example: 10.6 - Page: 403\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"deff('[P1] = f1(T)','P1 = exp(16.5915 - 3643.31/(T - 33.424))');\n",
+"deff('[P2] = f2(T)','P2 = exp(14.2532 - 2665.54/(T - 53.424))');\n",
+"deff('[A] = f3(T)','A = 2.771 - 0.00523*T');\n",
+"Temp = 318.15;// [K]\n",
+"x1 = 0.25;\n",
+"//**************//\n",
+"\n",
+"P1sat = f1(Temp);// [kPa]\n",
+"P2sat = f2(Temp);// [kPa]\n",
+"A = f3(Temp);\n",
+"x2 = 1 - x1;\n",
+"gama1 = exp(A*x2^2);\n",
+"gama2 = exp(A*x1^2);\n",
+"P = x1*gama1*P1sat + x2*gama2*P2sat;\n",
+"y1 = x1*gama1*P1sat/P;\n",
+"y2 = x2*gama2*P2sat/P;\n",
+"printf('In Vapour phase\n');\n",
+"printf('The mole fraction of methanol is %.3f\n',y1);\n",
+"printf('The mole fraction of methyl acetate is %.3f\n',y2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.7: Azeotropes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 10.7\n",
+"// Page: 408\n",
+"\n",
+"printf('Example: 10.7 - Page: 408\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"Temp = 30;// [OC]\n",
+"A = 0.625;\n",
+"//**************//\n",
+"\n",
+"P1sat = exp(13.71 - 3800/Temp);// [kPa]\n",
+"P2sat = exp(14.01 - 3800/Temp);// [kPa]\n",
+"// At azeotropic point:\n",
+"// P = gama1*P1sat + gama2*P2sat\n",
+"// gama1/gama2 = P2sat/P1sat\n",
+"// log(gama1) - log(gama2) = log(P2sat) - log(P1sat)\n",
+"// Val = log(gama1) - gama2\n",
+"Val = log(P2sat) - log(P1sat);\n",
+"// log(gama1) = (A*x2^2)\n",
+"// log(gama2) = (A*x1^2)\n",
+"// A(x2^2 - x1^2) = 0.625*(x2^2 - x1^2)..................... (1)\n",
+"// x1 + x2 = 1............................................. (2)\n",
+"// On simplifying, we get:\n",
+"// A*(1 - (2*x1)) = Val\n",
+"x1 = (1/2)*(1 - Val/A);\n",
+"x2 = 1 - x1;\n",
+"printf('Azeotropic Composition\n');\n",
+"printf('The mole fraction of component 1 is %.3f\n',x1);\n",
+"printf('The mole fraction of component 2 is %.3f\n',x2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.8: Margules_Equatio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 10.8\n",
+"// Page: 410\n",
+"\n",
+"printf('Example: 10.8 - Page: 410\n\n');\n",
+"\n",
+"// This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
+"// For prove refer to this example 10.8 on page number 410 of the book.\n",
+"\n",
+"printf(' This problem involves proving a relation in which no mathematics and no calculations are involved.\n\n');\n",
+"printf(' For prove refer to this example 10.8 on page 410 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.9: van_Laar_Equation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 10.9\n",
+"// Page: 412\n",
+"\n",
+"printf('Example: 10.9 - Page: 412\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"x1 = 0.42;\n",
+"x2 = 0.58;\n",
+"P = 760;// [mm of Hg]\n",
+"P1sat = 786;// [mm of Hg]\n",
+"P2sat = 551;// [mm of Hg]\n",
+"//***************//\n",
+"\n",
+"gama1 = P/P1sat;\n",
+"gama2 = P/P2sat;\n",
+"A = log(gama1)*(1 + (x2*log(gama2))/(x1*log(gama1)))^2;\n",
+"B = log(gama2)*(1 + (x1*log(gama1))/(x2*log(gama2)))^2;\n",
+"printf('Van Laar Constants\n');\n",
+"printf('A = %.3f\n',A);\n",
+"printf('B = %.3f\n',B);"
+ ]
+ }
+],
+"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
+}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/11-Additional_Topics_in_Phase_Equilibrium.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/11-Additional_Topics_in_Phase_Equilibrium.ipynb
new file mode 100644
index 0000000..fd8d710
--- /dev/null
+++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/11-Additional_Topics_in_Phase_Equilibrium.ipynb
@@ -0,0 +1,325 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 11: Additional Topics in Phase Equilibrium"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.1: Depression_of_Freezing_Point_of_Solution.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 11.1\n",
+"// Page: 458\n",
+"\n",
+"printf('Example: 11.1 - Page: 458\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"a = 2.423;// [g]\n",
+"b = 100;// [g]\n",
+"Lf = 35.7;// [cal/g]\n",
+"Tf = 353.1;// [cal/g]\n",
+"delta_Tf = 0.64;// [OC]\n",
+"R = 2;// [cal/mol K]\n",
+"Mw = 32;// [Molecular wt. of Sulphur, g/mol]\n",
+"//*************//\n",
+"\n",
+"M2 = ((R*Tf^2/(1000*Lf))*(a*1000/(b)))/delta_Tf;// [g/mol]\n",
+"n = M2/Mw;\n",
+"printf('Molecular Formula of Sulphur is S%d',round(n));"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.2: Depression_of_Freezing_Point_of_Solution.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 11.2\n",
+"// Page: 459\n",
+"\n",
+"printf('Example: 11.2 - Page: 459\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"Tf = 5 + 273;// [K]\n",
+"Lf = 9830;// [J/mol]\n",
+"R = 8.314;// [J/mol K]\n",
+"M1 = 78;// [kg/kmol]\n",
+"//**************//\n",
+"\n",
+"Kf = R*Tf^2*M1/(1000*Lf);// [kg/kmol]\n",
+"printf('Molal Freezing point is %.2f kg/kmol\n',Kf);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.3: Depression_of_Freezing_Point_of_Solution.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 11.3\n",
+"// Page: 458\n",
+"\n",
+"printf('Example: 11.3 - Page: 458\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"T_melting = 40;// [OC]\n",
+"Tf = T_melting + 273;// [K]\n",
+"a = 0.172;// [g]\n",
+"b = 12.54;// [g]\n",
+"T_new = 39.25;// [OC]\n",
+"M2 = 135;// [Molecular wt. of acetanilide, g/mol]\n",
+"R = 2;// [cal/mol K]\n",
+"//**************//\n",
+"\n",
+"delta_T = T_melting - T_new;// [OC]\n",
+"Kf = delta_T*b*M2/(1000*a);\n",
+"Lv = ((R*Tf^2/(1000)))/Kf;// [cal/g]\n",
+"printf('Latent Heat of Fusion of phenol is %.2f cal/g\n',Lv);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.4: Elevation_Of_Boiling_Point_Of_Solution.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 11.4\n",
+"// Page: 461\n",
+"\n",
+"printf('Example: 11.4 - Page: 461\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"T_boiling = 118.24;// [OC]\n",
+"Tb = T_boiling + 273;// [K]\n",
+"a = 0.4344;// [g]\n",
+"b = 44.16;// [g]\n",
+"Lv = 121;// [cal/g]\n",
+"T_new = 118.1;// [OC]\n",
+"R = 2;// [cal/mol K]\n",
+"//**************//\n",
+"\n",
+"delta_Tb = T_boiling - T_new;// [OC]\n",
+"M2 = (R*Tb^2/(1000*Lv))*(a*1000/(b*delta_Tb));\n",
+"printf('Molecular weight of anthracene is %d kg/kmol',round(M2));"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.5: Elevation_Of_Boiling_Point_Of_Solution.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 11.5\n",
+"// Page: 462\n",
+"\n",
+"printf('Example: 11.5 - Page: 462\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"delta_Tb = 2.3;// [K]\n",
+"w1 = 100;// [g]\n",
+"M1 = 78;// [g/mol]\n",
+"w2 = 13.86;// [g]\n",
+"M2 = 154;// [g/mol]\n",
+"Tb = 353.1;// [K]\n",
+"R = 8.314;// [J/mol K]\n",
+"//****************//\n",
+"\n",
+"// Molality:\n",
+"m = w2*1000/(w1*M2);// [mol/kg]\n",
+"// Molal Elevation Constant:\n",
+"Kb = delta_Tb/m;// [K kg/mol]\n",
+"// Molar Latent Heat of Vaporisation:\n",
+"Lv = R*Tb^2*M1/(1000*Kb);// [J/mol]\n",
+"printf('Molar Latent Heat of Vaporisation is %d J/mol',Lv);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.6: Osmotic_Pressure_and_Equilibria.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"\n",
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 11.6\n",
+"// Page: 465\n",
+"\n",
+"printf('Example: 11.6 - Page: 465\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"Temp = 50 + 273;// [K]\n",
+"w2 = 60;// [g]\n",
+"w1 = 1500;// [g]\n",
+"M1 = 18;// [g/mol]\n",
+"M2 = 180;// [g/mol]\n",
+"Vl = 18*10^(-6);// [Molar Volume of water, cubic m/mol]\n",
+"R = 8.314;// [J/mol K]\n",
+"//***************//\n",
+"\n",
+"// Mole fraction of glucose:\n",
+"x2 = (w2/M2)/((w2/M2) + (w1/M1));\n",
+"// Applying Eqn. (11.45):\n",
+"P = R*Temp*x2/Vl;// [N/square m]\n",
+"P = P/1000;// [kPa]\n",
+"printf('Osmotic Pressure is %.2f kPa\n',P);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.7: Osmotic_Pressure_and_Equilibria.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 11.7\n",
+"// Page: 465\n",
+"\n",
+"printf('Example: 11.7 - Page: 465\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"w2 = 0.6;// [g]\n",
+"w3 = 1.8;// [g]\n",
+"Temp = 27 + 273;// [K]\n",
+"V1 = 100;// [cubic cm]\n",
+"M2 = 60;// [g/mol]\n",
+"M3 = 180;// [g/mol]\n",
+"R = 0.082;// [L.atm/mol.K]\n",
+"//****************//\n",
+"\n",
+"V1 = V1/1000;// [litre]\n",
+"// C: Concentration per litre\n",
+"C = ((w2/M2) + (w3/M3))/V1;// [mol/litre]\n",
+"P = C*R*Temp;// [atm]\n",
+"printf('Osmotic Pressure of the solution is %.2f atm',P);"
+ ]
+ }
+],
+"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
+}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/12-Chemical_Reaction_Equilibria.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/12-Chemical_Reaction_Equilibria.ipynb
new file mode 100644
index 0000000..28256c5
--- /dev/null
+++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/12-Chemical_Reaction_Equilibria.ipynb
@@ -0,0 +1,1138 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 12: Chemical Reaction Equilibria"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.10: Homogeneous_Gas_Phase_Reaction_Equilibrium.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.10\n",
+"// Page: 489\n",
+"\n",
+"printf('Example: 12.10 - Page: 489\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"// Reaction: CO(g) + H2O(g) ------> CO2(g) + H2(g)\n",
+"P = 10;// [bar]\n",
+"T = 1000;// [K]\n",
+"K_1000 = 1.5;\n",
+"//***********//\n",
+"\n",
+"// Moles in feed:\n",
+"nCO_feed = 1;\n",
+"nH20_feed = 1;\n",
+"// Let e be the degree of completion at equilibrium.\n",
+"// Moles at Equilibrium:\n",
+"// nCO_eqb = 1 - e;\n",
+"// nH20_eqb = 1 - e;\n",
+"// nCO2_eqb = e;\n",
+"// nH2_eqb = e;\n",
+"// Total moles at equilibrium = 1 - e + 1 - e + e + e = 2\n",
+"// Mole Fractions at Equilibrium:\n",
+"// yCO_eqb = (1 - e)/2;\n",
+"// yH20_eqb = (1 - e)/2;\n",
+"// yCO2_eqb = e/2;\n",
+"// yH2_eqb = e/2;\n",
+"// Sum of stoichometric coeffecient:\n",
+"v = 1 + 1 - 1 - 1;\n",
+"K = K_1000*P^v;\n",
+"deff('[y] = f(e)','y = K - (e/2)*(e/2)/(((1 - e)/2)*(1 - e)/2)');\n",
+"e = fsolve(0.5,f);\n",
+"printf('Composition of the gas leaving the mixture\n');\n",
+"printf('yCO = yH20 = %.4f\n',(1 - e)/2);\n",
+"printf('yCO2 = yH2 = %.4f\n',e/2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.11: Homogeneous_Gas_Phase_Reaction_Equilibrium.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.11\n",
+"// Page: 489\n",
+"\n",
+"printf('Example: 12.11 - Page: 489\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"// Reaction: N2(g) + 3H2(g) --------> 2NH3\n",
+"nN2_feed = 1;\n",
+"nH2_feed = 5;\n",
+"T = 800;// [K]\n",
+"P = 250;// [bar]\n",
+"K = 1.106*10^(-5);\n",
+"//**************//\n",
+"\n",
+"// Let e be the degree of completion at equilibrium.\n",
+"// Moles at Equilibrium:\n",
+"// nN2_eqb = 1 - e;\n",
+"// nH2_eqb = 5 - 3*e;\n",
+"// nNH3_eqb = 2*e;\n",
+"// Total moles at equilibrium = 1 - e + 5 - 3*e + 2*e = 2*(3 - e)\n",
+"// Mole Fractions at Equilibrium:\n",
+"// yN2_eqb = (1 - e)/(2*(3 - e));\n",
+"// yH2_eqb = (5 - 3*e)/(2*(3 - e));\n",
+"// yNH3_eqb = 2*e/(2*(3 - e));\n",
+"// Sum of stoichometric coeffecient:\n",
+"v = 2 - 3 - 1;\n",
+"Ky = K*P^(-v);\n",
+"deff('[y] = f(e)','y = Ky - ((2*e/(2*(3 - e)))^2)/(((1-e)/((2*(3 - e))))*((5 - 3*e)/(2*(3 - e)))^3)');\n",
+"e = fsolve(0.5,f);\n",
+"printf('Molar Composition of the gases\n');\n",
+"printf('yN2 = %.4f\n',(1 - e)/(2*(3 - e)));\n",
+"printf('yH2 = %.4f\n',(5 - 3*e)/(2*(3 - e)));\n",
+"printf('yNH3 = %.4f\n',(2*e)/(2*(3 - e)));"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.12: Homogeneous_Gas_Phase_Reaction_Equilibrium.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.12\n",
+"// Page: 490\n",
+"\n",
+"printf('Example: 12.12 - Page: 490\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"// Reaction: SO2(g) + (1/2)O2 ------> SO3(g)\n",
+"P = 1;// [bar]\n",
+"T = 750;// [K]\n",
+"K = 74;\n",
+"//************//\n",
+"\n",
+"// Moles in Feed:\n",
+"nSO2 = 1;\n",
+"nO2 = 0.5;\n",
+"// Let e be the degree of completion at equilibrium.\n",
+"// Moles at Equilibrium:\n",
+"// nSO2_eqb = 10 - e;\n",
+"// nO2_eqb = 8 - 0.5*e;\n",
+"// nSO3_eqb = e;\n",
+"// Total no. of moles = 10 - e + 8 - 0.5*e + e = 18 -0.5*e;\n",
+"// Mole fraction at Equilibrium:\n",
+"// ySO2_eqb = (10 - e)/(18 - 0.5*e);\n",
+"// yO2_eqb = (8 - 0.5*e)/(18 - 0.5*e);\n",
+"// ySO3_eqb = e/(18 - 0.8*e);\n",
+"// Sum of stoichometric coeffecient:\n",
+"v = 1 - 1 -0.5;\n",
+"Ky = K*P^(-v);\n",
+"deff('[y] = f(e)','y = Ky - (e*(18 - (0.5*e)))/((10 - e)*(8 - 0.5*e))');\n",
+"e = fsolve(7,f);\n",
+"printf('Molar Composition of the gases\n');\n",
+"printf('nSO2 = %.2f\n',(10 - e));\n",
+"printf('nO2 = %.2f\n',(8 - 0.5*e));\n",
+"printf('nSO3 = %.2f\n',e);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.13: Effect_of_Pressure_on_Chemical_Equilibrium.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.13\n",
+"// Page: 492\n",
+"\n",
+"printf('Example: 12.13 - Page: 492\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"// Reaction: PCl5 = PCl3 + Cl2\n",
+"T = 250;// [OC]\n",
+"Kp = 1.8;\n",
+"e = 0.5;\n",
+"//**************//\n",
+"\n",
+"// Basis: 1 mol of PCl5\n",
+"// At Equilibrium:\n",
+"n_PCl5 = 1 - e;\n",
+"n_PCl3 = e;\n",
+"n_Cl2 = e;\n",
+"n_total = n_PCl5 + n_PCl3 + n_Cl2;\n",
+"// Patrial Pressures:\n",
+"// P_PCl5 = (n_PCl5/n_total)*P\n",
+"// P_PCl3 = (n_PCl3/n_total)*P\n",
+"// P_Cl2 = (n_Cl2/n_total)*P\n",
+"deff('[y] = f(P)','y = Kp - ((n_PCl3/n_total)*P)*((n_Cl2/n_total)*P)/((n_PCl5/n_total)*P)');\n",
+"P = fsolve(7,f);// [atm]\n",
+"printf('Total Pressure Required for 50 %% conversion of PCl5 is %.1f atm',P);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.14: Effect_of_Pressure_of_Inert_Gas_on_Chemical_Equilibrium.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.14\n",
+"// Page: 494\n",
+"\n",
+"printf('Example: 12.14 - Page: 494\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"// Reaction: SO2(g) + (1/2)O2(g) -------> SO3(g)\n",
+"// Moles in Feed:\n",
+"nSO2_feed = 1;\n",
+"nO2_feed = 0.5;\n",
+"nAr_feed = 2;\n",
+"P = 30;// [bar]\n",
+"T = 900;// [K]\n",
+"K = 6;\n",
+"//*************//\n",
+"\n",
+"// Let e be the degree of completion at equilibrium.\n",
+"// nSO2_eqb = 1 - e;\n",
+"// nO2_eqb = 0.5*(1 - e);\n",
+"// nSO3_eqb = e;\n",
+"// nAr_eqb = 2;\n",
+"// Total moles at equilibrium = 1 - e + 0.5*(1 - e) + e + 2 = (7 - e)/2\n",
+"// Mole fractions:\n",
+"// ySO2_eqb = 2*(1 - e)/(7 - e)\n",
+"// yO2_eqb = (1 - e)/(7 - e)\n",
+"// ySO3_eqb = 2*e/(7 - e)\n",
+"// yAr_eqb = 4/(7 - e)\n",
+"// Sum of Stoichiometric Coeffecient:\n",
+"v = 1 - 1 - 1/2;\n",
+"Ky = K*P^(-v);\n",
+"e = 0.8;\n",
+"err = 1;\n",
+"while err > 0.2\n",
+" Ky_new = (2*e/(7 - e))/(((2*(1 - e))/(7 - e))*(((1 - e)/(7 - e))^0.5));\n",
+" err = abs(Ky - Ky_new);\n",
+" Ky = Ky_new;\n",
+" e = e + 0.001;\n",
+"end\n",
+"printf('Degree of Conversion is %.3f\n',e);\n",
+"ySO2_eqb = 2*(1 - e)/(7 - e);\n",
+"yO2_eqb = (1 - e)/(7 - e);\n",
+"ySO3_eqb = 2*e/(7 - e);\n",
+"yAr_eqb = 4/(7 - e);\n",
+"printf('Equilibrium Composition of the reaction Mixture\n');\n",
+"printf('ySO2 = %.4f\n',ySO2_eqb);\n",
+"printf('yO2 = %.4f\n',yO2_eqb);\n",
+"printf('ySO3 = %.4f\n',ySO3_eqb);\n",
+"printf('yAr = %.4f\n',yAr_eqb)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.15: Homogeneous_Liquid_Phase_Reaction_Equilibrium.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.15\n",
+"// Page: 498\n",
+"\n",
+"printf('Example: 12.15 - Page: 498\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"// Reaction: CH3COOH(l) + C2H5OH(l) --------> CH3COOC2H5(l) + H2O(l)\n",
+"T = 373.15;// [K]\n",
+"nCH3COOH_feed = 1;\n",
+"nC2H5OH_feed = 1;\n",
+"deltaHf_CH3COOH = -484.5;// [kJ]\n",
+"deltaHf_C2H5OH = -277.69;// [kJ]\n",
+"deltaHf_CH3COOC2H5 = -480;// [kJ]\n",
+"deltaHf_H2O = -285.83;// [kJ]\n",
+"deltaGf_CH3COOH = -389.9;// [kJ]\n",
+"deltaGf_C2H5OH = -174.78;// [kJ]\n",
+"deltaGf_CH3COOC2H5 = -332.2;// [kJ]\n",
+"deltaGf_H2O = -237.13;// [kJ]\n",
+"R = 8.314;// [J/mol K]\n",
+"//******************//\n",
+"\n",
+"deltaH_298 = deltaHf_CH3COOC2H5 + deltaHf_H2O - deltaHf_CH3COOH - deltaHf_C2H5OH;// [kJ]\n",
+"deltaG_298 = deltaGf_CH3COOC2H5 + deltaGf_H2O - deltaGf_CH3COOH - deltaGf_C2H5OH;// [kJ]\n",
+"T0 = 298;// [K]\n",
+"K_298 = exp(-(deltaG_298*1000/(R*T0)));\n",
+"K_373 = K_298*exp((deltaH_298*1000/R)*((1/T0) - (1/T)));\n",
+"// Let e be the degree of completion at equilibrium.\n",
+"// nCH3COOH_eqb = 1 - e;\n",
+"// nC2H5OH_eqb = 1 - e;\n",
+"// nCH3COOC2H5_eqb = e;\n",
+"// nH2O_eqb = e;\n",
+"// Total moles at equilibrium = 1 - e + 1 - e + e + e = 2\n",
+"// Mole fractions:\n",
+"// ySO2_eqb = (1 - e)/2\n",
+"// yO2_eqb = (1 - e)/2\n",
+"// ySO3_eqb = e/2\n",
+"// yAr_eqb = e/2\n",
+"// Sum of Stoichiometric Coeffecient:\n",
+"v = 1 + 1 - 1 - 1;\n",
+"deff('[y] = f(e)','y = K_373 - ((e/2)*(e/2))/(((1 - e)/2)*((1 - e)/2))');\n",
+"e = fsolve(0.5,f);\n",
+"printf('Mole fraction of ethyl acetate is %.3f',e/2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.16: Solid_Gas_Reaction_Equilibria.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.16\n",
+"// Page: 501\n",
+"\n",
+"printf('Example: 12.16 - Page: 501\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"// Reaction: CaCO3(s) = CaO(s) + CO2(g)\n",
+"T = 1000;// [K]\n",
+"deltaH_1000 = 1.7533*10^5;// [J]\n",
+"deltaS_1000 = 150.3;// [J/mol K]\n",
+"R = 8.314;// [J/mol K]\n",
+"//****************//\n",
+"\n",
+"deltaG_1000 = deltaH_1000 - T*deltaS_1000;// [J]\n",
+"K_1000 = exp(-(deltaG_1000/(R*T)));// [bar]\n",
+"P = K_1000;\n",
+"printf('The decomposition pressure of limestone is %.4f bar at 1000 K',P);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.17: Solid_Gas_Reaction_Equilibria.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.17\n",
+"// Page: 501\n",
+"\n",
+"printf('Example: 12.17 - Page: 501\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"// Reaction: A(s) ---------> B(s) + C(g)\n",
+"deff('[deltaG] = f1(T)','deltaG = 85000 - 213.73*T + 6.71*T*log(T) - 0.00028*T^2');// [J]\n",
+"T1 = 400;// [K]\n",
+"T2 = 700;// [K]\n",
+"Pc = 1;// [bar]\n",
+"R = 8.314;// [J/mol K]\n",
+"//**************//\n",
+"\n",
+"deltaG_400 = f1(400);// [J]\n",
+"deltaG_700 = f1(700);// [J]\n",
+"K_400 = exp(-(deltaG_400/(R*T1)));// [bar]\n",
+"K_700 = exp(-(deltaG_700/(R*T2)));// [bar]\n",
+"printf('The decomposition pressure is %.4f bar at 400 K\n',K_400);\n",
+"printf('The decomposition pressure is %.2f bar at 700 K\n',K_700);\n",
+"\n",
+"// Equilibrium constant for solid - gas reaction is:\n",
+"// K = aB*aC/aA = aC = fC = Pc\n",
+"deff('[y] = f2(T)','y = Pc - exp(-f1(T)/(R*T))');\n",
+"T = fsolve(900,f2);// [K]\n",
+"printf('The decomposition temperature is %.3f K',T);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.18: Solid_Gas_Reaction_Equilibria.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.18\n",
+"// Page: 502\n",
+"\n",
+"printf('Example: 12.18 - Page: 502\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"T = 875;// [K]\n",
+"K = 0.514;\n",
+"P = 1;// [bar]\n",
+"//*************//\n",
+"\n",
+"// Reaction: Fe(s) + H2O(g) --------->FeO(s) + H2(g)\n",
+"// K = a_FeO*a_H2/(a_Fe*a_H2O)\n",
+"// Since the activities of the solid components Fe & FeO at equilibrium may be taken as unity.\n",
+"// a_Fe = a_FeO = 1\n",
+"// Ka = a_H2/a_H2O;\n",
+"// Feed:\n",
+"nH2O_feed = 1;\n",
+"nH2feed = 0;\n",
+"// Let e be the degree of completion at equilibrium.\n",
+"// Moles at Equilibrium:\n",
+"// nH2O_eqb = 1 - e;\n",
+"// nH2_eqb = e;\n",
+"// Total moles at equilibrium = 1 - e + e = 1\n",
+"// Mole Fractions at Equilibrium:\n",
+"// yH20_eqb = 1 - e;\n",
+"// yH2_eqb = e;\n",
+"// Sum of stoichometric coeffecient:\n",
+"v = 1 - 1;\n",
+"Ky = K*P^(-v);\n",
+"// Ky = e/(1 - e)\n",
+"e = Ky/(Ky + 1);\n",
+"yH2_eqb = e;\n",
+"yH2O_eqb = 1 - e;\n",
+"printf('Equilibrium Composition\n');\n",
+"printf('yH2 = %.2f\n',yH2_eqb);\n",
+"printf('y_H2O = %.2f\n',yH2O_eqb);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.19: Solid_Gas_Reaction_Equilibria.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.19\n",
+"// Page: 503\n",
+"\n",
+"printf('Example: 12.19 - Page: 503\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 12.19 on page number 503 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 12.19 on page 503 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.1: Reaction_Coordinate.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.1\n",
+"// Page: 471\n",
+"\n",
+"printf('Example: 12.1 - Page: 471\n\n');\n",
+"\n",
+"// This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
+"// For prove refer to this example 12.1 on page number 471 of the book.\n",
+"\n",
+"printf(' This problem involves proving a relation in which no mathematics and no calculations are involved.\n\n');\n",
+"printf(' For prove refer to this example 12.1 on page 471 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.20: Phase_Rule_for_Reacting_System.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.20\n",
+"// Page: 505\n",
+"\n",
+"printf('Example: 12.20 - Page: 505\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//Reactions:\n",
+"// CO + (1/2)O2 ------------> CO2 ......................................(1)\n",
+"// C + O2 ------------------> CO2 ......................................(2)\n",
+"// H2 + (1/2)O2 ------------> H2O ......................................(3)\n",
+"// C + 2H2 -----------------> CH4 ......................................(4)\n",
+"\n",
+"// Elimination of C:\n",
+"// Combining Eqn. (2) with (1):\n",
+"// CO + (1/2)O2 ------------> CO2 ......................................(5)\n",
+"// Combining Eqn. (2) with (4):\n",
+"// CH4 + O2 ----------------> 2H2 + CO2 ................................(6)\n",
+"\n",
+"// Elimination of O2:\n",
+"// Combining Eqn. (3) with (4):\n",
+"// CO2 + H2 ----------------> CO + H2O .................................(7)\n",
+"// Combining Eqn. (3) with (6):\n",
+"// CH4 + 2H2O -------------> CO2 + 4H2 .................................(8)\n",
+"\n",
+"// Equations 7 & 8 are independent sets. Hence\n",
+"r = 2;// [No. of independent rkn.]\n",
+"C = 5;// [No. of component]\n",
+"P = 1;// [No. of phases]\n",
+"s = 0;// [No special constraint]\n",
+"// Applying Eqn. 12.81\n",
+"F = C - P + 2 - r - s;// [Degree of freedom]\n",
+"printf('No. of independent reaction that occur is %d\n',r);\n",
+"printf('No. of Degree of freedom is %d',F);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.21: Phase_Rule_for_Reacting_System.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.21\n",
+"// Page: 506\n",
+"\n",
+"printf('Example: 12.21 - Page: 506\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"// Reaction: CaCO3 -----------> CaO + CO2\n",
+"r = 1;// [No. of independent rkn.]\n",
+"C = 3;// [No. of component]\n",
+"P = 3;// [No. of phases, solid CaO, solid CaCO3, gaseous CO2]\n",
+"s = 0;// [No special constraint]\n",
+"// Applying Eqn. 12.81\n",
+"F = C - P + 2 - r - s;// [Degree of freedom]\n",
+"printf('No. of Degree of freedom is %d',F);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.22: Chemical_Equilibrium_for_Simultaneous_Equation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.22\n",
+"// Page: 508\n",
+"\n",
+"printf('Example: 12.22 - Page: 508\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*********Data*********//\n",
+"// Reaction: \n",
+"// C4H10 -----------> C2H4 + C2H6 ....................................(A)\n",
+"// C4H10 -----------> C3H6 + CH4 .................................... (B)\n",
+"T = 750;// [K]\n",
+"P = 1.2;// [bar]\n",
+"Ka = 3.856;\n",
+"Kb = 268.4;\n",
+"//************************//\n",
+"\n",
+"// Let\n",
+"// ea = Degree of conversion of C4H10 in reaction (A)\n",
+"// eb = Degree of conversion of C4H10 in reaction (B)\n",
+"\n",
+"// Moles in Feed:\n",
+"nC4H10_feed = 1;\n",
+"nC2H4_feed = 0;\n",
+"nC2H6_feed = 0;\n",
+"nC3H6_feed = 0;\n",
+"nCH4_feed = 0;\n",
+"\n",
+"// Moles at Equilibrium:\n",
+"// nC4H10_eqb = 1 - ea - eb\n",
+"// nC2H4_eqb = ea\n",
+"// nC2H6_eqb = ea\n",
+"// nC3H6_eqb = eb\n",
+"// nCH4_eqb = eb\n",
+"\n",
+"// Total moles at equilibrium = 1 - ea - eb + ea + eb + eb = 1 + ea + eb\n",
+"\n",
+"// Mole Fraction:\n",
+"// yC4H10_eqb = (1 - ea - eb)/(1 + ea + eb)\n",
+"// yC2H4_eqb = ea/(1 + ea + eb)\n",
+"// yC2H6_eqb = ea/(1 + ea + eb)\n",
+"// yC3H6_eqb = eb/(1 + ea + eb)\n",
+"// yCH4_eqb = eb/(1 + ea + eb)\n",
+"\n",
+"// Sum of the stoichometric coeffecient:\n",
+"va = 1 + 1 - 1;\n",
+"vb = 1 + 1 - 1;\n",
+"\n",
+"// e = [ea eb]\n",
+"// Solution of simultaneous equation\n",
+"function[f]=F(e)\n",
+" f(1) = (((e(1)/(1 + e(1) + e(2)))*(e(1)/(1 + e(1) + e(2))))/((1 - e(1) - e(2))/(1 + e(1) + e(2))))*P^va - Ka;\n",
+" f(2) = (((e(2)/(1 + e(1) + e(2)))*(e(2)/(1 + e(1) + e(2))))/((1 - e(1) - e(2))/(1 + e(1) + e(2))))*P^vb - Kb;\n",
+" funcprot(0);\n",
+"endfunction\n",
+"\n",
+"// Initial guess:\n",
+"e = [0.1 0.8];\n",
+"y = fsolve(e,F);\n",
+"ea = y(1);\n",
+"eb = y(2);\n",
+"yC4H10_eqb = (1 - ea - eb)/(1 + ea + eb);\n",
+"yC2H4_eqb = ea/(1 + ea + eb);\n",
+"yC2H6_eqb = ea/(1 + ea + eb);\n",
+"yC3H6_eqb = eb/(1 + ea + eb);\n",
+"yCH4_eqb = eb/(1 + ea + eb);\n",
+"\n",
+"printf('At Equilibrium\n');\n",
+"printf('yC4H10 = %.4f\n',yC4H10_eqb);\n",
+"printf('yC2H4 = %.4f\n',yC2H4_eqb);\n",
+"printf('yC2H6 = %.4f\n',yC2H6_eqb);\n",
+"printf('yC3H6 = %.4f\n',yC3H6_eqb);\n",
+"printf('yCH4 = %.4f\n',yCH4_eqb);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.2: Multireaction_Stoichometry.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.2\n",
+"// Page: 473\n",
+"\n",
+"printf('Example: 12.2 - Page: 473\n\n');\n",
+"\n",
+"// This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
+"// For prove refer to this example 12.2 on page number 473 of the book.\n",
+"\n",
+"printf(' This problem involves proving a relation in which no mathematics and no calculations are involved.\n\n');\n",
+"printf(' For prove refer to this example 12.2 on page 473 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.3: Feasibility_of_Chemical_Reactio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.3\n",
+"// Page: 479\n",
+"\n",
+"printf('Example: 12.3 - Page: 479\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"// Reaction: C2H5OH(g) + (1/2)O2(g) = CH3CHO(g) + H2O(g)\n",
+"Temp = 298;// [K]\n",
+"G_CH3CHO = -133.978;// [kJ]\n",
+"G_H2O = -228.60;// [kJ]\n",
+"G_C2H5OH = -174.883;// [kJ]\n",
+"R = 8.314;// [J/mol K]\n",
+"//***************//\n",
+"\n",
+"G_O2 = 0;// [kJ]\n",
+"G_rkn = G_CH3CHO + G_H2O -(G_C2H5OH + G_O2);// [kJ]\n",
+"G_rkn = G_rkn*1000;// [J]\n",
+"if G_rkn < 0 \n",
+" printf('Reaction is feasible\n');\n",
+" K = exp(-(G_rkn/(R*Temp)));\n",
+" printf('Equilibium Constant is %.3e',K);\n",
+"else\n",
+" printf('Reaction is not feasible\n');\n",
+"end"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.4: Feasibility_of_Chemical_Reactio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.4\n",
+"// Page: 479\n",
+"\n",
+"printf('Example: 12.4 - Page: 479\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"// H2O(l) = H2O(g)\n",
+"deltaH = 9710;// [cal]\n",
+"deltaS = 26;// [e.u.]\n",
+"Temp = 27 + 273;// [K]\n",
+"P = 1;// [atm]\n",
+"//**************//\n",
+"\n",
+"deltaG = deltaH - Temp*deltaS;// [cal]\n",
+"if deltaG > 0\n",
+" printf('Vaporisation of liquid water is not spontaneous\n');\n",
+"else\n",
+" printf('Vaporisation of liquid water is spontaneous')\n",
+"end"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.5: Relation_between_Equilibrium_Constant_And_Standard_Gibbs_Free_Energy_Change.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.5\n",
+"// Page: 481\n",
+"\n",
+"printf('Example: 12.5 - Page: 481\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"// Reaction: N2(g) + 3H2(g) = 2NH3(g)\n",
+"Temp = 298;// [K]\n",
+"G_NH3 = -16.750;// [kJ/mol]\n",
+"R = 8.314;// [J/mol K]\n",
+"//***************//\n",
+"\n",
+"G_N2 = 0;// [kJ/mol]\n",
+"G_H2 = 0;// [kJ/mol]\n",
+"G_rkn = 2*G_NH3 - G_N2 - 3*G_H2;// [kJ/mol]\n",
+"printf('Standard Gibbs free energy change is %.1f kJ/mol\n',G_rkn);\n",
+"G_rkn = G_rkn*1000;// [J/mol];\n",
+"K = exp(-(G_rkn/(R*Temp)));\n",
+"printf('Equilibrium constant is %.2e',K);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.6: Relation_between_Equilibrium_Constant_And_Standard_Gibbs_Free_Energy_Change.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.6\n",
+"// Page: 481\n",
+"\n",
+"printf('Example: 12.6 - Page: 481\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"// Reaction: CO(g) + H2O(g) = CO2(g) + H2(g)\n",
+"G_CO = -32.8;// [kcal]\n",
+"G_H2O = -54.64;// [kcal]\n",
+"G_CO2 = -94.26;// [kcal]\n",
+"Temp = 273 + 25;// [K]\n",
+"R = 1.987;// [cal/mol.K]\n",
+"//***************//\n",
+"\n",
+"G_H2 = 0;// [kcal]\n",
+"G_rkn = G_CO2 + G_H2 - (G_CO + G_H2O);// [kcal]\n",
+"G_rkn = G_rkn*1000;// [cal]\n",
+"K = exp(-(G_rkn/(R*Temp)));\n",
+"printf('Equilibrium Constant is %.3e',K);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.7: Vant_Hoff_Equation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.7\n",
+"// Page: 485\n",
+"\n",
+"printf('Example: 12.7 - Page: 485\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"// Reaction: CO(g) + H2O(g) = CO2(g) + H2(g)\n",
+"T1 = 298;// [K]\n",
+"T2 = 1000;// [K]\n",
+"P = 1;// [bar]\n",
+"K1 = 1.1582*10^5;\n",
+"H_CO = -110.532;// [kJ]\n",
+"H_H2O = -241.997;// [kJ]\n",
+"H_CO2 = -393.978;// [kJ]\n",
+"R = 8.314;// [J/mol.K]\n",
+"//***************//\n",
+"\n",
+"H_H2 = 0;// [kJ]\n",
+"H_rkn = H_CO2 + H_H2 - (H_CO + H_H2O);// [kJ]\n",
+"H_rkn = H_rkn*1000;// [J]\n",
+"// From Van't Hoff Equation,\n",
+"K2 = K1*exp((H_rkn/R)*((1/T1) - (1/T2)));\n",
+"printf('Equilibrium constant at 1000 K is %.4f',K2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.8: Vant_Hoff_Equation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.8\n",
+"// Page: 485\n",
+"\n",
+"printf('Example: 12.8 - Page: 485\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"// Reaction: N2(g) + 3H2(g) = 2NH3(g)\n",
+"T1 = 298;// [K]\n",
+"T2 = 700;// [K]\n",
+"H_NH3 = -46.1;// [kJ]\n",
+"G_NH3 = -16.747;// [kJ]\n",
+"R = 8.314;// [J/mol.K]\n",
+"//**************//\n",
+"\n",
+"H_N2 = 0;// [kJ]\n",
+"H_H2 = 0;// [kJ]\n",
+"G_N2 = 0;// [kJ]\n",
+"G_H2 = 0;// [kJ]\n",
+"H_rkn = 2*H_NH3 - (H_N2 + 3*H_H2);// [kJ]\n",
+"G_rkn = 2*G_NH3 - (G_N2 + 3*G_H2);// [kJ]\n",
+"H_rkn = H_rkn*1000;// [J]\n",
+"G_rkn = G_rkn*1000;// [J]\n",
+"K1 = exp(-(G_rkn/(R*T1)));\n",
+"K2 = K1*exp((H_rkn/R)*((1/T1) - (1/T2)));\n",
+"printf('Equilibrium constant at 700 K is %.4e',K2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.9: Vant_Hoff_Equation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 12.9\n",
+"// Page: 486\n",
+"\n",
+"printf('Example: 12.9 - Page: 486\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"// Reaction: CO(g) + H2O(g) ----> CO2(g) + H2(g)\n",
+"T1 = 298;// [K]\n",
+"T2 = 1000;// [K]\n",
+"deltaH_298 = -41450;// [J/mol]\n",
+"deltaGf_298 = -28888;// [J/mol]\n",
+"alpha_CO2 = 45.369;// [kJ/kmol K]\n",
+"alpha_H2 = 27.012;// [kJ/kmol K]\n",
+"alpha_CO = 28.068;// [kJ/kmol K]\n",
+"alpha_H2O = 28.850;// [kJ/kmol K]\n",
+"beeta_CO2 = 8.688*10^(-3);// [kJ/kmol square K]\n",
+"beeta_H2 = 3.509*10^(-3);// [kJ/kmol square K]\n",
+"beeta_CO = 4.631*10^(-3);// [kJ/kmol square K]\n",
+"beeta_H2O = 12.055*10^(-3);// [kJ/kmol square K]\n",
+"R = 8.314;// [J/mol K]\n",
+"//*************//\n",
+"\n",
+"delta_alpha = alpha_CO2 + alpha_H2 - (alpha_CO + alpha_H2O);\n",
+"delta_beeta = beeta_CO2 + beeta_H2 - (beeta_CO + beeta_H2O);\n",
+"// To obtain the standard heat of reaction:\n",
+"deltaH_0 = deltaH_298 - (delta_alpha*T1 + (delta_beeta*T1^2)/2);// [kJ/mol]\n",
+"// From Eqn. 12.52:\n",
+"IR = (deltaH_0 - delta_alpha*T1*log(T1) - (delta_beeta*T1^2)/2 - deltaGf_298)/T1;// [kJ/mol K]\n",
+"// Substituting T = T2 and IR in Eqn. 12.51:\n",
+"deltaG_1000 = deltaH_0 - delta_alpha*T2*log(T2) - (delta_beeta*T2^2)/2 - IR*T2;// [kJ/mol]\n",
+"printf('Standard Gibbs free energy at 1000 K %.3f kJ\n',deltaG_1000/1000);\n",
+"\n",
+"// Standard Equilibrium Constant at 1000 K\n",
+"K_1000 = exp(-(deltaG_1000)/(R*T2));\n",
+"printf('Standard Equilibrium Constant is %.1f',K_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
+}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/2-First_Law_of_Thermodynamics.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/2-First_Law_of_Thermodynamics.ipynb
new file mode 100644
index 0000000..0332be9
--- /dev/null
+++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/2-First_Law_of_Thermodynamics.ipynb
@@ -0,0 +1,1045 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2: First Law of Thermodynamics"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.10: Reversible_Adiabatic_Expansion_of_Real_Gas.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 2.10\n",
+"// Page: 53\n",
+"\n",
+"printf('Example: 2.10 - Page: 53\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"T1 = 300;// [K]\n",
+"V1 = 30;// [L]\n",
+"V2 = 3;// [L]\n",
+"Cv = 5;// [cal/mol]\n",
+"R = 2;// [cal/K mol]\n",
+"//*************//\n",
+"\n",
+"Cp = Cv + R;// [cal/mol]\n",
+"gama = Cp/Cv;\n",
+"// The relation between temperature and volume of ideal gas undergoing adiabatic change is given by:\n",
+"// (T2/T1) = (V1/V2)^(gama - 1)\n",
+"T2 = T1 * (V1/V2)^(gama - 1);// [K]\n",
+"printf('The final temperature is %.1f K\n',T2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.11: Reversible_Adiabatic_Expansion_of_Real_Gas.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 2.11\n",
+"// Page: 53\n",
+"\n",
+"printf('Example: 2.11 - Page: 53\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"n = 2;// [mol]\n",
+"T1 = 293;// [K]\n",
+"P1 = 15;//[atm]\n",
+"P2 = 5;// [atm]\n",
+"Cp = 8.58;// [cal/degree mol]\n",
+"//**************//\n",
+"\n",
+"R = 2;// [cal/degree mol]\n",
+"Cv = Cp - R;// [cal /degree mol]\n",
+"gama = Cp/Cv;\n",
+"R = 0.082;// [L atm/degree K]\n",
+"// Since the gas is ideal:\n",
+"V1 = n*R*T1/P1;// [L]\n",
+"// Under adiabatic conditions:\n",
+"// (V2/V1) = (P1/P2)^(1/gama)\n",
+"V2 = V1*(P1/P2)^(1/gama);// [L]\n",
+"printf('The final volme is %.2f L\n',V2);\n",
+"\n",
+"// To determine the final temperature:\n",
+"// (T2/T1) = (V1/V2)^(gama - 1);\n",
+"T2 = T1*(V1/V2)^(gama - 1);// [K]\n",
+"printf('The final temperature is %.2f K\n',T2);\n",
+"\n",
+"// Adiabatic Work done can be calculated as:\n",
+"W = (P1*V1 - P2*V2)/(gama - 1);\n",
+"printf('Adiabatic work done is %.2f L-atm\n',W);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.12: Adiabatic_and_Isothermal_Process.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 2.12\n",
+"// Page: 57\n",
+"\n",
+"printf('Example: 2.12 - Page: 57\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"m = 1;// [kg]\n",
+"P1 = 8;// [atm]\n",
+"T1 = 50 + 273;// [K]\n",
+"// V1 = V;// [L]\n",
+"// V2 = 5V;// [L]\n",
+"V1_by_V2 = 1/5;\n",
+"gama = 1.4;\n",
+"R = 0.082;// [L-atm]\n",
+"//***************//\n",
+"\n",
+"// Adiabatic process:\n",
+"printf('Adiabatic Process \n');\n",
+"P2 = P1*V1_by_V2^gama;// [atm]\n",
+"printf('Final Pressure is %.2f atm\n',P2);\n",
+"T2 = T1*V1_by_V2^(gama - 1);// [K]\n",
+"printf('Final Temperature is %f K\n',T2);\n",
+"Wad = R*(T2 - T1)/(1 - gama);// [L-atm]\n",
+"printf('Adiabatic Work done is %.3f L-atm\n',Wad);\n",
+"printf('\n')\n",
+"\n",
+"// Isothermal Process:\n",
+"printf('Isothermal Process\n')\n",
+"// In an isothermal Process, the temperature remans constant:\n",
+"T2 = T1;// [K]\n",
+"printf('Final temperature is %d K\n',T2);\n",
+"// From the ideal gas:\n",
+"// (P2*V2/T2) = (P1*V1/T1)\n",
+"// Since T2 = T1\n",
+"// P2*V2 = P1*V1\n",
+"P2 = P1*V1_by_V2;// [atm]\n",
+"printf('Final pressure is %.1f atm\n',P2);\n",
+"W = R*T1*log(1/V1_by_V2);// [L-atm]\n",
+"printf('Work done during the isothermal process is %.2f L-atm\n',W);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.13: Isochoric_and_Isobaric_Process.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 2.13\n",
+"// Page: 58\n",
+"\n",
+"printf('Example: 2.13 - Page: 58\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"m = 5;// [kg]\n",
+"M = 29;// [kg/mol]\n",
+"T1 = 37 + 273;// [K]\n",
+"P1 = 101.33;// [kPa]\n",
+"T2 = 237 + 273;// [K]\n",
+"Cp = 29.1;// [J/mol K]\n",
+"Cv = 20.78;// [J/mol K]\n",
+"R = 8.314;// [J/K mol]\n",
+"//*****************//\n",
+"\n",
+"n = m/M;\n",
+"// From ideal gas equation:\n",
+"V1 = n*R*T1/P1;// [cubic m]\n",
+"\n",
+"// Isochoric Process:\n",
+"printf('Isochoric Process\n');\n",
+"// Volume = constant\n",
+"V2 = V1;// [cubic m]\n",
+"deltaU = n*Cv*(T2 - T1);// [kJ]\n",
+"// Since Volume is constant\n",
+"W = 0;\n",
+"Q = deltaU + W;// [kJ]\n",
+"// deltaH = deltaU + P*deltaV\n",
+"// deltaH = deltaU + n*R*deltaT\n",
+"deltaH = deltaU + n*R*(T2 - T1);// [kJ]\n",
+"printf('Change in Internal Energy is %.2f kJ\n',deltaU);\n",
+"printf('Heat Supplied is %.2f kJ\n',Q);\n",
+"printf('Work done is %d kJ\n',W);\n",
+"printf('Change in Enthalpy is %.2f kJ\n',deltaH);\n",
+"printf('\n');\n",
+"\n",
+"// Isobaric Process\n",
+"printf('Isobaric Process\n');\n",
+"// Since Pressure is constant.\n",
+"P2 = P1;// [kPa]\n",
+"deltaH = n*Cp*(T2 - T1);// [kJ]\n",
+"Qp = deltaH;// [kJ]\n",
+"// deltaU = deltaH - P*deltaV\n",
+"// From ideal gas equation:\n",
+"deltaU = deltaH - n*R*(T2 - T1);// [kJ]\n",
+"W = Qp - deltaU;// [kJ]\n",
+"printf('Change in Internal Energy is %.2f kJ\n',deltaU);\n",
+"printf('Heat Supplied is %.2f kJ\n',Qp);\n",
+"printf('Work done is %.2f kJ\n',W);\n",
+"printf('Change in Enthalpy is %.2f kJ\n',deltaH);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.14: Adiabatic_and_Isothermal_Process.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 2.14\n",
+"// Page: 60\n",
+"\n",
+"printf('Example: 2.14 - Page: 60\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"n = 1;// [mol]\n",
+"T1 = 610;// [K]\n",
+"P1 = 10^6;// [N/square m]\n",
+"T2 = 310;// [K]\n",
+"P2 = 10^5;// [N/square m]\n",
+"Cv = 20.78;// [J/mol K]\n",
+"//*************//\n",
+"\n",
+"R = 8.314;// [J/K mol]\n",
+"\n",
+"// Step 1: Isothermal Expansion Of Ideal Gas:\n",
+"printf('Step 1: Isothermal Expansion Of Ideal Gas\n')\n",
+"T1 = 610;// [K]\n",
+"P1 = 10^6;// [N/square m]\n",
+"P2 = 10^5;// [N/square m]\n",
+"// Work done:\n",
+"W1 = 2.303*n*R*T1*log10(P1/P2);// [J/mol]\n",
+"// For isothermal expansion:\n",
+"delta_E1 = 0;// [J/mol]\n",
+"// From first law of thermodynamics:\n",
+"Q1 = delta_E1 + W1;// [J/mol]\n",
+"printf('delta_E for Step 1 is %d J/mol\n',delta_E1);\n",
+"printf('Q for step 1 is %.2f J/mol\n',Q1);\n",
+"printf('W for step 1 is %.2f J/mol\n',W1);\n",
+"printf('\n');\n",
+"\n",
+"// Step 2: Adiabatic Expansion of ideal gas:\n",
+"printf('Step 2: Adiabatic Expansion of ideal gas\n')\n",
+"Q2 = 0;// [J/mol]\n",
+"delta_E2 = Cv*(T2 - T1);// [J/mol]\n",
+"// From first law of thermodynamics:\n",
+"W2 = Q2 - delta_E2;// [J/mol]\n",
+"printf('delta_E for Step 2 is %d J/mol\n',delta_E2);\n",
+"printf('Q for step 2 is %.2f J/mol\n',Q2);\n",
+"printf('W for step 2 is %.2f J/mol\n',W2);\n",
+"printf('\n');\n",
+"\n",
+"// Step 3: Isothermal Compression Of Ideal Gas:\n",
+"printf('Step 3: Isothermal Compression Of Ideal Gas\n')\n",
+"T2 = 310;// [K]\n",
+"P1 = 10^5;// [N/square m]\n",
+"P2 = 10^6;// [N/square m]\n",
+"// Work done:\n",
+"W3 = 2.303*n*R*T2*log10(P1/P2);// [J/mol]\n",
+"// For isothermal expansion:\n",
+"delta_E3 = 0;// [J/mol]\n",
+"// From first law of thermodynamics:\n",
+"Q3 = delta_E3 + W3;// [J/mol]\n",
+"printf('delta_E for Step 3 is %d J/mol\n',delta_E3);\n",
+"printf('Q for step 3 is %.2f J/mol\n',Q3);\n",
+"printf('W for step 3 is %.2f J/mol\n',W3);\n",
+"printf('\n');\n",
+"\n",
+"// Step 4: Adiabatic Compression of ideal gas:\n",
+"printf('Step 4: Adiabatic Compression of ideal gas\n')\n",
+"T1 = 310;// [K]\n",
+"T2 = 610;// [K]\n",
+"Q4 = 0;// [J/mol]\n",
+"delta_E4 = Cv*(T2 - T1);// [J/mol]\n",
+"// From first law of thermodynamics:\n",
+"W4 = Q4 - delta_E4;// [J/mol]\n",
+"printf('delta_E for Step 4 is %d J/mol\n',delta_E4);\n",
+"printf('Q for step 4 is %.2f J/mol\n',Q4);\n",
+"printf('W for step 4 is %.2f J/mol\n',W4);\n",
+"printf('\n');\n",
+"\n",
+"// Net work done for the complete cycle:\n",
+"W = W1 + W2 + W3 + W4;// [J/mol]\n",
+"printf('Net Work done for the complete cycle is %.2f J/mol\n',W);\n",
+"\n",
+"// The efficiency of the cycle is given by:\n",
+"eta = 1- T1/T2;\n",
+"printf('The efficiency of the cycle is %.2f\n',eta);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.15: Reversible_Isothermal_Expansion.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 2.15\n",
+"// Page: 61\n",
+"\n",
+"printf('Example: 2.15 - Page: 61\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 2.15 on page number 61 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 2.15 on page 61 of the book.')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.16: Compression_of_ideal_gas.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 2.16\n",
+"// Page: 62\n",
+"\n",
+"printf('Example: 2.16 - Page: 62\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"P1 = 1;// [bar]\n",
+"T1 = 300;//[K]\n",
+"V1 = 24.92;// [cubic m/kmol]\n",
+"P2 = 10;// [bar]\n",
+"T2 = 300;// [K]\n",
+"Cp = 29.10;// [kJ/kmol K]\n",
+"Cv = 20.78;// [kJ/kmol K]\n",
+"R = 8.314;// [J/mol K]\n",
+"//**************//\n",
+"\n",
+"// Basis: 1 kmol of ideal gas:\n",
+"n = 1;\n",
+"V2 = P1*V1/P2;// [cubic m]\n",
+"\n",
+"// First Process:\n",
+"printf('First Process\n');\n",
+"// In the first step of the first process, the cooling of ga takes place at constant pressure.\n",
+"// Here the volume is reduced appreciably and consequently the temperature decreases.\n",
+"T_prime = T1*V2/V1;// [K]\n",
+"// Heat Requirement:\n",
+"Q1 = n*Cp*(T_prime - T1);// [kJ]\n",
+"deltaH1 = Q1;// [kJ]\n",
+"deltaU1 = deltaH1 - P1*(V2 - V1);// [kJ]\n",
+"// In the second step, the gas is heated at constant Volume:\n",
+"// V = constant\n",
+"Q2 = n*Cv*(T2 - T_prime);// [kJ]\n",
+"deltaU2 = Q2;// [kJ]\n",
+"deltaH2 = n*R*(T2 - T_prime);// [kJ]\n",
+"deltaU = deltaU1 + deltaU2;// [kJ]\n",
+"deltaH = deltaH1 + deltaH2;// [kJ]\n",
+"Q = Q1 + Q2;// [kJ]\n",
+"printf('Change in Internal Energy is %.2f kJ\n',deltaU);\n",
+"printf('Change in Enthalpy is %.2f kJ\n',deltaH);\n",
+"printf('Heat Requirement is %.2f kJ\n',Q);\n",
+"printf('\n');\n",
+"\n",
+"// Second Process:\n",
+"printf('Second Process\n');\n",
+"// In the first step of the second process, the gas is heated at constant volume.\n",
+"T_prime = T1*P2/P1;// [K]\n",
+"// Heat Requirement:\n",
+"Q1 = n*Cv*(T_prime - T1);// [kJ]\n",
+"deltaU1 = Q1;// [kJ]\n",
+"deltaH1 = n*R*(T_prime - T1);// [kJ]\n",
+"// In the second step, the gas is cooled at constant presure:\n",
+"// V = constant\n",
+"Q2 = n*Cp*(T2 - T_prime);// [kJ]\n",
+"deltaH2 = Q2;// [kJ]\n",
+"deltaU2 = deltaH2 - P1*(V2 - V1);// [kJ]\n",
+"deltaU = deltaU1 + deltaU2;// [kJ]\n",
+"deltaH = deltaH1 + deltaH2;// [kJ]\n",
+"Q = Q1 + Q2;// [kJ]\n",
+"printf('Change in Internal Energy is %.2f kJ\n',deltaU);\n",
+"printf('Change in Enthalpy is %.2f kJ\n',deltaH);\n",
+"printf('Heat Requirement is %.2f kJ\n',Q);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.17: Work_done_by_gas.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 2.17\n",
+"// Page: 62\n",
+"\n",
+"printf('Example: 2.17 - Page: 64\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"D1 = 1;// [m]\n",
+"P1 = 120;// [kPa]\n",
+"P2 = 360;// [kPa]\n",
+"// P = k*D^3\n",
+"//***************//\n",
+"\n",
+"k = P1/D1^3;// [proportionality constant]\n",
+"D2 = (P2/k)^(1/3);// [m]\n",
+"// Work done by the gas inside the balloon can be estimated as:\n",
+"// W = integral(P*dV);\n",
+"// W = integral((k*D^3)*d((4/3)*%pi*r^3);\n",
+"// W = (%pi*k/6)*integral((D^3)*d(D^3));\n",
+"// W = (%pi*k/12)*(D2^6 - D1^6);\n",
+"W = (%pi*k/12)*(D2^6 - D1^6);// [kJ]\n",
+"printf('Workdone by the gas is %.2f kJ\n',W);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.18: Work_Requirement.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 2.18\n",
+"// Page: 65\n",
+"\n",
+"printf('Example: 2.18 - Page: 65\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"P1 = 10*100;// [kPa]\n",
+"T1 = 250;// [K]\n",
+"P2 = 1*100;// [kPa]\n",
+"T2 = 300;// [K]\n",
+"R = 8.314;// [J/mol K]\n",
+"Cv = 20.78;// [kJ/kmol K]\n",
+"Cp = 29.10;// [kJ/kmol K]\n",
+"//**********//\n",
+"\n",
+"V1 = R*T1/P1;// [cubic m]\n",
+"V2 = R*T2/P2;// [cubic m]\n",
+"\n",
+"// Calculation based on First Process:\n",
+"// In this constant-volume process, the initial pressure of 10 bar is reduced to a final pressure of 1 bar and consequently the temperature decreases.\n",
+"T_prime = P2*V1/R;// [K]\n",
+"deltaU1 = Cv*(T_prime - T1);// [kJ]\n",
+"deltaH1 = deltaU1 + V1*(P2 -P1);// [kJ]\n",
+"// Since V = constant\n",
+"W1 = 0;//[kJ]\n",
+"// By first law of thermodynamics:\n",
+"Q = W1 + deltaU1;// [kJ]\n",
+"\n",
+"// Calculation based on second process:\n",
+"// In this process, the gas is heated at constant pressure to the final temperature of T2.\n",
+"deltaH2 = Cp*(T2 - T_prime);// [kJ]\n",
+"deltaU2 = deltaH2 - P2*(V2 - V1);// [kJ]\n",
+"Q = deltaH2;// [kJ]\n",
+"W2 = Q - deltaU2;// [kJ]\n",
+"\n",
+"deltaU = deltaU1 + deltaU2;// [kJ]\n",
+"deltaH = deltaH1 + deltaH2;// [kJ]\n",
+"printf('Change in Inernal Enrgy is %.2f kJ\n',deltaU);\n",
+"printf('Change in Enthalpy is %.2f kJ\n',deltaH);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.19: Energy_balance_for_open_system.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 2.19\n",
+"// Page: 69\n",
+"\n",
+"printf('Example: 2.19 - Page: 69\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"T1 = 273;// [K]\n",
+"T2 = 273 + 67;// [K]\n",
+"m_dot = 20000;// [kg/h]\n",
+"Ws = -1.5;// [hp]\n",
+"Q = -38000;// [kJ/min]\n",
+"Z = 20;// [m]\n",
+"Cp = 4.2;// [kJ/kg K]\n",
+"g = 9.81;// [m/second square]\n",
+"//***************//\n",
+"\n",
+"Q = Q*60/m_dot;// [kJ/kg]\n",
+"Ws = Ws*0.7457*3600/m_dot;// [kJ/kg]\n",
+"PE = g*Z*10^(-3);// [kJ/kg]\n",
+"// KE is assumed to be negligible.\n",
+"// For Steady Flow process: dE/dt = 0\n",
+"// From Eqn. 2.47:\n",
+"deltaH = Q - Ws - PE;// [kJ/kg]\n",
+"H1 = Cp*(T2 - T1);// [kJ/kg]\n",
+"H2 = H1 + deltaH;// [kJ/kg]\n",
+"\n",
+"// Now, the temperature of the tank can be determined as:\n",
+"T = (H2/Cp) + T1;// [K]\n",
+"printf('Tempertaure of water in the second tank is %.2f K\n',T);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.1: First_Law_of_thermodynamics_for_closed_system.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 2.1\n",
+"// Page: 39\n",
+"\n",
+"printf('Example: 2.1 - Page: 39\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"deff('[E] = f1(T)','E = 50 + 25*T + 0.05*T^2');// [J]\n",
+"deff('[Q] = f2(T)','Q = 4000 + 10*T');// [J]\n",
+"Ti = 400;// [K]\n",
+"Tf = 800;// [K]\n",
+"//*************//\n",
+"\n",
+"// From the first law of thermodynamics:\n",
+"// W = Q - delta_E\n",
+"// W = f2 -f1\n",
+"W = integrate('(4000 + 10*T) - (50 + (25*T) + (0.05*T^2))','T',Ti,Tf);\n",
+"printf('The work done during the process is %.2f kJ\n',W/1000);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.2: First_Law_of_Thermodynamics_for_Closed_System.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 2.2\n",
+"// Page: 40\n",
+"\n",
+"printf('Example: 2.2 - Page: 40\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"U1 = 1000;// [kJ]\n",
+"Q = -600; // [kJ]\n",
+"W = -100;// [kJ]\n",
+"//************//\n",
+"\n",
+"// The system is considered to be a closed system. No mass transfer takes place across the system. The tank is rigid. \n",
+"// So, the kinetic and the potential energies is zero.\n",
+"// Therefore:\n",
+"// delta_E = delta_U + delta_PE + delta_KE\n",
+"// delta_E = delta_U\n",
+"// From the first law of thermodynamics:\n",
+"// Q = delta_U + W\n",
+"// delta_U = Q - W\n",
+"// U2 - U1 = Q - W\n",
+"U2 = U1 + Q - W;// [kJ]\n",
+"printf('The final internal energy of the fluid is %d kJ\n',U2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.3: First_Law_of_Thermodynamics_for_Closed_System.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 2.3\n",
+"// Page: 40\n",
+"\n",
+"printf('Example: 2.3 - Page: 40\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"W = -3;// [hp]\n",
+"Q = -4000;// [kJ/h]\n",
+"//**************//\n",
+"\n",
+"// The work done by the stirrer on the system is given by\n",
+"W = W*745.7;// [W]\n",
+"// The amount of heat transferred to the suroundings can be expressed in terms of J/s:\n",
+"Q = Q*1000/3600;// [J/s]\n",
+"// From the first law of thermodynamics:\n",
+"// Q = delta_U - W\n",
+"delta_U = Q - W;// [J/s]\n",
+"printf('The change in the internal energy of the system would be %.2f J/s\n',delta_U);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.4: First_Law_of_Thermodynamics_for_Closed_System.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 2.4\n",
+"// Page: 41\n",
+"\n",
+"printf('Example: 2.4 - Page: 41\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"// From Fig. 2.4 (Page: 41)\n",
+"// For process A-1-B:\n",
+"Q1 = 60;// [kJ]\n",
+"W1 = 35;// [kJ]\n",
+"// For process A-2-B:\n",
+"W2 = 50;// [kJ]\n",
+"// For process B-3-A:\n",
+"W3 = -70;// [kJ]\n",
+"//************//\n",
+"\n",
+"// For process A-1-B:\n",
+"// The internal energy of the process A-1-B can be estimated as:\n",
+"// Q = delta_U + W\n",
+"delta_U = Q1 - W1;// [kJ]\n",
+"// For process A-2-B:\n",
+"Q2 = delta_U + W2;// [kJ]\n",
+"// For process B-3-A:\n",
+"Q3 = -delta_U + W3;// [kJ]\n",
+"printf('The amount of heat transferred from the system to the surroundings during process B-3-A is %d kJ\n',-Q3);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.5: First_Law_of_Thermodynamics_for_Closed_System.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 2.5\n",
+"// Page: 41\n",
+"\n",
+"printf('Example: 2.5 - Page: 41\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"// For constant pressure process 1-2:\n",
+"W12 = -100;// [kJ]\n",
+"Q12 = -50;// [kJ]\n",
+"// For constant volume process 2-3:\n",
+"Q23 = 80;// [kJ]\n",
+"// process 3-1: Adiabatic process\n",
+"//**************//\n",
+"\n",
+"// The internal energy of process 1-2 can be calculated as:\n",
+"delta_U12 = Q12 - W12;// [kJ]\n",
+"printf('Change in Internal Energy for process 1-2 is %d kJ\n',delta_U12);\n",
+"// For the process 2-3:\n",
+"// As the process is constant volume process:\n",
+"W23 = 0;// [kJ]\n",
+"delta_U23 = Q23 - W23;// [kJ]\n",
+"printf('Change in Internal Energy for process 2-3 is %d kJ\n',delta_U23);\n",
+"\n",
+"// For process 3-1:\n",
+"// Since the process is adiabatic, ther is no heat transfer between the system and the surrounding.\n",
+"Q31 = 0;// [kJ]\n",
+"// For a cyclic process, the internal energy change is zero.\n",
+"// delta_U12 + delta_U23 + delta_U31 = 0\n",
+"delta_U31 = -(delta_U12 + delta_U23);// [kJ]\n",
+"// Putting the value of delta_U31:\n",
+"W31 = Q31 - delta_U31;// [kJ]\n",
+"printf('Change in Internal Energy for process 3-1 is %d kJ\n',delta_U31);\n",
+"printf('The work done during the adiabatic process is %d kJ\n',W31);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.6: Enthalpy.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 2.6\n",
+"// Page: 44\n",
+"\n",
+"printf('Example: 2.6 - Page: 44\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"m = 1;// [kg]\n",
+"Temp = 373;// [K]\n",
+"P = 101325;// [N/square m]\n",
+"V_Liquid = 1.04*10^(-3);// [cubic m/kg]\n",
+"V_Vapour = 1.673;// [cubic m/kg]\n",
+"Q = 2257;// [kJ]\n",
+"//**************//\n",
+"\n",
+"// Work done due to expansion:\n",
+"Wexpansion = P*(V_Vapour - V_Liquid);// [N-m]\n",
+"deltaU = Q - Wexpansion/1000;// [kJ]\n",
+"deltaH = deltaU + Wexpansion/1000;// [kJ]\n",
+"\n",
+"printf('Change in Internal Energy is %.2f kJ\n',deltaU);\n",
+"printf('Change in enthalpy is %d kJ\n',deltaH);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7: Enthalpy.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 2.7\n",
+"// Page: 45\n",
+"\n",
+"printf('Example: 2.7 - Page: 45\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"n = 1;// [mol]\n",
+"Temp = 353;// [K]\n",
+"P = 1;// [atm]\n",
+"Hv = 380;// [J/g]\n",
+"Mwt = 78;// [g/mol]\n",
+"R = 8.314;// [J/K mol]\n",
+"//*************//\n",
+"\n",
+"Q = Hv*Mwt;// [J/mol]\n",
+"// Since Vv >> Vl:\n",
+"// P*(Vv - Vl) = P*Vv =n*R*Temp\n",
+"Wexpansion = n*R*Temp;// [J]\n",
+"// By first law of thermodynamics:\n",
+"deltaU = Q - Wexpansion;// [J]\n",
+"deltaH = deltaU + Wexpansion;// [J]\n",
+"\n",
+"printf('Change in Internal Energy is %.2f J\n',deltaU);\n",
+"printf('Change in Enthalpy is %d J\n',deltaH);\n",
+"printf('Amount of Heat supplied is %d J\n',Q);\n",
+"printf('Work done is %.2f J\n',Wexpansion);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.8: Enthalpy.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 2.8\n",
+"// Page: 45\n",
+"\n",
+"printf('Example: 2.8 - Page: 45\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"deltaU = 200;// [cal]\n",
+"Vinit = 10;// [L]\n",
+"Vfinal = 50;// [L]\n",
+"deff('[P] = f(V)','P = 10/V');\n",
+"//**************//\n",
+"\n",
+"// By definition of enthalpy:\n",
+"// deltaQ = deltaU + PdV\n",
+"deltaQ = deltaU + integrate('f(V)','V',Vinit,Vfinal)*24.2;// [cal]\n",
+"printf('Change in enthalpy is %f cal\n',deltaQ);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.9: Heat_Capacity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 2.9\n",
+"// Page: 48\n",
+"\n",
+"printf('Example: 2.9 - Page: 48\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"m_water = 1;// [kg]\n",
+"Cv = 4.18;// [kJ/kg K]\n",
+"m_stirrer = 40;// [kg]\n",
+"h = 25;// [m]\n",
+"g = 9.81;// [m/square s]\n",
+"//***************//\n",
+"\n",
+"// Since the system is thermally insulated:\n",
+"// Q = 0\n",
+"// From the first law of thermodynamics:\n",
+"// dQ = dE + dW\n",
+"// As E = U + Ek +Ep and Ek = Ep = 0\n",
+"// dQ = dU + dW\n",
+"dT = g*h/Cv;// [K]\n",
+"printf('Rise in Temperature is %.2f K\n',dT);"
+ ]
+ }
+],
+"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
+}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/3-Properties_Of_Pure_Substances.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/3-Properties_Of_Pure_Substances.ipynb
new file mode 100644
index 0000000..1ff0ba1
--- /dev/null
+++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/3-Properties_Of_Pure_Substances.ipynb
@@ -0,0 +1,526 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3: Properties Of Pure Substances"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.10: Isothermal_Process.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 3.10\n",
+"// Page: 103\n",
+"\n",
+"printf('Example: 3.10 - Page: 103\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"beeta = 1.487*10^(-3);// [1/OC]\n",
+"alpha = 62*10^(-6);// [1/bar]\n",
+"V1 = 1.287;// [cubic cm /g]\n",
+"//************//\n",
+"\n",
+"// Solution (a)\n",
+"// The value of derivative (dP/dT) at constant V:\n",
+"// dV/V = beeta*dT - alpha*dP\n",
+"// dV = 0\n",
+"// dP/dT = beeta/alpha\n",
+"// Value = dP/dT\n",
+"Value = beeta/alpha;// [bar/OC]\n",
+"printf('Value of derivative is %.2f bar/OC\n',Value);\n",
+"\n",
+"// Solution (b)\n",
+"P1 = 1;// [bar]\n",
+"T1 = 20;// [OC]\n",
+"T2 = 30;// [OC]\n",
+"// Applying the same equation:\n",
+"P2 = P1 +(beeta/alpha)*(T2 - T1);// [bar]\n",
+"printf('The pressure generated by heating at constant Volume is %.2f Pa\n',P2);\n",
+"\n",
+"// Solution (c)\n",
+"T2 = 0;// [OC]\n",
+"T1 = 20;// [OC]\n",
+"P2 = 10;// [bar]\n",
+"P1 = 1;// [bar]\n",
+"// The change in Volume can be obtained as:\n",
+"V2 = V1*exp((beeta*(T2 - T1)) - alpha*(P2 - P1));// [cubic cm/g]\n",
+"deltaV = V2 - V1;// [cubic cm/g]\n",
+"printf('The change in Volume is %.3f cubic cm/g\n',deltaV);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.11: Acentric_Factor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 3.11\n",
+"// Page: 107\n",
+"\n",
+"printf('Example: 3.11 - Page: 107\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"Tc = 513.9;// [K]\n",
+"Pc = 61.48*10^5;// [Pa]\n",
+"//************//\n",
+"\n",
+"Tr = 0.7;\n",
+"T = Tr*Tc - 273.15;// [OC]\n",
+"P_sat = 10^(8.112 - (1592.864/(T + 226.184)));// [mm Hg]\n",
+"P_sat = P_sat*101325/760;// [Pa]\n",
+"Pr_sat = P_sat/Pc;// [Pa]\n",
+"omega = -1 - log10(Pr_sat);// [Acentric factor]\n",
+"printf('Acentric factor is %.4f',omega);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.1: Ideal_Gas_Equation_of_State.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 3.1\n",
+"// Page: 88\n",
+"\n",
+"printf('Example: 3.1 - Page: 88\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"P = 2*10^5;// [Pa]\n",
+"T = 273 + 37;// [K]\n",
+"R = 8.314;// [J/mol K]\n",
+"//****************//\n",
+"\n",
+"// Since the gas behaves ideally:\n",
+"V = R*T/P;// [cubic metres]\n",
+"printf('Molar Volume of the gas is %.2e cubic metres',V);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.2: Ideal_Gas_Equation_of_State.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 3.2\n",
+"// Page: 89\n",
+"\n",
+"printf('Example: 3.2 - Page: 89\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"V1 = 8;// [cubic m]\n",
+"P1 = 300;// [kPa]\n",
+"V2 = 2;// [cubic m]\n",
+"//**************//\n",
+"\n",
+"// Apptying the ideal gas Eqn. & since the Temperature remains constant:\n",
+"P2 = P1*V1/V2;// [kPa]\n",
+"printf('The pressure of air after compression is %d kPa\n',P2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.3: Ideal_Gas_Equation_of_State.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 3.3\n",
+"// Page: 89\n",
+"\n",
+"printf('Example: 3.3 - Page: 89\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"V1 = 6;// [cubic m]\n",
+"P1 = 500;// [kPa]\n",
+"R = 0.287;// [kJ/kg K]\n",
+"//*************//\n",
+"\n",
+"// Applying the charectarstic equation to the gas initially:\n",
+"// P1*V1 = m1*R*T1.......................................(i)\n",
+"// Applying the charectarstic equation to the gas which was left in the vessel after one-fifth of the gas has been removed:\n",
+"// P2*V2 = m2*R*T2.......................................(ii)\n",
+"// V2 = V1;\n",
+"// T2 = T1;\n",
+"// m2 = (4/5)*m1;\n",
+"// Eqn (ii) becomes:\n",
+"// P2*V1 = (4/5)*m1*R*T1..................................(iii)\n",
+"// Dividing eqn (i) by eqn (iii), we get:\n",
+"P2 = (4/5)*P1;// [kPa]\n",
+"printf('The pressure of the remaining air is %d kPa\n',P2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.4: Ideal_Gas_Equation_of_State.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 3.4\n",
+"// Page: 90\n",
+"\n",
+"printf('Example: 3.4 - Page: 90\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"T1 = 450 + 273;// [K]\n",
+"P1 = 3;// [bar]\n",
+"//***************//\n",
+"\n",
+"// Soluton(a)\n",
+"// From Fig. 3.7, (Page 90)\n",
+"// Since the weight remains the same, therefore, the final pressure is equal to the initial pressure.\n",
+"// Therefore it is a constant pressure process.\n",
+"P2 = P1;// [bar]\n",
+"// Volumetric Ratio:\n",
+"V2_by_V1 = 2.5/(2.5 + 2.5);\n",
+"// Applying ideal gas law & P1 = P2\n",
+"T2 = T1*V2_by_V1;// [K]\n",
+"printf('Final Temperature of the air when the piston reaches stop is %.1f K\n',T2);\n",
+"\n",
+"// Solution (b)\n",
+"// When the piston rests ot the stops, the pressure exerted by the weight, air & the atmosphere will be different. But there will beno further decrease in volume.\n",
+"// This is a constant volume process.\n",
+"T3 = 273 + 30;// [K]\n",
+"// Applying ideal gas law & V2 = V3\n",
+"P3 = T3*P2/T2;// [bar]\n",
+"printf('Pressure of air inside the cylinder is %.2f bar\n',P3);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.5: Van_der_waal_equation_of_state.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 3.5\n",
+"// Page: 95\n",
+"\n",
+"printf('Example: 3.5 - Page: 95\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"m = 1.373;// [kg]\n",
+"P = 1.95*10^(6);// [Pa]\n",
+"V = 0.1;// [cubic m]\n",
+"a = 422.546*10^(-3);// [cubic m/square mol]\n",
+"b = 37*10^(-6);// [cubic m/mol]\n",
+"M = 17*10^(-3);// [kg/mol]\n",
+"R = 8.314;// [J/mol K]\n",
+"//****************//\n",
+"\n",
+"n = m/M;// [moles]\n",
+"Vm = V/n;// [molar volume, cubic m]\n",
+"// Applying Van der Waals equation of state:\n",
+"T = (P + (a/Vm^2))*((Vm - b)/R);// [K]\n",
+"printf('The temperature at which ammonia exists in the cylinder is %.1f K\n',T)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.6: Cubic_Equation_of_State.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 3.6\n",
+"// Page: 96\n",
+"\n",
+"printf('Example: 3.6 - Page: 96\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"P = 15*10^5;// [Pa]\n",
+"T = 773;// [K]\n",
+"R = 8.314;// [J/mol K]\n",
+"//**************//\n",
+"\n",
+"// Solution (a)\n",
+"printf('Ideal Equation of State\n')\n",
+"// Applying ideal Eqn. of State:\n",
+"Vm = R*T/P;// [cubic m/mol]\n",
+"printf('Molar Volume of the gas is %.3e cubic m/mol\n',Vm);\n",
+"printf('\n');\n",
+"\n",
+"// Solution (b)\n",
+"printf('Van der Wall Equation of State\n');\n",
+"a = 0.2303;// [Nm^4/square mol]\n",
+"b = 4.3073*10^(-5);// [cubic m/mol]\n",
+"deff('[y] = f1(Vm)','y = P - (R*T/(Vm-b)) + (a/Vm^2)');\n",
+"Vm = fsolve(Vm,f1);// [cubic m/mol]\n",
+"printf('Molar Volume of the gas is %.3e cubic m/mol\n',Vm);\n",
+"printf('\n');\n",
+"\n",
+"//Solution (c)\n",
+"printf('Virial Equation of State\n');\n",
+"// Z = 1 + B/V\n",
+"// (P*V/(R*T)) = (1 + B/V)\n",
+"// V^2 - V*R*T/P - B*R*T/P = 0\n",
+"B = 1.3697*10^(-5);// [cubic m/mol]\n",
+"deff('[y] = f2(Vm)','y = Vm^2 - (Vm*R*T/P) - (B*R*T/P)');\n",
+"Vm = fsolve(7,f2);// [cubic m/mol]\n",
+"printf('Molar Volume of the gas is %.3e cubic m/mol\n',Vm);\n",
+"printf('\n');\n",
+"\n",
+"// Solution (d)\n",
+"printf('Redlich Kwong Equation of State\n');\n",
+"Tc = 190.6;// [K]\n",
+"Pc = 45.99*10^5;// [Pa]\n",
+"a = 0.4278*R^2*Tc^2.5/Pc;// [N/m^4 square mol]\n",
+"b = 0.0867*R*Tc/Pc;// [cubic m/mol]\n",
+"deff('[y] = f3(Vm)','y = P - (R*T/(Vm - b)) + (a/((T^0.5)*Vm*(Vm+b)))');\n",
+"Vm = fsolve(Vm,f3);// [cubic m/mol]\n",
+"printf('Molar Volume of the gas is %.3e cubic m/mol\n',Vm);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.7: Van_der_waal_equation_of_state.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 3.7\n",
+"// Page: 101\n",
+"\n",
+"printf('Example: 3.7 - Page: 101\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 3.7 on page number 101 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 3.7 on page 101 of the book.')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.8: Virial_Equation_of_state.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 3.8\n",
+"// Page: 101\n",
+"\n",
+"printf('Example: 3.8 - Page: 101\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"T = 500;// [K]\n",
+"P = 8*10^6;// [Pa]\n",
+"R = 8.314;// [J/mol K]\n",
+"//*************//\n",
+"\n",
+"// Solution (a)\n",
+"// By ideal gas equation of state:\n",
+"printf('Ideal Equation of State\n')\n",
+"Vm = R*T/P;// [cubic m/mol]\n",
+"printf('Molar Volume of gas is %.3e cubic m/mol\n',Vm);\n",
+"printf('\n');\n",
+"\n",
+"// Solution (b)\n",
+"// By Virial Equation of State:\n",
+"printf('Virial Equation of State\n');\n",
+"B = -0.265*10^(-3);// [cubic m/mol]\n",
+"C = 0.3025*10^(-7);// [m^6/square mol]\n",
+"deff('[y] = f(Vm)','y = (P*Vm/(R*T)) - 1 -(B/Vm) - (C/Vm^2)');\n",
+"Vm = fsolve(Vm,f);\n",
+"printf('Molar Volume of gas is %.2e cubic m/mol\n',Vm);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.9: Isothermal_Process.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 3.9\n",
+"// Page: 102\n",
+"\n",
+"printf('Example: 3.9 - Page: 102\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 3.9 on page number 102 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 3.9 on page 102 of the book.')"
+ ]
+ }
+],
+"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
+}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/4-Heat_Effects.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/4-Heat_Effects.ipynb
new file mode 100644
index 0000000..1bcdec4
--- /dev/null
+++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/4-Heat_Effects.ipynb
@@ -0,0 +1,497 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: Heat Effects"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.10: Effect_of_Temperature_on_Heat_of_Reaction.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 4.10\n",
+"// Page: 129\n",
+"\n",
+"printf('Example: 4.10 - Page: 129\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"T2 = 1273;// [K]\n",
+"T1 = 300;// [K]\n",
+"deltaH_300 = -11030;// [cal/mol]\n",
+"//*************//\n",
+"\n",
+"// The chemical reaction involved is:\n",
+"// N2 + 3H2 = 2NH3\n",
+"// (1/2)N2 + (3/2)H2 = NH3\n",
+"// deltaH_1273 = deltaH_300 + integrate('Cp_NH3(T) - (1/2)*Cp_N2(T) - (1/2)*Cp_H2(T)','T',1273,300);\n",
+"deltaH_1273 = deltaH_300 + integrate('(6.2 + 7.8*10^(-3)*T - 7.2*10^(-6)*T^2) - (1/2)*(6.45 + 1.4*10^(-3)*T) - (1/2)*(6.94 - 0.2*10^(-3)*T)','T',1273,300);// [cal]\n",
+"printf('Heat of formation at 1273 K is %d cal',deltaH_1273);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.11: Effect_of_Temperature_on_Heat_of_Reaction.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 4.11\n",
+"// Page: 130\n",
+"\n",
+"printf('Example: 4.11 - Page: 130\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"CO2 = 13.4;// [percent by volume]\n",
+"N2 = 80.5;// [percent by volume]\n",
+"O2 = 6.1;// [percent by volume]\n",
+"//*************//\n",
+"\n",
+"// Basis : 100 cubic m of flue gas.\n",
+"Vol_N2_flue = N2;// [Volume of Nitrogen in flue gas, cubic m]\n",
+"Vol_O2_flue = O2;// [Volume of O2 in flue gas, cubic m]\n",
+"Vol_Air = N2/0.79;// [Volume of air supplied, cubic m]\n",
+"Vol_O2 = Vol_Air*0.21;// [Volume of O2 in air supply, cubic m]\n",
+"Vol_O2_cumbustion = Vol_O2 - Vol_O2_flue;// [Volume of O2 used up in cumbustion of the fuel, cubic m]\n",
+"Excess_Air = Vol_O2_flue/Vol_O2_cumbustion * 100;// [percent of excess air supplied]\n",
+"printf('Percent of excess air supplied is %.1f %%',Excess_Air);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.1: Relation_between_Qp_and_Qv.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 4.1\n",
+"// Page: 118\n",
+"\n",
+"printf('Example: 4.1 - Page: 118\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"Qp = -327;// [kcal]\n",
+"T = 27 + 273;// [K]\n",
+"R = 2*10^(-3);// [kcal/K mol]\n",
+"//*************//\n",
+"\n",
+"// The reaction involved is:\n",
+"// C2H5OH(l) + 3O2(g) = 2CO2(g) + 3H2O(l)\n",
+"deltan = 2 - 3;\n",
+"Qv = Qp - deltan*R*T;// [kcal]\n",
+"printf('Value of Qv is %.2f kcal\n',Qv);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.2: Standard_Heat_of_Reaction.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 4.2\n",
+"// Page: 119\n",
+"\n",
+"printf('Example: 4.2 - Page: 119\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"// Mg + (1/2)O2 = MgO ...............(1)\n",
+"deltaH1 = -610.01;// [kcal]\n",
+"// 2Fe + (3/2)O2 = Fe2O3 ............(2)\n",
+"deltaH2 = -810.14;// [kcal]\n",
+"//*************//\n",
+"\n",
+"// 3Mg + Fe2O3 = 3MgO + 2Fe .........(3)\n",
+"// Multiplying (1) by 3 and substracting from (2), we get (3):\n",
+"deltaH = 3*deltaH1 - deltaH2;// [kcal]\n",
+"printf('Heat produced in the reaction is %.1f kcal\n',deltaH);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3: Standard_Heat_of_Formation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 4.3\n",
+"// Page: 121\n",
+"\n",
+"printf('Example: 4.3 - Page: 121\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"// 2H2(g) + O2(g) ---------------> 2H2O .....................(1)\n",
+"deltaH1 = -241.8*2;// [kJ/gmol H2]\n",
+"// C(graphite) + O2(g) =---------> CO2(g) ...................(2)\n",
+"deltaH2 = -393.51;// [kJ/gmol C]\n",
+"// CH4(g) + 2O2(g) ---------------> CO2(g) + 2H2O(l) ........(3)\n",
+"deltaH3 = -802.36;// [kJ/mol CH4]\n",
+"//*************//\n",
+"\n",
+"// For standard heat of formation of methane, (a) + (b) - (c)\n",
+"// C + 2H2 ------------------------> CH4\n",
+"deltaHf = deltaH1 + deltaH2 - deltaH3;// [kJ/gmol]\n",
+"printf('The standard heat of formation of methane is %.2f kJ/gmol\n',deltaHf);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.4: Standard_Heat_of_Formation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 4.4\n",
+"// Page: 122\n",
+"\n",
+"printf('Example: 4.4 - Page: 122\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"deltaH_C6H12O6 = -1273;// [kcal]\n",
+"deltaH_C2H5OH = -277.6;// [kcal]\n",
+"deltaH_CO2 = -393.5;// [kcal]\n",
+"deltaH_H2O = -285.8;// [kcal]\n",
+"//**************//\n",
+"\n",
+"// C6H12O6(s) = 2C2H5OH(l) + 2CO2(g) ..........................(A)\n",
+"deltaH_A = 2*deltaH_C2H5OH + 2*deltaH_CO2 - deltaH_C6H12O6;// [kJ]\n",
+"// C6H12O6(s) + 6O2(g) = 6CO2(g) + 6H2O(l) ...................(B)\n",
+"deltaH_B = 6*deltaH_CO2 + 6*deltaH_H2O - deltaH_C6H12O6;// [kJ]\n",
+"printf('Energy supplied by reaction A is %.1f kJ\n',deltaH_A);\n",
+"printf('Energy supplied by reaction B is %.1f kJ\n',deltaH_B);\n",
+"if deltaH_A < deltaH_B\n",
+" printf('Reaction A supplies more energy to the organism\n');\n",
+"else\n",
+" printf('Reaction B supplies more energy to the organism\n');\n",
+"end"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.5: Standard_Heat_of_Formation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 4.5\n",
+"// Page: 122\n",
+"\n",
+"printf('Example: 4.5 - Page: 122\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"// Zn + S = ZnS ....................................................(A)\n",
+"deltaH_A = -44;// [kcal/kmol]\n",
+"// ZnS + 3O2 = 2ZnO + 2SO2 .........................................(B)\n",
+"deltaH_B = -221.88;// [kcal/kmol]\n",
+"// 2SO2 + O2 = 2SO3 ................................................(C)\n",
+"deltaH_C = -46.88;// [kcal/kmol]\n",
+"// ZnO + SO3 = ZnSO4 ...............................................(D)\n",
+"deltaH_D = -55.10;// [kcal/kmol]\n",
+"//***************//\n",
+"\n",
+"// Multiplying (A) by 2 & (D) by (2) and adding (A), (B), (C) & (D)\n",
+"// Zn + S + 2O2 = ZnSO4\n",
+"deltaH = 2*deltaH_A + deltaH_B + deltaH_C + 2*deltaH_D;// [kcal/kmol for 2 kmol of ZnSO4]\n",
+"printf('Heat of formation of ZnSO4 is %.2f kcal/kmol\n',deltaH/2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6: Standard_Heat_of_Combustion.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 4.6\n",
+"// Page: 124\n",
+"\n",
+"printf('Example: 4.6 - Page: 124\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"// HC : Heat of Combustion\n",
+"HC_NH3 = -90.6;// [kcal]\n",
+"HC_H2 = -68.3;// [kcal]\n",
+"//*************//\n",
+"\n",
+"// Heat of combustion of NH3:\n",
+"// 2NH3 + 3O = N2 + 3H2O ............................ (A)\n",
+"// Heat of combustion of H2:\n",
+"// H2 + O = H2O ..................................... (B)\n",
+"// Multiplying (B) by 3 & substracting from (A), we get:\n",
+"// 2NH3 = N2 + 3H2 .................................. (C)\n",
+"// Hf : Heat of Formation\n",
+"Hf_NH3 = -(2*HC_NH3 - 3*HC_H2)/2;// [kcal]\n",
+"printf('Standard Heat of formation of NH3 is %.1f kcal',Hf_NH3);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7: Adiabatic_Flame_Temperature.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 4.7\n",
+"// Page: 125\n",
+"\n",
+"printf('Example: 4.7 - Page: 125\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"// HC : Heat of Combustion\n",
+"HC_C2H2 = -310600; // [cal]\n",
+"//**************//\n",
+"\n",
+"// C2H2 + (5/2)O2 = 2CO2 + H2O\n",
+"Q = -HC_C2H2;// [cal]\n",
+"// The gases present in the flame zone after combustion are carbon dioxide, water vapor and the unreacted nitrogen of the air.\n",
+"// Since (5/2) mole of oxygen were required for combustion, nitrogen required would be 10 mol.\n",
+"// Hence the composition of the resultant gas would be 2 mol CO2, 1 ol H2 & 10 mol N2.\n",
+"// Q = integrate('Cp(T)','T',T,298);\n",
+"// On integrating we get:\n",
+"// Q = 84.52*(T - 298) + 18.3*10^(-3)*(T^2 - 298^2)\n",
+"deff('[y] = f(T)','y = Q - 84.52*(T - 298) - 18.3*10^(-3)*(T^2 - 298^2)');\n",
+"T = fsolve(7,f);// [K]\n",
+"printf('The maximum attainable temperature is %.1f K',T);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.8: Adiabatic_Flame_Temperature.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 4.8\n",
+"// Page: 126\n",
+"\n",
+"printf('Example: 4.8 - Page: 126\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"Cp_CO2 = 54.56;// [kJ/mol K]\n",
+"Cp_O2 = 35.20;// [kJ/mol K]\n",
+"Cp_steam = 43.38;// [kJ/mol K]\n",
+"Cp_N2 = 33.32;// [kJ/mol K]\n",
+"// 2C2H6(g) + 7O2(g) = 4CO2(g) + 6H2O(g)\n",
+"deltaH_273 = -1560000;// [kJ/kmol]\n",
+"//************//\n",
+"\n",
+"// Since the air is 25% in excess of the amount required,the combustion may be written as:\n",
+"// C2H6(g) + (7/2)O2(g) = 2CO2(g) + 3H2O(g)\n",
+"// 25% excess air is supplied.\n",
+"// Since the air contains N2 = 79% and O2 = 21%\n",
+"// C2H6(g) + 3.5O2(g) + 0.25*3.5O2(g) + (4.375*(79/21))N2 = 2CO2 + 3H2O + 0.875O2 + 16.46N2 .................. (A)\n",
+"// Considering the reaction (A),\n",
+"// Amount of O2:\n",
+"O2 = 3.5 + 3.5*0.25;// [mol]\n",
+"// Amount of N2 required:\n",
+"N2 = 4.375*(79/21);// [mol]\n",
+"// Let the initial temperature of ethane and air be 0 OC and the temperature of products of combustion be T OC\n",
+"// Since heat librated by combustion = heat accumulated by combustion products\n",
+"Q = -deltaH_273;// [kJ/mol K]\n",
+"T = Q/(2*Cp_CO2 + 3*Cp_steam + 0.875*Cp_O2 + N2*Cp_N2);// [OC]\n",
+"printf('The theoretical temperature of combustion is %d degree Celsius',T);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.9: Effect_of_Temperature_on_Heat_of_Reaction.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 4.9\n",
+"// Page: 129\n",
+"\n",
+"printf('Example: 4.9 - Page: 129\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"T1 = 273;// [K]\n",
+"T2 = 253;// [K]\n",
+"deltaH_273 = 1440;// [cal/mol]\n",
+"Cp = 8.7;// [cal/mol]\n",
+"//**************//\n",
+"\n",
+"deltaH_253 = deltaH_273 + Cp*(T2 - T1);// [cal/mol]\n",
+"printf('Laten heat of ice at -20 OC is %d cal/mol\n',deltaH_253);"
+ ]
+ }
+],
+"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
+}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/5-Second_Law_of_Thermodynamics.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/5-Second_Law_of_Thermodynamics.ipynb
new file mode 100644
index 0000000..5d9ec8f
--- /dev/null
+++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/5-Second_Law_of_Thermodynamics.ipynb
@@ -0,0 +1,1094 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5: Second Law of Thermodynamics"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.10: Calculation_of_Entropy_Changes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.10\n",
+"// Page: 164\n",
+"\n",
+"printf('Example: 5.10 - Page: 164\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"n = 5;// [moles]\n",
+"T1 = 300;// [K]\n",
+"T2 = 400;// [K]\n",
+"P1 = 3;// [bars]\n",
+"P2 = 12;// [bars]\n",
+"Cp = 26.73;// [J/mol K]\n",
+"R = 8.314;// [K/mol K]\n",
+"//*************//\n",
+"\n",
+"deltaS = n*((Cp*log(T2/T1)) + (R*log(P1/P2)));// [kJ/K]\n",
+"printf('Change in Entropy is %f kJ/K',deltaS);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.11: Entropy_Change_in_a_mixture_of_Non_Identical_Ideal_Gas.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.11\n",
+"// Page: 166\n",
+"\n",
+"printf('Example: 5.11 - Page: 166\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"N = 1;// [kmol]\n",
+"xA = 0.21;// [for Oxygen]\n",
+"xB = 0.79;// [for Nitrogen]\n",
+"R = 8.314;// [kJ/kmol K]\n",
+"//*************//\n",
+"\n",
+"deltaS = - (N*R*(xA*log(xA) + xB*log(xB)));// [kJ/mol K]\n",
+"printf('Entropy Change is %.2f kJ/kmol K',deltaS);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.12: Entropy_Change_in_a_mixture_of_Non_Identical_Ideal_Gas.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.12\n",
+"// Page: 167\n",
+"\n",
+"printf('Example: 5.12 - Page: 167\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"Vol_O2 = 5.6;// [L]\n",
+"Vol_H2 = 16.8;// [L]\n",
+"R = 1.987;// [cal/mol K]\n",
+"//*************//\n",
+"\n",
+"xA = Vol_O2/22.4;// [mole fraction O2]\n",
+"xB = Vol_H2/22.4;// [mle fraaction H2]\n",
+"N = xA + xB;// [total number of moles]\n",
+"// From Eqn. 5.21:\n",
+"deltaS = - (N*R*(xA*log(xA) + xB*log(xB)));// [cal/K]\n",
+"printf('Change in Entropy is %.3f cal/K',deltaS);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.13: Entropy_Changes_with_Temperature.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.13\n",
+"// Page: 168\n",
+"\n",
+"printf('Example: 5.13 - Page: 168\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"m = 80;// [mass of Argon, g]\n",
+"T1 = 300;// [K]\n",
+"T2 = 500;// [K]\n",
+"Cv = 0.3122;// [kJ/kg K]\n",
+"//**************//\n",
+"\n",
+"Mw = 40;// [Molecular Weight of Argon]\n",
+"n = m/Mw;// [moles]\n",
+"deltaS = n*Cv*log(T2/T1);// [kJ/K]\n",
+"printf('Entropy Change is %.3f kJ/K',deltaS);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.14: Entropy_Changes_with_Temperature.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.14\n",
+"// Page: 168\n",
+"\n",
+"printf('Example: 5.14 - Page: 168\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"deltaS = 1;// [kJ/kg K]\n",
+"Cv = 0.918;// [kJ/kg K]\n",
+"T1 = 273 + 18;// [K]\n",
+"//*************//\n",
+"\n",
+"// Let the upper temperature be T.\n",
+"// deltaS = integrate('Cv/T','T',T1,T); \n",
+"// deltaS = Cv*log(T/T1)\n",
+"T = T1*exp(deltaS/Cv);// [K]\n",
+"printf('The upper temperature of the process is %.3f K',T);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.15: Entropy_Changes_with_Temperature.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.15\n",
+"// Page: 169\n",
+"\n",
+"printf('Example: 5.15 - Page: 169\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"m1 = 5;// [kg]\n",
+"m2 = 20;// [kg]\n",
+"C = 4.2;// [kJ/kg K]\n",
+"T1 = 350;// [K]\n",
+"T2 = 250;// [K]\n",
+"//**************//\n",
+"\n",
+"// Suppose the final temperature is T\n",
+"deff('[y] = f(T)','y = m1*C*(T1 - T) - m2*C*(T - T2)');\n",
+"T = fsolve(7,f);// [K]\n",
+"// Change in entropy of Hot Water:\n",
+"deltaS1 = m1*C*integrate('(1/T)','T',T1,T);// [kJ/K]\n",
+"// Change in Entopy of Hot Water:\n",
+"deltaS2 = m2*C*integrate('(1/T)','T',T2,T);// [kJ/K]\n",
+"deltaS = deltaS1 + deltaS2;// [kJ/K]\n",
+"printf('Change in Entropy is %.3f kJ/K',deltaS);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.16: Entropy_Changes_with_Temperature.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.16\n",
+"// Page: 169\n",
+"\n",
+"printf('Example: 5.16 - Page: 169\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"m = 12;// [g]\n",
+"T1 = 294;// [K]\n",
+"T2 = 574;// [K]\n",
+"T = 505;// [melting point, K]\n",
+"H_fusion = 4.5;// [cal/K]\n",
+"C_solid = 0.052;// [cal/g K]\n",
+"C_liquid = 0.062;// [cal/g K]\n",
+"//*************//\n",
+"\n",
+"// Entropy Change in heating 12 g of metal from T1 to T\n",
+"deltaS1 = m*C_solid*integrate('(1/T)','T',T1,T);// [kJ/K]\n",
+"// Entropy Change in fusion of metal:\n",
+"deltaS2 = m*H_fusion/T;// [kJ/K]\n",
+"// Entropy Change in heating liquid metal from 505 K to 574 K\n",
+"deltaS3 = m*C_liquid*integrate('(1/T)','T',T,T2);// [kJ/K]\n",
+"deltaS = deltaS1 + deltaS2 + deltaS3;// [kJ/K]\n",
+"printf('Change in Entropy is %.3f kJ/K',deltaS);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.17: Entropy_Changes_with_Temperature.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.17\n",
+"// Page: 170\n",
+"\n",
+"printf('Example: 5.17 - Page: 170\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"deff('[y] = Cp(T)','y = 7.25 + 2.28*10^(-3)*T');\n",
+"T1 = 273 + 137;// [K]\n",
+"T2 = 273 + 877;// [K]\n",
+"//************//\n",
+"\n",
+"deltaS = integrate('Cp(T)/T','T',T1,T2);// [cal/K]\n",
+"printf('Change in Entropy is %.3f cal/K',deltaS);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.18: Entropy_Changes_with_Temperature.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.18\n",
+"// Page: 170\n",
+"\n",
+"printf('Example: 5.18 - Page: 170\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"m_iron = 40;// [kg]\n",
+"T1 = 625;// [K]\n",
+"m_water = 160;// [kg]\n",
+"T2 = 276;// [K]\n",
+"C_iron = 0.45;// [kJ/kg K]\n",
+"C_water = 4.185;// [kJ/kg K]\n",
+"//**************//\n",
+"\n",
+"deff('[y] = f(T)','y = m_iron*C_iron*(T1 - T) - m_water*C_water*(T - T2)');\n",
+"T = fsolve(7,f);// [K]\n",
+"// Change in Entropy of the iron casting can be estimated as:\n",
+"deltaS1 = m_iron*C_iron*log(T/T1);// [kJ/K]\n",
+"// Change in Entropy of Water is given by:\n",
+"deltaS2 = m_water*C_water*log(T/T2);// [kJ/K]\n",
+"deltaS = deltaS1 + deltaS2;// [kJ/K]\n",
+"printf('Total Entropy Change is %.2f kJ/K',deltaS);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.19: Mathematical_Statement_of_Second_Law_of_Thermodynamics.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.19\n",
+"// Page: 172\n",
+"\n",
+"printf('Example: 5.19 - Page: 172\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"Cp = 21;// [J/kmol]\n",
+"T1 = 300;// [K]\n",
+"T2 = 500;// [K]\n",
+"S1 = 150;// [Entropy at T1, J/kmol]\n",
+"//*************//\n",
+"\n",
+"// This is a constant Entropy process. Therefore:\n",
+"deltaS = Cp*log(T2/T1);// [J/kmol]\n",
+"S2 = S1 + deltaS;// [J/kmol]\n",
+"printf('Entropy at 500 K is %.2f J/kmol',S2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.1: Efficiency_of_Carnot_Cycle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.1\n",
+"// Page: 150\n",
+"\n",
+"printf('Example: 5.1 - Page: 150\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"Th = 550 + 273;// [K]\n",
+"Tl = 27 + 273;// [K]\n",
+"//************//\n",
+"\n",
+"// The theoretical efficiency of a heat engine is given by:\n",
+"// eta = Net Work Output/Net Work Input\n",
+"// eta = Wnet/Qin\n",
+"// eta = (Qin - Qout)/Qin = (Th - Tl)/Th\n",
+"eta = (Th - Tl)/Th;\n",
+"printf('The theoretical efficiency of heat engine is %.1f %%',eta * 100)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.20: Mathematical_Statement_of_Second_Law_of_Thermodynamics.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.20\n",
+"// Page: 173\n",
+"\n",
+"printf('Example: 5.20 - Page: 173\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"T1_oil = 273 + 150;// [K]\n",
+"T2_oil = 50 +273;// [K]\n",
+"m_water = 4000;// [kg]\n",
+"T1_water = 273 + 20;// [K]\n",
+"T2_water = 273 + 130;// [K]\n",
+"C_water = 4.185;// [kJ/kg K]\n",
+"C_oil = 2.5;// [kJ/kg K]\n",
+"//***************//\n",
+"\n",
+"// For oil:\n",
+"deltaT_oil = T1_oil - T2_oil;// [K]\n",
+"// For water:\n",
+"deltaT_water = T2_water - T1_water;// [K]\n",
+"// The mass flow rate of oil can be measured by the enthalpy balance over the process:\n",
+"m_oil = m_water*C_water*deltaT_water/(deltaT_oil*C_oil);// [kg]\n",
+"// Change in the Entropy of oil:\n",
+"deltaS_oil = m_oil*C_oil*log(T2_oil/T1_oil);// [kJ/K]\n",
+"// Change in Entropy of water:\n",
+"deltaS_water = m_water*C_water*log(T2_water/T1_water);// [kJ/K]\n",
+"deltaS = deltaS_oil + deltaS_water;// [kJ/K]\n",
+"printf('Total Entropy Change is %.2f kJ/K',deltaS);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.21: Mathematical_Statement_of_Second_Law_of_Thermodynamics.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.21\n",
+"// Page: 174\n",
+"\n",
+"printf('Example: 5.21 - Page: 174\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"t = 20*60;// [s]\n",
+"P = 650;// [W]\n",
+"T = 273 + 250;// [K]\n",
+"//*************//\n",
+"\n",
+"Q = P*t/1000;// [kJ]\n",
+"deltaS = Q/T;// [kJ/K]\n",
+"printf('Change in Entropy is %.2f kJ/K',deltaS);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.22: Mathematical_Statement_of_Second_Law_of_Thermodynamics.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.22\n",
+"// Page: 174\n",
+"\n",
+"printf('Example: 5.22 - Page: 174\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"T1 = 400;// [K]\n",
+"P1 = 300;// [kPa]\n",
+"V1 = 1;// [cubic m]\n",
+"V2 =2;// [cubic m]\n",
+"R = 8.314;// [kJ/kmol K]\n",
+"//**************//\n",
+"\n",
+"// Since the system is well insulated, there is no scope of transferring heat between system & surrounding.\n",
+"deltaQ = 0;// [kJ]\n",
+"deltaW = 0;// [kJ]\n",
+"// By first law of thermodynamics:\n",
+"deltaU =deltaQ - deltaW;// [kJ]\n",
+"// As the internal energy of the gas depends only on temperature,\n",
+"deltaT = 0;// [K]\n",
+"T2 = T1 + deltaT;// [K]\n",
+"P2 = (P1*V1/T1)*(T2/V2);// [kPa]\n",
+"n = P1*V1/(R*T1);// [kmol]\n",
+"deltaS_system = n*R*log(P1/P2);// [kJ/K]\n",
+"// Since process is adiabatic:\n",
+"deltaS_surrounding = 0;// [kJ/K]\n",
+"deltaS = deltaS_system + deltaS_surrounding;// [kJ/K]\n",
+"printf('Change in Entropy of the gas is %.4f kJ/K',deltaS);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.23: Mathematical_Statement_of_Second_Law_of_Thermodynamics.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.23\n",
+"// Page: 174\n",
+"\n",
+"printf('Example: 5.23 - Page: 174\n\n');\n",
+"\n",
+"// This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
+"// For prove refer to this example 5.23 on page number 174 of the book.\n",
+"\n",
+"printf(' This problem involves proving a relation in which no mathematics and no calculations are involved.\n\n');\n",
+"printf(' For prove refer to this example 5.23 on page 174 of the book.')"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.24: Irreversibility_and_Lost_Work.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.24\n",
+"// Page: 182\n",
+"\n",
+"printf('Example: 5.24 - Page: 182\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"// From Example 5.18 (Pg: 170)\n",
+"//*****Data*****//\n",
+"m_iron = 40;// [kg]\n",
+"T1 = 625;// [K]\n",
+"m_water = 160;// [kg]\n",
+"T2 = 276;// [K]\n",
+"C_iron = 0.45;// [kJ/kg K]\n",
+"C_water = 4.185;// [kJ/kg K]\n",
+"//**************//\n",
+"\n",
+"deff('[y] = f(T)','y = m_iron*C_iron*(T1 - T) - m_water*C_water*(T - T2)');\n",
+"T = fsolve(7,f);// [K]\n",
+"// Change in Entropy of the iron casting can be estimated as:\n",
+"deltaS1 = m_iron*C_iron*integrate('(1/T)','T',T1,T);// [kJ/K]\n",
+"// Change in Entropy of Water is given by:\n",
+"deltaS2 = m_water*C_water*integrate('(1/T)','T',T2,T);// [kJ/K]\n",
+"deltaS = deltaS1 + deltaS2;// [kJ/K]\n",
+"// By Eqn. 5.63:\n",
+"W_lost = T2 * deltaS;// [kJ]\n",
+"printf('Work lost is %.2f kJ',W_lost);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.25: Irreversibility_and_Lost_Work.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.24\n",
+"// Page: 182\n",
+"\n",
+"printf('Example: 5.24 - Page: 182\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"// *****Data******//\n",
+"m_oil = 4750;// [kg]\n",
+"T1_oil = 515;// [K]\n",
+"T2_oil = 315;// [K]\n",
+"m_water = 9500;// [kg]\n",
+"T1_water = 290;// [K]\n",
+"Cp_oil = 3.2;// [kJ/kg K]\n",
+"Cp_water = 4.185;// [kJ/kg K]\n",
+"//*****************//\n",
+"\n",
+"// From enthalpy Balance:\n",
+"deff('[y] = f(T2_water)','y = m_oil*Cp_oil*(T1_oil - T2_oil) - m_water*Cp_water*(T2_water - T1_water)');\n",
+"T2_water = fsolve(7,f);// [K]\n",
+"// Change in the Entropy of oil:\n",
+"deltaS_oil = m_oil*Cp_oil*integrate('(1/T)','T',T1_oil,T2_oil);// [kJ/K]\n",
+"// Change in Entropy of water:\n",
+"deltaS_water = m_water*Cp_water*integrate('(1/T)','T',T1_water,T2_water);// [kJ/K]\n",
+"deltaS = deltaS_oil + deltaS_water;// [kJ/K]\n",
+"printf('Total Entropy Change is %.2f kJ/K\n',deltaS);\n",
+"if deltaS > 0\n",
+" printf('Since deltaS is a positive quantity, process is irreversible\n');\n",
+"else\n",
+" printf('Since deltaS is a negative quantity, process is reversible\n');\n",
+"end"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2: Efficiency_of_Carnot_Cycle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.2\n",
+"// Page: 150\n",
+"\n",
+"printf('Example: 5.2 - Page: 150\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"Th = 810;// [K]\n",
+"Tl = 300;// [K]\n",
+"//*************//\n",
+"\n",
+"// Solution (a)\n",
+"eta = (Th - Tl)/Th;\n",
+"printf('(a) The efficiency of the heat engine is %.1f %%\n',eta*100);\n",
+"\n",
+"// Solution (b)\n",
+"Th = 1366;// [K]\n",
+"Tl = 300;// [K]\n",
+"eta = (Th - Tl)/Th;\n",
+"printf('(b) The efficiency of the heat engine is %.1f %%\n',eta*100);\n",
+"\n",
+"// Solution (c)\n",
+"Th = 810;// [K]\n",
+"Tl = 344;// [K]\n",
+"eta = (Th - Tl)/Th;\n",
+"printf('(c) The efficiency of the heat engine is %.1f %%\n',eta*100);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.3: Efficiency_of_Carnot_Cycle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.3\n",
+"// Page: 151\n",
+"\n",
+"printf('Example: 5.3 - Page: 151\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"Th = 650 + 273;// [K]\n",
+"Tl = 30 + 273;// [K]\n",
+"Qh = 585;// [kJ/cycle]\n",
+"//*************//\n",
+"\n",
+"// Solution (a)\n",
+"// From Eqn. (5.9)\n",
+"eta = (Th - Tl)/Th;\n",
+"printf('(a) The efficiency of the Carnot engine is %.1f %%\n',eta*100);\n",
+"\n",
+"// Soluton (b)\n",
+"// From the knowledge of the ratio of heat and temperature between the two regions:\n",
+"Ql = Qh*Tl/Th;// [kJ]\n",
+"printf('(b) Heat released to cold reservoir is %d kJ\n',Ql);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.4: Efficiency_of_Carnot_Cycle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.4\n",
+"// Page: 151\n",
+"\n",
+"printf('Example: 5.4 - Page: 151\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"m = 1;// [kg]\n",
+"Tl = 273;// [K]\n",
+"Th = 295;// [K]\n",
+"Ql = 335;// [kJ/kg]\n",
+"//*************//\n",
+"\n",
+"// Solution (a)\n",
+"// The coeffecient of performance of refrigerating machine is:\n",
+"// COP = Ql/Wnet = Tl/(Th - Tl)\n",
+"Wnet = Ql*(Th - Tl)/Tl;// [kJ]\n",
+"printf('Minimum Work requirement is %d kJ\n',round(Wnet));\n",
+"\n",
+"// Solution (b)\n",
+"// Amount of heat released:\n",
+"// Wnet = Qh - Ql\n",
+"Qh = Wnet + Ql;// [kJ]\n",
+"printf('Amount of heat released to the surrounding is %d kJ\n',round(Qh));"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.5: Efficiency_of_Carnot_Cycle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.5\n",
+"// Page: 152\n",
+"\n",
+"printf('Example: 5.5 - Page: 152\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"Th = 373;// [K]\n",
+"Tl = 275;// [K]\n",
+"Qh = 50;// [kJ]\n",
+"//*************//\n",
+"\n",
+"// Solution (a)\n",
+"// Theral Efficiency of the engine can be given as:\n",
+"// eta_HE = Wnet/Qh;\n",
+"// Wnet = Qh*COP = Qh*(Th - Tl)/Th;\n",
+"Wnet = Qh*(Th - Tl)/Th;// [kJ]\n",
+"printf('Minimum Work Required is %.1f kJ\n',Wnet);\n",
+"\n",
+"// Solution (b)\n",
+"eta = (Th - Tl)/Th;\n",
+"printf('The efficiency of Heat Engine is %.3f\n',eta);\n",
+"\n",
+"// Solution (c)\n",
+"// Amount of heat released can be calculated as:\n",
+"// eta = Net Work Output/Net Work Input;\n",
+"// eta = Wnet/Qin;\n",
+"// eta = (Qin - Qout)/Qin;\n",
+"Qin = Qh;// [kJ]\n",
+"Qout = Qin*(1 - eta);\n",
+"printf('Amount of Heat released is %.1f kJ\n',Qout);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.6: Efficiency_of_Carnot_Cycle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.6\n",
+"// Page: 153\n",
+"\n",
+"printf('Example: 5.6 - Page: 153\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"W = 5;// [hp]\n",
+"Q = 7000;// [J/s]\n",
+"Th = 400 + 273;// [K]\n",
+"Tl = 24 + 273;// [K]\n",
+"//*************//\n",
+"\n",
+"W = 5*745.7;// [W]\n",
+"thermal_eta = W/Q;\n",
+"theoretical_eta = (Th - Tl)/Th;\n",
+"\n",
+"if theoretical_eta <= thermal_eta\n",
+" printf('Claim is Valid');\n",
+"else\n",
+" printf('Claim is not Valid');\n",
+"end"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.7: Calculation_of_Entropy_Changes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.7\n",
+"// Page: 162\n",
+"\n",
+"printf('Example: 5.7 - Page: 162\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"n = 1;// [mol]\n",
+"deltaH_fusion = 6500;// [J/mol]\n",
+"T_Tr = 273;// [transition temperature, K]\n",
+"P = 1;// [atm]\n",
+"//************//\n",
+"\n",
+"// By Eqn. (9.40)\n",
+"deltaS_fusion = deltaH_fusion/T_Tr;// [J/mol K]\n",
+"printf('Change in Entropy is %.2f J/mol K',deltaS_fusion);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.8: Calculation_of_Entropy_Changes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.8\n",
+"// Page: 164\n",
+"\n",
+"printf('Example: 5.8 - Page: 164\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"V1 = 5;// [L]\n",
+"V2 = 50;// [L]\n",
+"n = 5;// [moles]\n",
+"R = 1.987;// [cal/mol K]\n",
+"//**************//\n",
+"\n",
+"// Change in entropy for an isothermal change for an ideal gas:\n",
+"// deltaS = n*R*log(P1/P2) = n*R*log(V2/V1)\n",
+"deltaS = n*R*log(V2/V1);// [cal/degree]\n",
+"printf('Change in Entropy is %.3f eu',deltaS);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9: Calculation_of_Entropy_Changes.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 5.9\n",
+"// Page: 164\n",
+"\n",
+"printf('Example: 5.9 - Page: 164\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data*****//\n",
+"n = 8;// [mol]\n",
+"R = 8.314;// [J/mol K]\n",
+"T2 = 700;// [K]\n",
+"T1 = 350;// [K]\n",
+"Cp = (5/2)*R;// [J/mol K]\n",
+"//*************//\n",
+"\n",
+"deltaS = n*Cp*log(T2/T1);// [J/K]\n",
+"printf('deltaS is %.2f J/K',deltaS);"
+ ]
+ }
+],
+"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
+}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/6-Thermodynamic_Property_Relations.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/6-Thermodynamic_Property_Relations.ipynb
new file mode 100644
index 0000000..6c97286
--- /dev/null
+++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/6-Thermodynamic_Property_Relations.ipynb
@@ -0,0 +1,836 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6: Thermodynamic Property Relations"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.10: Isothermal_Compressibility_and_Volume_Expansivity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.10\n",
+"// Page: 218\n",
+"\n",
+"printf('Example: 6.10 - Page: 218\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 6.10 on page number 218 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 6.10 on page 218 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.11: Isothermal_Compressibility_and_Volume_Expansivity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.11\n",
+"// Page: 219\n",
+"\n",
+"printf('Example: 6.11 - Page: 219\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 6.11 on page number 219 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 6.11 on page 219 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.12: Isothermal_Compressibility_and_Volume_Expansivity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.12\n",
+"// Page: 219\n",
+"\n",
+"printf('Example: 6.12 - Page: 219\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 6.12 on page number 219 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 6.12 on page 219 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.13: Isothermal_Compressibility_and_Volume_Expansivity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.13\n",
+"// Page: 220\n",
+"\n",
+"printf('Example: 6.13 - Page: 220\n\n');\n",
+"\n",
+"// This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
+"// For prove refer to this example 6.13 on page number 220 of the book.\n",
+"\n",
+"printf(' This problem involves proving a relation in which no mathematics and no calculations are involved.\n\n');\n",
+"printf(' For prove refer to this example 6.13 on page 220 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.14: Isothermal_Compressibility_and_Volume_Expansivity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.14\n",
+"// Page: 221\n",
+"\n",
+"printf('Example: 6.14 - Page: 221\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"// *****Data******//\n",
+"alpha = 0.837*10^(-11);// [square m/N]\n",
+"beeta = 54.2*10^(-6);// [1/K]\n",
+"T = 227 + 273;// [K]\n",
+"V = 7.115*10^(-3);// [cubic m/kmol]\n",
+"Cp = 26.15;// [J/mol K]\n",
+"//*****************//\n",
+"\n",
+"Cv = Cp - (T*V*beeta^2/alpha)/1000;// [J/mol K]\n",
+"// Percentage error if Cp is assumed to Cv.\n",
+"err = ((Cp - Cv)/Cp)*100;\n",
+"printf('Percentage error is %.2f %%',err);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.15: Isothermal_Compressibility_and_Volume_Expansivity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.15\n",
+"// Page: 221\n",
+"\n",
+"printf('Example: 6.15 - Page: 221\n\n');\n",
+"\n",
+"// This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
+"// For prove refer to this example 6.15 on page number 221 of the book.\n",
+"\n",
+"printf(' This problem involves proving a relation in which no mathematics and no calculations are involved.\n\n');\n",
+"printf(' For prove refer to this example 6.15 on page 221 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.16: Isothermal_Compressibility_and_Volume_Expansivity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.16\n",
+"// Page: 222\n",
+"\n",
+"printf('Example: 6.16 - Page: 222\n\n');\n",
+"\n",
+"// This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
+"// For prove refer to this example 6.16 on page number 222 of the book.\n",
+"\n",
+"printf(' This problem involves proving a relation in which no mathematics and no calculations are involved.\n\n');\n",
+"printf(' For prove refer to this example 6.16 on page 222 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.17: Isothermal_Compressibility_and_Volume_Expansivity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.17\n",
+"// Page: 222\n",
+"\n",
+"printf('Example: 6.17 - Page: 222\n\n');\n",
+"\n",
+"// This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
+"// For prove refer to this example 6.17 on page number 222 of the book.\n",
+"\n",
+"printf(' This problem involves proving a relation in which no mathematics and no calculations are involved.\n\n');\n",
+"printf(' For prove refer to this example 6.17 on page 222 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.18: Isothermal_Compressibility_and_Volume_Expansivity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.18\n",
+"// Page: 223\n",
+"\n",
+"printf('Example: 6.18 - Page: 223\n\n');\n",
+"\n",
+"// This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
+"// For prove refer to this example 6.18 on page number 223 of the book.\n",
+"\n",
+"printf(' This problem involves proving a relation in which no mathematics and no calculations are involved.\n\n');\n",
+"printf(' For prove refer to this example 6.18 on page 223 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.19: Joule_Thomson_Effect.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.19\n",
+"// Page: 227\n",
+"\n",
+"printf('Example: 6.19 - Page: 227\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"// *****Data******//\n",
+"a = 3.59;// [square L atm /square mol]\n",
+"b = 0.043;// [L/mol]\n",
+"R = 0.082;// [J/mol K]\n",
+"//***************//\n",
+"\n",
+"// From Eqn. 6.122:\n",
+"Ti = 2*a/(R*b);// [K]\n",
+"printf('Inversion of temperature is %.1f K',Ti);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.1: Thermodynamic_Properties.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.1\n",
+"// Page: 197\n",
+"\n",
+"printf('Example: 6.1 - Page: 197\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 6.1 on page number 197 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 6.1 on page 197 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.20: Joule_Thomson_Effect.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.20\n",
+"// Page: 227\n",
+"\n",
+"printf('Example: 6.20 - Page: 227\n\n');\n",
+"\n",
+"// This problem involves proving a relation in which no mathematics and no calculations are involved.\n",
+"// For prove refer to this example 6.20 on page number 227 of the book.\n",
+"\n",
+"printf(' This problem involves proving a relation in which no mathematics and no calculations are involved.\n\n');\n",
+"printf(' For prove refer to this example 6.20 on page 227 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.21: Joule_Thomson_Effect.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.22: Residual_Properties_from_Virial_Equation_of_State.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.23: Residual_Properties_from_Cubic_Equation_of_State.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.23\n",
+"// Page: 239\n",
+"\n",
+"printf('Example: 6.23 - Page: 239\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"// *****Data******//\n",
+"T = 298;// [K]\n",
+"P = 10*10^5;// [Pa]\n",
+"Tc = 126.2;// [K]\n",
+"Pc = 34*10^5;// [bar]\n",
+"R = 8.314;// [J/mol K]\n",
+"//****************//\n",
+"\n",
+"a = 27*R^2*Tc^2/(64*Pc);// [Pa.m^6/square mol]\n",
+"b = R*Tc/(8*Pc);// [cubic m/mol]\n",
+"V = 2.425*10^(-3);// [cubic m/mol]\n",
+"// From Eqn. 6.173:\n",
+"Sr = R*log(P*(V - b)/(R*T));// [J/mol K]\n",
+"printf('Residual Entropy is %.4f J/mol K\n',Sr);\n",
+"// From Eqn. 6.174:\n",
+"Hr = P*V - R*T - (a/V);// [J/mol]\n",
+"printf('Residual Enthalpy is %.4f J/mol K\n',Hr);\n",
+"Ur = -(a/V);// [J/mol]\n",
+"printf('Residual Internal Energy is %.4f J/mol K\n',Ur);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.24: Fugacity_and_Fugacity_Coeffecient.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.24\n",
+"// Page: 244\n",
+"\n",
+"printf('Example: 6.24 - Page: 244\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"// *****Data******//\n",
+"B = -4.28*10^(-4);// [cubic m/mol]\n",
+"P = 15*10^5;// [Pa]\n",
+"T = 273 + 87;// [K]\n",
+"R = 8.314;// [J/atm K]\n",
+"//****************//\n",
+"\n",
+"// Z = 1 + (B*P/(R*T))\n",
+"// (Z - 1)/P = B/(R*T)\n",
+"// From Eqn. 6.192 (b)\n",
+"// ln(f/P) = integral('(Z - 1)/P','P',0,P) = B*P/(R*T)\n",
+"f = P*exp(B*P/(R*T));// [Pa]\n",
+"printf('Fugacity of iso-butane is %.2f atm',f/10^5);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.2: Clapeyron_Equation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.2\n",
+"// Page: 205\n",
+"\n",
+"printf('Example: 6.2 - Page: 205\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"// *****Data******//\n",
+"density_water = 0.998;// [g/cubic cm]\n",
+"density_ice = 0.9168;// [g/cubic cm]\n",
+"Hf = 335;// [J/g]\n",
+"T = 0 + 273;// [K]\n",
+"//*****************//\n",
+"\n",
+"V_water = 1/density_water;// [cubic cm/g]\n",
+"V_ice = 1/density_ice;// [cubic cm/g]\n",
+"// From Eqn. 6.56:\n",
+"// dP/dT = deltaS/(V2 - V1) = deltaH/(T*(V2 - V1))\n",
+"// Substituting these values in Eqn. 6.58\n",
+"deltaP_By_deltaT = (Hf/(T*(V_water - V_ice)))*10;// [atm/K]\n",
+"deltaT_By_deltaP = 1/deltaP_By_deltaT;// [K/atm]\n",
+"if deltaT_By_deltaP > 0\n",
+" printf('Increase in pressure of 1 atm increases the freezing point by %.4f K',abs(deltaT_By_deltaP));\n",
+"else\n",
+" printf('Increase in pressure of 1 atm lowers the freezing point by %.4f K',abs(deltaT_By_deltaP));\n",
+"end"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.3: Clapeyron_Equation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.3\n",
+"// Page: 206\n",
+"\n",
+"printf('Example: 6.3 - Page: 206\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"// *****Data******//\n",
+"P1 = 361.3;// [kPa]\n",
+"T1 = 140 + 273;// [K]\n",
+"P2 = 617.8;// [kPa]\n",
+"T2 = 160 + 273;// [K]\n",
+"T = 150 + 273;// [K]\n",
+"Vg = 0.3917;// [cubic m/kg]\n",
+"//****************//\n",
+"\n",
+"// From Eqn. 6.56\n",
+"// dP/dT = deltaH/(T*(Vg - V1)) = deltaH/(T*Vg)\n",
+"deltaP = P2 - P1;// [kPa]\n",
+"deltaT = T2 - T1;// [K]\n",
+"deltaH = T*Vg*deltaP/deltaT;// [kJ/kg]\n",
+"printf('Enthalpy of Vaporisation is %d kJ/kg\n',round(deltaH));"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.4: Clapeyron_Equation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.4\n",
+"// Page: 206\n",
+"\n",
+"printf('Example: 6.4 - Page: 206\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"// *****Data******//\n",
+"T1 = -40 + 273;// [K]\n",
+"T2 = -45 + 273;// [K]\n",
+"P1 = 51.25;// [kPa]\n",
+"R = 0.0815;// [kJ/kg K]\n",
+"Hv = 225.86;// [kJ/kg]\n",
+"//****************//\n",
+"\n",
+"// From Eqn. 6.61:\n",
+"P2 = P1*exp((Hv/R)*((1/T1) - (1/T2)));// [kPa]\n",
+"printf('Saturation pressure of the refrigerant is %.2f kPa',P2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.5: Clapeyron_Equation.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.5\n",
+"// Page: 206\n",
+"\n",
+"printf('Example: 6.5 - Page: 206\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"// *****Data******//\n",
+"Tb = -103.9 + 273;// [K]\n",
+"deff('[P] = f1(T)','P = 10^(-(834.13/T) + 1.75*log10(T) - 8.375*10^(-3)*T + 5.324)');\n",
+"R = 8.314;// [J/mol K]\n",
+"//***************//\n",
+"\n",
+"// From Eqn. 6.60, we get:\n",
+"// d(ln(P))/dT = deltaH/(R*T^2)\n",
+"deff('[P] = f2(T)','P = exp(2.303*log10(f1(T)))');\n",
+"// Differentiating it with respect to T\n",
+"// d(ln(P))/dT = (834.13*2.303/Tb^2 + 1.75/Tb - 2.303*8.375*10^(-3))\n",
+"deltaH = R*Tb^2*(834.13*2.303/Tb^2 + 1.75/Tb - 2.303*8.375*10^(-3))/1000;// [kJ/mol]\n",
+"printf('The enthalpy of vaporisation is %.2f kJ/mol\n',deltaH);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.6: Heat_Capacity_Relations.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.6\n",
+"// Page: 214\n",
+"\n",
+"printf('Example: 6.6 - Page: 214\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 6.6 on page number 214 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 6.6 on page 214 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.7: Heat_Capacity_Relations.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.7\n",
+"// Page: 215\n",
+"\n",
+"printf('Example: 6.7 - Page: 215\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 6.7 on page number 215 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 6.7 on page 215 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.8: Isothermal_Compressibility_and_Volume_Expansivity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.8\n",
+"// Page: 217\n",
+"\n",
+"printf('Example: 6.8 - Page: 217\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 6.8 on page number 217 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 6.8 on page 217 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.9: Isothermal_Compressibility_and_Volume_Expansivity.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 6.9\n",
+"// Page: 217\n",
+"\n",
+"printf('Example: 6.9 - Page: 217\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 6.9 on page number 217 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 6.9 on page 217 of the book.');"
+ ]
+ }
+],
+"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
+}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/7-Thermodynamics_to_Flow_Processes.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/7-Thermodynamics_to_Flow_Processes.ipynb
new file mode 100644
index 0000000..9d64717
--- /dev/null
+++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/7-Thermodynamics_to_Flow_Processes.ipynb
@@ -0,0 +1,549 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7: Thermodynamics to Flow Processes"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.10: Nozzles_and_Diffusers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 7.10\n",
+"// Page: 280\n",
+"\n",
+"printf('Example: 7.10 - Page: 280\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"P1 = 800;// [kPa]\n",
+"T1 = 773;// [K]\n",
+"H1 = 3480;// [kJ/kg]\n",
+"P2 = 100;// [kPa]\n",
+"T2 = 573;// [K]\n",
+"H2 = 3074;// [kJ/kg]\n",
+"//***************//\n",
+"\n",
+"// Solution (a)\n",
+"// Velocity of the fluid exiting the nozzle:\n",
+"// U2 = sqrt(U1^2 + 2*(H1 - H2))\n",
+"// Neglecting initial velocity:\n",
+"U2 = sqrt(2*(H1 - H2)*1000);// [m/s]\n",
+"printf('(a) Final Velocity is %.2f m/s\n',U2);\n",
+"\n",
+"// Solution (b)\n",
+"U1 = 40;// [m/s]\n",
+"U2 = sqrt((U1^2 + 2*(H1 - H2))*1000);// [m/s]\n",
+"printf('(b) Final Velocity is %.2f m/s\n',U2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.11: Nozzles_and_Diffusers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 7.11\n",
+"// Page: 281\n",
+"\n",
+"printf('Example: 7.11 - Page: 281\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"P1 = 100;// [kPa]\n",
+"T1 = 200;// [OC]\n",
+"U1 = 190;// [m/s]\n",
+"A1 = 2000/10^4;// [square m]\n",
+"U2 = 70;// [m/s]\n",
+"P2 = 200;// [kPa]\n",
+"Qdot = 100;// [kW]\n",
+"V1 = 2.172;// [cubic m/kg]\n",
+"H1 = 2875.3;// [kJ/kg]\n",
+"//***************//\n",
+"\n",
+"// Solution (a)\n",
+"mdot = U1*A1/V1;// [kg/s]\n",
+"printf('Mass flow rate of the steam is %.2f kg/s\n',mdot);\n",
+"\n",
+"// Solution (b)\n",
+"// Amount of heat transferred to the surrounding per unit steam:\n",
+"Q = Qdot/mdot;// [kJ/kg]\n",
+"// The Enthalpy at the diffuser outlet can be estimated as:\n",
+"H2 = Q + H1 + (U1^2 - U2^2)/2;// [kJ/kg]\n",
+"// From the steam table:\n",
+"T2 = 393.38;// [K]\n",
+"V2 = 1.123;// [cubic m/kg]\n",
+"printf('The temperature of the steam leaving the outlet is %.2f K\n',T2);\n",
+"\n",
+"// Solution (c)\n",
+"A2 = V2*mdot/U2;// [square m]\n",
+"printf('Area of diffuser outlet is %.2f square m\n',A2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.1: Steady_Flow_Process_and_Devices.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 7.1\n",
+"// Page: 256\n",
+"\n",
+"printf('Example: 7.1 - Page: 256\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"// *****Data******//\n",
+"d1 = 0.15;// [inlet dia, m]\n",
+"d2 = 0.20;// [outlet dia, m]\n",
+"U1 = 7;// [inlet velocity, m/s]\n",
+"//****************//\n",
+"\n",
+"// From Fig. 7.2 (Pg 256)\n",
+"// At the inlet:\n",
+"A1 = (%pi/4)*d1^2;// [square m]\n",
+"// At the outlet:\n",
+"A2 = (%pi/4)*d2^2;// [square m]\n",
+"Q = A1*U1;// [cubic m/s]\n",
+"printf('Flow rate is %.4f m/s\n',Q);\n",
+"// Using Continuity Eqn.\n",
+"// density1*U1*A1 = Density2*U2*A2\n",
+"// For water: Density1 = Density2. Therefore:\n",
+"U2 = A1*U1/A2;\n",
+"printf('Velocity of water at the outlet is %.3f m/s',U2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.2: Steady_Flow_Processes_and_Devices.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 7.2\n",
+"// Page: 257\n",
+"\n",
+"printf('Example: 7.2 - Page: 257\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"d1 = 0.2;// [m]\n",
+"d2 = 0.15;// [m]\n",
+"d3 = 0.1;// [m]\n",
+"U1 = 3;// [m/s]\n",
+"U2 = 2.5;// [m/s]\n",
+"//**************//\n",
+"\n",
+"// From Fig. 7.3 (Pg: 257)\n",
+"// For pipe I:\n",
+"A1 = (%pi/4)*d1^2;// [square m]\n",
+"Q1 = A1*U1;// [cubic m/s]\n",
+"// For pipe II:\n",
+"A2 = (%pi/4)*d2^2;// [square m]\n",
+"Q2 = A2*U2;// [cubic m/s]\n",
+"// For pipe III:\n",
+"A3 = (%pi/4)*d3^2;// [square m]\n",
+"// From continuity Eqn.:\n",
+"Q3 = Q1 - Q2;// [cubic m/s]\n",
+"U3 = Q3/A3;// [m/s]\n",
+"printf('Discharge through the 10 cm pipe is %.4f cubic m/sec\n',Q1);\n",
+"printf('Average velocity in the 15 cm pipe is %.2f m/s',U3);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.3: Energy_Analysis_of_Control_Volume.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 7.3\n",
+"// Page: 262\n",
+"\n",
+"printf('Example: 7.3 - Page: 262\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"d1 = 0.3;// [m]\n",
+"d2 = 0715;//[m]\n",
+"Q = 40/1000;// [cubic m/s]\n",
+"Z1 = 8;// [m]\n",
+"Z2 = 6;// [m]\n",
+"P1 = 5*10^5;// [Pa]\n",
+"density = 1000;// [kg/cubic m]\n",
+"g = 9.81;// [m/square s]\n",
+"//*************//\n",
+"\n",
+"// From Fig. 7.3 (Pg: 262)\n",
+"A1 = (%pi/4)*d1^2;// [square m]\n",
+"A2 = (%pi/4)*d2^2;// [square m]\n",
+"U1 = Q/A1;// [m/s]\n",
+"U2 = Q/A2;// [m/s]\n",
+"// Applying Bernoulli's equations at sections 1 & 2:\n",
+"P2 = ((U1^2/(2*g) + Z1 + P1/(density*g)) - (U2^2/(2*g) + Z2))*(density*g);// [Pa]\n",
+"printf('Pressure at section 2 is %.2f bar',P2/10^5);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.4: Compressor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 7.4\n",
+"// Page: 268\n",
+"\n",
+"printf('Example: 7.4 - Page: 268\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"P1 = 100;// [kPa]\n",
+"T1 = 320;// [K]\n",
+"P2 = 600;// [kPa]\n",
+"T2 = 430;// [K]\n",
+"m_dot = 0.03;// [kg/s]\n",
+"Qout = 15;// [kJ/kg]\n",
+"//*************//\n",
+"\n",
+"// The energy balance around the compressor:\n",
+"// dE_System/dt = Ein - Eout\n",
+"// Since it is a steady state process:\n",
+"// dE_Sysytem/dt = 0\n",
+"// Ein = Eout\n",
+"// Win + m_dot*H1 = Qout + m_dot*H2\n",
+"// Since, Qout = Qout/m\n",
+"// Win = m_dot*(Qout + (H2 - H1))\n",
+"// From enthalpy chart of air:\n",
+"H1 = 320.20;// [Enthalpy of air at 320 K, kJ/kg]\n",
+"H2 = 431.43;// [Enthalpy of air at 430 K, kJ/kg]\n",
+"Win = m_dot*(Qout + (H2 - H1));// [kW]\n",
+"printf('Power Requirement of the compressor is %.2f kW',Win);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.5: Compressor.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 7.5\n",
+"// Page: 269\n",
+"\n",
+"printf('Example: 7.5 - Page: 269\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"P1 = 100;// [kPa]\n",
+"T1 = 250;// [K]\n",
+"Q = 0.1;// [cubic m/s]\n",
+"P2 = 500;// [kPa]\n",
+"M = 44;// [g/mol]\n",
+"R = 8.314;// [J/mol K]\n",
+"//****************//\n",
+"\n",
+"// Solution (a)\n",
+"// Work done by reversible adiabatic compression, gama = 1.4;\n",
+"gama = 1.4;\n",
+"T2 = T1*(P2/P1)^((gama - 1)/gama);// [K]\n",
+"Wad = (gama*R/(gama - 1))*(T1 - T2);// [J/mol]\n",
+"Wad = Wad/M;// [J/g]\n",
+"printf('Work done by reversible adiabatic compression when gama = 1.4 is %.2f J/g\n',Wad);\n",
+"\n",
+"// Solution (b)\n",
+"// Work done by isothermal compression:\n",
+"Wiso = - (R*T1)*log(P2/P1);// [J/mol]\n",
+"Wiso = Wiso/M;// [J/g]\n",
+"printf('Work done by isothermal compression is %.2f J/g\n',Wiso);\n",
+"\n",
+"// Solution (c)\n",
+"// Work done in single stage compression, gama = 1.3:\n",
+"gama = 1.3;\n",
+"V1 = Q;// [cubic m]\n",
+"Wsingle_stage = (gama*P1*V1/(gama - 1))*(1-(P2/P1)^((gama - 1)/gama));// [kW]\n",
+"printf('Work done in single stage compression is %.2f kW',Wsingle_stage);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.6: Heat_Exchangers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.7: Heat_Exchangers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 7.7\n",
+"// Page: 274\n",
+"\n",
+"printf('Example: 7.7 - Page: 274\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"T_steam1 = 50;// [OC]\n",
+"T_steam2 = 30;// [OC]\n",
+"msteam_dot = 10;// [kg/min]\n",
+"T_water1 = 15;// [OC]\n",
+"T_water2 = 25;// [OC]\n",
+"//***************//\n",
+"\n",
+"// Solution (a)\n",
+"// From the Stem Table:\n",
+"H1 = 2645.9;// [kJ/kg, At 50 OC]\n",
+"H2 = 768.2;// [kJ/kg, At 30 OC]\n",
+"H3 = 62.982;// [kJ/kg, At 15 OC]\n",
+"H4 = 104.83;// [kJ/kg, At 25 OC]\n",
+"// The mass & Energy balance of the above flow gives:\n",
+"mwater_dot = msteam_dot*(H1 - H2)/(H4 - H3);// [kg/min]\n",
+"printf('The mass flow rate of water is %.2f kg/min\n',mwater_dot);\n",
+"\n",
+"// Solution (b)\n",
+"Qdot = mwater_dot*(H4 - H3);// [kJ/min]\n",
+"printf('The rate of heat transfer is %.2f kJ/min',Qdot);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.8: Nozzles_and_Diffusers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 7.8\n",
+"// Page: 279\n",
+"\n",
+"printf('Example: 7.8 - Page: 279\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"P1 = 500;// [kPa]\n",
+"T1 = 623;// [K]\n",
+"mdot = 12;// [kg/s]\n",
+"P2 = 500;// [kPa]\n",
+"T2 = 523;// [K]\n",
+"Qdot = -120;// [kW]\n",
+"H1 = 3168;// [kJ/kg]\n",
+"H2 = 2976;// [kJ/kg]\n",
+"//************//\n",
+"\n",
+"Q = Qdot/mdot;// [kJ/kg]\n",
+"// By energy balance:\n",
+"// (deltaU^2/2) + g*deltaZ + deltaH = Q - Ws\n",
+"// Considering negligible change in P.E., deltaZ = 0 & Ws = 0.\n",
+"// (U2^2 - U1^2)/2 + deltaH = Q\n",
+"deltaH = H2 - H1;// [kJ/kg]\n",
+"// Neglecting inlet velocity.\n",
+"U2 = sqrt(2*(Q - deltaH)*1000);// [m/s]\n",
+"printf('Outlrt velocity is %.1f m/s\n',U2);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.9: Nozzles_and_Diffusers.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 7.9\n",
+"// Page: 279\n",
+"\n",
+"printf('Example: 7.9 - Page: 279\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"Pin = 1000;// [kPa]\n",
+"Tin = 600;// [K]\n",
+"Uin = 50;// [m/s]\n",
+"gama = 1.4;\n",
+"M = 17;// [g/mol]\n",
+"R = 8314;// [kJ/mol K]\n",
+"MachNumber = 2;\n",
+"//***************//\n",
+"\n",
+"// Solution (i)\n",
+"// Using Eqn. (7.36):\n",
+"Critical_Ratio = (2/(gama + 1))^(gama/(gama - 1));\n",
+"printf('Critical Ratio is %.2f\n',Critical_Ratio);\n",
+"\n",
+"// Solution (ii)\n",
+"PV_in = R*Tin/M;// [square m]\n",
+"Uthroat = sqrt(Uin^2 + (2*gama*PV_in/(gama - 1))*(1-(Critical_Ratio)^((gama - 1)/gama)));// [m/s]\n",
+"Uout = MachNumber*Uthroat;// [m/s]\n",
+"printf('The discharge velocity is %.2f m/s',Uout);"
+ ]
+ }
+],
+"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
+}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/8-Refrigeration_and_Liquefaction_Processes.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/8-Refrigeration_and_Liquefaction_Processes.ipynb
new file mode 100644
index 0000000..369c494
--- /dev/null
+++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/8-Refrigeration_and_Liquefaction_Processes.ipynb
@@ -0,0 +1,500 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8: Refrigeration and Liquefaction Processes"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.10: Air_Refrigeration_Cycle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 8.10\n",
+"// Page: 313\n",
+"\n",
+"printf('Example: 8.10 - Page: 313\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"Q = 5;// [tons]\n",
+"T1 = 253;// [Temperature of the working fluid leaving the evaporator, K]\n",
+"T2 = 303;// [Temperature of the working fluid leaving the evaporator, K]\n",
+"T3 = 303;// [K]\n",
+"Pressure_Ratio = 4;\n",
+"C = 1.008;// [kJ/kg]\n",
+"gama = 1.4;\n",
+"//**************//\n",
+"\n",
+"// Solution (a)\n",
+"T2 = T1*((Pressure_Ratio)^((gama - 1)/gama));// [K]\n",
+"T2 = T1*(Pressure_Ratio)^((gama - 1)/gama);// [K]\n",
+"T4 = T3/((Pressure_Ratio)^((gama - 1)/gama));// [K]\n",
+"COP = T1/(T2 - T1);\n",
+"printf('COP of Air Refrigeration System is %.2f\n',COP);\n",
+"\n",
+"// Solution (b)\n",
+"mdot = Q*12660/(C*(T1 - T4));// [kg/h]\n",
+"printf('Mass flow rate of the refrigerant is %.2f kg/h\n',mdot);\n",
+"\n",
+"// Solution (c)\n",
+"Wcompression = mdot*C*(T2 - T3);// [kJ/h]\n",
+"printf('The work of Compression is %.2f kW\n',Wcompression/3600);\n",
+"\n",
+"// Solution (d)\n",
+"Wexpansion = mdot*C*(T1 - T4);// [kJ/h]\n",
+"printf('The work of expansion is %.2f kW\n',Wexpansion/3600);\n",
+"\n",
+"// Solution (e)\n",
+"Wnet = Wcompression - Wexpansion;// [kJ/h]\n",
+"printf('Net work of the system is %.2f kW\n',Wnet/3600);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.1: Carnot_Refrigeration_Cycle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 8.1\n",
+"// Page: 297\n",
+"\n",
+"printf('Example: 8.1 - Page: 297\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"Tl = 273 - 4;// [K]\n",
+"Th = 273 + 30;// [K]\n",
+"Ql = 30;// [kW]\n",
+"//*************//\n",
+"\n",
+"// Solution (a)\n",
+"COP = Tl/(Th - Tl);\n",
+"printf('The coeffecient of performance of the cycle is %.2f\n',COP);\n",
+"\n",
+"// Solution (b)\n",
+"Wnet = Ql/COP;// [kW]\n",
+"printf('The power required is %.2f kW\n',Wnet);\n",
+"\n",
+"// Solution (c)\n",
+"Qh = Wnet + Ql;// [kW]\n",
+"printf('The rate of heat rejection in the room is %.2f kW',Qh);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.2: Carnot_Refrigeration_Cycle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 8.2\n",
+"// Page: 298\n",
+"\n",
+"printf('Example: 8.2 - Page: 298\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"Tl = -10 + 273;// [K]\n",
+"Th = 45 + 273;// [K]\n",
+"Ql = 1;// [ton]\n",
+"//*************//\n",
+"\n",
+"// Solution (a)\n",
+"COP = Tl/(Th - Tl);\n",
+"Wnet = Ql*3.516/COP;// [kW]\n",
+"printf('The power consumption is %.3f kW\n',Wnet);\n",
+"\n",
+"// Solution (b)\n",
+"Tl = -20 + 273;// [K]\n",
+"Th = 45 + 273;// [K]\n",
+"COP = Tl/(Th - Tl);\n",
+"Ql = Wnet*COP;// [kW]\n",
+"printf('Cooling Effect produced is %.3f kW\n',Ql);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.3: Carnot_Refrigeration_Cycle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 8.3\n",
+"// Page: 298\n",
+"\n",
+"printf('Example: 8.3 - Page: 298\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"// From Example 8.2:\n",
+"\n",
+"// For refrigerated space:\n",
+"// Wnet = Ql/4.78 = 0.209*Ql;\n",
+"\n",
+"// For freezer box.\n",
+"// Wnet = Ql/3.89 = 0.257*Ql\n",
+"\n",
+"percent = ((0.257 - 0.209)/0.209)*100;\n",
+"printf('Increase in percentage of work output is %.2f %%',percent);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.4: Carnot_Refrigeration_Cycle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 8.4\n",
+"// Page: 299\n",
+"\n",
+"printf('Example: 8.4 - Page: 299\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"Th = 273 + 24;// [K]\n",
+"Tl = 0 + 273;// [K]\n",
+"Qh = 25;// [kW]\n",
+"//*************//\n",
+"\n",
+"COP = Th/(Th - Tl);\n",
+"Wnet = Qh/COP;// [kW]\n",
+"printf('Coeffecient of performance of Carnot Heat Pump is %.2f\n',COP);\n",
+"printf('Power input can be estimated as %.2f kW\n',Wnet);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.5: Carnot_Refrigeration_Cycle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 8.5\n",
+"// Page: 299\n",
+"\n",
+"printf('Example: 8.5 - Page: 299\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"Tl = -2 + 273;// [K]\n",
+"Th = 20 + 273;// [K]\n",
+"Qh = 80000;// [kJ/h]\n",
+"//*************//\n",
+"\n",
+"Ql = Qh*Tl/Th;// [kJ/h]\n",
+"Wnet = Qh - Ql;// [kJ/h]\n",
+"printf('Minimum Power input required is %.3f kW\n',Wnet/3600);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.6: Vapour_Compression_Refrigeration_Cycle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 8.6\n",
+"// Page: 303\n",
+"\n",
+"printf('Example: 8.6 - Page: 303\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"Tl = 273;// [K]\n",
+"Th = 313;// [K]\n",
+"H1 = 187;// [Enthalpy of saturated vapour at 273 K, kJ/kg]\n",
+"H3 = 74;// [Enthalpy of saturated liquid at 313 K,kJ/kg]\n",
+"H4 = H3;// [kJ/kg]\n",
+"H2 = 204;// [Enthalpy of Supersaturated Vapour at 273 K, kJ/kg]\n",
+"//****************//\n",
+"\n",
+"// Solution (i)\n",
+"// COP = Ql/Wnet;\n",
+"COP = ((H1 - H4)/(H2 - H1));\n",
+"printf('Enthalpy of saturated vapour is %.2f\n',COP);\n",
+"\n",
+"// Solution (ii)\n",
+"Ref_Effect = H1 - H4;// [kJ/kg]\n",
+"printf('Refrigerating Effect is %d kJ/kg\n',Ref_Effect);\n",
+"\n",
+"// Solution (iii)\n",
+"COP = Tl/(Th - Tl);\n",
+"printf('The COP of an ideal Carnot refrigerator is %.2f\n',COP);\n",
+"\n",
+"// Solution (iv)\n",
+"W = H2 - H1;// [kJ/kg]\n",
+"printf('Work done by the compression is %.2f kJ/kg\n',W);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.7: Vapour_Compression_Refrigeration_Cycle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 8.7\n",
+"// Page: 304\n",
+"\n",
+"printf('Example: 8.7 - Page: 304\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"P1 = 0.18;// [MPa]\n",
+"T1 = -10 + 273;// [K]\n",
+"mdot = 0.06;// [kg/s]\n",
+"P2 = 1;// [MPa]\n",
+"T2 = 45 + 273;// [K]\n",
+"T = 273 + 29;// [K]\n",
+"P = 0.75;// [MPa]\n",
+"H1 = 245.16;// [Enthalpy of superheated vapour at -10 OC & 0.18 MPa, kJ/kg]\n",
+"H2 = 277.2;// [Enthalpy of superheated vapour at 45 OC & 1 MPa, kJ/kg]\n",
+"H3 = 92.22;// [Enthalpy of saturated liquid at 29 OC & 0.75 MPa, kJ/kg]\n",
+"H4 = H3;// [kJ/kg]\n",
+"//*************//\n",
+"\n",
+"// Solution (a)\n",
+"Ql = mdot*(H1 - H4);// [kW]\n",
+"printf('Amount of heat removed from cold space is %.2f kW\n',Ql);\n",
+"\n",
+"// Solution (b)\n",
+"Wnet = mdot*(H2 - H1);// [kW]\n",
+"printf('THe power input required is %.2f kW\n',Wnet);\n",
+"\n",
+"// Solution (c)\n",
+"COP = Ql/Wnet;\n",
+"printf('COP of refrigeration of cycle is %.2f\n',COP);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.8: Vapour_Compression_Refrigeration_Cycle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 8.8\n",
+"// Page: 305\n",
+"\n",
+"printf('Example: 8.8 - Page: 305\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"Ql = 5;// [tons]\n",
+"Tl = -10 + 273;// [K]\n",
+"Th = 35 + 273;// [K]\n",
+"eta = 0.85;\n",
+"H1 = 183.2;// [Enthalpy of saturated vapour at 263 K, kJ/kg]\n",
+"H2 = 208.3;// [Enthalpy of superheated vapour, kJ/kg]\n",
+"H3 = 69.5;// [Enthalpy of saturated vapour at 308 K, kJ/kg]\n",
+"H4 = H3;// [kJ/kg]\n",
+"//***************//\n",
+"\n",
+"// Solution (a)\n",
+"// Mass flow rate:\n",
+"Ql = Ql*3.516;// [kW]\n",
+"mdot = Ql/(H1 - H4);// [kW]\n",
+"printf('Mass flow rate of the refrigerant is %.4f kg/s\n',mdot);\n",
+"\n",
+"// Solution (b)\n",
+"W = H2 - H1;// [kJ/kg]\n",
+"Wnet = W*mdot/eta;// [kW]\n",
+"printf('Power consumption in the compression is %.2f kW\n',Wnet);\n",
+"\n",
+"// Solution (c)\n",
+"Qh = Ql + Wnet;// [kW]\n",
+"printf('The amount of heat rejected in the condenser is %.2f kW\n',Qh);\n",
+"\n",
+"// Solution (d)\n",
+"COP_VapourCompression = (H1 - H4)/(H2 - H1);\n",
+"COP_Carnot = Tl/(Th - Tl);\n",
+"COP_relative = COP_VapourCompression/COP_Carnot;\n",
+"printf('Relative COP is %.2f\n',COP_relative);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.9: Absorption_Refrigeration_Cycle.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 8.9\n",
+"// Page: 308\n",
+"\n",
+"printf('Example: 8.9 - Page: 308\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"Th = 273 + 125;// [K]\n",
+"Tl = 273 - 5;// [K]\n",
+"Ts = 273 + 28;// [K]\n",
+"COP = 2;\n",
+"//*************//\n",
+"\n",
+"COP_absorption = (Tl/(Ts - Tl))*((Th - Ts)/Th);\n",
+"if (COP - 0.1) < COP_absorption | (COP + 0.1) > COP_absorption\n",
+" printf('Claim is Valid and reasonable');\n",
+"else\n",
+" printf('Claim is not Valid');\n",
+"end"
+ ]
+ }
+],
+"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
+}
diff --git a/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/9-Solution_Thermodynamics_Properties.ipynb b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/9-Solution_Thermodynamics_Properties.ipynb
new file mode 100644
index 0000000..56d886a
--- /dev/null
+++ b/Introduction_To_Chemical_Engineering_Thermodynamics_by_G_Halder/9-Solution_Thermodynamics_Properties.ipynb
@@ -0,0 +1,897 @@
+{
+"cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9: Solution Thermodynamics Properties"
+ ]
+ },
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.10: Fugacity_of_Component_in_Mixture.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.10\n",
+"// Page: 354\n",
+"\n",
+"printf('Example: 9.10 - Page: 354\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"x1 = 0.3;// [mole fraction of component 1 in the mixture]\n",
+"x2 = 0.7;// [mole fraction of component 2 in the mixture]\n",
+"phi1 = 0.7;// [fugacity coeffecient of component 1 in the mixture]\n",
+"phi2 = 0.85;// [fugacity coeffecient of component 2 in the mixture]\n",
+"P = 50;// [bar]\n",
+"T = 273 + 100;// [K]\n",
+"//*************//\n",
+"\n",
+"phi = exp(x1*log(phi1) + x2*log(phi2));// [fugacity coeffecient of the mixture]\n",
+"f = phi*P;// [bar]\n",
+"printf('Fugacity of the gaseous mixture is %.3f bar',f);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.11: Fugacity_of_Component_in_Mixture.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.11\n",
+"// Page: 354\n",
+"\n",
+"printf('Example: 9.11 - Page: 354\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"x1 = 0.3;// [mole fraction of hydrogen in the mixture]\n",
+"x2 = 0.25;// [mole fraction of nitrogen in the mixture]\n",
+"x3 = 0.45;// [mole fraction of oxygen in the mixture]\n",
+"phi1 = 0.7;// [fugacity coeffecient of oxygen in the mixture]\n",
+"phi2 = 0.85;// [fugacity coeffecient of nitrogen in the mixture]\n",
+"phi3 = 0.75;// [fugacity coeffecient of oxygen in the mixture]\n",
+"P = 60;// [bar]\n",
+"T = 273 + 150;// [K]\n",
+"//***********//\n",
+"\n",
+"phi = exp(x1*log(phi1) + x2*log(phi2) + x3*log(phi3));// [fugacity coeffecient of the mixture]\n",
+"f = phi*P;// [bar]\n",
+"printf('Fugacity of the gaseous mixture is %.3f bar',f);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.12: Fugacity_of_Solids_and_Liquids.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.12\n",
+"// Page: 356\n",
+"\n",
+"printf('Example: 9.12 - Page: 356\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"T = 372.12;// [K]\n",
+"Psat = 100;// [kPa]\n",
+"P = 300; //[kPa]\n",
+"Vspecific = 1.043*10^(-3);//[cubic m/kg]\n",
+"M = 18*10^(-3);// [molecular weight of water, kg/mol]\n",
+"R = 8.314;// [J/mol K]\n",
+"//***************//\n",
+"\n",
+"Psat = Psat/100;// [bar]\n",
+"P = P/100;// [bar]\n",
+"Vl = Vspecific*M;// [cubic m/mol]\n",
+"// Vapour is assumed to be like an ideal gas.\n",
+"phi = 1;\n",
+"fsat = Psat*phi;// [bar]\n",
+"fl = fsat*exp(Vl*(P - Psat)*10^5/(R*T));// [bar]\n",
+"printf('Fugacity of liquid water is %.4f bar',fl);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.13: Fugacity_of_Solids_and_Liquids.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.13\n",
+"// Page: 357\n",
+"\n",
+"printf('Example: 9.13 - Page: 357\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"Vl = 90.45*10^(-6);// [molar volume of liquid butadiene, cubic m/mol]\n",
+"fsat = 4.12;// [bar]\n",
+"P = 10;// [bar]\n",
+"Psat = 4.12;// [bar]\n",
+"T = 313;// [K]\n",
+"R = 8.314;// [J/mol K]\n",
+"//************//\n",
+"\n",
+"fl = fsat*exp(Vl*(P - Psat)*10^5/(R*T));// [bar]\n",
+"printf('The fugacity of the liquid water is %.4f bar',fl);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.14: Fugacity_of_Solids_and_Liquids.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.14\n",
+"// Page: 357\n",
+"\n",
+"printf('Example: 9.14 - Page: 357\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"b = 0.0391;// [cubic dm/mol]\n",
+"P1 = 1000;// [atm]\n",
+"T = 1000 + 273;// [K]\n",
+"R = 0.0892;// [L bar/K mol]\n",
+"deff('[Vreal] = f1(P)','Vreal = R*T/P + b');\n",
+"deff('[Videal] = f2(P)','Videal = R*T/P');\n",
+"//**************//\n",
+"\n",
+"// We know that:\n",
+"// RTlog(f/P) = integral('Vreal - Videal',P,0,P)\n",
+"f = P1*exp((1/(R*T))*integrate('f1(P) - f2(P)','P',0,P1));// [atm]\n",
+"phi = f/P1;\n",
+"printf('The fugacity of the gas is %d atm \n',f);\n",
+"printf('The fugacity coeffecient of the gas is %.3f atm',phi);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.15: Fugacity_of_Solids_and_Liquids.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.15\n",
+"// Page: 359\n",
+"\n",
+"printf('Example: 9.15 - Page: 359\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"Vl = 73*10^(-6);// [cubic m/mol]\n",
+"P = 275;// [bar]\n",
+"Psat = 4.360;// [bar]\n",
+"T = 110 + 273;// [K]\n",
+"R = 8.314;// [J/mol K]\n",
+"//**************//\n",
+"\n",
+"// Acetone vapour is assumed to behave like ideal gas.\n",
+"phi = 1;\n",
+"fsat = Psat;// [bar]\n",
+"fl = fsat*exp(Vl*(P - Psat)*10^5/(R*T));// [bar]\n",
+"printf('Fugacity of liquid butadiene at 313 K & 10 bar is %.3f bar',fl); "
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.16: Gibbs_Theorem.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.16\n",
+"// Page: 362\n",
+"\n",
+"printf('Example: 9.16 - Page: 362\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"V1 = 2.8;// [Volume of Oxygen, L]\n",
+"V2 = 19.6;// [Volume of hydrogen, L]\n",
+"R = 1.987;// [cal/K mol]\n",
+"//**************//\n",
+"\n",
+"n1 = V1/22.4;// [moles of Oxygen]\n",
+"n2 = V2/22.4;// [moles of Hydrogen]\n",
+"n = n1 + n2;// [total number of moles]\n",
+"x1 = n1/n;// [mole fraction of Oxygen]\n",
+"x2 = n2/n;// [mole fraction of Hydrogen]\n",
+"// From Eqn. 9.88:\n",
+"deltaS_mix = - (R*(x1*log(x1) + x2*log(x2)));// [cal/K mol]\n",
+"printf('The entropy change of mixiong is %.3f cal/K mol',deltaS_mix)"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.17: Gibbs_Theorem.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.17\n",
+"// Page: 363\n",
+"\n",
+"printf('Example: 9.17 - Page: 363\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 9.17 on page number 363 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 9.17 on page 363 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.18: Gibbs_Theorem.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.18\n",
+"// Page: 364\n",
+"\n",
+"printf('Example: 9.18 - Page: 364\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"n1 = 0.7;// [moles of helium]\n",
+"n2 = 0.3;// [moles of argon]\n",
+"R = 8.314;// [J/mol K]\n",
+"T = 273 + 25;// [K]\n",
+"//******************//\n",
+"\n",
+"n = n1 + n2;// [total moles]\n",
+"x1 = n1/n;// [mole fraction of helium]\n",
+"x2 = n2/n;// [mole fraction of argon]\n",
+"deltaG_mix = n*R*T*(x1*log(x1) + x2*log(x2));// [J]\n",
+"printf('The free energy change of mixing is %.2f J\n',deltaG_mix);\n",
+"\n",
+"// Since the gases are ideal:\n",
+"deltaH_mix = 0;// [J]\n",
+"printf('The enthalpy change of mixing is %d J\n',deltaH_mix);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.19: Gibbs_Theorem.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.19\n",
+"// Page: 364\n",
+"\n",
+"printf('Example: 9.19 - Page: 364\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"V = 20;// [Volume of vessel, L]\n",
+"V1 = 12;// [Volume of Hydrogen, L]\n",
+"V2 = 10;// [Volume of Nitrogen, L]\n",
+"P = 1;// [atm]\n",
+"T = 298;// [K]\n",
+"P1 = 1;// [atm]\n",
+"P2 = 1;// [atm]\n",
+"R = 0.082;// [L atm/K mol]\n",
+"//************//\n",
+"\n",
+"n1 = P1*V1/(R*T);// [number of moles of Hydrogen]\n",
+"n2 = P2*V2/(R*T);// [number of moles of Nitrogen]\n",
+"n = n1 + n2;// [total number of moles]\n",
+"Pfinal = n*R*T/V;// [atm]\n",
+"p1 = Pfinal*n1;// [partial pressure of Hydrogen, atm]\n",
+"p2 = Pfinal*n2;// [partial pressure of Nitrogen, atm]\n",
+"deltaG_mix = R*T*(n1*log(p1/P1) + n2*log(p2/P2));// [J]\n",
+"printf('Free Energy change of mixing is %.2f J\n',deltaG_mix);\n",
+"\n",
+"// Since mixing is ideal:\n",
+"deltaH_mix = 0;// [J]\n",
+"printf('Enthalpy change in mixing is %.2f J\n',deltaH_mix);\n",
+"\n",
+"deltaS_mix = - (deltaG_mix/T);// [J/K]\n",
+"printf('Entropy Change in mixing is %.3f J/K\n',deltaS_mix);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.1: Partial_Molar_Properties.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.1\n",
+"// Page: 338\n",
+"\n",
+"printf('Example: 9.1 - Page: 338\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"V1_bar = 52.37*10^(-6);// [partial molar volume of ethanol, cubic m/mol]\n",
+"y1 = 0.5;// [mole fraction of ethanol]\n",
+"Density = 800.21;// [kg/cubic m]\n",
+"M1 = 46*10^(-3);// //[Molecular wt. of ethanol,kg/mol]\n",
+"M2 = 18*10^(-3);// [Molecular wt. of water,kg/cmol]\n",
+"//*************//\n",
+"\n",
+"y2 = 1 - y1;// [mole fraction of water]\n",
+"M = y1*M1 + y2*M2;// [Molecular wt. of mixture, kg/mol]\n",
+"V = M/Density;// [Volume of mixture, cubic m/mol]\n",
+"// From Eqn. 9.9:\n",
+"V2_bar = (V - y1*V1_bar)/y2;// [partial molar volume of water, cubic m/mol]\n",
+"printf('Partial molar volume of water is %.2e cubic m/mol\n',V2_bar);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.20: Excess_Property_Of_Mixture.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.20\n",
+"// Page: 367\n",
+"\n",
+"printf('Example: 9.20 - Page: 367\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 9.20 on page number 367 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 9.20 on page 367 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.21: Henry_Law.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.21\n",
+"// Page: 373\n",
+"\n",
+"printf('Example: 9.21 - Page: 373\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 9.21 on page number 373 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 9.21 on page 373 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.2: Partial_Molar_Properties.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.2\n",
+"// Page: 338\n",
+"\n",
+"printf('Example: 9.2 - Page: 338\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"Vol = 2;// [Volume of the mixture, cubic m/mol]\n",
+"y1 = 0.4;// [mole fraction of alcohol, cubic m/mol]\n",
+"V1_bar = 38.3*10^(-6);// [partial molar volume of alcohol, cubic m/mol]\n",
+"V2_bar = 17.2*10^(-6);// [partial molar volume of water, cubic m/mol]\n",
+"V1 = 39.21*10^(-6);// [molar volume of alcohol, cubic m/mol]\n",
+"V2 = 18*10^(-6);// [molar volume of water, cubic m/mol]\n",
+"//*************//\n",
+"\n",
+"// From Eqn. 9.9:\n",
+"V = y1*V1_bar + (1 - y1)*V2_bar;// [molar volume of the solution]\n",
+"n = Vol/V;// [number of moles of solution]\n",
+"n1 = y1*n;// [number of moles of alcohol required]\n",
+"n2 = (1 - y1)*n;// [number of moles of water required]\n",
+"V_alcohol = V1*n1;// [Volume of alcohol required, cubic m]\n",
+"V_water = V2*n2;// [Volume of water required, cubic m]\n",
+"printf('Volume of alcohol required is %.3f cubic m while volume of water required is %.3f cubic m\n',V_alcohol,V_water);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.3: Partial_Molar_Properties.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.3\n",
+"// Page: 339\n",
+"\n",
+"printf('Example: 9.3 - Page: 339\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"Vol = 2000;// [cubic cm]\n",
+"y1_1 = 0.96;// [mass fraction of ethanol in laboratory alcohol]\n",
+"y2_1 = 0.04;// [mass fraction of water in laboratory alcohol]\n",
+"y1_2 = 0.56;// [mass fracion of ethanol in vodka]\n",
+"y2_2 = 0.44;// [mass fraction of water in vodka]\n",
+"Vbar_water1 = 0.816;// [cubic cm/g]\n",
+"Vbar_ethanol1 = 1.273;// [cubic cm/g]\n",
+"Vbar_water2 = 0.953;// [cubic cm/g]\n",
+"Vbar_ethanol2 = 1.243;// [cubic cm/g]\n",
+"Density_water = 0.997;// [cubic cm/g]\n",
+"//***************//\n",
+"\n",
+"// Solution (i)\n",
+"// From Eqn 9.9\n",
+"Va = y1_1*Vbar_ethanol1 + y2_1*Vbar_water1;// [Volume of laboratory alcohol, cubic cm/g]\n",
+"mass = Vol/Va;// [g]\n",
+"// Let Mw be the mass of water added in laboratory alcohol.\n",
+"// Material balance on ethanol:\n",
+"Mw = mass*y1_1/y1_2 - mass;// [g]\n",
+"Vw = Mw/Density_water;// [Volume of water added, cubic cm]\n",
+"printf('Mass of water added is %d g\n',Mw);\n",
+"\n",
+"// Solution (ii)\n",
+"Mv = mass + Mw;// [Mass of vodka, g]\n",
+"Vv = y1_2*Vbar_ethanol2 + y2_2*Vbar_water2;// [Volume of ethanol, cubic cm/g]\n",
+"V_vodka = Vv*Mv;// [Volume of vodka obtained after conversion, cubic cm]\n",
+"printf('The volume of vodka obtained after conversion is %.d cubic cm\n',V_vodka);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.4: Partial_Molar_Properties.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.4\n",
+"// Page: 339\n",
+"\n",
+"printf('Example: 9.4 - Page: 339\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 9.4 on page number 339 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 9.4 on page 339 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.5: Partial_Molar_Properties.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.5\n",
+"// Page: 340\n",
+"\n",
+"printf('Example: 9.5 - Page: 340\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 9.5 on page number 340 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 9.5 on page 340 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.6: Partial_Molar_Properties.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.6\n",
+"// Page: 341\n",
+"printf('Example - 9.6 and Page number - 341\n\n');\n",
+"\n",
+"//Given\n",
+"T = 25+273.15;// [K]\n",
+"P = 1;// [atm]\n",
+"// Component 1 = water\n",
+"// Component 2 = methanol\n",
+"a = -3.2;// [cubic cm/mol] A constant\n",
+"V2 = 40.7;// [cubic cm/mol] Molar volume of pure component 2 (methanol)\n",
+"// V1_bar = 18.1 + a*x_2^(2)\n",
+"\n",
+"// From Gibbs-Duhem equation at constant temperature and pressure we have\n",
+"// x_1*dV1_bar + x_2*dV2_bar = 0\n",
+"// dV2_bar = -(x_1/x_2)*dV1_bar = -(x_1/x_2)*a*2*x_2*dx_2 = -2*a*x_1*dx_2 = 2*a*x_1*dx_1\n",
+"\n",
+"// At x_1 = 0: x_2 = 1 and thus V2_bar = V2\n",
+"// Integrating the above equation from x_1 = 0 to x_1 in the RHS, and from V2_bar = V2 to V2 in the LHS, we get\n",
+"// V2_bar = V2 + a*x_1^(2) - Molar volume of component 2(methanol) in the mixture \n",
+"\n",
+"printf('The expression for the partial molar volume of methanol(2) is\nV2_bar = V2 + a*x_1^(2) [cubic cm/mol]\n\n');\n",
+"\n",
+"// At infinite dilution, x_2 approach 0 and thus x_1 approach 1, therefore\n",
+"x_1 = 1;// Mole fraction of component 1(water) at infinite dilution\n",
+"V2_bar_infinite = V2 + a*(x_1^(2));//[cubic cm/mol]\n",
+"\n",
+"printf('The partial molar volume of methanol at infinite dilution is %.1f cubic cm/mol',V2_bar_infinite);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.7: Partial_Molar_Properties.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.7\n",
+"// Page: 342\n",
+"\n",
+"printf('Example: 9.7 - Page: 342\n\n');\n",
+"\n",
+"// Solution\n",
+"\n",
+"//*****Data******//\n",
+"// Data = [X1 V*10^6(cubic m/mol)];\n",
+"Data = [0 20;0.2 21.5;0.4 24.0;0.6 27.4;0.8 32.0;1 40];\n",
+"//************//\n",
+"\n",
+"scf(1.1);\n",
+"plot(Data(:,1),Data(:,2));\n",
+"title('Example 9.7');\n",
+"xlabel('Mole fraction');\n",
+"ylabel('Molar Volume*10^(6)');\n",
+"xgrid();\n",
+"\n",
+"// Solution (i)\n",
+"printf('For X1 = 0.5\n');\n",
+"// A tangent is drawn to the curve at X1 = 0.5.\n",
+"// The intercept at X2 = 0 or X1 = 1, gives V1_bar.\n",
+"V1_bar1 = 33.8*10^(-6);// [cubic m/mol]\n",
+"// The intercept at X2 = 1 or X1 = 0, gives V2_bar.\n",
+"V2_bar1 = 17*10^(-6);// [cubic m/mol]\n",
+"printf('Partial molar volume of component 1 is %.2e cubic m/mol\n',V1_bar1);\n",
+"printf('Partial molar volume of component 2 is %.2e cubic m/mol\n',V2_bar1);\n",
+"printf('\n');\n",
+"\n",
+"// Solution (ii)\n",
+"printf('For X2 = 0.75\n');\n",
+"// A tangent is drawn to the curve at X1 = 0.75.\n",
+"// The intercept at X2 = 0 or X1 = 1, gives V1_bar.\n",
+"V1_bar2 = 36.6*10^(-6);// [cubic m/mol]\n",
+"// The intercept at X2 = 1 or X1 = 0, gives V2_bar.\n",
+"V2_bar2 = 12.4*10^(-6);// [cubic m/mol]\n",
+"point1 = [0 V1_bar1; 1 V2_bar1];\n",
+"point2 = [0 V1_bar2;1 V2_bar2];\n",
+"scf(2);\n",
+"plot(point1(:,1),point1(:,2),point2(:,1),point2(:,2));\n",
+"legend('X1 = 0.5','X1 = 0.75');\n",
+"xlabel('Mole fraction');\n",
+"ylabel('Molar Volume');\n",
+"printf('Partial molar volume of component 1 is %.2e cubic m/mol\n',V1_bar);\n",
+"printf('Partial molar volume of component 2 is %.2e cubic m/mol\n',V2_bar);"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.8: Gibbs_Duhem_Equatio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.8\n",
+"// Page: 352\n",
+"\n",
+"printf('Example: 9.8 - Page: 352\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 9.8 on page number 352 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 9.8 on page 352 of the book.');"
+ ]
+ }
+,
+{
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.9: Gibbs_Duhem_Equatio.sce"
+ ]
+ },
+ {
+"cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+"source": [
+"clear;\n",
+"clc;\n",
+"\n",
+"// Example: 9.9\n",
+"// Page: 352\n",
+"\n",
+"printf('Example: 9.9 - Page: 352\n\n');\n",
+"\n",
+"// Mathematics is involved in proving but just that no numerical computations are involved.\n",
+"// For prove refer to this example 9.9 on page number 352 of the book.\n",
+"\n",
+"printf(' Mathematics is involved in proving but just that no numerical computations are involved.\n\n');\n",
+"printf(' For prove refer to this example 9.9 on page 352 of the book.');"
+ ]
+ }
+],
+"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
+}