- "Snell's Law is a formula used to describe the relation between the angle of incidence ($\\theta_i$) and transmission ($\\theta_t$) when light is incident on an interface between two media having different refractive indices ($n_1$ and $n_2$. The relation is given by : \n",
+ "Snell's Law is a formula used to describe the relation between the angle of incidence ($\\theta_i$) and transmission ($\\theta_t$) when light is incident on an interface between two media having different refractive indices ($n_1$ and $n_2$). The relation is given by : \n",
+ "The polarization of the EM waves is defined as the direction,$\\hat{n}$ of the oscillation ef the electric field $\\vec{E}\\sim\\hat{n}$. Without loss of generality, let us suppose that the wave is propagating in the $\\hat{e}_3$ direction, this implies that the polarization vector can be any linear combination of $\\hat{n} = c_1\\hat{e}_1 + c_2\\hat{e}_2$. We therefore can have the so called vertical and horizonal polarizations:\n",
+ "\n",
+ "However, since we could have any linear combination in $span(\\hat{e}_1,\\hat{e}_2)$, the electric field could oscillate between both $span(\\hat{e}_1,\\hat{e}_3)$ and $span(\\hat{e}_3,\\hat{e}_2)$ planes. These are the elliptical polarizations. In the plot you can chech different combinations of the parameters ($\\theta$, $\\phi_1$, $\\phi_2$). For instance try $(45, 90, 0)$ for a circular polarization and $(\\theta, 0, 0)$ for linear, yet tilted polarizations. Notice that to get the elliptical polarizations it was neccesary to introduce an phase shift between the 1 and 2 components of the electric field. This is, of course, not possible in the vaccum, which we assume always isotropic and homogeneous, but in anisotropic media is very common.\n",
+ "\n",
+ "Now assume further assume that there is an interface described by some plane $span(\\hat{e}_1,\\hat{e}_2)$, the normal to this plane is therefore $span(\\hat{e}_3)$. Consider an incoming wave with wavevector $\\vec{k}$. The plane $span(\\hat{e}_3, \\vec{k})$ is $\\textit{plane of incidence}$. It is common to choose the basis for the description of the polarization states to be precisely the set formed by the parallel ($p$) and perpendicular ($s$) vectors to this plane. Thus, we will commonly find the polarization in terms of $s$-polarization and $p$-polarization."
"where $A$ is the area of the pillowbox lid. Notice that the sides of the pillowbox contribute nothing to the flux. Thus, in the limit as the thickness $\\epsilon \\rightarrow 0 $, we get\n",
"Consider two optical media separated by an interface (diagram needed). A plane wave is propagating toward the interface with a wavevector $\\vec{k}_i$ and angle of incidence $\\theta_i$. The elctric field and magnetic field amplitude of the incident wave is denoted by $E_i$ and $B_i$ respectively. On incidence, the wave will be transmitted (at an angle determined by Snell's Law $sin(\\theta_t) = \\frac{n_1}{n_2} sin(\\theta_i)$ ) as well as reflected (at an angle equal to the angle of incidence $\\theta_i = \\theta_r$). The amplitudes of the reflected and transmitted waves are denoted using subscripts $r$ and $t$ respectively. Our aim is to calculate these amplitudes.\n",
"\n",
"### Approach taken\n",
"\n",
"As the EM wave is transverse, the incident field can be decomposed into $S$ and $P$ polarised components. Then, using EM boundary conditions, we will derive the Fresnel equations for the two cases separately.\n",
"\n",
"### P-polarised light \n",
"\n",
"Due to symmetry, the transmitted and reflected waves will have the same polarisation. \n",
"\n",
"The boundary condition for the electric field becomes: \n",
"Most commonly used optical materials are non-magnetic. In this case, we can approximate $\\mu_1 = \\mu_2 = \\mu_0 $ and the Fresnel equations can be further simplified using Snell's Law (Exercise):\n",
"(First calculations done by Augustus Fresnel in 1820's)\n",
"\n",
"# Introduction: \n",
"\n",
"Incident, reflected and transmitted light (animation for Snell's law) \n",
"\n",
"S and P polarisation (animation)\n",
"\n",
"# Posing the problem:\n",
"\n",
"What happens when light with a known $\\vec{k}$ is incident on a smooth interface which is the boundary between two interfaces with known refractive indices? \n",
"\n",
"# Concepts to be explained first :\n",
"\n",
"- S and P polarisation : \n",
"\n",
"- Boundary conditions for E.M. fields\n",
"\n",
"\n",
"\n",
"For both, 3D interactive figures would aid understanding\n",
"\n",
"# Derivation\n",
"\n",
"### Setup of the problem\n",
"\n",
"Consider two optical media separated by an interface (diagra\n",
"\n",
"Show calculation for derivation of reflection and transmission coefficients for light polarised perpendicular and parallel to the surface.\n",
"\n",
"Plot of coefficients as a function of $\\theta_i$\n",
"Notice that R = $|r|^{2}$ but $T=\\frac{n_{2} \\cos \\theta_{t}}{n_{1} \\cos \\theta_{\\mathrm{i}}}|t|^{2}$ \n",
"\n",
"Explain reason/derivation (different directions of propagation, impedance matching / different media)\n",
"Reflectance and transmittance (derivation and plots w.r.t $\\theta_i$)\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Food for thought / fun questions and applications \n",
"\n",
"Lens flare in photography\n",
"( Simple explaination if we set $\\theta_i = 0$ and use refractive index coeff for glass and air\n",
"\n",
"Windows looking like mirrors if room is lit and it is dark outside\n",
"\n",
"In optics :\n",
"\n",
"Optical fibers working because of TIR\n",
"\n",
"Lasers using elements at Brewster angle to minimise losses.\n",
"\n",
"Extension to multiple surfaces, Interference effect ( Transfer-Matrix method might be mentioned )"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The polarization of the EM waves is defined as the direction,$\\hat{n}$ of the oscillation ef the electric field $\\vec{E}\\sim\\hat{n}$. Without loss of generality, let us suppose that the wave is propagating in the $\\hat{e}_3$ direction, this implies that the polarization vector can be any linear combination of $\\hat{n} = c_1\\hat{e}_1 + c_2\\hat{e}_2$. We therefore can have the so called vertical and horizonal polarizations:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"However, since we could have any linear combination in $span(\\hat{e}_1,\\hat{e}_2)$, the electric field could oscillate between both $span(\\hat{e}_1,\\hat{e}_3)$ and $span(\\hat{e}_3,\\hat{e}_2)$ planes. These are the elliptical polarizations. In the plot you can chech different combinations of the parameters ($\\theta$, $\\phi_1$, $\\phi_2$). For instance try $(45, 90, 0)$ for a circular polarization and $(\\theta, 0, 0)$ for linear, yet tilted polarizations. Notice that to get the elliptical polarizations it was neccesary to introduce an phase shift between the 1 and 2 components of the electric field. This is, of course, not possible in the vaccum, which we assume always isotropic and homogeneous, but in anisotropic media is very common.\n",
"\n",
"Now assume further assume that there is an interface described by some plane $span(\\hat{e}_1,\\hat{e}_2)$, the normal to this plane is therefore $span(\\hat{e}_3)$. Consider an incoming wave with wavevector $\\vec{k}$. The plane $span(\\hat{e}_3, \\vec{k})$ is \\textit{plane of incidence}. It is common to choose the basis for the description of the polarization states to be precisely the set formed by the parallel ($p$) and perpendicular ($s$) vectors to this plane. Thus, we will commonly find the polarization in terms of $s$-polarization and $p$-polarization."
"Gauss Law is used to compute the flux of an electric field through a closed surface, knowing the electric charges contained in it.\n",
"It states that the electric flux through a closed surface $S$ is equal to the sum of the electric charges in the volume $V$ delimited by $S$, divided by the vacuum permitivitty.\n",
"The surface S, called the Gaussian surface, can be simply a theoretical construct to help\n",
"our calculations, or coincide with a real surface."
"- $\\overrightarrow{E} $ is the electrical field\n",
"- $\\rho$ is the volume charge density"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"# Simulation - 2D - Charge moving in and out of surface"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#Figure 2D (Figure2d.jpg) - Field lines from a point source, with the field lines crossing the surfaces to the right.\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For example, when we have a point source, the field lines go from it to the outside. If we take a cut of the space around it, we see that the same numbre of field lines go inside and outside of the space."
- "ax.quiver(point[0], point[1], [p[0] for p in field_lines],[p[1] for p in field_lines], scale=10,width=0.002, color='blue') #angles='xy', scale_units='xy', linewidth=0.15)\n",
+ " ax.quiver(point[0], point[1], [p[0] for p in field_lines],[p[1] for p in field_lines], scale=10,width=0.002, color='blue') #angles='xy', scale_units='xy', linewidth=0.15)\n",
"'\\n1. Show a cicuit diagram with a key to switch between charging and discharging circuits as in the youtube video\\n2. Show the graph of Voltage and Current as a function of time.\\n3. Vary the time as multiples of the time constant. Show how much percent of the total voltage and current is present. May be it can be indicated with two progress bars.\\n\\nRef:\\nhttps://www.youtube.com/watch?v=X5bzjs3ByBU\\nhttps://electronicspani.com/charging-and-discharging-of-capacitor/\\n'"
]
},
- "execution_count": 12,
+ "execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#charge and discharge of a condensator\n",
"\"\"\"\n",
"1. Show a cicuit diagram with a key to switch between charging and discharging circuits as in the youtube video\n",
"2. Show the graph of Voltage and Current as a function of time.\n",
"3. Vary the time as multiples of the time constant. Show how much percent of the total voltage and current is present. May be it can be indicated with two progress bars.\n",
"Let us spend a few minutes to think through the following questions.\n",
"\n",
"Have you seen a flash camera? How is there a sudden burst of light when you click on the flash button? \n",
"\n",
"How does a smart phone touch screen react to your touch?\n",
"\n",
"Where does your computer/smart phone store the so called binary data?\n",
"\n",
"Intriguing...........?\n",
"\n",
"Now, consider a water tank. It has a pipe at the bottom with a valve. The tank can be filled by a pump. It can be emptied when the valve is open. A capacitor is a similar storage tank for the charges, which is filled by a volatage source (pump). It can be filled or emptied gradually leading to its extensive applications in electronic circuits.\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Charging a capacitor\n",
"Let us see the charging and discharging of the circuit through the circuit below.<br>\n",
"Let us begin with the switch in position A, when the circuit closes with voltage source, capacitor and the resistor. The voltage source will start accumulating charge in the capacitor plates through current in the cicuit. The charge accumulates until the voltage across the capacitor is equal the the applied voltage source and then the current stops flowing.\n",
"\n",
"At any given time,\n",
"\n",
"$V_{c}$ = Potential difference across the capacitor.<br>\n",
"$I_{c}$ = The instantaneous charging current.<br>\n",
"By seperation of variables and integrating the equation, we get\n",
"\\begin{equation}\n",
"\\log_e (V-V_c) = -\\frac{t}{CR}+constant\n",
"\\end{equation}<br>\n",
"As $V_c$ = 0 at the beginning (t=0), the constant turns out to be $log_{e}V$.\n",
"The variation of voltage across the capacitor is given by,\n",
"\\begin{equation}\n",
"V_c = V (1 - e^{\\frac{-t}{\\tau}})\n",
"\\end{equation}<br>\n",
"where $\\tau$ = RC is called the time constant. During the time $\\tau$ the capacitor gains 63.2$\\%$ of it's final value.<br><br>\n",
"We can also obtain the relation for charging current as \n",
"\\begin{equation}\n",
"I_c = \\frac{V}{R} e^{\\frac{-t}{\\tau}}\n",
"\\end{equation}\n",
"\n",
"## Charging table\n",
"Time | Volatage ($\\%$ of maximum) | Current ($\\%$ of maximum)\n",
"--- | --- | --- \n",
"0.5$\\tau$|39.3%|60.7%\n",
"0.7$\\tau$|50.3%|49.7%\n",
"1$\\tau$|63.2%|36.8%\n",
"2$\\tau$|86.5%|13.5%\n",
"3$\\tau$|95.0%|5.0%\n",
"4$\\tau$|98.2%|1.8%\n",
"5$\\tau$|99.3%|0.7%\n",
"\n",
"As the charging curve for a RC charging circuit is exponential, the capacitor in reality never becomes 100% fully charged due to the energy stored in the capacitor. So for all practical purposes, after five time constants a capacitor is considered to be fully charged."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Discharging a capacitor\n",
"Let us consider a time much larger than $\\tau$. The capacitor is fully charged. The switch is now flipped to position B, where the circuit closes with just the capacitor and the resistor.<br>\n",
"The potential built across the capacitor will drop through the load R. The discharging current flows in the opposite direction of the charging current as the potential built across the capacitor is opposite to the voltage across the intial source. The relations for voltage and current can be derived as,\n",
"\n",
"\\begin{equation}\n",
"V_c = V. e^{- \\frac{t}{\\tau}}\n",
"\\end{equation}\n",
"\n",
"\\begin{equation}\n",
"I_c = -\\frac{V}{R} e^{\\frac{-t}{\\tau}}\n",
"\\end{equation}\n",
"\n",
"## Discharging table\n",
"Time | Volatage ($\\%$ of maximum) | Current ($\\%$ of maximum)\n",
"--- | --- | --- \n",
"0.5$\\tau$|60.7%|39.3%\n",
"0.7$\\tau$|49.7%|50.3%\n",
"1$\\tau$|36.6%|63.4%\n",
"2$\\tau$|13.5%|86.5%\n",
"3$\\tau$|5.0%|95.0%\n",
"4$\\tau$|1.8%|98.2%\n",
"5$\\tau$|0.7%|99.3%\n",
"\n",
"After five time constants the capacitor is considered to be fully discharged."
]
},
{
"cell_type": "code",
- "execution_count": 13,
+ "execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
- "model_id": "464d089a995f4506b54dcd93263609be",
+ "model_id": "5e260cdc747b4f018f192b5447fce0af",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(Button(description='Charging of Capacitor', style=ButtonStyle()), Button(description='Dischargiβ¦"
" taw[\"args\"][1][i] = True # Toggle i'th trace to \"visible\"\n",
" taws.append(taw)\n",
"\n",
"sliders = [dict(\n",
" active=10,\n",
" currentvalue={\"prefix\": \"Time Constant T : \"},\n",
" pad={\"t\": 90}, #distance of the sliding bar from the x axis\n",
" steps=taws\n",
")]\n",
"\n",
"fig.update_layout(\n",
" sliders=sliders\n",
")\n",
"fig.data[0].visible = True\n",
"fig.show()"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'\\n1. State the expression for both and explain the analogy\\n2. Show both the systems in animation. \\n3. Allow variation of\\n - position and velocity for the mechanical oscillator\\n - current and charge for the LC circuit\\n4. Varying one system should simulatenously affect the other system.\\n5. Show the plots of \\n - Kinetic and potential energy for the mechanical oscillator\\n - Energy from the inductor and capacitor for the LC circuit\\n \\nRef: https://www.youtube.com/watch?v=tIreqOg7zYw\\n'"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Analogy of LC circuit and mechanical oscillator (A spring mass system or Pendulum)\n",
"\"\"\"\n",
"1. State the expression for both and explain the analogy\n",
"2. Show both the systems in animation. \n",
"3. Allow variation of\n",
" - position and velocity for the mechanical oscillator\n",
" - current and charge for the LC circuit\n",
"4. Varying one system should simulatenously affect the other system.\n",
"5. Show the plots of \n",
" - Kinetic and potential energy for the mechanical oscillator\n",
" - Energy from the inductor and capacitor for the LC circuit\n",
"plt.plot(x, U, 'r', label='Electric Field Energy') # plotting t, a separately \n",
"plt.plot(x, E, 'b', label='Total Energy') # plotting t, b separately \n",
"plt.plot(x, K, 'g', label='Magnetic Field Energy') # plotting t, c separately \n",
"plt.xlabel('Q(c)')\n",
"plt.ylabel('energy(j))')\n",
"plt.legend(loc='center')\n",
"plt.title('LC Circuit Energies')\n",
"plt.subplots_adjust(bottom=0.5, wspace=0.35)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'\\n1. Extend the analogy from previous section to the RLC circuit. Add friction to the mechanical oscillator.\\n2. Vary the value of R or the viscous constant to show different damping case. \\n3. Show graphs of the oscillation (position vs time / charge vs time)\\n\\n\\nRef: \\nhttp://www.ux1.eiu.edu/~cfadd/1360/32Ind/RLC.html\\nhttps://www.youtube.com/watch?v=sP1DzhT8Vzo\\nhttps://brilliant.org/wiki/damped-harmonic-oscillators/\\n'"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#RLC circuit. Analogy with damped mechanical oscillator.\n",
"\"\"\"\n",
"1. Extend the analogy from previous section to the RLC circuit. Add friction to the mechanical oscillator.\n",
"2. Vary the value of R or the viscous constant to show different damping case. \n",
"3. Show graphs of the oscillation (position vs time / charge vs time)\n",
"Attempts to describe electromagnetic force started as early as the 18th century. Johann Tobias Mayer (1760) and Henry Cavendish (1762) were the first to suggest the force on magnetic poles and electrically charged objects obey an inverse-square law.\n",
"\n",
"## Miscalculations ;)\n",
"Sir Joseph John Thomson was first in attempting the derivation of the electromagnetic forces on a moving charged particle from Maxwell's equations (1881). In the paper he published, he gave the force as:\n",
"$\\vec{v}$ - velocity of the charged particle<br>\n",
"q - charge of the particle<br>\n",
"$\\vec{B}$ - magnetic field\n",
"\n",
"Thomson had the correct form of the equation, but due to some miscalculations and an incomplete description of the displacement current, included an incorrect scale of one-half at the front of the formula. Oliver Heaviside, who is responsible for the modern vector notation and also applied it to Maxwell's equations, fixed Thomson's mistakes and derived the correct form of the formula. For the modern formulation, Hendrik Lorentz (1892) arrived at the modern form which takes into account the total force from both the electric and magnetic fields.\n",
"It states that, to determine the direction of the magnetic force on a positive moving charge, you point the thumb of the right hand in the direction of $\\vec{v}$, the fingers in the direction of $\\vec{B}$, and a perpendicular to the palm points in the direction of $\\vec{F}.\n",
"\n",
"You can try to remember it with the following trick!<br>\n",
- "\n",
+ "<font color =\"#00cc00\">\n",
"<center>\n",
"$\\vec{v}$ Velocity is just <b>one direction</b> - so the <b>thumb</b> points it<br>\n",
"$\\vec{B}$ Magnetic field has <b>many lines</b> - so the <b>fingers</b> point them<br>\n",
"$\\vec{F}$ Force is in the direction you would <b>push</b> with your <b>palm</b><br>\n",
"</b>\n",
"<center>\n",
+ "</font>\n",
"<br>\n",
"<font color=\"blue\">\n",
"Try to visualize the right hand rule with the illustration below. \n",
"</font>\n"
]
},
{
"cell_type": "code",
- "execution_count": 12,
+ "execution_count": 11,
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"application/javascript": [
"/* Put everything inside the global mpl namespace */\n",
"window.mpl = {};\n",
"\n",
"\n",
"mpl.get_websocket_type = function() {\n",
" if (typeof(WebSocket) !== 'undefined') {\n",
" return WebSocket;\n",
" } else if (typeof(MozWebSocket) !== 'undefined') {\n",
" return MozWebSocket;\n",
" } else {\n",
" alert('Your browser does not have WebSocket support. ' +\n",
"Consider a charged particle which moves perpendicular to a uniform B-field. Since the magnetic force is perpendicular to the direction of travel, a charged particle follows a curved path in a magnetic field. The particle continues to follow this curved path until it forms a complete circle. \n",
"\n",
"As the magnetic force is always perpendicular to velocity, it does no work on the charged particle. The particleβs kinetic energy and speed thus remain constant. The direction of motion is affected but not the speed.\n",
"\n",
"Since the velocity is perpendicular to the magnetic field, the magnetic force experienced by the particle is F = qvB. This supplies the centripetal force $F_{c}$ = $\\frac{mv^{2}}{2}$. Equating the two equations we obtain the radius of the circular motion as\n",
"\\begin{equation}\n",
"r = \\frac{mv}{qB}\n",
"\\end{equation}\n",
"\n",
"The time period of the circular motion is \n",
"\\begin{equation}\n",
"T = \\frac{2\\pi r}{v} = \\frac{2\\pi m}{qB}\n",
"\\end{equation}\n",
"\n",
"If the velocity is not perpendicular to the magnetic field, then we can compare each component of the velocity separately with the magnetic field. \n",
"\n",
"\\begin{equation}\n",
"v_{perpendicular} = v\\: sin \\theta\n",
"\\end{equation}\n",
"\n",
"\\begin{equation}\n",
"v_{parallel} = v\\: cos \\theta\n",
"\\end{equation}\n",
"\n",
"where $theta$ is the angle between v and B.\n",
"\n",
"The component of the velocity perpendicular to the magnetic field produces a magnetic force perpendicular to both this velocity and the field.\n",
"\n",
"The component parallel to the magnetic field creates constant motion along the same direction as the magnetic field. The result is a helical motion\n",
"\n",
"The parallel motion determines the pitch p of the helix, which is the distance between adjacent turns. This distance equals the parallel component of the velocity times the period:\n",
"\\begin{equation}\n",
"p = v\\: cos \\theta\\:T\n",
"\\end{equation}\n",
"\n",
"<font color=\"blue\">\n",
"Observe the helical motion in the illustration below\n",
"</font>\n"
]
},
{
"cell_type": "code",
- "execution_count": 13,
+ "execution_count": 20,
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"application/javascript": [
"/* Put everything inside the global mpl namespace */\n",
"window.mpl = {};\n",
"\n",
"\n",
"mpl.get_websocket_type = function() {\n",
" if (typeof(WebSocket) !== 'undefined') {\n",
" return WebSocket;\n",
" } else if (typeof(MozWebSocket) !== 'undefined') {\n",
" return MozWebSocket;\n",
" } else {\n",
" alert('Your browser does not have WebSocket support. ' +\n",
"The circular motion of the charged particle in a magnetic has various practical applications. Cyclotron is one such device. It is a type of particle accelerator in which charged particles accelerate outwards from the center along a spiral path. The particles are held to a spiral trajectory by a static magnetic field and accelerated by a rapidly varying electric field.\n",
"\n",
"Cyclotrons accelerate charged particle beams using a high frequency alternating voltage which is applied between two βDβ-shaped electrodes (also called βdeesβ). An additional static magnetic field is applied in perpendicular direction to the electrode plane. Every time the particle finishes its half-circle, the electric field just reverses direction and accerates the particle across the gap. So during the next half-circle, the particle has higher velocity and traverses a semi-circle of bigger radius. In this way, the particle traverses a spiral path and comes out with a very high speed.\n",
"\n",
"The time to complete one orbit is:\n",
"\\begin{equation}\n",
"T = \\frac{2\\pi m}{qB}\n",
"\\end{equation}\n",
"which is <b>independant of the radius</b>. Thus each circle is traversed in the same time.\n",
" \n",
"If a particle enters the cyclotron with a velocity $v_{0}$, its velocity at the output end after traversing n circles is given by\n",
"See the illustration below to observe the cyclotron motion with exaggerated middle section. You can see the charge particle accelerating with each crossing.\n",
"</font>\n",
"\n"
]
},
{
"cell_type": "code",
- "execution_count": 14,
+ "execution_count": 12,
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"application/javascript": [
"/* Put everything inside the global mpl namespace */\n",
"window.mpl = {};\n",
"\n",
"\n",
"mpl.get_websocket_type = function() {\n",
" if (typeof(WebSocket) !== 'undefined') {\n",
" return WebSocket;\n",
" } else if (typeof(MozWebSocket) !== 'undefined') {\n",
" return MozWebSocket;\n",
" } else {\n",
" alert('Your browser does not have WebSocket support. ' +\n",
"'\\n1. Start with the charge in circular motion in magnetic field.\\n2. Given an option to switch between parallel and perpendicular electric field.\\n3. Show the path traced by the particle.\\n\\nRef:\\nhttps://cnx.org/contents/I1swyvWa@2/Motion-of-a-charged-particle-in-electric-and-magnetic-fields\\n'"
]
},
- "execution_count": 15,
+ "execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#Motion of charge in Electric and Magenetic field\n",
"\"\"\"\n",
"1. Start with the charge in circular motion in magnetic field.\n",
"2. Given an option to switch between parallel and perpendicular electric field.\n",
+ "Let us consider a bar magnet in a uniform magnetic field $\\vec{B}$. Let m be strength of each pole and 2l its length. The force acting on the North pole is mB along the field and that in the South pole is mB opposite to the field. The magnetic moment M of the bar magnet is M = m* 2l which points in the direction from South pole to North pole.\n",
+ "\n",
+ "## Situation 1\n",
+ "When the magnet is placed parallel to the magnetic field such that the magnetic moment is along the direction of the field, the net force and torque is zero.\n",
+ "If the magnet is placed in this position it remains in the same place. The magenet is in stable equilibrium.\n",
+ "\n",
+ "## Situation 2\n",
+ "When the magnet is placed parallel to the magnetic field such that the magnetic moment is opposite to the direction of the field, the net force and torque is zero.\n",
+ "When released, the magnet swings towards the equlibrium postition. But because of the velocity it gained, it further moves away from the equilibrium and develops a simple Harmonic oscillation.\n",
+ "\n",
+ "If I is the moment of inertia of the bar magnet the torque is given by I$\\alpha$ ($\\alpha$ = $\\frac{d^{2}\\theta}{dt}$ is the angular acceleration). This equals the restoring torque due to the magnetic field.\n",
+ "\n",
+ "At equilibrium, \n",
+ "\\begin{equation}\n",
+ "I \\frac{d^{2}\\theta}{dt} = βmBsin\\theta\n",
+ "\\end{equation}\n",
+ "where $\\theta$ is the angle between the direction of the magnetic moment (m) and the direction of the magnetic field (B).\n",
+ "\n",
+ "For small values of displacement,\n",
+ "\\begin{equation}\n",
+ "I \\frac{d^{2}\\theta}{dt} = βmB\\theta\n",
+ "\\end{equation}\n",
+ "This represents a simple harmonic motion with time period,\n",
+ "\\begin{equation}\n",
+ "T = 2\\pi \\sqrt{\\frac{I}{mB}}\n",
+ "\\end{equation}\n"
+ ]
+ },
{
"cell_type": "code",
- "execution_count": 18,
+ "execution_count": 8,
"metadata": {},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "'\\nMagnetic dipole in uniform field\\n\\n1. Get input from the user for π = 0, 180 or some small angle. It can be a drop down list\\n2. Based on the input show the bar magnet reaching the equilibrium position.\\n - for π = 0, the magnet does not move\\n - for π = 180, the magnet flips\\n - for π = small angle, the magnet oscillates\\n'"
+ ]
+ },
+ "execution_count": 8,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
- "# Magnetic dipole in a uniform B field"
+ "\"\"\"\n",
+ "Magnetic dipole in uniform field\n",
+ "\n",
+ "1. Get input from the user for π = 0, 180 or some small angle. It can be a drop down list\n",
+ "2. Based on the input show the bar magnet reaching the equilibrium position.\n",
+ " - for π = 0, the magnet does not move\n",
+ " - for π = 180, the magnet flips\n",
+ " - for π = small angle, the magnet oscillates\n",