Computational & Modern Physics
Special relativity, quantum and nuclear physics, Monte Carlo, orbit and PDE solvers, fitting with uncertainties, data acquisition and research computing, all in Python.
Leads to: Physicist
Before you start
This course builds on Scientific Python and Physics for Engineering & Science. Take them first if you are new to the topic.
About this course
A mid-level course for future physicists that joins modern physics to the numerical methods physicists use every day. You will compute time dilation and the Lorentz factor without losing precision; find the energy levels and wavefunctions of a particle in a box; model radioactive decay both exactly and by simulation; estimate integrals with Monte Carlo sampling and quote their error; integrate an orbit with the velocity Verlet method and check energy conservation; solve the heat equation with finite differences and respect the stability limit; fit data with uncertainties and judge the fit with chi-squared; record and analyse real sensor data with a phone or a free microcontroller simulator; and see how clusters, schedulers and reproducible research software work. Prerequisites: Scientific Python and Physics for Engineering & Science. Code activities run Python in your browser with NumPy where it helps. This course teaches knowledge and skills; physicist roles need at least a bachelor's degree in physics, and most research positions in national labs, universities and R&D need a PhD.
Course content
Module 1
Modern Physics
3 lessons · 1h 43mSpecial relativity, the quantum particle in a box and atomic and nuclear physics, each turned into a small Python model.
- 28mSpecial relativityReading
Compute the Lorentz factor, time dilation and length contraction, and avoid the round-off trap at everyday speeds.
- 45mQuantum basicsReading
Explain wavefunctions, probability and quantized energy levels using the particle in a box, and compute them in Python.
- 30mAtomic and nuclear physicsReading
Describe nuclei, binding energy and radiation, and model radioactive decay both exactly and by simulation.
Module 2
Computational Methods
3 lessons · 2h 7mMonte Carlo sampling, orbit integration with velocity Verlet and finite-difference solutions of the heat equation.
- 45mMonte Carlo methodsReading
Estimate integrals and averages by random sampling, quote the statistical error, and model a random walk.
- 22mSimulating motionReading
Integrate a planetary orbit with velocity Verlet, see why Euler's method drifts, and check energy conservation.
- 1hSolving PDEsReading
Solve the 1D heat equation with an explicit finite-difference scheme, respect its stability limit and test it against an exact solution.
Module 3
Physics Data
3 lessons · 1h 34mFitting with uncertainties and chi-squared, recording sensor data, and the clusters and habits behind reproducible research code.
- 35mData analysis and fittingReading
Fit a straight line to data with uncertainties, quote the parameter errors, and judge the fit with chi-squared.
- 27mInstrumentation and DAQReading
Explain sensors, analog-to-digital conversion and sampling, and record and analyse real data from a phone or a simulated microcontroller.
- 32mHPC and research softwareReading
Explain how clusters, schedulers and parallel code work, and the habits that make research software reproducible.