summaryrefslogtreecommitdiff
path: root/Elements_of_Physical_Chemistry/chapter0.ipynb
diff options
context:
space:
mode:
authorhardythe12015-01-28 14:31:21 +0530
committerhardythe12015-01-28 14:31:21 +0530
commit53f72e6790ff23b43c8f6a0b69d6386940671429 (patch)
tree7745af6dbf2f5b2972b23f9f5a7a19c695a27321 /Elements_of_Physical_Chemistry/chapter0.ipynb
parent7b78be04fe05bf240417e22f74b3fc22e7a77d19 (diff)
downloadPython-Textbook-Companions-53f72e6790ff23b43c8f6a0b69d6386940671429.tar.gz
Python-Textbook-Companions-53f72e6790ff23b43c8f6a0b69d6386940671429.tar.bz2
Python-Textbook-Companions-53f72e6790ff23b43c8f6a0b69d6386940671429.zip
added books
Diffstat (limited to 'Elements_of_Physical_Chemistry/chapter0.ipynb')
-rwxr-xr-xElements_of_Physical_Chemistry/chapter0.ipynb198
1 files changed, 198 insertions, 0 deletions
diff --git a/Elements_of_Physical_Chemistry/chapter0.ipynb b/Elements_of_Physical_Chemistry/chapter0.ipynb
new file mode 100755
index 00000000..4cc1774a
--- /dev/null
+++ b/Elements_of_Physical_Chemistry/chapter0.ipynb
@@ -0,0 +1,198 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 0 - Introduction"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E1 - Pg 4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the final pressure of the gas\n",
+ "#Initialization of variables\n",
+ "P=1.115 #bar\n",
+ "#Calculations\n",
+ "Conv_fac=1/1.01325\n",
+ "FinalP=Conv_fac*P #Final pressure\n",
+ "#Results\n",
+ "print '%s %.3f' %('Final pressure in atmospheres (atm)= ',FinalP)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Final pressure in atmospheres (atm)= 1.100\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example I1 - Pg 5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the pressure at the foot of the column\n",
+ "#Initialization of variables\n",
+ "h=0.760 #m\n",
+ "d=1.36*10000 #kg/m^3\n",
+ "#Calculations\n",
+ "P=9.81*d*h\n",
+ "#Results\n",
+ "print '%s %.3e' %('Pressure at the foot of the column (Pa)= ',P)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure at the foot of the column (Pa)= 1.014e+05\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example I2 - Pg 6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the hydrostatic pressure and pressure in apparatus\n",
+ "#Initialization of variables\n",
+ "h=0.1 #m\n",
+ "d=1000 #Kg/m^3\n",
+ "Patm=100021. #Pa\n",
+ "#Calculations\n",
+ "P=9.81*h*d\n",
+ "Papp=(Patm-P)/1000.\n",
+ "#Results\n",
+ "print '%s %.3f' %('Hydrostatic pressure(Pa) = ',P )\n",
+ "print '%s %.3f' %('\\n Pressure in apparatus(kPa) = ',Papp)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hydrostatic pressure(Pa) = 981.000\n",
+ "\n",
+ " Pressure in apparatus(kPa) = 99.040\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example I3 - Pg 8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Calculate the no.of moles of copper required\n",
+ "import math\n",
+ "#Initialization of variables\n",
+ "N=8.8*math.pow(10,22)\n",
+ "NA=6.023*math.pow(10,23) #mol^-1\n",
+ "#Calculations\n",
+ "n=N/NA\n",
+ "#Results\n",
+ "print '%s %.2f' %('No. of moles of Cu ( mol Cu)= ',n)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "No. of moles of Cu ( mol Cu)= 0.15\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example I4 - Pg 9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the amount of Carbon atoms \n",
+ "#Initialization of variables\n",
+ "m=21.5 #g\n",
+ "Mc=12.01 #g/mol\n",
+ "#Calculations\n",
+ "nc=m/Mc\n",
+ "#Results\n",
+ "print '%s %.2f %s' %(\"Amount of C atoms=\",nc,\"mol C\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amount of C atoms= 1.79 mol C\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file