summaryrefslogtreecommitdiff
path: root/Engineering_Physics/chapter4_2.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Engineering_Physics/chapter4_2.ipynb')
-rw-r--r--Engineering_Physics/chapter4_2.ipynb494
1 files changed, 443 insertions, 51 deletions
diff --git a/Engineering_Physics/chapter4_2.ipynb b/Engineering_Physics/chapter4_2.ipynb
index b8bc5e59..80203b2d 100644
--- a/Engineering_Physics/chapter4_2.ipynb
+++ b/Engineering_Physics/chapter4_2.ipynb
@@ -1,6 +1,7 @@
{
"metadata": {
- "name": "chapter4"
+ "name": "",
+ "signature": "sha256:544912fca601384def1f6da3b02bc7431b47e0d8f9efa5f2e7d2a367448daaa6"
},
"nbformat": 3,
"nbformat_minor": 0,
@@ -11,25 +12,50 @@
"cell_type": "heading",
"level": 1,
"metadata": {},
- "source": "Magnetic Properties"
+ "source": [
+ "Magnetic Properties"
+ ]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 4.1, Page number 119"
+ "source": [
+ "Example number 4.1, Page number 119"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "# To calculate the relative permeability of iron\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nH=6.5*10**-4; #magnetic field in T\nM=1.4; #field with iron\n\n#Calculation\nchi=M/H;\nmew_r=1+chi;\nmew_r=math.ceil(mew_r*10**2)/10**2; #rounding off to 2 decimals\n\n#Result\nprint(\"relative permeability of iron is\",mew_r);\n\n#answer given in the book is wrong",
+ "input": [
+ " \n",
+ "#import module\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable decleration\n",
+ "H=6.5*10**-4; #magnetic field in T\n",
+ "M=1.4; #field with iron\n",
+ "\n",
+ "#Calculation\n",
+ "chi=M/H;\n",
+ "mew_r=1+chi;\n",
+ "mew_r=math.ceil(mew_r*10**2)/10**2; #rounding off to 2 decimals\n",
+ "\n",
+ "#Result\n",
+ "print(\"relative permeability of iron is\",mew_r);\n",
+ "\n",
+ "#answer given in the book is wrong"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "('relative permeability of iron is', 2154.85)\n"
+ "text": [
+ "('relative permeability of iron is', 2154.85)\n"
+ ]
}
],
"prompt_number": 2
@@ -38,19 +64,39 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 4.2, Page number 119"
+ "source": [
+ "Example number 4.2, Page number 119"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "# To calculate the relative permeability of ferromagnetic material\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nH=220; #field in amp/m\nM=3300; #magnetisation in amp/m\n\n#Calculation\nchi=M/H;\nmew_r=1+chi;\n\n#Result\nprint(\"relative permeability is\",mew_r);",
+ "input": [
+ " \n",
+ "#import module\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable decleration\n",
+ "H=220; #field in amp/m\n",
+ "M=3300; #magnetisation in amp/m\n",
+ "\n",
+ "#Calculation\n",
+ "chi=M/H;\n",
+ "mew_r=1+chi;\n",
+ "\n",
+ "#Result\n",
+ "print(\"relative permeability is\",mew_r);"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "('relative permeability is', 16.0)\n"
+ "text": [
+ "('relative permeability is', 16.0)\n"
+ ]
}
],
"prompt_number": 3
@@ -59,19 +105,40 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 4.3, Page number 120 *****"
+ "source": [
+ "Example number 4.3, Page number 120 *****"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "# To calculate the change in magnetic moment\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nr=5.29*10**-11; #radius of orbit in m\nB=2; #applied field in Tesla\ne=1.602*10**-19; #charge of electron in coulomb\nm=9.108*10**-31; #mass of electron in kg\n\n#Calculation\nmew=(e**2)*(r**2)*B/(4*m);\n\n#Result\nprint(\"magnetic moment in Am^2 is\",mew);",
+ "input": [
+ " \n",
+ "#import module\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable decleration\n",
+ "r=5.29*10**-11; #radius of orbit in m\n",
+ "B=2; #applied field in Tesla\n",
+ "e=1.602*10**-19; #charge of electron in coulomb\n",
+ "m=9.108*10**-31; #mass of electron in kg\n",
+ "\n",
+ "#Calculation\n",
+ "mew=(e**2)*(r**2)*B/(4*m);\n",
+ "\n",
+ "#Result\n",
+ "print(\"magnetic moment in Am^2 is\",mew);"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "('magnetic moment in Am^2 is', 3.94260574090909e-29)\n"
+ "text": [
+ "('magnetic moment in Am^2 is', 3.94260574090909e-29)\n"
+ ]
}
],
"prompt_number": 5
@@ -80,19 +147,42 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 4.4, Page number 120"
+ "source": [
+ "Example number 4.4, Page number 120"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "# To calculate the intensity of magnetisation and flux density\n\n#import module\nimport math\n\n#Variable decleration\nchi=0.5*10**-5; #susceptibility \nH=10**6; #field strength in amp/m\n\n#Calculation\nmew_0=4*math.pi*10**-7;\nI=chi*H;\nB=mew_0*(I+H);\nB=math.ceil(B*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"intensity of magnetisation in Amp/m is\",I);\nprint(\"flux density in Weber/m^2 is\",B);\n",
+ "input": [
+ " \n",
+ "#import module\n",
+ "import math\n",
+ "\n",
+ "#Variable decleration\n",
+ "chi=0.5*10**-5; #susceptibility \n",
+ "H=10**6; #field strength in amp/m\n",
+ "\n",
+ "#Calculation\n",
+ "mew_0=4*math.pi*10**-7;\n",
+ "I=chi*H;\n",
+ "B=mew_0*(I+H);\n",
+ "B=math.ceil(B*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print(\"intensity of magnetisation in Amp/m is\",I);\n",
+ "print(\"flux density in Weber/m^2 is\",B);\n"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "('intensity of magnetisation in Amp/m is', 5.0)\n('flux density in Weber/m^2 is', 1.257)\n"
+ "text": [
+ "('intensity of magnetisation in Amp/m is', 5.0)\n",
+ "('flux density in Weber/m^2 is', 1.257)\n"
+ ]
}
],
"prompt_number": 7
@@ -101,19 +191,44 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 4.5, Page number 120"
+ "source": [
+ "Example number 4.5, Page number 120"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "# To calculate the average number of bohr magnetons\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\ne=2.86; #edge in armstrong\ne=e*10**-10; #edge in m\nIs=1.76*10**6; #magnetisation in amp/m\nmewB=9.27*10**-24; #1 bohr magneton in amp m^2\n\n#Calculation\nN=2/(e**3); #density per m^3\nmewbar=Is/N;\nmew_bar=mewbar/mewB;\nmew_bar=math.ceil(mew_bar*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"average dipole moment in mewB is\",mew_bar);",
+ "input": [
+ " \n",
+ " \n",
+ "#import module\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable decleration\n",
+ "e=2.86; #edge in armstrong\n",
+ "e=e*10**-10; #edge in m\n",
+ "Is=1.76*10**6; #magnetisation in amp/m\n",
+ "mewB=9.27*10**-24; #1 bohr magneton in amp m^2\n",
+ "\n",
+ "#Calculation\n",
+ "N=2/(e**3); #density per m^3\n",
+ "mewbar=Is/N;\n",
+ "mew_bar=mewbar/mewB;\n",
+ "mew_bar=math.ceil(mew_bar*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print(\"average dipole moment in mewB is\",mew_bar);"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "('average dipole moment in mewB is', 2.221)\n"
+ "text": [
+ "('average dipole moment in mewB is', 2.221)\n"
+ ]
}
],
"prompt_number": 10
@@ -122,19 +237,44 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 4.6, Page number 121 ***"
+ "source": [
+ "Example number 4.6, Page number 121 ***"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "# To calculate the magnetisation and flux density\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nH=10**6; #magnetic field in amp/m\nchi=1.5*10**-3; #susceptibility\n\n#Calculation\nmew_0=4*math.pi*10**-7;\nM=chi*H;\nB=mew_0*(M+H);\n\n#Result\nprint(\"magnetisation in Amp/m is\",M);\nprint(\"flux density in Tesla is\",B);\n\n#answer for flux density given in the book is wrong",
+ "input": [
+ " \n",
+ "#import module\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable decleration\n",
+ "H=10**6; #magnetic field in amp/m\n",
+ "chi=1.5*10**-3; #susceptibility\n",
+ "\n",
+ "#Calculation\n",
+ "mew_0=4*math.pi*10**-7;\n",
+ "M=chi*H;\n",
+ "B=mew_0*(M+H);\n",
+ "\n",
+ "#Result\n",
+ "print(\"magnetisation in Amp/m is\",M);\n",
+ "print(\"flux density in Tesla is\",B);\n",
+ "\n",
+ "#answer for flux density given in the book is wrong"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "('magnetisation in Amp/m is', 1500.0)\n('flux density in Tesla is', 1.258522017028071)\n"
+ "text": [
+ "('magnetisation in Amp/m is', 1500.0)\n",
+ "('flux density in Tesla is', 1.258522017028071)\n"
+ ]
}
],
"prompt_number": 11
@@ -143,19 +283,45 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 4.7, Page number 121"
+ "source": [
+ "Example number 4.7, Page number 121"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "# To calculate the magnetisation and flux density\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nchi=3.7*10**-3; #susceptibility \nH=10**4; #field strength in amp/m\n\n#Calculation\nmew_0=4*math.pi*10**-7;\nM=chi*H;\nB=mew_0*(M+H);\nB=math.ceil(B*10**5)/10**5; #rounding off to 5 decimals\n\n#Result\nprint(\"magnetisation in Amp/m is\",M);\nprint(\"flux density in Weber/m^2 is\",B);\n\n#answer for flux density given in the book is wrong",
+ "input": [
+ " \n",
+ "#import module\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable decleration\n",
+ "chi=3.7*10**-3; #susceptibility \n",
+ "H=10**4; #field strength in amp/m\n",
+ "\n",
+ "#Calculation\n",
+ "mew_0=4*math.pi*10**-7;\n",
+ "M=chi*H;\n",
+ "B=mew_0*(M+H);\n",
+ "B=math.ceil(B*10**5)/10**5; #rounding off to 5 decimals\n",
+ "\n",
+ "#Result\n",
+ "print(\"magnetisation in Amp/m is\",M);\n",
+ "print(\"flux density in Weber/m^2 is\",B);\n",
+ "\n",
+ "#answer for flux density given in the book is wrong"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "('magnetisation in Amp/m is', 37.0)\n('flux density in Weber/m^2 is', 0.01262)\n"
+ "text": [
+ "('magnetisation in Amp/m is', 37.0)\n",
+ "('flux density in Weber/m^2 is', 0.01262)\n"
+ ]
}
],
"prompt_number": 13
@@ -164,19 +330,42 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 4.8, Page number 121"
+ "source": [
+ "Example number 4.8, Page number 121"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "# To calculate the change in magnetic moment\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nr=0.052*10**-9; #radius of orbit in m\nB=1; #magnetic field in Wb/m^2\ne=1.6*10**-19; #charge of electron in coulomb\nm=9.1*10**-31; #mass of electron in kg\n\n#Calculation\ndmew=(e**2)*(r**2)*B/(4*m);\n\n#Result\nprint(\"magnetic moment in Am^2 is\",dmew);\n\n#answer given in the book is wrong",
+ "input": [
+ " \n",
+ "#import module\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable decleration\n",
+ "r=0.052*10**-9; #radius of orbit in m\n",
+ "B=1; #magnetic field in Wb/m^2\n",
+ "e=1.6*10**-19; #charge of electron in coulomb\n",
+ "m=9.1*10**-31; #mass of electron in kg\n",
+ "\n",
+ "#Calculation\n",
+ "dmew=(e**2)*(r**2)*B/(4*m);\n",
+ "\n",
+ "#Result\n",
+ "print(\"magnetic moment in Am^2 is\",dmew);\n",
+ "\n",
+ "#answer given in the book is wrong"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "('magnetic moment in Am^2 is', 1.901714285714286e-29)\n"
+ "text": [
+ "('magnetic moment in Am^2 is', 1.901714285714286e-29)\n"
+ ]
}
],
"prompt_number": 14
@@ -185,19 +374,45 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 4.9, Page number 122"
+ "source": [
+ "Example number 4.9, Page number 122"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "# To calculate the intensity of magnetisation and flux density\n\n#import module\nimport math\n\n#Variable decleration\nchi=-0.5*10**-5; #susceptibility \nH=9.9*10**4; #field strength in amp/m\n\n#Calculation\nmew_0=4*math.pi*10**-7;\nI=chi*H;\nB=mew_0*H*(1+chi);\nI=math.ceil(I*10**4)/10**4; #rounding off to 4 decimals\nB=math.ceil(B*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"intensity of magnetisation in Amp/m is\",I);\nprint(\"flux density in Weber/m^2 is\",B);\n\n#answer for flux density given in the book is wrong ",
+ "input": [
+ " \n",
+ "#import module\n",
+ "import math\n",
+ "\n",
+ "#Variable decleration\n",
+ "chi=-0.5*10**-5; #susceptibility \n",
+ "H=9.9*10**4; #field strength in amp/m\n",
+ "\n",
+ "#Calculation\n",
+ "mew_0=4*math.pi*10**-7;\n",
+ "I=chi*H;\n",
+ "B=mew_0*H*(1+chi);\n",
+ "I=math.ceil(I*10**4)/10**4; #rounding off to 4 decimals\n",
+ "B=math.ceil(B*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print(\"intensity of magnetisation in Amp/m is\",I);\n",
+ "print(\"flux density in Weber/m^2 is\",B);\n",
+ "\n",
+ "#answer for flux density given in the book is wrong "
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "('intensity of magnetisation in Amp/m is', -0.495)\n('flux density in Weber/m^2 is', 0.1245)\n"
+ "text": [
+ "('intensity of magnetisation in Amp/m is', -0.495)\n",
+ "('flux density in Weber/m^2 is', 0.1245)\n"
+ ]
}
],
"prompt_number": 18
@@ -206,19 +421,48 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 4.10, Page number 122"
+ "source": [
+ "Example number 4.10, Page number 122"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "# To calculate the flux density at centre and dipole moment\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nr=6.1*10**-11; #radius of H atom in m\nnew=8.8*10**15; #frequency in rev/sec\ne=1.6*10**-19;\n\n#Calculation\nmew0=4*math.pi*10**-7;\ni=e*new;\nB=(mew0*i)/(2*r);\nmew=i*math.pi*(r**2);\ni=math.ceil(i*10**7)/10**7; #rounding off to 7 decimals\nB=math.ceil(B*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"current in amp is\",i);\nprint(\"magnetic induction in weber/m^2 is\",B);\nprint(\"dipole moment in amp m^2 is\",mew);",
+ "input": [
+ " \n",
+ "#import module\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable decleration\n",
+ "r=6.1*10**-11; #radius of H atom in m\n",
+ "new=8.8*10**15; #frequency in rev/sec\n",
+ "e=1.6*10**-19;\n",
+ "\n",
+ "#Calculation\n",
+ "mew0=4*math.pi*10**-7;\n",
+ "i=e*new;\n",
+ "B=(mew0*i)/(2*r);\n",
+ "mew=i*math.pi*(r**2);\n",
+ "i=math.ceil(i*10**7)/10**7; #rounding off to 7 decimals\n",
+ "B=math.ceil(B*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print(\"current in amp is\",i);\n",
+ "print(\"magnetic induction in weber/m^2 is\",B);\n",
+ "print(\"dipole moment in amp m^2 is\",mew);"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "('current in amp is', 0.0014081)\n('magnetic induction in weber/m^2 is', 14.503)\n('dipole moment in amp m^2 is', 1.645933169972273e-23)\n"
+ "text": [
+ "('current in amp is', 0.0014081)\n",
+ "('magnetic induction in weber/m^2 is', 14.503)\n",
+ "('dipole moment in amp m^2 is', 1.645933169972273e-23)\n"
+ ]
}
],
"prompt_number": 22
@@ -227,19 +471,44 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 4.11, Page number 123"
+ "source": [
+ "Example number 4.11, Page number 123"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "# To calculate the average number of Bohr magnetons\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nIs=1.96*10**6; #saturation magnetisation in amp/m\na=3; #cube edge of iron in armstrong\na=a*10**-10; #cube edge of iron in m\nmew_b=9.27*10**-24; #bohr magneton in amp/m^2\nn=2; #number of atoms per unit cell\n\n#Calculation\nN=n/(a**3);\nmewbar=Is/N;\nmew_ab=mewbar/mew_b;\nmew_ab=math.ceil(mew_ab*10**4)/10**4; #rounding off to 4 decimals\n\n#Result\nprint(\"average number of Bohr magnetons in bohr magneton per atom is\",mew_ab);",
+ "input": [
+ " \n",
+ "#import module\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable decleration\n",
+ "Is=1.96*10**6; #saturation magnetisation in amp/m\n",
+ "a=3; #cube edge of iron in armstrong\n",
+ "a=a*10**-10; #cube edge of iron in m\n",
+ "mew_b=9.27*10**-24; #bohr magneton in amp/m^2\n",
+ "n=2; #number of atoms per unit cell\n",
+ "\n",
+ "#Calculation\n",
+ "N=n/(a**3);\n",
+ "mewbar=Is/N;\n",
+ "mew_ab=mewbar/mew_b;\n",
+ "mew_ab=math.ceil(mew_ab*10**4)/10**4; #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print(\"average number of Bohr magnetons in bohr magneton per atom is\",mew_ab);"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "('average number of Bohr magnetons in bohr magneton per atom is', 2.8544)\n"
+ "text": [
+ "('average number of Bohr magnetons in bohr magneton per atom is', 2.8544)\n"
+ ]
}
],
"prompt_number": 24
@@ -248,19 +517,46 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 4.12, Page number 123"
+ "source": [
+ "Example number 4.12, Page number 123"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "# To calculate the magnetic force and relative permeability\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nI=3000; #magnetisation in amp/m\nB=0.005; #flux density in weber/m^2\n\n#Calculation\nmew0=4*math.pi*10**-7;\nH=(B/mew0)-I;\nmew_r=(I/H)+1;\nH=math.ceil(H*10**3)/10**3; #rounding off to 3 decimals\nmew_r=math.ceil(mew_r*10**3)/10**3; #rounding off to 3 decimals\n\n#Result\nprint(\"magnetic force in amp/m is\",H);\nprint(\"relative permeability is\",mew_r);\n\n#answer given in the book is wrong",
+ "input": [
+ " \n",
+ "#import module\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable decleration\n",
+ "I=3000; #magnetisation in amp/m\n",
+ "B=0.005; #flux density in weber/m^2\n",
+ "\n",
+ "#Calculation\n",
+ "mew0=4*math.pi*10**-7;\n",
+ "H=(B/mew0)-I;\n",
+ "mew_r=(I/H)+1;\n",
+ "H=math.ceil(H*10**3)/10**3; #rounding off to 3 decimals\n",
+ "mew_r=math.ceil(mew_r*10**3)/10**3; #rounding off to 3 decimals\n",
+ "\n",
+ "#Result\n",
+ "print(\"magnetic force in amp/m is\",H);\n",
+ "print(\"relative permeability is\",mew_r);\n",
+ "\n",
+ "#answer given in the book is wrong"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "('magnetic force in amp/m is', 978.874)\n('relative permeability is', 4.065)\n"
+ "text": [
+ "('magnetic force in amp/m is', 978.874)\n",
+ "('relative permeability is', 4.065)\n"
+ ]
}
],
"prompt_number": 28
@@ -269,19 +565,44 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 4.13, Page number 124"
+ "source": [
+ "Example number 4.13, Page number 124"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "# To calculate the permeability\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nH=1800; #magnetising field in amp/m\nphi=3*10**-5; #magnetic flux in weber\nA=0.2; #cross sectional area in cm^2\n\n#Calculation\nA=A*10**-4; #cross sectional area in m^2\nB=phi/A;\nmew=B/H;\nmew=math.ceil(mew*10**8)/10**8 #rounding off to 8 decimals\n\n#Result\nprint(\"the permeability in Henry/m is\",mew);\n\n#answer given in the book is wron",
+ "input": [
+ " \n",
+ "#import module\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable decleration\n",
+ "H=1800; #magnetising field in amp/m\n",
+ "phi=3*10**-5; #magnetic flux in weber\n",
+ "A=0.2; #cross sectional area in cm^2\n",
+ "\n",
+ "#Calculation\n",
+ "A=A*10**-4; #cross sectional area in m^2\n",
+ "B=phi/A;\n",
+ "mew=B/H;\n",
+ "mew=math.ceil(mew*10**8)/10**8 #rounding off to 8 decimals\n",
+ "\n",
+ "#Result\n",
+ "print(\"the permeability in Henry/m is\",mew);\n",
+ "\n",
+ "#answer given in the book is wron"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "('the permeability in Henry/m is', 0.00083334)\n"
+ "text": [
+ "('the permeability in Henry/m is', 0.00083334)\n"
+ ]
}
],
"prompt_number": 31
@@ -290,19 +611,46 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 4.14, Page number 124 ********************"
+ "source": [
+ "Example number 4.14, Page number 124 ********************"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "# To calculate the magnetic dipole moment and torque\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nr=0.04; #radius of circular loop in m\ni=1000; #current in mA\ni=i*10**-3; #current in amp\nB=10**-3; #magnetic flux density in Wb/m^2\ntheta=45; #angle in degrees\n\n#Calculation\nA=math.pi*(r**2);\nmew=i*A;\ntow=i*B*math.cos(theta);\nmew=math.ceil(mew*10**6)/10**6 #rounding off to 6 decimals\n\n#Result\nprint(\"the magnetic dipole moment in amp m^2 is\",mew);\nprint(\"the torque in Nm is\",tow);",
+ "input": [
+ " \n",
+ "#import module\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable decleration\n",
+ "r=0.04; #radius of circular loop in m\n",
+ "i=1000; #current in mA\n",
+ "i=i*10**-3; #current in amp\n",
+ "B=10**-3; #magnetic flux density in Wb/m^2\n",
+ "theta=45; #angle in degrees\n",
+ "\n",
+ "#Calculation\n",
+ "A=math.pi*(r**2);\n",
+ "mew=i*A;\n",
+ "tow=i*B*math.cos(theta);\n",
+ "mew=math.ceil(mew*10**6)/10**6 #rounding off to 6 decimals\n",
+ "\n",
+ "#Result\n",
+ "print(\"the magnetic dipole moment in amp m^2 is\",mew);\n",
+ "print(\"the torque in Nm is\",tow);"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "('the magnetic dipole moment in amp m^2 is', 0.005027)\n('the torque in Nm is', 0.0005253219888177298)\n"
+ "text": [
+ "('the magnetic dipole moment in amp m^2 is', 0.005027)\n",
+ "('the torque in Nm is', 0.0005253219888177298)\n"
+ ]
}
],
"prompt_number": 36
@@ -311,19 +659,39 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 4.15, Page number 125"
+ "source": [
+ "Example number 4.15, Page number 125"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "# To calculate the hysterisis loss per cycle\n\n#import module\nimport math\n\n#Variable decleration\nA=100; #area of hysteris loop in m^2\nB=0.01; #flux density in wb/m^2\nH=40; #magnetic field in amp/m\nM=7650; #atomic weight in kg/m^3\n\n#Calculation\nhl=A*B*H;\n\n#Result\nprint(\"the hysterisis loss per cycle in J/m^3 is\",hl);",
+ "input": [
+ " \n",
+ "#import module\n",
+ "import math\n",
+ "\n",
+ "#Variable decleration\n",
+ "A=100; #area of hysteris loop in m^2\n",
+ "B=0.01; #flux density in wb/m^2\n",
+ "H=40; #magnetic field in amp/m\n",
+ "M=7650; #atomic weight in kg/m^3\n",
+ "\n",
+ "#Calculation\n",
+ "hl=A*B*H;\n",
+ "\n",
+ "#Result\n",
+ "print(\"the hysterisis loss per cycle in J/m^3 is\",hl);"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "('the hysterisis loss per cycle in J/m^3 is', 40.0)\n"
+ "text": [
+ "('the hysterisis loss per cycle in J/m^3 is', 40.0)\n"
+ ]
}
],
"prompt_number": 38
@@ -332,19 +700,43 @@
"cell_type": "heading",
"level": 2,
"metadata": {},
- "source": "Example number 4.17, Page number 125"
+ "source": [
+ "Example number 4.17, Page number 125"
+ ]
},
{
"cell_type": "code",
"collapsed": false,
- "input": "# To calculate the hysterisis power loss and power loss\n\n#import module\nimport math\nfrom __future__ import division\n\n#Variable decleration\nhl=200; #hysterisis loss per cycle in J/m^3\nM=7650; #atomic weight in kg/m^3\nm=100; #magnetisation cycles per second\n\n#Calculation\nhpl=hl*m;\npl=hpl/M;\npl=math.ceil(pl*10**4)/10**4 #rounding off to 4 decimals\n\n#Result\nprint(\"hysterisis power loss per second in watt/m^3 is\",hpl);\nprint(\"the power loss in watt/kg is\",pl); \n",
+ "input": [
+ " \n",
+ "#import module\n",
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#Variable decleration\n",
+ "hl=200; #hysterisis loss per cycle in J/m^3\n",
+ "M=7650; #atomic weight in kg/m^3\n",
+ "m=100; #magnetisation cycles per second\n",
+ "\n",
+ "#Calculation\n",
+ "hpl=hl*m;\n",
+ "pl=hpl/M;\n",
+ "pl=math.ceil(pl*10**4)/10**4 #rounding off to 4 decimals\n",
+ "\n",
+ "#Result\n",
+ "print(\"hysterisis power loss per second in watt/m^3 is\",hpl);\n",
+ "print(\"the power loss in watt/kg is\",pl); \n"
+ ],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
- "text": "('hysterisis power loss per second in watt/m^3 is', 20000)\n('the power loss in watt/kg is', 2.6144)\n"
+ "text": [
+ "('hysterisis power loss per second in watt/m^3 is', 20000)\n",
+ "('the power loss in watt/kg is', 2.6144)\n"
+ ]
}
],
"prompt_number": 40
@@ -352,7 +744,7 @@
{
"cell_type": "code",
"collapsed": false,
- "input": "",
+ "input": [],
"language": "python",
"metadata": {},
"outputs": []