Skip to content
Tutorials Center
My learning

Topics

Computational Physics Tutorial

Learn Computational Physics step by step: 47 lessons in 9 chapters with examples, quizzes, diagrams and practice.

Start learning →

of lessons completed

Getting Started

  1. 1 Course Map: Computational Physics See the whole computational physics course at a glance: who it is for, what you need, how to study it, and a nine-chapter map from Python basics to quantum simulations.
  2. 2 What Is Computational Physics? Learn what computational physics is, how it sits beside theory and experiment, and the model, algorithm, code and check loop behind every trustworthy simulation.
  3. 3 Python and NumPy for Physics Learn the NumPy skills every simulation needs: arrays, linspace, vectorized formulas, slicing, masks, broadcasting and physical constants, with runnable physics examples.
  4. 4 Plotting Physics Data with Matplotlib Learn to draw clear physics plots with Matplotlib: labeled axes with units, error bars, log scales, subplots and residuals, with runnable examples and a checklist.
  5. 5 Chapter 1 Review: Getting Started Review chapter 1 of the computational physics course: the simulation workflow, NumPy arrays, and plotting habits, with a recap table and a ten-question quiz.

Numerical Foundations

  1. 6 Numerical Foundations: Overview Preview chapter 2 of the computational physics course: floating point numbers, derivatives and integrals on a grid, root finding, and the error budget that ties them together.
  2. 7 Floating Point Numbers and Errors Understand IEEE 754 doubles, machine epsilon, overflow, catastrophic cancellation and safe summation, with runnable examples on the quadratic formula and long sums.
  3. 8 Derivatives and Integrals on a Grid Learn finite-difference derivatives, the trapezoid and Simpson rules, orders of accuracy and the error floor from round-off, with runnable Python examples.
  4. 9 Roots and Linear Systems Solve f(x) = 0 with bisection, Newton and SciPy, apply it to Kepler's equation, and solve linear systems such as circuits with numpy.linalg.solve and condition numbers.
  5. 10 Chapter 2 Review: Numerical Foundations Review chapter 2: floating point and round-off, derivatives and integrals on a grid, root finding and linear systems, with a recap table and a ten-question quiz.

Ordinary Differential Equations

  1. 11 Ordinary Differential Equations: Overview Preview chapter 3: how physics becomes ordinary differential equations, how to turn second-order equations into first-order systems, and how the methods in this chapter fit.
  2. 12 Euler's Method Learn Euler's method for ordinary differential equations: the algorithm, why its global error is first order, how to test it, and when a large step makes it unstable.
  3. 13 Runge-Kutta Methods Learn the midpoint and classical fourth-order Runge-Kutta methods, implement RK4 in Python, measure convergence order, and compare accuracy per function evaluation.
  4. 14 Oscillators and Energy: Leapfrog and Verlet Learn why Euler and RK4 drift in energy on oscillators and how symplectic methods such as leapfrog and velocity Verlet keep energy bounded, with a pendulum period test.
  5. 15 Projectile Motion with Air Drag Simulate a projectile with quadratic air drag using scipy solve_ivp and event detection, find the best launch angle, check limits and terminal velocity, and see why drag skews the arc.
  6. 16 Chapter 3 Review: Ordinary Differential Equations Review chapter 3: initial value problems, Euler, Runge-Kutta, symplectic leapfrog and solve_ivp, with a method comparison table and a ten-question quiz.

Monte Carlo Methods

  1. 17 Monte Carlo Methods: Overview Preview chapter 4: how random sampling solves problems in physics, from estimating pi to random walks and the Ising model, and why the error falls as one over the square root of N.
  2. 18 Random Numbers and Sampling Learn how pseudo-random generators work, why seeds matter, and how to sample exponential, Gaussian and direction distributions by inverse transform, Box-Muller and rejection.
  3. 19 Monte Carlo Integration Estimate integrals by averaging random samples, report the standard error, see why the 1/sqrt(N) law holds in any dimension, and cut the variance with importance sampling.
  4. 20 Random Walks and Diffusion Simulate random walks in one and two dimensions, show that the mean squared distance grows linearly with time, and extract the diffusion coefficient from the simulation.
  5. 21 The Ising Model and the Metropolis Algorithm Simulate the 2D Ising model with the Metropolis algorithm: spins, energy, Boltzmann weights, magnetization, the phase transition at Tc = 2.269, and an interactive lattice.
  6. 22 Chapter 4 Review: Monte Carlo Methods Review chapter 4: random numbers and sampling, Monte Carlo integration, random walks and the Metropolis algorithm for the Ising model, with a recap table and a ten-question quiz.

Partial Differential Equations

  1. 23 Chapter overview: partial differential equations See the big picture of numerical PDEs: heat, wave and Laplace equations, why grids work, and what every lesson in this chapter covers.
  2. 24 The heat equation and the FTCS scheme Solve the 1D heat equation on a grid with the explicit FTCS scheme, see why r must stay below one half, and fix it with an implicit method.
  3. 25 The wave equation and the leapfrog scheme Simulate a vibrating string with the leapfrog scheme, learn the CFL stability condition and see the numerical errors that appear when r is below one.
  4. 26 The Laplace equation and relaxation methods Solve the 2D Laplace equation by relaxation: Jacobi, Gauss-Seidel and successive over-relaxation, with iteration counts and a check against exact symmetry.
  5. 27 Chapter 5 review: partial differential equations A one-picture recap of the heat, wave and Laplace solvers, their stability rules, and a ten-question quiz covering the whole chapter.

Molecular Dynamics

  1. 28 Chapter overview: molecular dynamics What molecular dynamics is, how a simulation loop works, and what you will build in this chapter: forces, the Verlet integrator, and measured temperature and pressure.
  2. 29 Forces and boundaries: Lennard-Jones and the minimum image Compute Lennard-Jones forces in Python, apply a cut-off, and use periodic boundaries with the minimum image convention to simulate a bulk fluid.
  3. 30 Velocity Verlet and energy conservation Why molecular dynamics uses velocity Verlet: compare it with Euler, watch energy drift, test time reversibility and choose a safe time step.
  4. 31 Temperature, pressure and structure Turn raw trajectories into physics: kinetic temperature, virial pressure, velocity-rescaling thermostat and the radial distribution function of a Lennard-Jones liquid.
  5. 32 Chapter 6 review: molecular dynamics A recap of the molecular dynamics chapter in one picture and one table, plus a ten-question quiz on forces, integrators, boundaries and measurements.

Quantum Simulations

  1. 33 Chapter overview: quantum simulations A map of numerical quantum mechanics: solving the SchrΓΆdinger equation on a grid, evolving wave packets, and using the variational principle, in natural units.
  2. 34 Energy levels from matrices Solve the 1D time-independent SchrΓΆdinger equation with a finite-difference matrix and scipy: particle in a box, harmonic oscillator and a finite well, with error checks.
  3. 35 Wave packets and tunneling Evolve a quantum wave packet with the split-step Fourier method, watch it hit a barrier, and check the transmitted fraction against the exact tunneling formula.
  4. 36 The variational method Use the variational principle to bound a ground-state energy: trial Gaussians for the quartic oscillator and hydrogen, plus a Monte Carlo local-energy estimate.
  5. 37 Chapter 7 review: quantum simulations One-picture recap of grid eigenvalue solvers, split-step wave packet evolution and the variational principle, with a recap table and a ten-question quiz.

Data Analysis and Projects

  1. 38 Chapter overview: data analysis How to turn simulation output and measurements into results you can defend: fits, uncertainties, spectra and honest reporting, with a map of the chapter.
  2. 39 Fitting models to data Fit lines and curves to data with weighted least squares, read parameter uncertainties from chi-square and covariance, and compare with a bootstrap.
  3. 40 Fourier analysis of signals Find the frequencies hidden in a noisy signal with the FFT. Learn frequency resolution, the Nyquist limit, aliasing and window functions with checked examples.
  4. 41 Chapter 8 review: data analysis A recap of fitting, uncertainty estimation and Fourier analysis in one picture and one table, plus a ten-question quiz mixing the whole chapter.

Projects and Practice

  1. 42 Project: the chaotic double pendulum Simulate a double pendulum with a fourth-order Runge-Kutta integrator, verify energy conservation, and measure how tiny differences in the start grow exponentially.
  2. 43 Project: gravity and the N-body problem Simulate Kepler orbits and the three-body figure-eight with Euler, velocity Verlet and RK4, and learn to audit energy and angular momentum.
  3. 44 Practice set: eight exercises Eight hands-on exercises covering PDEs, molecular dynamics, quantum tunneling, fitting, spectra and convergence, with hints and self-checking Python solutions.
  4. 45 Glossary and units A reference glossary of the terms, symbols and units used in numerical PDEs, molecular dynamics, quantum simulation and data analysis, with flashcards.
  5. 46 One-page cheat sheet A one-page recap with a poster of the key schemes, stability rules and checks, plus a tested mini-library of reference implementations in Python.
  6. 47 Where to go next A roadmap from this course to research-grade simulation: numerical methods, Monte Carlo, statistical mechanics, GPUs and your own project, with a scaling calculator.