“Charged particles in magnetic fields”
Learning outcomes assessed
1. Write functions describing the motion of a particle
2. Numerically solve differential equations
3. Plot results
Introduction
The general motion of a charged particle in electric (⃗E) and magnetic (⃗B) fields is governed by
⃗F=q(⃗E+⃗v×⃗B)
where q, m, and ⃗v are the charge, mass, and velocity of the particle, and ⃗Fis the force acting on it. The cross-product operator is available in NumPy as NumPy.cross.
In this assignment, we will analyze the motion of a charged particle by numerically solving the corresponding differential equation.
Be careful and consistent when choosing your units. SI units as in scipy. constants might be a good choice here.
Make sanity checks of your results. Orbits bigger than the Earth is bad, as is particles going faster than the speed of light.
Submission
You need to submit 2 files via studium:
1. Your code as a single .py file. Do not submit code as a PDF, .txt, or anything else.
2. A short report presenting (a) the figures requested in the various questions and (b) a short explanation of the procedures you used to get them. (Note the double usage of the word “short” here.) Submit as a PDF.
Please do not create a ZIP or other archive.
Grading
Grade Criteria
3 (Pass) Substantially correct attempt at mandatory parts. Code quality satisfactory. Report including the required figures.
4 As 3, but good attempt, including some extended parts. Code quality good. Report including the required figures and comments about how you created them.
5 As 4, but excellent attempt, including several extended parts. Code quality is excellent. Report including the required figures and comments about how you created them and what they show.
We’ll make a judgment on the code quality. Good quality code (for this assignment):
- Uses correct naming conventions for variables, functions, constants, etc.
- Sensible names for variables, functions, constants, etc.
- Terse, well-written comments, where appropriate; and to indicate code relating to different sections. Correct spelling.
- Readable; avoids substantial unnecessary complexity and repetition.
- No redundant or unused code.
Mandatory Questions
Question 1
Consider a proton moving in the x-direction in a homogeneous magnetic field with a field axis in the z-direction. The proton has an energy of 1 MeV and the field strength is 3 T. Using an ordinary differential equation solver, follow the motion of this particle for 1 microsecond. Plot and describes the result.
Question 2
Launch the same proton (energy 1 MeV) in the same magnetic field (1 T, parallel to the zaxis), but this time the initial proton velocity has both an x- and a z-component. Follow the motion of this particle for 1 microsecond. Plot and describe the result.
Question 3
Change the magnetic field so that it is cylindrically symmetric around the z-axis. If R is the distance from the z-axis, in m, the magnitude of the magnetic field is 9T/R. The direction of the B-field at any point should be along a ring around z in the clockwise direction.
Launch a 1 MeV proton at R = 3 meters straight up (in the z direction) and plot the first microsecond. Describe the result.
Extended questions
Question 4
Repeat question 2, but make a 3d plot of your results. Depending on how you do that, you will have to include the line from mpl_toolkits.mplot3d import Axes3D in your import section.
Question 5
Repeat question 3, but make a 3d plot of your results.
Question 6
Evaluate the drift velocity in question 3
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme