## PHY494 — Topic: Computational Methods in Physics

The course provides an introduction to using the computer as a tool to solve problems in physics. Students will learn to analyze problems, select appropriate numerical algorithms, implement them using Python, a programming language widely used in scientific computing, and critically evaluate their numerical results. Problems will be drawn from diverse areas of physics.

The topics of the class in spring 2016 included applications in electrostatics and heat transfer as well as writing a molecular dynamics code to simulate liquid argon. The Final Projects included navigation in the solar system, real time digital soundeffect processing, and agent-based modeling such as generating a winning strategy for Black Jack.

The class ran the first time in Spring 2016.

## Time and requirements

- Spring 2018: listed as PHY 494, class 26920
- TTh 1:30pm — 2:45pm
- room: PSH 355
- Students will have to contact the Physics Undergraduate Coordinator, Ms Morgan Texeira, to get access to the course.
**PHY 252**is a pre- or co-requisite.

If possible, bring your own laptop (Linux or Mac OS X preferred but we can make Windows work, too).

## Course Description

The course provides a practical introduction to using the computer as a tool to solve problems in physics. Students will learn how to work in a scientific computing environment, to analyze a physical problem, select appropriate numerical algorithms to solve the problem, and to implement them. The course will introduce the students to computer graphics and object oriented design. Students will work in teams, critically evaluate their approaches and results, and present them in a professional manner to their peers. The instructor will introduce problems and guide students to their solution.

This is a three-credit hour course. It will be taught in a computer laboratory setting. The **emphasis is on practical work**, with the instructor initially introducing the problem, and the students then pursuing pre-structured programming exercises and projects. Assessment will primarily focus on projects, including group projects, in which students solve a problem as a small team and present their work as a short report and talk.

In order to facilitate the interactive setting, the capacity will be capped at 24 students.

PHY 252 is a co-requisite.

## Learning outcomes

Students will learn to program computers in order to solve physical problems. In particular, they will be able to write object oriented code in the open source Python programming language, which is widely used in science and engineering and in some of the biggest tech companies such as Google.

Students will also learn how to solve problems in teams and to communicate their work clearly and effectively.

By the completion of the course, students should be able to quickly apply their knowledge to problems they encounter in other courses and experimental and theoretical research projects.

## Possible Topics

(Subject to change.)

- Working in a scientific computing environment: basic Linux and command line.
- Programming in Python (including object oriented programming and use of the numpy library).
- Plotting and visualization with matplotlib.
- Numerics fundamentals: numbers, errors
- Differentiation and Integration
- Ordinary differential equations (ODE), integration of equations of motion
- Partial differential equations (PDE) e.g. Poisson’s equation, wave equation
- Linear algebra (vectors, matrices, eigenvalue problems)
- Use of high performance computing (HPC)

## Books and Resources

### Recommended text books

- Computational Modeling and Visualization of Physical Systems with Python, Jay Wang (2016) Wiley-VCH. ISBN: 978-1-119-17918-4
- Computational Physics: Problem Solving with Python, 3rd Edition, Rubin H. Landau, Manuel J. Páez, Cristian C. Bordeianu. (2015) Wiley-VCH. ISBN: 978-3-527-41315-7

### Additional books and online resources

- Effective Computation in Physics. Field Guide to Research with Python, Anthony Scopatz and Kathryn D. Huff. (2015) O’Reilly
- A Survey of Computational Physics, Rubin Landau, Manuel J. Páez, and Cristian C. Bordeianu. (2011) Princeton University Press. Free online ComPADRE edition and PDF
- Software Carpentry (especially the lessons on the
*Unix Shell*,*Version Control with Git*, and*Programming with Python*)

## Discuss: “PHY494 — Topic: Computational Methods in Physics”