Texas A&M University Public Partnership & Outreach
MATLAB and Python for Beam and Accelerator Physics
Dan Green, Fermilab Emeritus; Jeff Eldred and Adam Watts, Fermilab
Purpose and Audience
With the advent of personal computing and tools such as MATLAB and Python, it has become much easier to study numerically complex problems in physics, specifically the time evolution of systems.
In this course we will use MATLAB Apps to increase understanding of select concepts from accelerator physics and technology. The aim is not to teach physics from first principles, but rather to display solutions and then have the student explore the effect of changes to the problem parameters and build up an intuitive feel for the solutions. The supplied Apps allow the student to “morph” the given solutions. The course will also cover basic code writing in Python as well as use of the matplotlib, numpy, sympy, and scipy packages. This course is designed for graduate students or advanced undergraduates in physics and engineering. It is also appropriate for scientists and engineers working on accelerator systems who want to gain more experience with programming.
Courses in classical mechanics, special relativity, electrodynamics and mathematical methods for scientists and engineers at a senior undergraduate level or higher; and familiarity with accelerator science at the level of the USPAS course Fundamentals of Accelerator Physics and Technology with Simulations and Measurements Lab or higher are required.
Prior programming experience with MATLAB or Python is not required.
It is the responsibility of the student to ensure that they meet the course prerequisites or have equivalent experience.
On completion of this course, the students are expected to better understand the physical principles of the accelerator systems covered. Students will learn to execute and/or write Python scripts to analyze a variety of accelerator concepts. This will provide a firm basis to extrapolate what they learn to other accelerator systems after completion of the course.
This course includes morning physics instruction through interactive MATLAB apps and afternoon lectures on how to write code in Python. There will be three daily homework exercises to write code in Python, with homework graded and solutions presented the following afternoons. There will also be an individual final projects to write and present a detailed physics program. Students should bring their own laptop or tablet computer to the school to access our Amazon Web Service cloud computers where MATLAB and Python will be installed.
Numerical modeling of physics processes relevant to particle beams in MATLAB, including the use of MATLAB symbolic math and visualization tools. Emphasis will be drawn from the following eight topics applicable to a variety of linear and circular accelerator systems:
Indiana University course number: Physics 671, "Advanced Topics in Accelerator Physics"
Michigan State University course number: PHY 963, "U.S. Particle Accelerator School"
MIT course number: 8.790, "Accelerator Physics"