summaryrefslogtreecommitdiff
path: root/sample_notebooks/SandhyaArroju/Chapter5.ipynb
diff options
context:
space:
mode:
authorhardythe12015-07-03 12:23:43 +0530
committerhardythe12015-07-03 12:23:43 +0530
commit9d260e6fae7328d816a514130b691fbd0e9ef81d (patch)
tree9e6035702fca0f6f8c5d161de477985cacad7672 /sample_notebooks/SandhyaArroju/Chapter5.ipynb
parentafcd9e5397e3e1bde0392811d0482d76aac391dc (diff)
downloadPython-Textbook-Companions-9d260e6fae7328d816a514130b691fbd0e9ef81d.tar.gz
Python-Textbook-Companions-9d260e6fae7328d816a514130b691fbd0e9ef81d.tar.bz2
Python-Textbook-Companions-9d260e6fae7328d816a514130b691fbd0e9ef81d.zip
add/remove books
Diffstat (limited to 'sample_notebooks/SandhyaArroju/Chapter5.ipynb')
-rwxr-xr-xsample_notebooks/SandhyaArroju/Chapter5.ipynb303
1 files changed, 303 insertions, 0 deletions
diff --git a/sample_notebooks/SandhyaArroju/Chapter5.ipynb b/sample_notebooks/SandhyaArroju/Chapter5.ipynb
new file mode 100755
index 00000000..2e530c83
--- /dev/null
+++ b/sample_notebooks/SandhyaArroju/Chapter5.ipynb
@@ -0,0 +1,303 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#5: Conducting Materials"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.1, Page number 5.34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "drift speed is 36.6 *10**-5 m/s\n",
+ "mean free path is 3.34 *10**-8 m\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "Na=6.023*10**26; #avagadro number\n",
+ "e=1.602*10**-19;\n",
+ "d=8960; #density\n",
+ "N=1; #number of free electrons\n",
+ "w=63.54; #atomic weight\n",
+ "i=10; #current(ampere)\n",
+ "m=9.1*10**-31; \n",
+ "rho=2*10**-8; #resistivity(ohm m)\n",
+ "r=0.08*10**-2; #radius(m)\n",
+ "c=1.6*10**6; #mean thermal velocity(m/s)\n",
+ "\n",
+ "#Calculation\n",
+ "A=math.pi*r**2; #area(m**2)\n",
+ "n=Na*d*N/w;\n",
+ "vd=i/(A*n*e); #drift speed(m/s)\n",
+ "tow_c=m/(n*e**2*rho);\n",
+ "lamda=tow_c*c; #mean free path(m)\n",
+ "\n",
+ "#Result\n",
+ "print \"drift speed is\",round(vd*10**5,1),\"*10**-5 m/s\"\n",
+ "print \"mean free path is\",round(lamda*10**8,2),\"*10**-8 m\"\n",
+ "print \"answer given in the book is wrong\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.2, Page number 5.35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "electrical conductivity is 4.8 *10**7 ohm-1 m-1\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.602*10**-19;\n",
+ "m=9.1*10**-31; #mass(kg)\n",
+ "tow=2*10**-14; #time(s)\n",
+ "n=8.5*10**28; \n",
+ "\n",
+ "#Calculation\n",
+ "sigma=n*e**2*tow/m; #electrical conductivity(ohm-1 m-1)\n",
+ "\n",
+ "#Result\n",
+ "print \"electrical conductivity is\",round(sigma/10**7,1),\"*10**7 ohm-1 m-1\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.3, Page number 5.35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "relaxation time is 4.0 *10**-14 s\n",
+ "mobility of electrons is 7.0 *10**-3 m**2/Vs\n",
+ "drift velocity is 0.7 m/s\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19;\n",
+ "m=9.1*10**-31; #mass(kg)\n",
+ "n=5.8*10**28; \n",
+ "rho=1.54*10**-8; #resistivity(ohm m)\n",
+ "E=1*10**2;\n",
+ "\n",
+ "#Calculation\n",
+ "tow=m/(rho*n*e**2); #relaxation time(s)\n",
+ "mew_e=1/(rho*e*n); #mobility of electrons(m**2/Vs)\n",
+ "vd=mew_e*E; #drift velocity(m/s)\n",
+ "\n",
+ "#Result\n",
+ "print \"relaxation time is\",round(tow*10**14),\"*10**-14 s\"\n",
+ "print \"mobility of electrons is\",round(mew_e*10**3),\"*10**-3 m**2/Vs\"\n",
+ "print \"drift velocity is\",round(vd,1),\"m/s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.4, Page number 5.35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "resistivity is 5.51 *10**-8 ohm m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho=1.7*10**-8; #resistivity(ohm m)\n",
+ "T=300; #temperature(K)\n",
+ "T1=973; #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "a=rho/T; \n",
+ "rho_973=a*T1; #resistivity(ohm m)\n",
+ "\n",
+ "#Result\n",
+ "print \"resistivity is\",round(rho_973*10**8,2),\"*10**-8 ohm m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.5, Page number 5.36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "increase of resistivity is 0.54 *10**-8 ohm m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "rho1=1.2*10**-8; #resistivity(ohm m)\n",
+ "rho2=0.12*10**-8; #resistivity(ohm m)\n",
+ "p1=0.4; #atomic percent\n",
+ "p2=0.5; #atomic percent\n",
+ "rho=1.5*10**-8; #resistivity(ohm m)\n",
+ "\n",
+ "#Calculation\n",
+ "rho_i=(rho1*p1)+(rho2*p2); #increase of resistivity(ohm m)\n",
+ "Tr=rho+rho_i; #total resistivity of copper alloy(ohm m)\n",
+ "\n",
+ "#Result\n",
+ "print \"increase of resistivity is\",round(rho_i*10**8,2),\"*10**-8 ohm m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example number 5.6, Page number 5.36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "electrical conductivity is 1.688 *10**7 ohm-1 m-1\n",
+ "thermal conductivity is 123.93 W/m/K\n",
+ "lorentz number is 2.447 *10**-8 watt ohm K-2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "e=1.6*10**-19;\n",
+ "m=9.1*10**-31; #mass(kg)\n",
+ "n=6*10**28; #density(per m**3)\n",
+ "tow=10**-14; #relaxation time(s)\n",
+ "T=300; #temperature(K)\n",
+ "k=1.38*10**-23; #boltzmann constant\n",
+ "\n",
+ "#Calculation\n",
+ "sigma=n*e**2*tow/m; #electrical conductivity(ohm-1 m-1)\n",
+ "K=n*math.pi**2*k**2*T*tow/(3*m); #thermal conductivity(W/m/K)\n",
+ "L=K/(sigma*T); #lorentz number(watt ohm K-2)\n",
+ "\n",
+ "#Result\n",
+ "print \"electrical conductivity is\",round(sigma/10**7,3),\"*10**7 ohm-1 m-1\"\n",
+ "print \"thermal conductivity is\",round(K,2),\"W/m/K\"\n",
+ "print \"lorentz number is\",round(L*10**8,3),\"*10**-8 watt ohm K-2\""
+ ]
+ }
+ ],
+ "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
+}