PHY 411-506 Computational Physics 2 Spring 2014 Quiz 1 01/27 1. What do you hope to learn from this course? 2. What do you hope to do with this new knowledge? 3. What do you expect the lectures to do for you? 4. What do you expect the references to do for you? 5. What types of computational problems do you need to solve in your research projects now and/or in the future? 6. What operating system(s) (Linux, Mac, Windows) do you plan to use in this course and why? 7. What programming language(s) are you familiar with and how familiar? 8. How many hours do you think it will take to learn all you need to know from this course? Include everything: lectures, homework, etc. hours/week 1 PHY 411-506 Computational Physics 2 Quiz 2 Spring 2014 01/29 1. Write down Newton’s equation for the Duffing oscillator and explain the physical meaning of the constants and parameters. 2. Describe in words an algorithm to solve Duffing’s equation numerically. 2 PHY 411-506 Computational Physics 2 Quiz 3 Spring 2014 01/31 1. State (1) The Equipartion Theorem, and (2) The Ergodic Hypothesis, and explain any connection(s) between the two. 2. How do the results in the figure illustrate your answers above? 3 PHY 411-506 Computational Physics 2 Quiz 4 Spring 2014 02/3 1. Show that the KdV soliton solution satisfies the KdV equation: u(x, t) = a sech2 [β(x − ct)] , 2. Estimate the speeds of the two solitons in the figure: 4 ∂u ∂u ∂ 3 u =0 + 6u + ∂t ∂x ∂x3 PHY 411-506 Computational Physics 2 Spring 2014 Quiz 5 02/5 1. Explain why the decomposition using L and N is useful in solving this equation: ∂u(x, t) = −δ 2 uxxx − uux = Lu(x, t) + N u(x, t) . ∂t 2. Explain the difference between the two plots: Output of md2.cpp Output of md.cpp 3.5 0.4 "T2.data" "T.data" 0.35 3 Instantaneous Temperature Instantaneous Temperature 0.3 2.5 2 1.5 0.25 0.2 0.15 0.1 1 0.05 0.5 0 0 100 200 300 400 500 600 Time step number 700 800 900 1000 0 5 100 200 300 400 500 600 Time step number 700 800 900 1000 PHY 411-506 Computational Physics 2 Quiz 6 Spring 2014 02/7 1. Explain why Rahman and Verlet chose N = 864 for their MD simulations. What is the next “magic number” in this sequence? 2. Eplain the concept and application of Verlet’s “neighbor list” in Molecular Dynamics. 6 PHY 411-506 Computational Physics 2 Quiz 7 Spring 2014 02/10 1. Rahman’s MD simulation of Argon generates a microcanonical ensemble with fixed volume, energy and number of atoms. How would you set up an MD simulation to generate (1) a canonical ensemble? (2) a grand canonical ensemble? 2. Explain the significance of the Fig. 2 from Rahman’s Argon simulation article: 7 PHY 411-506 Computational Physics 2 Quiz 8 Spring 2014 02/12 1. List the differences between random number sequences derived from physical processes (e.g. tossing a coin, radioactive decays), and the computer-generated random number sequences (e.g. linear congruential, Mersenne Twister). 2. Write a function (C++, Python, or just pseudocode) to generate the symmetric exponential distribution from a sequence of uniform deviates generated by a standard library routine: ( 1 for 0 ≤ x < 1 Generate P (y) = 21 exp(|y|) , −∞ < y < ∞ , given P (x) = 0 otherwise 8 PHY 411-506 Computational Physics 2 Quiz 9 Spring 2014 02/14 1. Explain the concept of importance sampling in Monte Carlo integration. Give and example integrad for which you expect it to be more accurate than uniform sampling. Z N b f (x) dx ' a b−aX (b − a)σf f (xi ) ± √ N i=1 N 2. Write a function (C++, Python, or just pseudocode) to implement the Metropolis Monte Carlo algorithm for your example above. 9 PHY 411-506 Computational Physics 2 Spring 2014 Quiz 10 02/17 1. The interaction energy of the 2-D hard disk gas takes only two values: zero if the disks do not overlap, and ∞ if any two disks do overlap. Explain how this affects the Boltzmann probability P and the Metropolis Monte Carlo algorithm, which uses the ratio w P (xtrial ) P = exp(−E/kT ) , w= . P (xi ) 2. Find (1) the magnetization and (2) total energy of the 2-D Ising spin configuration shown below: M= X si ↓ ↓ ↑ i E = −J X hiji ↑ ↓ ↑ ↓ ↓ ↑ 10 si sj − H X i si PHY 411-506 Computational Physics 2 Spring 2014 Quiz 11 02/19 1. Prove that the average magnetization of a finite system of N Ising spins is zero at any temperature T in zero magnetic field: P −E/kB T configs M e = 0. hM i = P −E/kB T configs e Explain why this proof nevertheless allows for a ferromagnetic phase with non-zero magnetization per spin below Tc = 2.269. 2. Define the symbols and briefly explain the significance of the following formulas for simulating the Ising model: g(r) = hs0 sn i − hs0 ihsn i ∼ e−r/ξ , rd−2+η 11 τ ∼ ξz ∼ 1 νz . |T − Tc | PHY 411-506 Computational Physics 2 Quiz 12 Spring 2014 02/21 1. Simulation data on the Ising model heat capacity C are shown in Figure 3(a) from D.P. Landau, Phys. Rev. B 13, 2997 (1976), where R = N k, Knn = J and kTc /J = 2.269. Explain the dependence of C and the location of its maximum on the number of spins N and temperature T . 2. Explain why the pseudocode on page 497 of Thijssen Computational Physics uses two mutually recursive functions. Can the algorithm be coded using a single recursive function? Can it be coded without recursion? 12 PHY 411-506 Computational Physics 2 Quiz 13 Spring 2014 02/24 1. Explain the data plotted in the figure: 2. Enumerate all distinct self-avoiding walks of lengths 1, 2, 3 starting at (0, 0) on a 2-dimensional square lattice of sites with unit lattice spacing. Draw typical examples. 13 PHY 411-506 Computational Physics 2 Quiz 14 Spring 2014 02/26 1. Identify the cul-de-sacs and the double cul-de-sacs. Draw one more example of each of these two types of dead-end configurations. n = 12 n = 11 n = 13 2. C++ has primitive arrays and the C++ Standard Library provides list and deque containers. Python has builtin list [...] objects and a deque object in the collections standard library. Choose a language and explain the advantages/disadvantages of using each of these data types to store the coordinates of monomers in the reptation algorithm. 14 PHY 411-506 Computational Physics 2 Spring 2014 Quiz 15 02/28 1. Explain the physical origin of the terms in the potential energy function: V (r1 , . . . , rN ) = X kb (` − `0 )2 + bonds + N −1 X N X j=1 i=j+1 X ka (θ − θ0 )2 + X 1 Vn [1 + cos(nω − γ)] 2 torsions angles ) " 12 6 # r0ij qi qj r0ij −2 + i,j rij rij 4π0 rij ( 2. Estimate the numbers of self-avoiding random walks on a 2-d honeycomb lattice and compare with the square lattice: Steps n Square lattice 1 2 3 4 4 12 36 100 Honeycomb 15 PHY 411-506 Computational Physics 2 Quiz 16 Spring 2014 03/3 1. Explain why simulated annealing Monte Carlo helps find the native state. 2. Explain the Unger-Moult genetic algorithm using the configurations shown: 16 PHY 411-506 Computational Physics 2 Quiz 17 Spring 2014 03/5 1. Explain the meaning of the symbols in the Hodgkin-Huxley neuron model equation with the help of a circuit diagram: I = CM dV + ḡ K n4 V − V K + ḡ Na m3 h V − V Na + ḡl (V − Vl ) dt 2. An action potential propagates along a nerve fiber like a soliton. Can you see any similarities between the Hodgkin-Huxley equation above and the Korteweg - de Vries equation below? ∂u ∂ 3 u ∂u + (1 + u) + =0, ∂t ∂x ∂x3 17 PHY 411-506 Computational Physics 2 Spring 2014 Quiz 18 03/7 1. Explain “Fig. 1 Two-dimensional representation of motion in state space.” from Hopfield’s article in Scholarpedia, giving a possible application: 2. Prove Hopfield’s claim that E is a monotonically decreasing function if Tij = Tji , i.e., ∆E < 0 where E=− 1 X Tij Vi Vj , 2 i,j6=i 18 ∆E = −∆Vi X j6=i Tij Vj PHY 411-506 Computational Physics 2 Quiz 19 Spring 2014 03/10 1. Explain the concept and use of “Hamming Distance” in the snapshots of a Hopfield neural network: 2. Explain the differences between (1) Hopfield neural networks, (2) Feed-forward neural networks, and (3) Feed-back neural networks. 19 PHY 411-506 Computational Physics 2 Spring 2014 Quiz 20 03/14 1. Explain how to reduce the generalized eigenvalue problem to an ordinary eigenvalue problem: HC = ESC , N X Hpq Cq = E q=1 N X Spq Cq , p = 1, . . . , N . q=1 2. Compare the Gaussian orbital expectation value of the Coulomb potential with the exact hydrogen ground state expectation value: Z 2 2 1 2πe2 . Vij = −e2 d3 r e−αi r e−αj r = − r αi + αj 20 PHY 411-506 Computational Physics 2 Spring 2014 Quiz 21 03/24 1. Write down the terms in the exact Hamiltonian for a non-relativistic system of electrons and nuclei that are missing in the Born-Oppenheimer approximation HB-O = N −2 N −1 X p2 1 X X 1 X X Zn e2 e2 i + − , 2m 4π0 i=0 j=i+1 |ri − rj | 4π0 i |ri − Rk | i k and explain why they are negligible. 2. Write down the Slater determinant for the 3 electrons in a Lithium atom in its ground state assuming non-interacting Hydrogen-like space and spin wavefunctions. 21 PHY 411-506 Computational Physics 2 Quiz 22 Spring 2014 03/26 1. Explain how the Hartree equation Z 1 2 2 |φ(r1 )|2 3 − ∇0 − + d r1 φ(r0 ) = E 0 φ(r0 ) , 2 r0 |r0 − r1 | differs from the Schrödinger equation Hψ = (T + V )ψ = Eψ for a particle in a potential V (r), and outline an iterative algorithm to solve it for E 0 and φ(r). 2. Define the quantities in the Thomas-Fermi model and explain the physical origin of the three contributions: Z Z Z Z 3 1 n(r)n(r0 ) ETF = (3π 2 )2/3 d3 r [n(r)]5/3 + d3 r vext (r) + d3 r d3 r0 . 10 2 |r − r0 | 22 PHY 411-506 Computational Physics 2 Quiz 23 Spring 2014 03/31 1. Explain the physical origin of the quantities in the Kohn-Sham equations: 1 2 − ∇ + vKS (r) ψk (r) = εk ψk (r) , 2 vKS (r) = − L X `=1 Z` + |r − R` | Z d3 r 0 n(r0 ) + vxc (r) = vext (r) + vH (r) + vxc (r) |r − r0 | 2. Draw a diagram of the Kronig-Penney potential and explain how Bloch’s theorem applies: X ψk (x) = eikx eiKx Ck+K = eikx uk (x) , uk (x + na) = uk (x) . K 23 PHY 411-506 Computational Physics 2 Quiz 24 Spring 2014 04/2 1. Explain the difference between the Variational Method of Topic 4 to find the the electronic ground state energy, and the Variational Monte Carlo Method of Topic 5 to compute the same quantity. 2. Find and sketch the local energy for the Hydrogen atom with Gaussian trial function 2 2 d 1 1 1 d2 + − , EL (r) = H=− HψT,α (r) , ψT,α (r) = e−αr 2 2 dr r dr r ψT,α 24 PHY 411-506 Computational Physics 2 Spring 2014 Quiz 25 04/4 1. Explain the motivation for using the Slater-Jastrow wavefunction in a VMC determination of the Helium atom ground state r12 Ψ(r1 , r2 ) = e−2r1 e−2r2 e 2(1+αr12 ) . 2. Find the local energy in the α = 0 limit of the Slater-Jastrow wavefunction EL = HΨ , Ψ Ψ(r1 , r2 ) = e−2r1 e−2r2 e 25 r12 2 . PHY 411-506 Computational Physics 2 Quiz 26 Spring 2014 04/7 1. Explain how the singularity at r = 0 in the radial Schrödinger equation for a Hydrogen-like atom with nuclear charge Z 2 d 1 d2 Z + − ψ(r) − ψ(r) = Eψ(r) , ψ(r) = e−αr , 2 dr2 r dr r determines a cusp-condition on the variational wave function ψ. 2. Verify the result given for the expectation value of the repulsive electron-electron potential energy in the Helium atom for a Hydrogen-like product wave function. Hint: show that only ` = 0 in the Legendre polynomial expansion contributes. 1 5 ψ = e−αr1 e−αr2 , = α. r12 8 ` ∞ 1 1 1 X r< =p 2 = P` (cos θ) , r12 r> r> r1 − 2r1 r2 cos θ + r22 `=0 26 cos θ = cos θ1 cos θ2 + sin θ1 sin θ2 cos(φ1 − φ2 ) . PHY 411-506 Computational Physics 2 Spring 2014 Quiz 27 04/9 1. Why does the number of random walkers in Diffusion Monte Carlo (DMC) need to be changed at each time step and how does the parameter ET determine the number of walkers to be added or removed? ∂ψ(x, τ ) 1 ∂ 2 ψ(x, τ ) − (V (x) − ET )ψ(x, τ ) = ∂τ 2 ∂x2 2. Show that the following path integral formula obeys the Schrödinger equation for a quantum harmonic oscillator: r mω i mω 2 hx, t|x0 , 0i = exp x + x20 cot(ωt) − 2 x x0 cosec(ωt) . 2πi~ sin(ωt) ~ 2 27 PHY 411-506 Computational Physics 2 Spring 2014 Quiz 28 04/11 1. Evaluate the free particle Green’s function by inserting a complete set P p |pihp| of momentum eigenstates (plane waves) ~2 d2 x . x0 exp − 2m dx2 2. Prove the virial theorem in classical mechanics for the kinetic energy T of N particles with positions rk and net forces Fk 2hT i = − N X k=1 28 hrk · Fk i . PHY 411-506 Computational Physics 2 Spring 2014 Quiz 29 04/14 1. Define the symbols and explain the motivation for the VEGAS step probability function p(x) = 1 , N ∆xi xi − ∆xi ≤ x ≤ xi , i = 1, . . . , N , N X ∆xi = 1 . i=1 2. Explain the “Adaptive Stratified Sampling” strategy implemented by Lepage in his latest Python version of Vegas. 29 PHY 411-506 Computational Physics 2 Quiz 30 Spring 2014 04/16 1. Draw a diagram of a Compton scattering event and explain the symbols in the Klein-Nishina cross section formula 1 dσ = re2 dΩ ω0 ω 2 (ω − ω 0 )2 2 ∗ 2 2 |ε∗ · ε0 | + 1 + |ε · ε | − |ε · ε | 0 0 4ωω 0 2. Write a few lines of code to integrate a function f (x) using VEGAS, and give sample output of running the code explaining what the numbers mean. 30 PHY 411-506 Computational Physics 2 Quiz 31 Spring 2014 04/18 1. Explain the variables in the Drell-Yan cross section formula XZ 1 dσ a1 a2 dσ dx2 dx1 fah11 (x1 , M 2 )fah22 (x2 , M 2 ) EQ 3 (x1 P1 , x2 P2 , M 2 ) . = dΩ a ,a 0 d Q 1 2 2. The effective QED coupling α(Q) is found to increase slowly with energy from 1/137.036 at zero energy to approximately 1/128 at the mass of the Z boson. The QCD coupling αs (Q) decreases with energy. Why do these couplings depend on energy and why do they change in opposite directions? The QED coupling is labeled EM and the SU(3) QCD coupling is labeled 3 in the plot. 31 PHY 411-506 Computational Physics 2 Spring 2014 Quiz 32 04/21 1. Show that the QED Lagrangian density is gauge invariant 1 LQED = ψ̄ [γ µ (i∂µ − eAµ ) − m] ψ − Fµν F µν , Aµ (x) → Aµ (x) − ∂µ χ(x) , ψ(x) → eieχ ψ(x) . 4 2. The Coulomb potential V (r) ∼ 1/r in D = 3 dimensions. How does it depend on r in D = 1 and D = 2 dimensions? Hint: Use Gauss’ Law to get the r dependence of the electric field. 32 PHY 411-506 Computational Physics 2 Quiz 33 Spring 2014 04/23 1. Explain the concepts (1) gauge invariance, (2) plaquette, and (3) Wilson loop in lattice gauge theory. 2. Explain the significance of the figure 33 PHY 411-506 Computational Physics 2 Quiz 34 Spring 2014 04/28 1. Explain the significance of the two metrics, and an application for each: dr2 2 2 2 2 2 2 2 − r dθ + sin θdφ , ds2 = a2 (µ, t)dt2 − b2 (µ, t)dµ2 − R2 (µ, t)dΩ2 , ds = dt + a (t) 1 − kr2 2. If u(r, t) represent fluid velocity, explain the physical meaning of each of the three terms: du ∂u = + (u · ∇)u . dt ∂t 34 4πρR2 b = 1 . PHY 411-506 Computational Physics 2 Quiz 35 1. What is the Riemann problem for the equation Spring 2014 04/30 ∂ ∂t u(x, t) ∂ + c ∂x u(x, t) = 0. Why is it a problem and what is its solution? u(x, 0) x 2. Identify the shock and two contact discontinuities in Sod’s shock tube problem. In which direction does each move, and which has the fastest and which the slowest speeds? 35 PHY 411-506 Computational Physics 2 Quiz 36 Spring 2014 05/2 1. Explain the variables and the basic physics that follows from EF + EG = ~cN 1/3 GN m2B − . R R 2. Find the non-relativistic limit of the TOV equation and give a simple interpretation for a shell of matter at radius r with thickness dr: −1 G dP (r) P (r) 4πr3 P (r) 2Gm(r) = − 2 ρ(r) + 2 m(r) + 1− . dr r c c2 rc2 36 PHY 411-506 Computational Physics 2 Quiz 37 Spring 2014 05/5 1. Explain the figure from Baym-Pethick-Sutherland identifying stable regions and type of star in each: 2. Describe the types of matter modeled by the (1) Fermi-Metropolis-Teller, (2) Baym-Pethick-Sutherland, (3) Baym-BethePethick, and (4) Pandharipande, equations of state. 37 PHY 411-506 Computational Physics 2 Quiz 38 Spring 2014 05/7 1. Explain the symbols in the equations for gravitational collapse: Dt R = U , Dt m = −4πR2 pU , 1 + U 2 − 2m/R ∂p m + 4πR3 p , Dt U = − − +p ∂R t R2 ∂m = 4πR2 . ∂R t 2. Explain the significance of the collapse simulation in the figure: 38 PHY 411-506 Computational Physics 2 Quiz 39 Spring 2014 05/9 1. List the important differences between the Newtonian N -body simulations in Cosmology and Astrophysics, and the Newtonian Molecular Dynamics simulations studied in Topic 1. 2. Explain the meaning and use of the vector j in the equations below. Why is this term not included in Newton’s equations of motion as taught in introductory physics courses? 1 1 rp = r + vδt + aδt2 + jδt3 2 6 1 vp = v + aδt + jδt2 2 39