Visualization of numerical data

Similar documents
Numerical integration

Chapter (5) Matter Waves

Superposition of waves (review) PHYS 258 Fourier optics SJSU Spring 2010 Eradat

Problem 8.0 Make Your Own Exam Problem for Midterm II by April 13

The EYE. Physics 1502: Lecture 32 Today s Agenda. Lecture 4. Announcements: Optics. Midterm 2: graded after Thanks Giving

Physics Lecture 40: FRI3 DEC

in Electromagnetics Numerical Method Introduction to Electromagnetics I Lecturer: Charusluk Viphavakit, PhD

Lecture 7. 1 Wavepackets and Uncertainty 1. 2 Wavepacket Shape Changes 4. 3 Time evolution of a free wave packet 6. 1 Φ(k)e ikx dk. (1.

Wavepackets. Outline. - Review: Reflection & Refraction - Superposition of Plane Waves - Wavepackets - ΔΔk Δx Relations

PH 222-3A Spring 2010

Matter Waves. Chapter 5

Where k = 1. The electric field produced by a point charge is given by

LECTURE 4 WAVE PACKETS

Quantum Mechanics for Scientists and Engineers. David Miller

Physics 142 Wave Optics 1 Page 1. Wave Optics 1. For every complex problem there is one solution that is simple, neat, and wrong. H.L.

Chapter 35. Interference

Polarization Mode Dispersion

University of Illinois at Chicago Department of Physics. Quantum Mechanics Qualifying Examination. January 7, 2013 (Tuesday) 9:00 am - 12:00 noon

The Wave Function. Chapter The Harmonic Wave Function

x(t) = R cos (ω 0 t + θ) + x s (t)

Chapter 38 Quantum Mechanics

Solutions: Homework 7

The Quantum Theory of Atoms and Molecules: Waves and Optics. Hilary Term Dr Grant Ritchie

Superposition of electromagnetic waves

Massachusetts Institute of Technology Physics 8.03 Practice Final Exam 3

Physics 208, Spring 2016 Exam #3


Notes on Huygens Principle 2000 Lawrence Rees

Physics 217 Problem Set 1 Due: Friday, Aug 29th, 2008

Chapter 38. Photons and Matter Waves

CBSE 12th Physics 2016 Unsolved Paper Delhi Board ARYAN INSTITUTE

GOVIND VIDYALAYA TAMULIA XII PHYSICS

SOLUTIONS for Homework #2. 1. The given wave function can be normalized to the total probability equal to 1, ψ(x) = Ne λ x.

Physical Optics 2018 Dr. Muwafaq Fadhil Al-Mishlab Third lecture [ Huygens Principle, Interference of light]

The Wave Function. Chapter The Harmonic Wave Function

1. Electricity and Magnetism (Fall 1995, Part 1) A metal sphere has a radius R and a charge Q.

Chapter 33. Electromagnetic Waves

Chapter 18: Scattering in one dimension. 1 Scattering in One Dimension Time Delay An Example... 5

APPLIED OPTICS POLARIZATION

Phys 531 Lecture 27 6 December 2005

p(θ,φ,θ,φ) = we have: Thus:

Physics 234 Homework Chapter 35 Q3, P3, P24, P32, P55, P81, P91. air

Electricity & Optics

Lecture 19 Optical MEMS (1)

Wave properties of matter & Quantum mechanics I. Chapter 5

Exam 4 (Final) Solutions

CHAPTER 5 Wave Properties of Matter and Quantum Mechanics I

Electromagnetic Waves

PHYSICS Units 3 & 4 Written examination (TSSM s 2009 trial exam updated for the current study design) SOLUTIONS

Electromagnetic Waves. Chapter 33 (Halliday/Resnick/Walker, Fundamentals of Physics 8 th edition)

WAVE PACKETS & SUPERPOSITION

Chapter 4. The wave like properties of particle

2426 Required Topics (May 4, 2012 draft) Halliday, FUNDAMENTALS OF PHYSICS, 9e Required topics are in bold text. Optional topics are in normal text.

XI. INTRODUCTION TO QUANTUM MECHANICS. C. Cohen-Tannoudji et al., Quantum Mechanics I, Wiley. Outline: Electromagnetic waves and photons

1 (2n)! (-1)n (θ) 2n

A) n 1 > n 2 > n 3 B) n 1 > n 3 > n 2 C) n 2 > n 1 > n 3 D) n 2 > n 3 > n 1 E) n 3 > n 1 > n 2

REFLECTION AND REFRACTION OF PLANE EM WAVES

Andy Buffler Department of Physics University of Cape Town

Typical anisotropies introduced by geometry (not everything is spherically symmetric) temperature gradients magnetic fields electrical fields

If the wavelength is larger than the aperture, the wave will spread out at a large angle. [Picture P445] . Distance l S

Bound and Scattering Solutions for a Delta Potential

Chapter 1 - The Nature of Light

Problem 1. Part a. Part b. Wayne Witzke ProblemSet #4 PHY ! iθ7 7! Complex numbers, circular, and hyperbolic functions. = r (cos θ + i sin θ)

Name Final Exam May 1, 2017

Electrodynamics HW Problems 06 EM Waves

LC circuit: Energy stored. This lecture reviews some but not all of the material that will be on the final exam that covers in Chapters

David J. Starling Penn State Hazleton PHYS 214

Yell if you have any questions

CHAPTER 6 INTRODUCTION TO SPECTROPHOTOMETRIC METHODS Interaction of Radiation With Matter

CHAPTER 6 INTRODUCTION TO SPECTROPHOTOMETRIC METHODS Interaction of Radiation With Matter

9 The conservation theorems: Lecture 23

Summary of Beam Optics

Wave Packets. Eef van Beveren Centro de Física Teórica Departamento de Física da Faculdade de Ciências e Tecnologia Universidade de Coimbra (Portugal)

Lecture 5: Polarization. Polarized Light in the Universe. Descriptions of Polarized Light. Polarizers. Retarders. Outline

QUANTUM THEORY & ATOMIC STRUCTURE. GENERAL CHEMISTRY by Dr. Istadi

Physics 214 Course Overview

PHY2049 Fall11. Final Exam Solutions (1) 700 N (2) 350 N (3) 810 N (4) 405 N (5) 0 N

Impedance/Reactance Problems

1 Simple Harmonic Oscillator

Path Integrals in Quantum Mechanics

Protocol for drain current measurements

(a) Show that the amplitudes of the reflected and transmitted waves, corrrect to first order


Final Exam. PHY2049 Fall11

Electromagnetic Radiation. Chapter 12: Phenomena. Chapter 12: Quantum Mechanics and Atomic Theory. Quantum Theory. Electromagnetic Radiation

Wave function and Quantum Physics

4E : The Quantum Universe. Lecture 9, April 13 Vivek Sharma

- 1 - θ 1. n 1. θ 2. mirror. object. image

: Imaging Systems Laboratory II. Laboratory 6: The Polarization of Light April 16 & 18, 2002

The above dispersion relation results when a plane wave Ψ ( r,t

Some properties of waves: Huygens principle Superposition Coherence Interference Young s double-slit experiment Thin-film interference

Quantum Theory. Thornton and Rex, Ch. 6

Introduction to Condensed Matter Physics

Topic 4: Waves 4.3 Wave characteristics

Fourier Approach to Wave Propagation

1. In Young s double slit experiment, when the illumination is white light, the higherorder fringes are in color.

Lecture 14: Superposition & Time-Dependent Quantum States

Chapter 12: Phenomena

3-2 Classical E&M Light Waves In classical electromagnetic theory we express the electric and magnetic fields in a complex form. eg.

Neutron interferometry. Hofer Joachim

Transcription:

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