"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the force acting on the conductor.\n",
"#Determine also the value of the force\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"B = 0.9;# in tesla\n",
"I = 20;# in Amperes\n",
"l = 0.30;# in m\n",
"alpha = 30;# in degree\n",
"u0 = 4*math.pi*1E-7;\n",
"\n",
"#calculation:\n",
"F1 = B*I*l\n",
"F2 = B*I*l*math.sin(alpha*math.pi/180)\n",
"\n",
"#Results\n",
"print \"\\n\\nResult\\n\\n\"\n",
"print \"\\n (a)Force when the conductor is at right angles to the field = \",F1,\" N\\n\"\n",
"print \"\\n (b)Force when the conductor is at 30\u00b0 angle to the field = \",F2,\" N\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Result\n",
"\n",
"\n",
"\n",
" (a)Force when the conductor is at right angles to the field = 5.4 N\n",
"\n",
"\n",
" (b)Force when the conductor is at 30\u00c2\u00b0 angle to the field = 2.7 N"
]
}
],
"prompt_number": 1
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 3, page no. 94
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determine the current required?\n",
"#what is the direction of the force?\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"F = 1.92;# in newton\n",
"B = 1.2;# in tesla\n",
"l = 0.40;# in m\n",
"u0 = 4*math.pi*1E-7;\n",
"\n",
"#calculation:\n",
"I = F/(B*l)\n",
"\n",
"#Results\n",
"print \"\\n\\nResult\\n\\n\"\n",
"print \"\\n (a)Current I = \",I,\" Amperes(A)\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Result\n",
"\n",
"\n",
"\n",
" (a)Current I = 4.0 Amperes(A)"
]
}
],
"prompt_number": 2
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 4, page no. 95
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#calculate the magnitude of the force exerted on the conductor.\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"r = 0.06;# in m\n",
"I = 10;# in Amperes\n",
"l = 0.35;# in m\n",
"Phi = 0.5E-3;# in Wb\n",
"u0 = 4*math.pi*1E-7;\n",
"\n",
"#calculation:\n",
"A = math.pi*r*r\n",
"B = Phi/A\n",
"F = B*I*l\n",
"\n",
"#Results\n",
"print \"\\n\\nResult\\n\\n\"\n",
"print \"\\n (a)Force F = \",round(F,2),\" N\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Result\n",
"\n",
"\n",
"\n",
" (a)Force F = 0.15 N"
]
}
],
"prompt_number": 3
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 6, page no. 95
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#determine the force on each coil side (a) for a single-turn coil,\n",
"#(b) for a coil wound with 300 turns.\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"N1 = 1;# for a single-turn coil\n",
"N2 = 300;# no. of turns\n",
"b = 0.024;# in m\n",
"B = 0.8;# in Tesla\n",
"I = 0.05;# in Amperes\n",
"l = 0.030;# in m\n",
"u0 = 4*math.pi*1E-7;\n",
"\n",
"#calculation:\n",
"#For a single-turn coil,\n",
"F1 = N1*B*I*l\n",
"#for a coil wound with 300 turns.\n",
"F2 = N2*B*I*l\n",
"\n",
"#Results\n",
"print \"\\n\\nResult\\n\\n\"\n",
"print \"\\n (a)For a single-turn coil, force on each coil side = \",F1,\" N\\n\"\n",
"print \"\\n (b)For a 300-turn coil, force on each coil side = \",F2,\" N\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Result\n",
"\n",
"\n",
"\n",
" (a)For a single-turn coil, force on each coil side = 0.0012 N\n",
"\n",
"\n",
" (b)For a 300-turn coil, force on each coil side = 0.36 N"
]
}
],
"prompt_number": 4
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
Example 7, page no. 98
"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#Determine the force exerted on the electron in the field.\n",
"from __future__ import division\n",
"import math\n",
"#initializing the variables:\n",
"Q = 1.6E-19;# in Coulomb\n",
"v = 3E7;# in m/s\n",
"B = 18.5E-6;# in Tesla\n",
"u0 = 4*math.pi*1E-7;\n",
"\n",
"#calculation:\n",
"F = Q*v*B\n",
"\n",
"#Results\n",
"print \"\\n\\nResult\\n\\n\"\n",
"print \"\\n Force exerted on the electron in the field. = \",(F/1E-17),\"E-17 N\\n\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"\n",
"Result\n",
"\n",
"\n",
"\n",
" Force exerted on the electron in the field. = 8.88 E-17 N"
]
}
],
"prompt_number": 5
}
],
"metadata": {}
}
]
}