Class Progress Basics of Linux, gnuplot, C Visualization of numerical data Roots of nonlinear equations (Midterm 1) Solutions of systems of linear equations Solutions of systems of nonlinear equations Monte Carlo simulation Interpolation of sparse data points Numerical integration (Midterm ) Solutions of ordinary differential equations 1
Helmholtz Coil for Uniform Magnetic Field
Magnetic Field Along Axis of a Single Coil z Bz(z) = z component of magnetic field at coordinate z on the axis of symmetry R B z ( z) = μ I R 3 ( R + z ) y current I R = coil radius x 3
Magnetic Field on Axis of a Helmholtz Coil z R = coil radius D = z distance of the plane of each coil from the z= plane D = R/ for best uniform fields R current I D (Region of approximately uniform magnetic field in z direction) y D x current I 4
Magnetic Field on Axis of a Helmholtz Coil R=1cm D=5cm I=1A -5 1.x1 Both coils Lower coil Upper coil -5 Z component of magnetic field (T) 1x1-6 8x1-6 6x1 4x1-6 x1-6 -.1 -.5.5.1 Z coordinate (m) 5
Magnetic Field on Axis of a Helmholtz Coil R=1cm D=6cm I=1A -5 1.x1 Both coils Lower coil Upper coil Z component of magnetic field (T) 1x1-5 -6 8x1 6x1-6 4x1-6 -6 x1 -.1 -.5.5.1 Z coordinate (m) 6
Magnetic Field on Axis of a Helmholtz Coil R=1cm D=4cm I=1A -5 1.x1 Both coils Lower coil Upper coil Z component of magnetic field (T) 1x1-5 8x1-6 6x1-6 -6 4x1-6 x1 -.1 -.5.5.1 Z coordinate (m) 7
Two-Dimensional Wave Diffraction Patterns (x,y) Observation Screen d1 z y x z=d1 Aperture R r1 θ1 (x1,y1) z= d (x,y) z=-d Point source 8
Review of Phasors Consider any physical system described by a linear second order ODE with constant coefficients, driven by a sinusoid at a fixed frequency and a reference phase: dx dx i ωt + a + b x=c e dt dt Look only for a solution in the form of a steady state sinusoid with unknown amplitude and phase. Form a prototype solution of the form: x= A e i (ω t ϕ) i ϕ i ωt =Ae e Plug prototype solution back into ODE: ω A ei ϕ e i ω t + a i ω A e i ϕ ei ω t + b A ei ϕ e i ω t =c e i ω t Cancel eiωt factors: iϕ iϕ iϕ ω A e + a i ω A e + b A e =c Second order ODE has been transformed into a complex algebraic equation AeiΦ is called the phasor of the solution x 9
Phasor Method for Wave Interference Observation point d1 d E field at observation point = E j from point source j Assume uniform polarization, so for instance E j =E jx x i t i i t E jx =E j e = E j e e E j ei is the 'phasor' from source j is due to path length differences Point source 1 Point source 1
Diffraction Pattern from Single Point Source R=1 D1= D= λ=. x= y= 11
Diffraction Pattern from Single Point Source R=1 D1= D= λ=. x=3 y= 1
Diffraction Pattern from Single Point Source R=1 D1= D= λ=. x=-3 y= 13
Diffraction Pattern from Two Point Sources R=1 D1= D= λ=. x1=-3 y1= x=3 y= 14
Diffraction Pattern from Two Point Sources R=1 D1= D= λ=. x1=-1 y1= x=1 y= 15
Diffraction Pattern from Two Point Sources R=1 D1= D= λ=. x1=- y1= x= y= 16
Simulation of the Poisson Spot RDISC= D1= D= λ=. x= y= 17
One-Dimensional Wave Diffraction Patterns x Observation Screen y=d1 d1 y x Aperture x1 y= x=w/ x=-w/ d x y=-d Point source x= 18
1-Dimensional Diffraction Pattern from Single Point Source 1.9.8 W=1 D1= D= λ=. x= Relative Intensity.7.6.5.4.3..1-1 -5 5 1 X-coordinate 19
1-Dimensional Diffraction Pattern from Single Point Source 1.9.8 W=1 D1= D= λ=. x=-5 Relative Intensity.7.6.5.4.3..1-1 -5 5 1 X-coordinate
1-Dimensional Diffraction Pattern from Single Point Source 1.9.8 W=1 D1= D= λ=. x=5 Relative Intensity.7.6.5.4.3..1-1 -5 5 1 X-coordinate 1
1-Dimensional Diffraction Pattern from Two Point Sources 1.4 1. W=1 D1= D= λ=. x1=5 x=-5 Relative Intensity 1.8.6.4. -1-5 5 1 X-coordinate
1-Dimensional Diffraction Pattern from Two Point Sources 1.8 1.6 1.4 W=1 D1= D= λ=. x1= x=- Relative Intensity 1. 1.8.6.4. -1-5 5 1 X-coordinate 3
1-Dimensional Diffraction Pattern from Two Point Sources.7.6 W=1 D1= D= λ=. x1=3 x=-3 Relative Intensity.5.4.3..1-1 -5 5 1 X-coordinate 4
Plotting Vectors with gnuplot We have used: plot 'efield1.dat' using 1: with lines plot 'efield1.dat' using 1: with points Column with X coordinate Column with Y coordinate Another plot mode: plot 'efield1.dat' using 1::3:4 with vectors Column with starting X coordinate Column with starting Y coordinate Column with X distance Column with Y distance 5
Electric Field Vectors for Dipole 5 15 1 5-5 -1-15 - -5-5 - -15-1 -5 5 1 15 5 6
Electric Field Vectors for Quadrapole 5 15 1 5-5 -1-15 - -5-5 - -15-1 -5 5 1 15 5 7
Electric Field Vectors for Example Arbitrary Charges 5 15 1 5-5 -1-15 - -5-5 - -15-1 -5 5 1 15 5 8
C Code for Mapping Electric Field Vectors xstop = xstop + xinc *.5; ystop = ystop + yinc *.5; rtest = 1.e-6 * (xinc*xinc + yinc*yinc); x = xstart; while (((xinc >.) && (x < xstop)) ((xinc <.) && (x > xstop))) { y = ystart; while (((yinc >.) && (y < ystop)) ((yinc <.) && (y > ystop))) { ex =.; ey =.; i = ; while (i < n) { Loop over n charges. rsq = (x-xi[i])*(x-xi[i]) + (y-yi[i])*(y-yi[i]); double array qi[] hold if (rsq < rtest) break; each charge qi and r = sqrt(rsq); ex += qi[i] * (x-xi[i]) / (r * rsq); double arrays xi[] and yi[] ey += qi[i] * (y-yi[i]) / (r * rsq); hold xi and yi coordinates i++; } if (i >= n) { emag = sqrt(ex*ex + ey*ey); vx = xinc * ex / emag; vy = yinc * ey / emag; printf("%.8g %.8g %.8g %.8g\n",x-.5*vx,y-.5*vy,vx,vy); } y = y + yinc; } x = x + xinc; } 9
Classical Electric Field Lines Note that the vectors plotted by this method only record the direction of the E field vector at an array of sampled points. These are not quite equivalent to the classical field lines, which convey both the direction of the field and its magnitude from the density of drawn lines. 3
Classical Electric Equipotential Lines A simple modification of this algorithm can be used to plot a sampling of the direction of the electric equipotential lines. At a given point, field lines and equipotential lines will have slopes that are negative reciprocals of each other. Again, no magnitude information is present, only direction. 31
Equipotential Vectors for Example Arbitrary Charges 5 15 1 5-5 -1-15 - -5-5 - -15-1 -5 5 1 15 5 3
C Code for Mapping Equipotential Vectors xstop = xstop + xinc *.5; ystop = ystop + yinc *.5; rtest = 1.e-6 * (xinc*xinc + yinc*yinc); x = xstart; while (((xinc >.) && (x < xstop)) ((xinc <.) && (x > xstop))) { y = ystart; while (((yinc >.) && (y < ystop)) ((yinc <.) && (y > ystop))) { ex =.; ey =.; i = ; while (i < n) { rsq = (x-xi[i])*(x-xi[i]) + (y-yi[i])*(y-yi[i]); if (rsq < rtest) break; r = sqrt(rsq); ex += qi[i] * (x-xi[i]) / (r * rsq); ey += qi[i] * (y-yi[i]) / (r * rsq); i++; Only these two } statements change! if (i >= n) { emag = sqrt(ex*ex + ey*ey); vx = -.5 * xinc * ey / emag; vy =.5 * yinc * ex / emag; printf("%.8g %.8g %.8g %.8g\n",x-.5*vx,y-.5*vy,vx,vy); } y = y + yinc; } x = x + xinc; } 33
Examples of Optical Glare Glare is the reflected room light off of an intervening plexiglass protective sheet. Reflections occur at the interface between two materials of different refractive indices. (Vacuum tube arithmetic unit and magnetic drum memory from the Univac 1, on display at the Deutches Museum of Technology, Munich, Germany) 34
Computing Another Kind of Glare: a Rainbow 35
Rene Descartes Graphical Derivation I took my pen and made an accurate calculation of the paths of the rays which fall on the different points of a globe of water to determine at which angles, after two refractions and one or two reflections they will come to the eye, and I then found that after one reflection and two refractions there are many more rays which can be seen at an angle of from forty-one to forty-two degrees than at any smaller angle; and that there are none which can be seen at a larger angle" 36
Calculating Reflection and Refraction Angles (x1,y1) θi1 θ1 (x,y) (x,y) θr1 θ1 Horizontal input ray θn θi θ3 θr (,) Radius r (x3,y3) θi3 Output ray θout θn3 θ3 Spherical water raindrop cross section, index of refraction n θr3 37
Calculating Reflection and Refraction Angles x 1= r y y 1= y θi1 =arctan ( ( ) y1 x1 ) 1 sin (θi1 ) n m1=tan ( θ1 ) Snell's law: θr1=arcsin x = ( ) y θn =arctan x x3 = θ1 =θi1 θr1 x 1 (m 1 1) m1 y 1 1 m +1 θi =θn +θ1 y = y 1 +m 1 ( x x 1 ) θ3=θn +θi = θn +θ1 m3=tan (θ3 ) x (m 3 1) m 3 y 3 m +1 θn3=arctan ( ) y3 x3 y 3= y +m 3 ( x3 x ) θi3 =θn3 θ3 Snell's law: θr3=arcsin ( n sin (θi3 ) ) θout =θn3 θr3 38
Reflection and Refractions through a Raindrop Incoming violet light λ=4nm 1 Spherical raindrop of water, n=1.339 at λ=4nm.5 -.5-1 Reflected light rays to observer on ground -1.5 Many reflection paths bundled at an angle of about 4 below horizontal - -.5-3 - -1.5-1 -.5.5 1 1.5 39
Reflection and Refractions through a Raindrop Incoming red light λ=7nm 1 Spherical raindrop of water, n=1.331 at λ=7nm.5 -.5-1 Reflected light rays to observer on ground -1.5 Many reflection paths bundled at an angle of about 4 below horizontal - -.5-3 - -1.5-1 -.5.5 1 1.5 4
Output Angle Relative to Horizontal Angle reaches a maximum, which concentrates much of the output energy around 4-4 Output angle (degrees) 45 4 35 3 5 15 1 5.1..3.4.5 Incident Y coordinate.6.7.8.9 1.33 1.331 λ=7nm 1.33 (red) 1.333 1.334 1.335 Refractive index 1.336 1.337 1.338 1 1.339 λ=4nm (violet) 41
Total Effect of Many Raindrops is a Rainbow Many raindrops in rainfall Incident white sunlight Red light appears on the top, violet light appears on the bottom Observer 4
Wave Packets for Quantum Mechanics Solutions of the time-independent Schrödinger equation in one dimension d ψ( x) m = [ E V ( x) ] ψ( x) dx ℏ in regions where particles are free to move and not subject to forces, or V (x)= E > and are of the form ψ( x)= A e+ikx +B e ikx which makes the complete solution including the time dependence ψ( x)= A e +i(kx ω t ) i(kx +ω t) +B e p E where k = and ω= ℏ ℏ so the relationship between ω and k is ℏ ω= k m 43
Wave Packets for Quantum Mechanics A single wave solution is associated with a continuous flux of particles in the positive or negative x direction, with momentum p and energy E. Solutions that are linear combinations of multiple waves form wave packets that are associated with single particles. ψ( x)= A k ψk (x) k Or in the continuous limit ψ(x)= A (k )ψ k (x)dk Look at Gaussian wave packets where A k =e a (k k ) Or in the continuous limit a (k k ) A (k )=e 44
Distribution of Wave Numbers Gaussian wavepacket 1 a=1 a= a=.5.8 A(k).6.4. 4 45 5 55 6 k 45
Corresponding Spatial Wave Distribution Gaussian wavepacket 14 a=1 a= a=.5 1 1 Psi(X) 8 6 4-15 -1-5 5 1 15 X 46
Phase and Group Velocities The phase velocity vp of a single wave with particular values of k and ω is the velocity of the point in space that maintains a constant sinusoidal phase ℏ ω vp = = k k m The group velocity vg of a wave packet is the velocity of the peak of spatial distribution ℏ dω vg = (k=k ) = k = v p dk m Where vp is the phase velocity of the single wave at the center of the k distribution Note: p ℏ ℏ p vg = k = = m m ℏ m So it is the wave packet group velocity that corresponds to the velocity p/m in the classical limit 47
Discrete Approximation to Gaussian Packet Gaussian wavepacket, a=1 Real Imaginary 15 1 Psi(X) 5-5 -1-15 - -15-1 -5 5 1 15 X 48
Why Do Wave Packets Form a Pulse? Consider the superposition of just two sine waves of different frequencies. They form a beat frequency where constructive and destructive interference alternate: Wave packets are extensions of this property, with the sum over many frequencies. The region where all the waves line up with constructive interference becomes isolated to a pulse. 49
Quality of Discrete Approximations Gaussian Wave Packet, n=number of component waves 6 n=1 n=3 n=5 n=7 n=9 n=11 n=13 n=17 Magnitude Squared of Psi(x) 5 4 3 1-15 -1-5 5 1 15 X 5
Group Velocity versus Phase Velocity Gaussian wavepacket, a=1, time=5, phase velocity=1 Real Imaginary 15 1 Psi(X) 5-5 -1-15 - -1-5 5 1 15 X 51
Uncertainty Principle of Wave Packets ψ( x) [ x x ] dx Δ x =[ x x ] = ψ( x) dx A (k) [k k ] dk Δ k =[k k ] = A (k) dk then Δ x Δ k 1 4 5