{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter5 Second and Third Law of Thermodynamics" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.1, Page no.20" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "maximum work= 214.42 cal\n" ] } ], "source": [ "import math\n", "#initialisation of variables\n", "q2=1000 #in cal\n", "T2=100 #in C\n", "T1= 20 #in C\n", "#CALCULATIONS\n", "wmax= q2*(T2-T1)/(273.1+T2)\n", "#RESULTS\n", "wmax=round(wmax,2)\n", "print 'maximum work=',wmax,'cal'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.2, Page no.20" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "entropy change per mole= 20.18 cal degˆ−1 moleˆ−1\n" ] } ], "source": [ "import math\n", "#initialisation of variables\n", "dH= 6896 #in cal moleˆ−1\n", "T= 68.7 #in C\n", "#CALCULATIONS\n", "dS= dH/(273.1+T)\n", "#RESULTS\n", "dS=round(dS,2)\n", "print 'entropy change per mole=',dS,'cal degˆ−1 moleˆ−1'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.3, Page no.21" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "increase in entropy= 0.64 cal degˆ−1 mole ˆ−1\n" ] } ], "source": [ "import math\n", "#initialisation of variables\n", "Cp=6.09 #in cal degˆ−1 moleˆ−1\n", "T1=30 #in C\n", "T2=0 #in C\n", "#CALCULATIONS\n", "k=0.0452799815 #log10((273+T1)/(273+T2)))\n", "dS=2.303*Cp*k\n", "#RESULTS\n", "dS=round(dS,2)\n", "print 'increase in entropy=',dS,'cal degˆ−1 mole ˆ−1'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.4, Page no.21" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "increase in entropy= 5.74 cal degˆ−1 mole^−1\n" ] } ], "source": [ "import math\n", "#initialisation of variables\n", "T1=25 #in C\n", "T2=600 #in C\n", "k1= 6.0954\n", "k2= 3.2533*10**-3 #in K\n", "k3= -10.71*10**-7 #in Kˆ−1\n", "#CALCULATIONS\n", "dS=k1*2.303*math.log10((273+T2)/(273+T1))+k2*(T2-T1)+(k3 /2)*((273+T2)**2-(273+T1)**2)\n", "#RESULTS\n", "dS=round(dS,2)\n", "print 'increase in entropy=',dS,'cal degˆ−1 mole^−1'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.5, Page no.22" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "change in entropy= 2.76 cal degˆ−1 moleˆ−1\n" ] } ], "source": [ "import math\n", "#initialisation of variables\n", "n=2 #in mole\n", "R=1.987 #in cal Kˆ−1 moleˆ−1\n", "X1=0.5 #in atm\n", "X2=0.5 #in atm\n", "#CALCULATIONS\n", "S=-2.303*n*R*(X1*math.log10(X1)+X2*math.log10(X2))\n", "#RESULTS\n", "S=round(S,2)\n", "print 'change in entropy=',S,'cal degˆ−1 moleˆ−1'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.6, Page no.22" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "change in entropy= -10.61 cal degˆ−1 moleˆ−1\n" ] } ], "source": [ "import math\n", "#initialisation of variables\n", "SH2O= 45.106 #in cal degˆ−1 moleˆ−1\n", "SH2= 31.211 #in cal degˆ−1 moleˆ−1\n", "SO2= 49.003 #in cal degˆ−1 moleˆ−1\n", "#CALCULATIONS\n", "dS= SH2O-SH2 -0.5*SO2\n", "#RESULTS\n", "dS=round(dS,2)\n", "print 'change in entropy=',dS,'cal degˆ−1 moleˆ−1'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.7, Page no.23" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "change in Gibbs free energy= -2727.33 cal\n" ] } ], "source": [ "import math\n", "#initialisation of variables\n", "n=2 #in moles\n", "p=1 #in atm\n", "p1=0.1 #in atm\n", "T=25 #in C\n", "R= 1.987 #in cal moleˆ−1 Kˆ−1\n", "#CALCULATIONS \n", "dG= n*R*2.303*math.log10(p1/p)*(273+T)\n", "#RESULTS\n", "dG=round(dG,2)\n", "print 'change in Gibbs free energy=',dG,'cal'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.8, Page no.23" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "change in Gibbs free energy= -50.79 cal mole ˆ−1\n" ] } ], "source": [ "import math\n", "#initialisation of variables\n", "R=1.987 #in cal moleˆ−1 Kˆ−1\n", "T=-10 #in C\n", "P1=2.149 #in mm\n", "P2=1.950 #in mm\n", "#CALCULATIONS\n", "dG=R*2.303*(273+T)*math.log10(P2/P1)\n", "#RESULTS\n", "dG=round(dG,2)\n", "print 'change in Gibbs free energy=',dG,'cal mole ˆ−1'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.9, Page no.23" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "W= -741.151 cal moleˆ−1\n", "qp= -9714.6 cal moleˆ−1\n", "dE= -8973.449 cal moleˆ−1\n", "dA= 741.151 cal moleˆ−1\n", "dS= -26.04 cal degˆ−1 moleˆ−1\n", "dG= 0.0 cal moleˆ−1\n" ] } ], "source": [ "import math\n", "#initialisation of variables\n", "T=100 #in C\n", "R=1.987 #in cal moleˆ−1 Kˆ−1\n", "H=539.7 #in cal gˆ−1\n", "M=18 #in g moleˆ−1\n", "#CALCULATIONS\n", "w=-R*(273+T)\n", "qp=-H*M\n", "dE=qp-w\n", "dA=-w\n", "dS=qp/(273+T)\n", "dG=qp -(273+T)*dS\n", "#RESULTS\n", "dS=round(dS,2)\n", "print 'W=',w,'cal moleˆ−1'\n", "print 'qp=',qp,'cal moleˆ−1'\n", "print 'dE=',dE,'cal moleˆ−1'\n", "print 'dA=',dA,'cal moleˆ−1'\n", "print 'dS=',dS,'cal degˆ−1 moleˆ−1'\n", "print 'dG=',dG,'cal moleˆ−1'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 5.10, Page no.24" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "W= 1373.28 cal moleˆ−1\n", "q= 1373.28 cal moleˆ−1\n", "dE= 0 cal moleˆ−1\n", "dA= -1373.28 cal moleˆ−1\n", "dS= 4.58 cal degˆ−1 moleˆ−1\n", "dG= -1373.28 cal moleˆ−1\n" ] } ], "source": [ "import math\n", "#initialisation of variables\n", "R=1.987 #in cal degˆ−1 moleˆ−1\n", "T=27 #in C\n", "V1=24.62 #in lit\n", "V2=2.462 #in lit\n", "#CALCULATIONS\n", "wmax=2.303*R*(273.1+T)*math.log10(V1/V2)\n", "dA=-wmax\n", "dE=0\n", "q=dE+wmax\n", "dH=0\n", "dG=-R*(273.1+T)*2.303\n", "dS=dG/(273.1+T)\n", "dS1=(dH-dG)/(273.1+T)\n", "#RESULTS\n", "wmax=round(wmax,2)\n", "q=round(q,2)\n", "dA=round(dA,2)\n", "dS1=round(dS1,2)\n", "dG=round(dG,2)\n", "print 'W=',wmax,'cal moleˆ−1'\n", "print 'q=',q,'cal moleˆ−1'\n", "print 'dE=',dE,'cal moleˆ−1'\n", "print 'dA=',dA,'cal moleˆ−1'\n", "print 'dS=',dS1,'cal degˆ−1 moleˆ−1'\n", "print 'dG=',dG,'cal moleˆ−1'" ] } ], "metadata": { "kernelspec": { "display_name": "Python [Root]", "language": "python", "name": "Python [Root]" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.11" } }, "nbformat": 4, "nbformat_minor": 0 }