summaryrefslogtreecommitdiff
path: root/Applied_Physics_by_P._K._Palanisamy/Chapter7_1.ipynb
diff options
context:
space:
mode:
authorkinitrupti2017-05-12 18:53:46 +0530
committerkinitrupti2017-05-12 18:53:46 +0530
commit6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d (patch)
tree22789c9dbe468dae6697dcd12d8e97de4bcf94a2 /Applied_Physics_by_P._K._Palanisamy/Chapter7_1.ipynb
parentd36fc3b8f88cc3108ffff6151e376b619b9abb01 (diff)
downloadPython-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.tar.gz
Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.tar.bz2
Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.zip
Removed duplicates
Diffstat (limited to 'Applied_Physics_by_P._K._Palanisamy/Chapter7_1.ipynb')
-rwxr-xr-xApplied_Physics_by_P._K._Palanisamy/Chapter7_1.ipynb465
1 files changed, 465 insertions, 0 deletions
diff --git a/Applied_Physics_by_P._K._Palanisamy/Chapter7_1.ipynb b/Applied_Physics_by_P._K._Palanisamy/Chapter7_1.ipynb
new file mode 100755
index 00000000..e3eb080f
--- /dev/null
+++ b/Applied_Physics_by_P._K._Palanisamy/Chapter7_1.ipynb
@@ -0,0 +1,465 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1ba9d8e44f464fdd4be85263413cd33050741f89efba47984e88555948ca8361"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "7: Magnetic Properties"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.1, Page number 7.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M = 1.4 #field(T)\n",
+ "H = 6.5*10**-4 #magnetic field(T)\n",
+ "\n",
+ "#Calculation\n",
+ "chi = M/H #susceptibility\n",
+ "mew_r = 1+chi #relative permeability\n",
+ "\n",
+ "#Result\n",
+ "print \"relative permeability of iron is\",round(mew_r)\n",
+ "print \"answer given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "relative permeability of iron is 2155.0\n",
+ "answer given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.2, Page number 7.3"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "M = 3300 #magnetisation(amp/m)\n",
+ "H = 220 #field strength(amp/m)\n",
+ "\n",
+ "#Calculation\n",
+ "mew_r = (M/H)+1 #relative permeability\n",
+ "\n",
+ "#Result\n",
+ "print \"relative permeability of material is\",mew_r"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "relative permeability of material is 16.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.3, Page number 7.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "H = 10**6 #magnetic field intensity(amp/m)\n",
+ "chi = 1.5*10**-3 #susceptibility\n",
+ "\n",
+ "#Calculation\n",
+ "mew0 = 4*math.pi*10**-7\n",
+ "M = chi*H #magnetisation(A/m)\n",
+ "B = mew0*(M+H) #flux density(T)\n",
+ "M = M*10**-3\n",
+ "B = math.ceil(B*10**3)/10**3 #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetisation of material is\",M,\"*10**3 A/m\"\n",
+ "print \"flux density is\",B,\"T\"\n",
+ "print \"answer for flux density B given in the book is wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "magnetisation of material is 1.5 *10**3 A/m\n",
+ "flux density is 1.259 T\n",
+ "answer for flux density B given in the book is wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.4, Page number 7.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "H = 10**4 #magnetic field intensity(amp/m)\n",
+ "chi = 3.7*10**-3 #susceptibility\n",
+ "\n",
+ "#Calculation\n",
+ "mew0 = 4*math.pi*10**-7\n",
+ "M = chi*H #magnetisation(A/m)\n",
+ "B = mew0*(M+H) #flux density(Wb/m**2)\n",
+ "B = math.ceil(B*10**5)/10**5 #rounding off to 5 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetisation of material is\",M,\"A/m\"\n",
+ "print \"flux density is\",B,\"Wb/m**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "magnetisation of material is 37.0 A/m\n",
+ "flux density is 0.01262 Wb/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.5, Page number 7.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "I = 500 #current(mA)\n",
+ "d = 10 #diameter(cm)\n",
+ "\n",
+ "#Calculation\n",
+ "I = I*10**-3 #current(A)\n",
+ "r = d/2 #radius(cm)\n",
+ "r = r*10**-2 #radius(m)\n",
+ "A = 2*math.pi*r**2 #area(m**2)\n",
+ "mew_m = I*A #magnetic moment(Am**2)\n",
+ "mew_m = mew_m*10**3\n",
+ "mew_m = math.ceil(mew_m*10**3)/10**3 #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"magnetic moment associated with the loop is\",mew_m,\"*10**-3 Am**2\"\n",
+ "print \"answer given in the book is wrong in the 3rd decimal\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "magnetic moment associated with the loop is 7.854 *10**-3 Am**2\n",
+ "answer given in the book is wrong in the 3rd decimal\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.6, Page number 7.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "r = 5.29*10**-11 #radius of orbit(m)\n",
+ "B = 2 #field applied(T)\n",
+ "e = 1.602*10**-19 #charge of electron(coulomb)\n",
+ "m = 9.108*10**-31 #mass of electron(kg)\n",
+ "\n",
+ "#Calculation\n",
+ "mew_ind = e**2*r**2*B/(4*m) #change in magnetic moment(Am^2)\n",
+ "\n",
+ "#Result\n",
+ "print \"change in magnetic moment is\",round(mew_ind/1e-29,3),\"*10^-29 Am**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "change in magnetic moment is 3.943 *10^-29 Am**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.7, Page number 7.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "chi_1 = 2.8*10**-4 #susceptibility\n",
+ "T1 = 350 #temperature(K)\n",
+ "T2 = 300 #temperature(K)\n",
+ "\n",
+ "#Calculation\n",
+ "#chi = C/T where C is curie constant\n",
+ "chi_2 = chi_1*T1/T2 #susceptibility at 300 K\n",
+ "chi_2 = chi_2*10**4\n",
+ "chi_2 = math.ceil(chi_2*10**3)/10**3 #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"susceptibility at 300 K is\",chi_2,\"*10**-4\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "susceptibility at 300 K is 3.267 *10**-4\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.8, Page number 7.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "d = 8906 #density(kg/m**3)\n",
+ "n = 6.025*10**26 #avagadro number\n",
+ "AW = 58.7 #atomic weight\n",
+ "Bs = 0.65 #magnetic induction(Wb/m**2)\n",
+ "mewB = 9.27*10**-24 \n",
+ "\n",
+ "#Calculation\n",
+ "N = d*n/AW #number of atoms(per m**3)\n",
+ "mew0 = 4*math.pi*10**-7\n",
+ "mew_m = Bs/(N*mew0) #magnetic moment(Am**2)\n",
+ "mew_m = mew_m/mewB #magnetic moment(mewB)\n",
+ "mew_m = math.ceil(mew_m*10**3)/10**3 #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"the magnetic moment of Ni is\",mew_m,\"mewB\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the magnetic moment of Ni is 0.611 mewB\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.9, Page number 7.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "H = 2 #magnetic field(Wb/m**2)\n",
+ "mew = 9.4*10**-24\n",
+ "k = 1.38*10**-23\n",
+ "\n",
+ "#Calculation\n",
+ "#np = C*n0*math.exp(mew*H/(k*T))\n",
+ "#na = C*n0*math.exp(-mew*H/(k*T))\n",
+ "#np/na = exp(mew*H/(k*T))/exp(-mew*H/(k*T)) = exp(2*mew*H/(k*T))\n",
+ "#given np/na = 2. therefore exp(2*mew*H/(k*T)) = 2\n",
+ "T = 2*mew*H/(k*math.log(2)) #temperature(K)\n",
+ "T = math.ceil(T*10**2)/10**2 #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print \"temperature is\",T,\"K\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "temperature is 3.94 K\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example number 7.10, Page number 7.30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#importing modules\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable declaration\n",
+ "AW = 157.26 #atomic weight\n",
+ "d = 7.8*10**3 #density(kg/m**3)\n",
+ "A = 6.025*10**26 #avagadro number\n",
+ "mew0 = 4*math.pi*10**-7\n",
+ "N = d*A/AW #number of atoms 1 kg contains\n",
+ "g = N/10**3 #number of atoms 1 g contains\n",
+ "mew_B = 7.1 #bohr magneton\n",
+ "mew_m = 9.27*10**-24\n",
+ "mew_mg = g*mew_B*mew_m #magnetic moment per gram(Am**2)\n",
+ "mew_mg = math.ceil(mew_mg*10**3)/10**3 #rounding off to 3 decimals\n",
+ "print \"magnetic moment per gram is\",mew_mg,\"Am**2\"\n",
+ "Bs = N*mew0*mew_m #saturation magnetisation(Wb/m**2)\n",
+ "Bs = math.ceil(Bs*10**4)/10**4 #rounding off to 4 decimals\n",
+ "print \"saturation magnetisation is\",Bs,\"Wb/m**2\"\n",
+ "print \"answers given in the book are wrong\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "magnetic moment per gram is 1966.852 Am**2\n",
+ "saturation magnetisation is 0.3482 Wb/m**2\n",
+ "answers given in the book are wrong\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file