summaryrefslogtreecommitdiff
path: root/Elements_of_Physical_Chemistry_by_Atkins_Peter/Chapter4.ipynb
diff options
context:
space:
mode:
authorkinitrupti2017-05-12 18:53:46 +0530
committerkinitrupti2017-05-12 18:53:46 +0530
commitf270f72badd9c61d48f290c3396004802841b9df (patch)
treebc8ba99d85644c62716ce397fe60177095b303db /Elements_of_Physical_Chemistry_by_Atkins_Peter/Chapter4.ipynb
parent64d949698432e05f2a372d9edc859c5b9df1f438 (diff)
downloadPython-Textbook-Companions-f270f72badd9c61d48f290c3396004802841b9df.tar.gz
Python-Textbook-Companions-f270f72badd9c61d48f290c3396004802841b9df.tar.bz2
Python-Textbook-Companions-f270f72badd9c61d48f290c3396004802841b9df.zip
Removed duplicates
Diffstat (limited to 'Elements_of_Physical_Chemistry_by_Atkins_Peter/Chapter4.ipynb')
-rwxr-xr-xElements_of_Physical_Chemistry_by_Atkins_Peter/Chapter4.ipynb208
1 files changed, 208 insertions, 0 deletions
diff --git a/Elements_of_Physical_Chemistry_by_Atkins_Peter/Chapter4.ipynb b/Elements_of_Physical_Chemistry_by_Atkins_Peter/Chapter4.ipynb
new file mode 100755
index 00000000..b5b8ff90
--- /dev/null
+++ b/Elements_of_Physical_Chemistry_by_Atkins_Peter/Chapter4.ipynb
@@ -0,0 +1,208 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4 - Thermodynamics: the Second Law"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example I1 - Pg 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the entropy change at 273 and 373 K\n",
+ "#Initialization of variables\n",
+ "H=100. #kJ\n",
+ "T1=273. #K\n",
+ "T2=373.#K\n",
+ "#calculations\n",
+ "S1=H*1000/T1\n",
+ "S2=H*1000/T2\n",
+ "#results\n",
+ "print '%s %d %s' %('Entropy change at 273 K is',S1,'J/K ')\n",
+ "print '%s %d %s' %('\\n Entropy change at 373 K is',S2,'J/K ')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entropy change at 273 K is 366 J/K \n",
+ "\n",
+ " Entropy change at 373 K is 268 J/K \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example I2 - Pg 84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the enthalpy of vaporization\n",
+ "#Initialization of variables\n",
+ "T=59.2 #K\n",
+ "#calculations\n",
+ "Hvap=85*(273.2+T)/1000.\n",
+ "#results\n",
+ "print '%s %d %s' %('Enthalpy of vaportization =',Hvap,'kJ/mol')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enthalpy of vaportization = 28 kJ/mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example I3 - Pg 88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the change in entropy\n",
+ "#Initialization of variables\n",
+ "SH2O=70 #J/K mol\n",
+ "SH2=131 #J/K mol\n",
+ "SO2=205 #J/K mol\n",
+ "#calculations\n",
+ "deltaS=2*SH2O-2*SH2-SO2\n",
+ "print '%s %d %s' %('Change in entropy =',deltaS,'J/K mol')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy = -327 J/K mol\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E1 - Pg 84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the net heat transferred and entropy production per day\n",
+ "#Initialization of variables\n",
+ "Power=100. #W\n",
+ "time=1 #day\n",
+ "T=20 #C\n",
+ "#calculations\n",
+ "timeins=1*24*3600\n",
+ "qsurr=timeins*Power\n",
+ "Ssurr=qsurr/(T+273.)\n",
+ "#results\n",
+ "print '%s %d %s' %('Heat transferred to surroundings =',qsurr,'J')\n",
+ "print '%s %.2e %s' %('\\n Entropy production per day =',Ssurr,'J/k')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat transferred to surroundings = 8640000 J\n",
+ "\n",
+ " Entropy production per day = 2.95e+04 J/k\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E2 - Pg 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the amount of food bird must consume\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "g=9.81 #m/s^2\n",
+ "m=30*math.pow(10,-3) #kg\n",
+ "d=10 #m\n",
+ "H=2.828*math.pow(10,6) #j/mol\n",
+ "M=180. #g/mol\n",
+ "#calculations\n",
+ "w=g*m*d\n",
+ "n=w/H\n",
+ "m=n*M\n",
+ "#results\n",
+ "print '%s %.1e %s' %('Amount bird must consume =',m,'g')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amount bird must consume = 1.9e-04 g\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file