diff options
author | kinitrupti | 2017-05-12 18:40:35 +0530 |
---|---|---|
committer | kinitrupti | 2017-05-12 18:40:35 +0530 |
commit | d36fc3b8f88cc3108ffff6151e376b619b9abb01 (patch) | |
tree | 9806b0d68a708d2cfc4efc8ae3751423c56b7721 /backup/Engineering_Physics_by_P.K.Palanisamy_version_backup/Chapter1.ipynb | |
parent | 1b1bb67e9ea912be5c8591523c8b328766e3680f (diff) | |
download | Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.tar.gz Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.tar.bz2 Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.zip |
Revised list of TBCs
Diffstat (limited to 'backup/Engineering_Physics_by_P.K.Palanisamy_version_backup/Chapter1.ipynb')
-rwxr-xr-x | backup/Engineering_Physics_by_P.K.Palanisamy_version_backup/Chapter1.ipynb | 209 |
1 files changed, 209 insertions, 0 deletions
diff --git a/backup/Engineering_Physics_by_P.K.Palanisamy_version_backup/Chapter1.ipynb b/backup/Engineering_Physics_by_P.K.Palanisamy_version_backup/Chapter1.ipynb new file mode 100755 index 00000000..3dd56e56 --- /dev/null +++ b/backup/Engineering_Physics_by_P.K.Palanisamy_version_backup/Chapter1.ipynb @@ -0,0 +1,209 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#1: Bonding in Solids"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.1, Page number 1.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "net change in energy per mole is -296 kJ/mol\n",
+ "answer varies due to rounding off errors\n",
+ "since the net change in energy is negative, the A+B- molecule will be stable\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.602*10**-19; #charge of electron(c)\n",
+ "epsilon0=8.85*10**-12; #permittivity(C/Nm)\n",
+ "r=3*10**-10; #seperation(m)\n",
+ "N=6.022*10**20;\n",
+ "Ea=502; #ionisation energy of A(kJ/mol)\n",
+ "Eb=-335; #electron affinity for B(kJ/mol)\n",
+ "\n",
+ "#Calculation\n",
+ "E=-e**2*N/(4*math.pi*epsilon0*r); #electrostatic attraction(kJ/mol)\n",
+ "nE=Ea+Eb+E; #net change in energy per mole(kJ/mol)\n",
+ "\n",
+ "#Result\n",
+ "print \"net change in energy per mole is\",int(nE),\"kJ/mol\"\n",
+ "print \"answer varies due to rounding off errors\"\n",
+ "print \"since the net change in energy is negative, the A+B- molecule will be stable\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.2, Page number 1.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "energy required is 0.5 eV\n",
+ "seperation is 2.88 nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "IPk=4.1; #IP of K(eV)\n",
+ "EACl=3.6; #EA of Cl(eV)\n",
+ "e=1.602*10**-19; #charge of electron(c)\n",
+ "onebyepsilon0=9*10**9;\n",
+ "\n",
+ "#Calculation\n",
+ "deltaE=IPk-EACl;\n",
+ "Ec=deltaE; #energy required(eV)\n",
+ "R=e*onebyepsilon0/deltaE; #seperation(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"energy required is\",Ec,\"eV\"\n",
+ "print \"seperation is\",round(R*10**9,2),\"nm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.3, Page number 1.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "bond energy is 4.61 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.602*10**-19; #charge of electron(c)\n",
+ "epsilon0=8.85*10**-12; #permittivity(C/Nm)\n",
+ "r0=236*10**-12; #seperation(m)\n",
+ "N=6.022*10**20;\n",
+ "IP=5.14; #ionisation energy of A(kJ/mol)\n",
+ "EA=3.65; #electron affinity for B(kJ/mol)\n",
+ "\n",
+ "#Calculation\n",
+ "Ue=-e**2/(4*math.pi*epsilon0*r0*e); #potential energy(eV)\n",
+ "BE=-Ue-IP+EA; #bond energy(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"bond energy is\",round(BE,2),\"eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 1.4, Page number 1.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "cohesive energy is 7.965 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "A=1.748; #madelung constant\n",
+ "n=9; #born repulsive exponent\n",
+ "e=1.602*10**-19; #charge of electron(c)\n",
+ "epsilon0=8.85*10**-12; #permittivity(C/Nm)\n",
+ "r0=0.281*10**-9; #seperation(m)\n",
+ "IE=5.14; #ionisation energy of A(kJ/mol)\n",
+ "EA=3.61; #electron affinity for B(kJ/mol)\n",
+ "\n",
+ "#Calculation\n",
+ "CE=A*e**2*(1-(1/n))/(4*math.pi*epsilon0*r0*e); #cohesive energy(eV)\n",
+ "\n",
+ "#Result\n",
+ "print \"cohesive energy is\",round(CE,3),\"eV\""
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "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.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
|