Sef-Cosistet Simuatios of Beam ad Pasma Systems Fia Exam ( take-home ) S. M. Lud, J.-L. Vay, R. Lehe, ad D. Wikeher Thursday, Jue 16 th, 2016 Probem 1 - Maxwe s equatios ad redudat iformatio. a) Show that the reativistic Vasov equatio { } t + v x + q [E + v B] f(x, p, t) = 0 p with v = impies coservatio of charge with where p γm = p/m [1 + p 2 /(mc) 2 ] 1/2 t ρ + x J = 0 ρ = q J = q d 3 p f d 3 p vf Hit 1: Use the same steps as i Moday s probem 3 a). Hit 2: You are permitted to do this o-reativisticay if you wat. The resut hods either way. b) The 3D Maxwe equatios are iear, 1 st -order-i-time, kiematic equatios for E(x, t), B(x, t) if ρ(x, t) ad J(x, t) are regarded as prescribed sources. 1) How may fied compoets are i E, B? 2) How may equatios are i the stadard set of Maxwe equatios? E = ρ ɛ 0 E = t B B = 0 B = µ 0 J + µ 0 ɛ 0 t E 1
3) What iitia (t = 0) vaues are required for E ad B to sove the Maxwe equatios for E(x, t) ad B(x, t) for a times t with ρ(x, t) ad J(x, t) specified? c) To better uderstad the situatio i b), show that the Maxwe equatios impy that where d) Show that ( E) + 1 2 c 2 t 2 E = µ 0 t J ( B) + 1 c 2 2 t 2 B = µ 0 J µ 0 ɛ 0 = 1 c 2. 6 2 d -order-i-time equatios for 6 fied compoets E, B. E = t B impies that t B = 0. Does this impy that B(x, t) = 0 for a times t if B(x, t = 0) = 0? e) Show that B = µ 0 J + µ 0 ɛ 0 t E ad t ρ + x J = 0 impy that t ( E ρ/ɛ 0) = 0. Does this impy that E = ρ/ɛ 0 for a times t if E = ρ/ɛ 0 at t = 0? f) Show that the Maxwe equatios B = µ 0 J + µ 0 ɛ 0 t E ad E = ρ ɛ 0 impy that t ρ + x J = 0. Does this impy that the Maxwe equatios shoud oy be appied to charge ρ ad curret sources J which ocay coserve charge? g) Based o a) - f), ca we sove Maxwe s equatios for E(x, t) ad B(x, t) for sources ρ ad J satisfyig t ρ + x J = 0 for a times t 0 by oy sovig the two Maxwe equatios provided that E = t B ad B = µ 0J + µ 0 ɛ 0 t E E = ρ ɛ 0 ad B = 0 are satisfied at time t = 0? If yes, does it matter if we use E = ρ/ɛ 0 ad B = 0? Why? 2
Probem 2 - Exteded-steci Maxwe sover Let us cosider the foowig scheme for the 1D Maxwe equatios i vacuum E x +1 E x +1/2 B y +1/2 B y 1/2 +1/2 = c 2 ( ) Ex = +1 E x z (1 α) B y +1/2 +1/2 B y +1/2 1/2 z + α B +1/2 y +3/2 B y +1/2 3/2 3 z where B y ad E x represet the fieds B y ad E x at time ad positio z. a) By performig a Tayor expasio of the B fied to order 2 i z (i.e. with a error term O( z 3 )), show that the expressio Is a approximatio of B z 2 i z. (1 α) B +1/2 y+1/2 B y +1/2 1/2 z + α B +1/2 y+3/2 B y +1/2 3/2 3 z at positio z (ad time ( + 1/2)) which is accurate to order +1/2 Hit: remember that B y +1/2 deotes the B y fied at positio z = (+1/2) z. I other words: +1/2 B y +1/2 = B y +1/2 +1/2 (( + 1/2) z) (with simiar expressios for B y 1/2, B y +1/2 +3/2, B y +1/2 3/2 ). The perform a Tayor expasio aroud z = z. b) By combiig the discrete Maxwe equatios, show that the correspodig discrete propagatio equatio for E x is of the form: E x +1 1 2E x + E x c 2 2 = E x+1 2E x + E x 1 z 2 (1) ad give the expressio of β as a fuctio of α. Hit: Start by evauatig the quatity 1 ( Ex +1 + β E x +2 4E x +1 + 6E x 4E x 1 + E x 2 z 2 (2) E x usig the secod Maxwe equatio from above. c) By assumig that E x is of the form E x E ) x 1 E x = E 0 e ik z iω Show that the discrete dispersio reatio is: ( ) 1 ω c 2 2 si2 = 1 ( ) k z 2 z 2 si2 4α ( ) k z 2 3 z 2 si4 2 3
d) For α < 3/8, show that the right-had side of the above equatio is a growig fuctio of k, for k [0, π/ z]. Ifer the maximum vaue that the right-had takes for k [0, π/ z], ad thus ifer that the Courat imit is CF L = z 1 c 1 4α 3 Remider for stadard formuas: si(x) = eix e ix 2i Probem 3 - Pytho ODE sover Write a pytho script to advace the momets 2 x x x 2 x x x 2 κ x (s) x 2 + d x 2 2κ x (s) x x + ds ỹ 2 = 2 ỹỹ ỹỹ ỹ 2 ỹ 2 κ y (s) ỹ 2 + 2κ y (s) ỹỹ + ( with κ x (s) = κ y (s) = ˆκ cos 2πs ad attice period L p = 0.5 m. L p ) Q x 2 1/2 2[ x 2 1/2 Q x x x 2 1/2 [ x2 1/2 Q ỹ 2 1/2 2[ x 2 1/2 Q ỹỹ ỹ 2 1/2 [ x2 1/2. Use a perveace of Q = 6 10 4, focus stregth ˆκ = 30 meter 2, a) Use a scietific pytho package with a ODE itegrator (e.g. scipy.itegrate.odeit) to evove the secod order momets from a (arbitrary) iitia coditio at s = 0. Hit: use scipy.itegrate.odeit? i ipytho for more iformatio. Ask for hep if you are stuck! b) Appy the resut i a) to advace from the iitia coditio x 2 = ỹ 2 = 1 4 mm2 x x = ỹỹ = 0 x 2 = ỹ 2 = 25 mrad 2 Use matpotib to pot a 2 d order momets o a axia mesh with at east 10 grid poits over 10 attice periods. c) Pot the combiatio of momets correspodig to rms x-emittace ɛ x,rms = x 2 x 2 x x 2 [mm-mrad] vs. s for 10 periods. Shoud you expect this vaue to be costat to umerica precisio? 4
d) Show that iitia coditios at s = 0 ca be foud for some vaues of x 2 ad ỹ 2 with iitia coditios x x = ỹỹ = 0 x 2 = ỹ 2 = 25 mrad 2 such that a momets repeat to umera precisio at s = L p. Is ɛ x,rms sti costat? Hit: Try umerica root fidig from iitia guess vaues of x 2 = ỹ 2. Probem 4 - Aterative partice pusher I order to itegrate the cotiuous equatios of motio dx dt = p ( dp γm dt = q E + p ) γm B (with γ = 1 + p 2 /(mc) 2 ) we choose to use the foowig staggered scheme x +1 x p +1/2 p 1/2 = p+1/2 γ +1/2 m ( ( ) ) = q E + 1 p +1/2 2 γ +1/2 m + p 1/2 γ 1/2 B m (3) (4) where the superscripts, +1/2 ad +1 idicates that the correspodig quatity is take at time, ( + 1/2) ad ( + 1), ad where γ +1/2 = 1 + (p +1/2 ) 2 /(mc) 2 ad γ 1/2 = 1 + (p 1/2 ) 2 /(mc) 2. Whie equatio (3) is easy to covert ito a update equatio (x +1 = x + p+1/2 ), it is γ +1/2 m more difficut to obtai p +1/2 from p 1/2, sice equatio (4) is impicit (i.e. it ivoves p +1/2 i both its right-had side ad eft-had side). The aim of this probem is to obtai the correspodig update equatio. a) Verify that the foowig scheme p = p 1/2 + qe + p 1/2 s s = qb 2γ 1/2 m p +1/2 = p + p +1/2 t t = qb 2γ +1/2 m (5) (6) satisfies equatio (4). Which oe of the two above equatios is impicit? b) By takig the vector product ad scaar product of (6) by t +, show that p +1/2 ca be extracted from this equatio ad reads p +1/2 = 1 1 + t 2 ( p + p t + (p t)t ) (7) Remider: For ay set of 3 vectors a, b, c, oe has (a b) c = (a c)b (b c)a 5
c) I fact, equatio (7) is sti ot expicit, sice the expressio of t (i equatio (3)) depeds o p +1/2, through γ +1/2. Thus, i order to extract p +1/2 expicity from equatio (7), take the foowig steps: From equatio (7), show that the expressio of (p +1/2 ) 2 is: (p +1/2 ) 2 = (p ) 2 + (p t) 2 1 + t 2 (8) Remider: For ay set of two vectors a, b, oe has (a b) (a b) = a 2 b 2 (a b) 2 Usig the otatio show that equatio (8) eads to τ = qb 2m = γ+1/2 t (9) (γ 2 ) 2 + [τ 2 (γ ) 2 ]γ 2 [(u ) 2 + τ 2 ] = 0 (10) where γ is a short-had otatio for γ +1/2 (i other words γ 2 = 1 + (p +1/2 ) 2 /(mc) 2 ) ad where the foowig otatios where used τ 2 = τ 2 u = p τ mc (γ ) 2 = 1 + (p ) 2 (mc) 2 (11) By remarkig that equatio (10) is a secod-order poyomia i γ 2, show that its soutio is: γ = 1 2 (γ ) 2 τ 2 + [(γ ) 2 τ 2 ] 2 + 4u 2 + 4τ 2 (12) d) Summig up a the previous step, i a actua agorithm (e.g. i Pytho) that computes p +1/2 from p 1/2, i which order shoud the foowig steps be executed? i) Compute γ +1/2 (aso deoted here as γ) usig equatio (12) ad equatio (11). ii) Compute s usig equatio (3), ad τ usig equatio (11) iii) Compute p +1/2 usig equatio (7) iv) Compute p from p 1/2 usig equatio (5) v) Compute t from τ ad γ +1/2 (usig equatio (9)) e) Dowoad the script partice_pusher.py from https://raw.githubusercotet.com/remilehe/uspas_exercise/master/partice_pusher. py This is a icompete script that impemets the sover cosidered here. Fid the ies tagged by ## ASSIGNEMENT ad compete them with the appropriate code. f) Ru the script (pytho partice_pusher.py). It itegrates the equatios of motio for a reativistic eectro (γ 100), i a magetic fied of 1 Tesa. What do you expect the motio to be? Are the resuts from the code quatitativey cosistet with the expected Larmor period of τ = 2πγme eb 0 (with B 0 = 1 T, m e = 0.9 10 30 kg ad e = 1.6 10 19 C)? 6