From d36fc3b8f88cc3108ffff6151e376b619b9abb01 Mon Sep 17 00:00:00 2001 From: kinitrupti Date: Fri, 12 May 2017 18:40:35 +0530 Subject: Revised list of TBCs --- ...agnetic_Properties_and_Crystal_Structures.ipynb | 548 ++++++++++++++++++++ ...netic_Properties_and_Crystal_Structures_1.ipynb | 555 +++++++++++++++++++++ .../Chapter_7.ipynb | 232 +++++++++ .../Chapter_7_1.ipynb | 236 +++++++++ 4 files changed, 1571 insertions(+) create mode 100755 sample_notebooks/RohithYeedulapalli/RohithYeedulapalli_version_backup/6.Magnetic_Properties_and_Crystal_Structures.ipynb create mode 100755 sample_notebooks/RohithYeedulapalli/RohithYeedulapalli_version_backup/6.Magnetic_Properties_and_Crystal_Structures_1.ipynb create mode 100755 sample_notebooks/RohithYeedulapalli/RohithYeedulapalli_version_backup/Chapter_7.ipynb create mode 100755 sample_notebooks/RohithYeedulapalli/RohithYeedulapalli_version_backup/Chapter_7_1.ipynb (limited to 'sample_notebooks/RohithYeedulapalli/RohithYeedulapalli_version_backup') diff --git a/sample_notebooks/RohithYeedulapalli/RohithYeedulapalli_version_backup/6.Magnetic_Properties_and_Crystal_Structures.ipynb b/sample_notebooks/RohithYeedulapalli/RohithYeedulapalli_version_backup/6.Magnetic_Properties_and_Crystal_Structures.ipynb new file mode 100755 index 00000000..43ba034f --- /dev/null +++ b/sample_notebooks/RohithYeedulapalli/RohithYeedulapalli_version_backup/6.Magnetic_Properties_and_Crystal_Structures.ipynb @@ -0,0 +1,548 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.1, Page number 6.46" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature rise is 8.43 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "El=10**-2*50; #energy loss(J)\n", + "H=El*60; #heat produced(J)\n", + "d=7.7*10**3; #iron rod(kg/m**3)\n", + "s=0.462*10**-3; #specific heat(J/kg K)\n", + "\n", + "#Calculation\n", + "theta=H/(d*s); #temperature rise(K)\n", + "\n", + "#Result\n", + "print \"temperature rise is\",round(theta,2),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.2, Page number 6.46" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetic field at the centre is 14.0 weber/m**2\n", + "dipole moment is 9.0 *10**-24 ampere/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "new=6.8*10**15; #frequency(revolutions per second)\n", + "mew0=4*math.pi*10**-7;\n", + "R=5.1*10**-11; #radius(m)\n", + "\n", + "#Calculation\n", + "i=round(e*new,4); #current(ampere)\n", + "B=mew0*i/(2*R); #magnetic field at the centre(weber/m**2)\n", + "A=math.pi*R**2;\n", + "d=i*A; #dipole moment(ampere/m**2)\n", + "\n", + "#Result\n", + "print \"magnetic field at the centre is\",round(B),\"weber/m**2\"\n", + "print \"dipole moment is\",round(d*10**24),\"*10**-24 ampere/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.3, Page number 6.46" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "intensity of magnetisation is 5.0 ampere/m\n", + "flux density in material is 1.257 weber/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "chi=0.5*10**-5; #magnetic susceptibility\n", + "H=10**6; #field strength(ampere/m)\n", + "mew0=4*math.pi*10**-7;\n", + "\n", + "#Calculation\n", + "I=chi*H; #intensity of magnetisation(ampere/m)\n", + "B=mew0*(I+H); #flux density in material(weber/m**2)\n", + "\n", + "#Result\n", + "print \"intensity of magnetisation is\",I,\"ampere/m\"\n", + "print \"flux density in material is\",round(B,3),\"weber/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.4, Page number 6.47" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of Bohr magnetons is 2.22 bohr magneon/atom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "B=9.27*10**-24; #bohr magneton(ampere m**2)\n", + "a=2.86*10**-10; #edge(m)\n", + "Is=1.76*10**6; #saturation value of magnetisation(ampere/m)\n", + "\n", + "#Calculation\n", + "N=2/a**3;\n", + "mew_bar=Is/N; #number of Bohr magnetons(ampere m**2)\n", + "mew_bar=mew_bar/B; #number of Bohr magnetons(bohr magneon/atom)\n", + "\n", + "#Result\n", + "print \"number of Bohr magnetons is\",round(mew_bar,2),\"bohr magneon/atom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.5, Page number 6.47" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average magnetic moment is 2.79 *10**-3 bohr magneton/spin\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mew0=4*math.pi*10**-7;\n", + "H=9.27*10**-24; #bohr magneton(ampere m**2)\n", + "beta=10**6; #field(ampere/m)\n", + "k=1.38*10**-23; #boltzmann constant\n", + "T=303; #temperature(K)\n", + "\n", + "#Calculation\n", + "mm=mew0*H*beta/(k*T); #average magnetic moment(bohr magneton/spin)\n", + "\n", + "#Result\n", + "print \"average magnetic moment is\",round(mm*10**3,2),\"*10**-3 bohr magneton/spin\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.6, Page number 6.48" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "hysteresis loss per cycle is 188.0 J/m**3\n", + "hysteresis loss per second is 9400.0 watt/m**3\n", + "power loss is 1.23 watt/kg\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "A=94; #area(m**2)\n", + "vy=0.1; #value of length(weber/m**2)\n", + "vx=20; #value of unit length\n", + "n=50; #number of magnetization cycles\n", + "d=7650; #density(kg/m**3)\n", + "\n", + "#Calculation\n", + "h=A*vy*vx; #hysteresis loss per cycle(J/m**3)\n", + "hs=h*n; #hysteresis loss per second(watt/m**3)\n", + "pl=hs/d; #power loss(watt/kg)\n", + "\n", + "#Result\n", + "print \"hysteresis loss per cycle is\",h,\"J/m**3\"\n", + "print \"hysteresis loss per second is\",hs,\"watt/m**3\"\n", + "print \"power loss is\",round(pl,2),\"watt/kg\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.7, Page number 6.48" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a= 5.43 Angstorm\n", + "density = 6.88 kg/m**3\n", + "#Answer given in the textbook is wrong\n" + ] + } + ], + "source": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#variable declaration\n", + "d=2.351 #bond lenght\n", + "N=6.02*10**26 #Avagadro number\n", + "n=8 #number of atoms in unit cell\n", + "A=28.09 #Atomin mass of silicon\n", + "m=6.02*10**26 #1mole\n", + "\n", + "#Calculations\n", + "a=(4*d)/math.sqrt(3)\n", + "p=(n*A)/((a*10**-10)*m) #density\n", + "\n", + "#Result\n", + "print \"a=\",round(a,2),\"Angstorm\"\n", + "print \"density =\",round(p*10**16,2),\"kg/m**3\"\n", + "print\"#Answer given in the textbook is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.8, Page number 6.48" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " radius of largest sphere is 0.154700538379252*r\n", + "maximum radius of sphere is 0.414213562373095*r\n" + ] + } + ], + "source": [ + " import math\n", + "from __future__ import division\n", + "from sympy import Symbol\n", + "\n", + "#Variable declaration\n", + "r=Symbol('r')\n", + "\n", + "#Calculation\n", + "a1=4*r/math.sqrt(3);\n", + "R1=(a1/2)-r; #radius of largest sphere\n", + "a2=4*r/math.sqrt(2);\n", + "R2=(a2/2)-r; #maximum radius of sphere\n", + "\n", + "#Result\n", + "print \"radius of largest sphere is\",R1\n", + "print \"maximum radius of sphere is\",R2 " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.9, Page number 6.49" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a1= 2.905 Angstrom\n", + "Unit cell volume =a1**3 = 24.521 *10**-30 m**3\n", + "Volume occupied by one atom = 12.26 *10**-30 m**3\n", + "a2= 3.654 Angstorm\n", + "Unit cell volume =a2**3 = 48.8 *10**-30 m**3\n", + "Volume occupied by one atom = 12.2 *10**-30 m**3\n", + "Volume Change in % = 0.493\n", + "Density Change in % = 0.5\n", + "Thus the increase of density or the decrease of volume is about 0.5%\n" + ] + } + ], + "source": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#variable declaration\n", + "r1=1.258 #Atomic radius of BCC\n", + "r2=1.292 #Atomic radius of FCC\n", + "\n", + "#calculations\n", + "a1=(4*r1)/math.sqrt(3) #in BCC\n", + "b1=((a1)**3)*10**-30 #Unit cell volume\n", + "v1=(b1)/2 #Volume occupied by one atom\n", + "a2=2*math.sqrt(2)*r2 #in FCC\n", + "b2=(a2)**3*10**-30 #Unit cell volume\n", + "v2=(b2)/4 #Volume occupied by one atom \n", + "v_c=((v1)-(v2))*100/(v1) #Volume Change in % \n", + "d_c=((v1)-(v2))*100/(v2) #Density Change in %\n", + "\n", + "#Results\n", + "print \"a1=\",round(a1,3),\"Angstrom\" \n", + "print \"Unit cell volume =a1**3 =\",round((b1)/10**-30,3),\"*10**-30 m**3\"\n", + "print \"Volume occupied by one atom =\",round(v1/10**-30,2),\"*10**-30 m**3\"\n", + "print \"a2=\",round(a2,3),\"Angstorm\"\n", + "print \"Unit cell volume =a2**3 =\",round((b2)/10**-30,3),\"*10**-30 m**3\"\n", + "print \"Volume occupied by one atom =\",round(v2/10**-30,2),\"*10**-30 m**3\"\n", + "print \"Volume Change in % =\",round(v_c,3)\n", + "print \"Density Change in % =\",round(d_c,2)\n", + "print \"Thus the increase of density or the decrease of volume is about 0.5%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.10, Page number 6.50" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a= 0.563 *10**-9 metre\n", + "spacing between the nearest neighbouring ions = 0.2814 nm\n" + ] + } + ], + "source": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#variable declaration\n", + "n=4 \n", + "M=58.5 #Molecular wt. of NaCl\n", + "N=6.02*10**26 #Avagadro number\n", + "rho=2180 #density\n", + "\n", + "#Calculations\n", + "a=((n*M)/(N*rho))**(1/3) \n", + "s=a/2\n", + "\n", + "#Result\n", + "print \"a=\",round(a/10**-9,3),\"*10**-9 metre\"\n", + "print \"spacing between the nearest neighbouring ions =\",round(s/10**-9,4),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.11, Page number 6.51" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice constant, a= 0.36 nm\n" + ] + } + ], + "source": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#variable declaration\n", + "n=4 \n", + "A=63.55 #Atomic wt. of NaCl\n", + "N=6.02*10**26 #Avagadro number\n", + "rho=8930 #density\n", + "\n", + "#Calculations\n", + "a=((n*A)/(N*rho))**(1/3) #Lattice Constant\n", + "\n", + "#Result\n", + "print \"lattice constant, a=\",round(a*10**9,2),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.12, Page number 6.51" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Density of iron = 8805.0 kg/m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "r=0.123 #Atomic radius\n", + "n=4\n", + "A=55.8 #Atomic wt\n", + "a=2*math.sqrt(2) \n", + "N=6.02*10**26 #Avagadro number\n", + "\n", + "#Calculations\n", + "rho=(n*A)/((a*r*10**-9)**3*N)\n", + "\n", + "#Result\n", + "print \"Density of iron =\",round(rho),\"kg/m**-3\"" + ] + } + ], + "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 +} diff --git a/sample_notebooks/RohithYeedulapalli/RohithYeedulapalli_version_backup/6.Magnetic_Properties_and_Crystal_Structures_1.ipynb b/sample_notebooks/RohithYeedulapalli/RohithYeedulapalli_version_backup/6.Magnetic_Properties_and_Crystal_Structures_1.ipynb new file mode 100755 index 00000000..8c0ce9a8 --- /dev/null +++ b/sample_notebooks/RohithYeedulapalli/RohithYeedulapalli_version_backup/6.Magnetic_Properties_and_Crystal_Structures_1.ipynb @@ -0,0 +1,555 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#Chapter 6:Magnetic Properties and Crystal Structures" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.1, Page number 6.46" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "temperature rise is 8.43 K\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "El=10**-2*50; #energy loss(J)\n", + "H=El*60; #heat produced(J)\n", + "d=7.7*10**3; #iron rod(kg/m**3)\n", + "s=0.462*10**-3; #specific heat(J/kg K)\n", + "\n", + "#Calculation\n", + "theta=H/(d*s); #temperature rise(K)\n", + "\n", + "#Result\n", + "print \"temperature rise is\",round(theta,2),\"K\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.2, Page number 6.46" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "magnetic field at the centre is 14.0 weber/m**2\n", + "dipole moment is 9.0 *10**-24 ampere/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "e=1.6*10**-19; #charge(coulomb)\n", + "new=6.8*10**15; #frequency(revolutions per second)\n", + "mew0=4*math.pi*10**-7;\n", + "R=5.1*10**-11; #radius(m)\n", + "\n", + "#Calculation\n", + "i=round(e*new,4); #current(ampere)\n", + "B=mew0*i/(2*R); #magnetic field at the centre(weber/m**2)\n", + "A=math.pi*R**2;\n", + "d=i*A; #dipole moment(ampere/m**2)\n", + "\n", + "#Result\n", + "print \"magnetic field at the centre is\",round(B),\"weber/m**2\"\n", + "print \"dipole moment is\",round(d*10**24),\"*10**-24 ampere/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.3, Page number 6.46" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "intensity of magnetisation is 5.0 ampere/m\n", + "flux density in material is 1.257 weber/m**2\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "chi=0.5*10**-5; #magnetic susceptibility\n", + "H=10**6; #field strength(ampere/m)\n", + "mew0=4*math.pi*10**-7;\n", + "\n", + "#Calculation\n", + "I=chi*H; #intensity of magnetisation(ampere/m)\n", + "B=mew0*(I+H); #flux density in material(weber/m**2)\n", + "\n", + "#Result\n", + "print \"intensity of magnetisation is\",I,\"ampere/m\"\n", + "print \"flux density in material is\",round(B,3),\"weber/m**2\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.4, Page number 6.47" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "number of Bohr magnetons is 2.22 bohr magneon/atom\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "B=9.27*10**-24; #bohr magneton(ampere m**2)\n", + "a=2.86*10**-10; #edge(m)\n", + "Is=1.76*10**6; #saturation value of magnetisation(ampere/m)\n", + "\n", + "#Calculation\n", + "N=2/a**3;\n", + "mew_bar=Is/N; #number of Bohr magnetons(ampere m**2)\n", + "mew_bar=mew_bar/B; #number of Bohr magnetons(bohr magneon/atom)\n", + "\n", + "#Result\n", + "print \"number of Bohr magnetons is\",round(mew_bar,2),\"bohr magneon/atom\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.5, Page number 6.47" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "average magnetic moment is 2.79 *10**-3 bohr magneton/spin\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "mew0=4*math.pi*10**-7;\n", + "H=9.27*10**-24; #bohr magneton(ampere m**2)\n", + "beta=10**6; #field(ampere/m)\n", + "k=1.38*10**-23; #boltzmann constant\n", + "T=303; #temperature(K)\n", + "\n", + "#Calculation\n", + "mm=mew0*H*beta/(k*T); #average magnetic moment(bohr magneton/spin)\n", + "\n", + "#Result\n", + "print \"average magnetic moment is\",round(mm*10**3,2),\"*10**-3 bohr magneton/spin\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.6, Page number 6.48" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "hysteresis loss per cycle is 188.0 J/m**3\n", + "hysteresis loss per second is 9400.0 watt/m**3\n", + "power loss is 1.23 watt/kg\n" + ] + } + ], + "source": [ + "#importing modules\n", + "import math\n", + "from __future__ import division\n", + "\n", + "#Variable declaration\n", + "A=94; #area(m**2)\n", + "vy=0.1; #value of length(weber/m**2)\n", + "vx=20; #value of unit length\n", + "n=50; #number of magnetization cycles\n", + "d=7650; #density(kg/m**3)\n", + "\n", + "#Calculation\n", + "h=A*vy*vx; #hysteresis loss per cycle(J/m**3)\n", + "hs=h*n; #hysteresis loss per second(watt/m**3)\n", + "pl=hs/d; #power loss(watt/kg)\n", + "\n", + "#Result\n", + "print \"hysteresis loss per cycle is\",h,\"J/m**3\"\n", + "print \"hysteresis loss per second is\",hs,\"watt/m**3\"\n", + "print \"power loss is\",round(pl,2),\"watt/kg\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.7, Page number 6.48" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a= 5.43 Angstorm\n", + "density = 6.88 kg/m**3\n", + "#Answer given in the textbook is wrong\n" + ] + } + ], + "source": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#variable declaration\n", + "d=2.351 #bond lenght\n", + "N=6.02*10**26 #Avagadro number\n", + "n=8 #number of atoms in unit cell\n", + "A=28.09 #Atomin mass of silicon\n", + "m=6.02*10**26 #1mole\n", + "\n", + "#Calculations\n", + "a=(4*d)/math.sqrt(3)\n", + "p=(n*A)/((a*10**-10)*m) #density\n", + "\n", + "#Result\n", + "print \"a=\",round(a,2),\"Angstorm\"\n", + "print \"density =\",round(p*10**16,2),\"kg/m**3\"\n", + "print\"#Answer given in the textbook is wrong\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.8, Page number 6.48" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " radius of largest sphere is 0.154700538379252*r\n", + "maximum radius of sphere is 0.414213562373095*r\n" + ] + } + ], + "source": [ + " import math\n", + "from __future__ import division\n", + "from sympy import Symbol\n", + "\n", + "#Variable declaration\n", + "r=Symbol('r')\n", + "\n", + "#Calculation\n", + "a1=4*r/math.sqrt(3);\n", + "R1=(a1/2)-r; #radius of largest sphere\n", + "a2=4*r/math.sqrt(2);\n", + "R2=(a2/2)-r; #maximum radius of sphere\n", + "\n", + "#Result\n", + "print \"radius of largest sphere is\",R1\n", + "print \"maximum radius of sphere is\",R2 " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.9, Page number 6.49" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a1= 2.905 Angstrom\n", + "Unit cell volume =a1**3 = 24.521 *10**-30 m**3\n", + "Volume occupied by one atom = 12.26 *10**-30 m**3\n", + "a2= 3.654 Angstorm\n", + "Unit cell volume =a2**3 = 48.8 *10**-30 m**3\n", + "Volume occupied by one atom = 12.2 *10**-30 m**3\n", + "Volume Change in % = 0.493\n", + "Density Change in % = 0.5\n", + "Thus the increase of density or the decrease of volume is about 0.5%\n" + ] + } + ], + "source": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#variable declaration\n", + "r1=1.258 #Atomic radius of BCC\n", + "r2=1.292 #Atomic radius of FCC\n", + "\n", + "#calculations\n", + "a1=(4*r1)/math.sqrt(3) #in BCC\n", + "b1=((a1)**3)*10**-30 #Unit cell volume\n", + "v1=(b1)/2 #Volume occupied by one atom\n", + "a2=2*math.sqrt(2)*r2 #in FCC\n", + "b2=(a2)**3*10**-30 #Unit cell volume\n", + "v2=(b2)/4 #Volume occupied by one atom \n", + "v_c=((v1)-(v2))*100/(v1) #Volume Change in % \n", + "d_c=((v1)-(v2))*100/(v2) #Density Change in %\n", + "\n", + "#Results\n", + "print \"a1=\",round(a1,3),\"Angstrom\" \n", + "print \"Unit cell volume =a1**3 =\",round((b1)/10**-30,3),\"*10**-30 m**3\"\n", + "print \"Volume occupied by one atom =\",round(v1/10**-30,2),\"*10**-30 m**3\"\n", + "print \"a2=\",round(a2,3),\"Angstorm\"\n", + "print \"Unit cell volume =a2**3 =\",round((b2)/10**-30,3),\"*10**-30 m**3\"\n", + "print \"Volume occupied by one atom =\",round(v2/10**-30,2),\"*10**-30 m**3\"\n", + "print \"Volume Change in % =\",round(v_c,3)\n", + "print \"Density Change in % =\",round(d_c,2)\n", + "print \"Thus the increase of density or the decrease of volume is about 0.5%\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.10, Page number 6.50" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "a= 0.563 *10**-9 metre\n", + "spacing between the nearest neighbouring ions = 0.2814 nm\n" + ] + } + ], + "source": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#variable declaration\n", + "n=4 \n", + "M=58.5 #Molecular wt. of NaCl\n", + "N=6.02*10**26 #Avagadro number\n", + "rho=2180 #density\n", + "\n", + "#Calculations\n", + "a=((n*M)/(N*rho))**(1/3) \n", + "s=a/2\n", + "\n", + "#Result\n", + "print \"a=\",round(a/10**-9,3),\"*10**-9 metre\"\n", + "print \"spacing between the nearest neighbouring ions =\",round(s/10**-9,4),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.11, Page number 6.51" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "lattice constant, a= 0.36 nm\n" + ] + } + ], + "source": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#variable declaration\n", + "n=4 \n", + "A=63.55 #Atomic wt. of NaCl\n", + "N=6.02*10**26 #Avagadro number\n", + "rho=8930 #density\n", + "\n", + "#Calculations\n", + "a=((n*A)/(N*rho))**(1/3) #Lattice Constant\n", + "\n", + "#Result\n", + "print \"lattice constant, a=\",round(a*10**9,2),\"nm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example number 6.12, Page number 6.51" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Density of iron = 8805.0 kg/m**-3\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "r=0.123 #Atomic radius\n", + "n=4\n", + "A=55.8 #Atomic wt\n", + "a=2*math.sqrt(2) \n", + "N=6.02*10**26 #Avagadro number\n", + "\n", + "#Calculations\n", + "rho=(n*A)/((a*r*10**-9)**3*N)\n", + "\n", + "#Result\n", + "print \"Density of iron =\",round(rho),\"kg/m**-3\"" + ] + } + ], + "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 +} diff --git a/sample_notebooks/RohithYeedulapalli/RohithYeedulapalli_version_backup/Chapter_7.ipynb b/sample_notebooks/RohithYeedulapalli/RohithYeedulapalli_version_backup/Chapter_7.ipynb new file mode 100755 index 00000000..c41c4cd6 --- /dev/null +++ b/sample_notebooks/RohithYeedulapalli/RohithYeedulapalli_version_backup/Chapter_7.ipynb @@ -0,0 +1,232 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7:LASERS " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 7.1, Page number 7.32" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Divergence = 0.5 *10**-3 radian\n" + ] + } + ], + "source": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#variable declaration\n", + "r1 = 2; #in radians\n", + "r2 = 3; #in radians\n", + "d1 = 4; #Converting from mm to radians\n", + "d2 = 6; #Converting from mm to radians\n", + "\n", + "#calculations\n", + "D = (r2-r1)/(d2*10**3-d1*10**3)\n", + "\n", + "#Result\n", + "print \"Divergence =\",round(D*10**3,3),\"*10**-3 radian\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 7.2, Page number 7.32" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Frequency (V) = 4.32 *10**14 Hz\n", + "Relative Population= 1.081 *10**30\n" + ] + } + ], + "source": [ + "import math\n", + "from __future__ import division\n", + "from sympy import *\n", + "#variable declaration\n", + "C=3*10**8 #The speed of light\n", + "L=6943 #Wavelength\n", + "T=300 #Temperature in Kelvin\n", + "h=6.626*10**-34 #Planck constant \n", + "k=1.38*10**-23 #Boltzmann's constant\n", + "\n", + "#Calculations\n", + "\n", + "V=(C)/(L*10**-10)\n", + "R=math.exp(h*V/(k*T))\n", + "\n", + "#Result\n", + "print \"Frequency (V) =\",round(V/10**14,2),\"*10**14 Hz\"\n", + "print \"Relative Population=\",round(R/10**30,3),\"*10**30\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 7.3, Page number 7.32" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Frequency= 4.74 *10**14 Hz\n", + "no.of photons emitted= 7.322 *10**15 photons/sec\n", + "Power density = 2.3 kWm**-2\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "C=3*10**8 #Velocity of light\n", + "W=632.8*10**-9 #wavelength\n", + "P=2.3\n", + "t=1\n", + "h=6.626*10**-34 #Planck constant \n", + "S=1*10**-6\n", + "\n", + "#Calculations\n", + "V=C/W #Frequency\n", + "n=((P*10**-3)*t)/(h*V) #no.of photons emitted\n", + "PD=P*10**-3/S\n", + "\n", + "#Result\n", + "print \"Frequency=\",round(V/10**14,2),\"*10**14 Hz\"\n", + "print \"no.of photons emitted=\",round(n/10**15,3),\"*10**15 photons/sec\"\n", + "print \"Power density =\",round(PD/1000,1),\"kWm**-2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 7.4, Page number 7.33" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelenght = 8628.0 Angstrom\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "h=6.626*10**-34 #Planck constant \n", + "C=3*10**8 #Velocity of light\n", + "E_g=1.44 #bandgap \n", + "\n", + "#calculations\n", + "W=(h*C)*10**10/(E_g*1.6*10**-19)\n", + "\n", + "#Result\n", + "print \"Wavelenght =\",round(W),\"Angstrom\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 7.5, Page number 7.33" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Band gap = 0.8 eV\n" + ] + } + ], + "source": [ + "import math\n", + "\n", + "#variable declaration\n", + "W=1.55 #wavelength\n", + "\n", + "#Calculations\n", + "E_g=(1.24)/W #Bandgap in eV \n", + "\n", + "#Result\n", + "print \"Band gap =\",E_g,\"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 +} diff --git a/sample_notebooks/RohithYeedulapalli/RohithYeedulapalli_version_backup/Chapter_7_1.ipynb b/sample_notebooks/RohithYeedulapalli/RohithYeedulapalli_version_backup/Chapter_7_1.ipynb new file mode 100755 index 00000000..56cbd13b --- /dev/null +++ b/sample_notebooks/RohithYeedulapalli/RohithYeedulapalli_version_backup/Chapter_7_1.ipynb @@ -0,0 +1,236 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7:LASERS " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 7.1, Page number 7.32" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Divergence = 0.5 *10**-3 radian\n" + ] + } + ], + "source": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#variable declaration\n", + "r1 = 2; #in radians\n", + "r2 = 3; #in radians\n", + "d1 = 4; #Converting from mm to radians\n", + "d2 = 6; #Converting from mm to radians\n", + "\n", + "#calculations\n", + "D = (r2-r1)/(d2*10**3-d1*10**3) #Divergence\n", + "\n", + "#Result\n", + "print \"Divergence =\",round(D*10**3,3),\"*10**-3 radian\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 7.2, Page number 7.32" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Frequency (V) = 4.32 *10**14 Hz\n", + "Relative Population= 1.081 *10**30\n" + ] + } + ], + "source": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#variable declaration\n", + "C=3*10**8 #The speed of light\n", + "Lamda=6943 #Wavelength\n", + "T=300 #Temperature in Kelvin\n", + "h=6.626*10**-34 #Planck constant \n", + "k=1.38*10**-23 #Boltzmann's constant\n", + "\n", + "#Calculations\n", + "\n", + "V=(C)/(Lamda*10**-10) #Frequency\n", + "R=math.exp(h*V/(k*T)) #Relative population\n", + "\n", + "#Result\n", + "print \"Frequency (V) =\",round(V/10**14,2),\"*10**14 Hz\"\n", + "print \"Relative Population=\",round(R/10**30,3),\"*10**30\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 7.3, Page number 7.32" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Frequency= 4.74 *10**14 Hz\n", + "no.of photons emitted= 7.322 *10**15 photons/sec\n", + "Power density = 2.3 kWm**-2\n" + ] + } + ], + "source": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#variable declaration\n", + "C=3*10**8 #Velocity of light\n", + "W=632.8*10**-9 #wavelength\n", + "P=2.3\n", + "t=1\n", + "h=6.626*10**-34 #Planck constant \n", + "S=1*10**-6\n", + "\n", + "#Calculations\n", + "V=C/W #Frequency\n", + "n=((P*10**-3)*t)/(h*V) #no.of photons emitted\n", + "PD=P*10**-3/S #Power density\n", + "\n", + "#Result\n", + "print \"Frequency=\",round(V/10**14,2),\"*10**14 Hz\"\n", + "print \"no.of photons emitted=\",round(n/10**15,3),\"*10**15 photons/sec\"\n", + "print \"Power density =\",round(PD/1000,1),\"kWm**-2\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 7.4, Page number 7.33" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Wavelenght = 8628.0 Angstrom\n" + ] + } + ], + "source": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#variable declaration\n", + "h=6.626*10**-34 #Planck constant \n", + "C=3*10**8 #Velocity of light\n", + "E_g=1.44 #bandgap \n", + "\n", + "#calculations\n", + "lamda=(h*C)*10**10/(E_g*1.6*10**-19) #Wavelenght\n", + "\n", + "#Result\n", + "print \"Wavelenght =\",round(lamda),\"Angstrom\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "##Example 7.5, Page number 7.33" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Band gap = 0.8 eV\n" + ] + } + ], + "source": [ + "import math\n", + "from __future__ import division\n", + "\n", + "#variable declaration\n", + "W=1.55 #wavelength\n", + "\n", + "#Calculations\n", + "E_g=(1.24)/W #Bandgap in eV \n", + "\n", + "#Result\n", + "print \"Band gap =\",E_g,\"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 +} -- cgit