Python lectures and codes for MSPH402B - Computational Physics, taught at the Department of Physics, The University of Burdwan
A repository of all my codes, tutorial lectures and simulations used to teach Computational Physics to masters students at the Department of Physics in The University of Burdwan
The simulations are written in the Python programming language.
The lecture slides can be found @ My Google Drive
The website for this Course is @ https://bit.ly/msph402b
-
For a quick introduction to the Python programming language, as well as Numerical Python, Scientific Python and Matplotlib, see this tutorial
-
For a more detailed introduction to the abovementioned topics, see Robert Johansson's Scientific Python Lectures.
You can run these python codes by installing the requisite software in your computer, or online through Google Colab.
-
Suggested Approach: If you're unable to set up Python on your local machine, you can execute the code using Google Colab. Simply follow the links to the Jupyter notebooks provided below and press the "Open in Colab" button at the top of the notebook. This method is compatible with any device (computer, mobile, or tablet) that has internet connectivity and a standard web browser such as Google Chrome. Please note that the code will be executed on Colab's servers, not on your local machine. Usually, this doesn't cause any issues, but be aware that the servers might sometimes be slow.
-
In order to run these programs locally in your computer (instead of Google Colab), perform the following steps.
- Install GitHub Desktop after downloading it from its website @ desktop.github.com
- Then, download this repository by cloning it using GitHub Desktop (see this doc for details).
- Finally, download and install the anaconda python distribution (anaconda @ https://www.anaconda.com/). Anaconda includes Jupyter notebooks and the Spyder IDE, either of which can be readily used for designing and running python code. Also, see this blog entry on how to install anaconda.
Use the following links:
- Simple code for determining machine precision
- Examples of Numerical Interpolation
- Examples of Solving Systems of Linear Equations
- Numerical Root Finding Examples
- Examples of Numerical Integration of Functions
- Examples of Ordinary Differential Equations (IVP) - Part 1
- Examples of Ordinary Differential Equations (IVP) - Part 2
- Examples of Ordinary Differential Equations (BVP)
- Examples of Fast Fourier Transforms (FFT)
- Examples from Special Topics - Part 1
- Examples from Special Topics - Part 2
- Examples from Special Topics - Part 3
This work is licensed under a MIT License
Analabha Roy
Assistant Professor,
Department of Physics,
The University of Burdwan
Bardhaman, India 713104
Webpage: https://www.ph.utexas.edu/~daneel