Welcome to the University of Toronto Computational Physics website! We have created this site to help you get started on using computers to help you learn and solve problems in physics. The material is primarily intended for lower-year students enrolled in physics major and specialist courses at the University of Toronto, but anyone should feel free to browse and learn.
For help, contact firstname.lastname@example.org.
The purpose of this website is to help you, a "typical" U of T Physics student, start doing physics on a computer with the Python programming language.
We'll assume that you don't have much background, but if you do, you will be able to fly through some of the material.
This website won't teach how to become an expert programmer. High-quality programming skills are valuable and will make your life easier if you get into big projects, but here we are aiming to get you comfortable using computers in physics:
- For challenging math calculations.
- To model and analyze physical systems.
- To work with experimental and field data.
We want these skills to become part of the toolkit you use every day to do work in physics. In our tutorial materials, and in most of our courses, we emphasizes short programs that teach you a lot about physics.
Here are some important parts of this website:
- Installing Python shows you how to set up Python on your computer at home or your laptop.
- We have a five part tutorial to get you started.
- Tutorial Part 1: intro Python and programming concepts like scripts, variables, and integrated development environments.
- Tutorial Part 2: functions and modules, with a focus on the NumPy module.
- Tutorial Part 3: logicals and statements, if blocks and while loops
- Tutorial Part 4: lists, NumPy arrays, and for loops.
- Tutorial Part 5: NumPy, SciPy and Matplotlib.
- Physics with Pylab: intro to plotting and numerical analysis with Python. (somewhat deprecated; if possible, we recommend you follow Tutorial Part 5 instead)
- Data Analysis with Pylab and SciPy: Python packages for data analysis and visualization.
- Python Reference: Summary of commands and concepts for doing your Python related coursework.
- Fun with Strings: How to manipulate strings, and provides insights into how Python works under the hood.
- Numerical Integration: Important concepts in solving ordinary differential equations on the computer.
- Functions and Modules: How to use and create code packages.
- Questions and Solutions: for practice with concepts covered in the website.
Suggested Study Path for select Physics courses
- 1st year physics (PHY151/152): Tutorial Part 1, Part of Tutorial Part 2, Part of Tutorial Part 3, Part of Tutorial Part 4, Physics with VPython
- 2nd year lecture courses (PHY254): Tutorial Part 1, Tutorial Part 2, Tutorial Part 3, Tutorial Part 4, Tutorial Part 5
- 2nd year practicals (PHY224): Tutorial Part 1, Tutorial Part 2, Tutorial Part 3, Tutorial Part 4, Physics with Pylab, Data Analysis with Pylab and Scipy, Numerical Integration, Functions and Modules, Fun with Strings
- 4th year Computational Physics (PHY407): Tutorial Part 1, Tutorial Part 2, Tutorial Part 3, Tutorial Part 4, Tutorial Part 5
The computation.physics.utoronto.ca site content is Copyright 2009-2021 Department of Physics, University of Toronto.