Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Help, please? need someone to do this python program? we are using matter and interaction book fourth edition as a reference. Thank you Matter &
Help, please? need someone to do this python program?
we are using matter and interaction book fourth edition as a reference.
Thank you
Matter & Interactions 4c VPEM03 Motion in a Dipolc Field Motion in a Dipole Field Objectives Electric fields affect charged particles. In this activity you will predict the motion of a proton in a region near a dipole. Before doing this activity you should have completed activity VPEMO2, Electric Field of a Dipole. It is helpful to have completed activity VP03, Computational Models of Motion, Part 2, which you may have done previously during your study of mechanics. You should also have studied Section 13.9 of the Matter & Interactions 4e textbook. If you have not yet studied either Chapter 6 (The Energy Principle) or Chapter 16 (Electric Poten- tial) through Section 16.7 in Matter & Interactions fe de, you may omit the section on graphing energy in this activity, After completing this activity you should be able to: Animate the motion of one or more charges under the influence of an electric field due to several source charges Monitor the sum of kinetic and potential energy for the system to check the accuracy of model predictions 1 Motion of a Proton Start with a copy of the program you wrote in activity VPEMO2: Electric Field of a Dipole. Make sure that your program calculates and displays the field of a dipole (not a quadrupole). Modify the program by adding a proton, at rest, at location (-3s, 0.0). Make it leave a trail by setting make_trail=True in the constructor. At the end of the program, add a loop to animate the motion of the proton under the influence of the dipole's electric field. Inside this loop, calculate the electric field of the dipole at the current position of the proton. Use a value of about 1 x 10-17s for At, and rate (300). Describe the motion of the proton. Can you explain this motion physically? It may be helpful to comment out the code that calculates and displays the electric field in the yz plane, so you can see the motion more easily. Change the particle to an antiproton. What happens to the particle's motion? Change the particle back to a proton. Position it at location (-33, -23,0). Observe the trajectory, Try giving the proton a small initial P. Try a few other initial positions, keeping the proton at least 38 away from the center of the dipole. Experiment with initial locations that are not on either axis of the dipole. Describe any interesting trajectories you find. Check your work before continuing. 2 Using Energy as a Check You may wonder if the trajectories you observe are reasonable. Recall that significant errors can occur if the proton gets into a region where the field is very large. Under that circumstance, the approximation that is approximately constant during one time step may no longer be valid, and predictions of motion may be very inaccurate. As discussed in Section 6.15, to check the accuracy of our predictions we can monitor the sum of (K +U). In a closed system with no external energy inputs, we should expect that (K +U) constant. Change the beginning lines of your program to this: from --future-- import division, print_function from visual import * from visual.graph import * egraphs-gdisplay(x=600, width=600) ## move graph so it's not on top of scene scene.width = scene.height = 600 Ug - gcurve (color=color.yellow) Kg = gcurve (color=color.cyan) Kug - gcurve (color-color.magenta) Position the proton, at rest, on the perpendicular axis of the dipole. Matter & Interactions 4c VPEMO3 Motion in a Dipole Field For each step inside your motion loop, calculate the kinetic energy of the proton and the electric potential energy of the system of (proton + dipole charges). You need not include the potential energy associated with the interaction of the charges making up the dipole this can be considered part of the internal energy of the dipole, and will not change because the dipole separation will not change. Plot K of the proton, U of the (proton + dipole) system, and the sum of (K + U) as a function of t: Kg.plot(pos=(t,K)) Ug.plot(pos=(t,U)) Kug.plot(pos-(t ,K+U)) Terminate the loop at a value of t sufficiently small that you can examine the details of your graphs (for example, after 3 periods if the motion is periodic). Explain the variations in K and U Is (K +U) constant? Closc cnongh? What might you change in your model to make it more nearly constant? Experiment with other initial positions for the proton. What happens to (K +U) when the proton gets close to one of the dipole charges? 2015-07-20 Matter & Interactions 4c VPEM03 Motion in a Dipolc Field Motion in a Dipole Field Objectives Electric fields affect charged particles. In this activity you will predict the motion of a proton in a region near a dipole. Before doing this activity you should have completed activity VPEMO2, Electric Field of a Dipole. It is helpful to have completed activity VP03, Computational Models of Motion, Part 2, which you may have done previously during your study of mechanics. You should also have studied Section 13.9 of the Matter & Interactions 4e textbook. If you have not yet studied either Chapter 6 (The Energy Principle) or Chapter 16 (Electric Poten- tial) through Section 16.7 in Matter & Interactions fe de, you may omit the section on graphing energy in this activity, After completing this activity you should be able to: Animate the motion of one or more charges under the influence of an electric field due to several source charges Monitor the sum of kinetic and potential energy for the system to check the accuracy of model predictions 1 Motion of a Proton Start with a copy of the program you wrote in activity VPEMO2: Electric Field of a Dipole. Make sure that your program calculates and displays the field of a dipole (not a quadrupole). Modify the program by adding a proton, at rest, at location (-3s, 0.0). Make it leave a trail by setting make_trail=True in the constructor. At the end of the program, add a loop to animate the motion of the proton under the influence of the dipole's electric field. Inside this loop, calculate the electric field of the dipole at the current position of the proton. Use a value of about 1 x 10-17s for At, and rate (300). Describe the motion of the proton. Can you explain this motion physically? It may be helpful to comment out the code that calculates and displays the electric field in the yz plane, so you can see the motion more easily. Change the particle to an antiproton. What happens to the particle's motion? Change the particle back to a proton. Position it at location (-33, -23,0). Observe the trajectory, Try giving the proton a small initial P. Try a few other initial positions, keeping the proton at least 38 away from the center of the dipole. Experiment with initial locations that are not on either axis of the dipole. Describe any interesting trajectories you find. Check your work before continuing. 2 Using Energy as a Check You may wonder if the trajectories you observe are reasonable. Recall that significant errors can occur if the proton gets into a region where the field is very large. Under that circumstance, the approximation that is approximately constant during one time step may no longer be valid, and predictions of motion may be very inaccurate. As discussed in Section 6.15, to check the accuracy of our predictions we can monitor the sum of (K +U). In a closed system with no external energy inputs, we should expect that (K +U) constant. Change the beginning lines of your program to this: from --future-- import division, print_function from visual import * from visual.graph import * egraphs-gdisplay(x=600, width=600) ## move graph so it's not on top of scene scene.width = scene.height = 600 Ug - gcurve (color=color.yellow) Kg = gcurve (color=color.cyan) Kug - gcurve (color-color.magenta) Position the proton, at rest, on the perpendicular axis of the dipole. Matter & Interactions 4c VPEMO3 Motion in a Dipole Field For each step inside your motion loop, calculate the kinetic energy of the proton and the electric potential energy of the system of (proton + dipole charges). You need not include the potential energy associated with the interaction of the charges making up the dipole this can be considered part of the internal energy of the dipole, and will not change because the dipole separation will not change. Plot K of the proton, U of the (proton + dipole) system, and the sum of (K + U) as a function of t: Kg.plot(pos=(t,K)) Ug.plot(pos=(t,U)) Kug.plot(pos-(t ,K+U)) Terminate the loop at a value of t sufficiently small that you can examine the details of your graphs (for example, after 3 periods if the motion is periodic). Explain the variations in K and U Is (K +U) constant? Closc cnongh? What might you change in your model to make it more nearly constant? Experiment with other initial positions for the proton. What happens to (K +U) when the proton gets close to one of the dipole charges? 2015-07-20Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started