{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 16 - Molecular substances" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example E1 - Pg 385" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#calculate the net dipole moment\n", "#Initialization of variables\n", "import math\n", "e=1.609*math.pow(10,-19) #C\n", "#calculations\n", "mux=(-0.36*e*(-0.8) + 0.45*e*(2.1) )*math.pow(10,-12) /(3.33564*math.pow(10,-30))\n", "muy=-0.96\n", "muz=0\n", "mux=-1.1\n", "mu=math.sqrt(mux*mux+muy*muy+muz*muz)\n", "#results\n", "print '%s %.1f %s' %(\"Net dipole moment =\",mu,\"D\")" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Net dipole moment = 1.5 D\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example E2 - Pg 390" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#calculate the potential energy of the system\n", "#Initialization of variables\n", "import math\n", "Na=6.023*math.pow(10,23) # /mol\n", "e=1.60228*math.pow(10,-19) #C\n", "e0=8.85419*math.pow(10,-12) #C^2/J m\n", "#calculations\n", "factor=Na*e*e /(4*math.pi*e0)\n", "#Multiply by Z^2/R to get the value of potential energy. Plot the graph\n", "#results\n", "print '%s %.3e %s' %(\"Potential energy =\",factor,\" Z*Z/R kJ/mol\")\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Potential energy = 1.390e-04 Z*Z/R kJ/mol\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example I1 - Pg 383" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#calcualte the predicted dipole moment\n", "#Initialization of variables\n", "EH=2.1\n", "EBr=2.8\n", "#calculations\n", "diff=-EH+EBr\n", "#results\n", "print '%s %.1f %s' %(\"Prediced dipole moment =\",diff,\"D\")\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Prediced dipole moment = 0.7 D\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example I2 - Pg 387" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#calculate the potential energy\n", "#Initialization of variables\n", "import math\n", "mu1=1.4 #D\n", "mu2=1.4 #D\n", "angle=180. #degrees\n", "d=3 #nm\n", "D=4.7*math.pow(10,-30) #C m\n", "#calculations\n", "Vmol=D*D*(1-3*math.cos(angle*math.pi/180.)*math.cos(angle*math.pi/180.))/(4*math.pi*8.854*math.pow(10,-12) *math.pow((d*math.pow(10,-9)),3))\n", "V=Vmol*(6.023*math.pow(10,23))\n", "#results\n", "print '%s %.1f %s' %(\"Potential energy =\",V,\" J/mol\")\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Potential energy = -8.9 J/mol\n" ] } ], "prompt_number": 4 } ], "metadata": {} } ] }