Computational physics examples as IPython Notebooks.

animation, ode, explicit euler method

Simulates the simple pendulum and damped simple pendulum

4th order runge-kutta, Big Bertha, ode, explicit euler method, set of odes

Computing the trajectory of a projectile moving through the air, subject to wind and air drag.

differential equation, animation, Lagrangian, Euler-Lagrange equations, chaos, phase space, odeint

Discusses the chaotic motion of the double pendulum using a phase-space diagram

cavendish, curve fitting, harmonic oscillator, newton, gravity

Analyzes data from the Cavendish experiment using curve fitting. The Gravitational Constant is estimated.

interpolation, animation, gravity, newton, 4th order runge-kutta, cubic splines

The motion of a rolling object on an arbitrary track is analyzed.

4th order runge-kutta, system of equations, animation

The 4th order Runge-Kutta method was used to integrate the equations of motion for the system, then the pendulum was stabilised on its inverted equilibrium point using a proportional gain controller and linear quadratic regulator.

temperature, pressure, simpson's method

Computing planet Mars' atmospheric pressure profile from its temperature profile.

Solving the one-dimensional stationary heat equation with a Gaussian heat source by approximating the solution as a sum of Lagrange polynomials.

ode, gravity, 4th order runge-kutta, einstein, angular momentum, space, fortran, extrapolation, f2py

Computes the precession of Mercury by linear extrapolation.

newton, space, explicit euler method, gravity

Applying the explicit and implicit Euler methods and the fourth order Runge-Kutta method to calculate the trajectory of the Earth around the Sun.

newton, 4th order runge-kutta, space, lagrange, gravity

Studying how a third mass behaves in the effective gravitational potential resulting from two opposing masses (here: Sun and Earth).

differential equation, ode, gravity, newton, 4th order runge-kutta, einstein, angular momentum, space

Discussion of orbits in the Schwarzschild Geometry.

animation, gravity, newton, embedded runge-kutta pair, angular momentum, space

Applying the fourth order Runge-Kutta method and the adaptive step size Runge-Kutta method to calculate the trajectories of three bodies.

newton, animation, semi-implicit euler method, gravity

Explaining the concept and simulating gravitational slingshot of a spacecraft passing a planet.

Solving the Friedmann equations to model the expansion of our universe.

fermat's principle, diffraction, snell's law, refraction

Plotting the paths of light rays travelling through a gradient-index optical fiber.

discrete fourier transform, image filtering

Filters and analyzes images using Fourier transforms.

rayleigh's criterion, einstein, star trek, discrete fourier transform, image filtering

Using Fourier transforms to filter and analyzing hybrid images.

specific heat, partition function, magnetism, spin

Computing the internal energy, specific heat and magnetisation in the 1D and 2D Ising model. An analytical solution to the XY model is also provided.

einstein, animation, brown, diffusion, random walk

A brief introduction to Brownian motion and its connection with diffusion. A system of Brownian particles in 2D is simulated and visualised.

magnetism, metropolis, equilibrium, autocorrelation, monte carlo, ising, spin

Using the Metropolis algorithm to approximate the magnetization and specific heat for a 2D Ising lattice.

eigenenergy, harmonic oscillator, forward shooting, eigenstate

Using the method of forward shooting to determine numerically the eigenenergies of the quantum harmonic oscillator in one dimension.

bloch's theorem, newton's theorem, schrödinger equation

Using Newton's method to calculate the band structure for the simple Dirac comb potential in one dimension.

Computing the size of the hydrogen atom using Monte Carlo integration.

eigenenergy, forward shooting, eigenstate

Calculating the eigenenergies of the lowest states for a one-dimensional double-well potential.

Employing Monte Carlo integration to determine the "shape" of the hydrogen molecule ion.

eigenenergy, forward shooting, eigenstate, schrödinger equation

Using a forward-shooting method to determine the eigenenergies and eigenfunctions of an asymmetric potential in one dimension.

The eigenenergies of a system are found by discretizing the Schrödinger equation and finding the eigenvalues of the resulting matrix.

animation, schrödinger equation, tunneling, scattering

A one-dimensional wave-packet is propagated forward in time for various different potentials.

eigenenergy, eigenstate, schrödinger equation, tunneling, scattering, ehrenfest's theorem, animation

The Time-Dependent Schrödinger equation is solved by expressing the solution as a linear combination of (stationary) solutions of the Time-Independent Schrödinger equation.

eigenenergy, eigenstate, schrödinger equation, waves, spin, hemmer

Solving the time independent Schrödinger equation in one dimension using matrix diagonalisation for five different potentials.

electricity, magnetism, coulomb

Calculates and plots the electric fields and potentials around an arbitrary number of point charges.

4th order runge-kutta, electricity, magnetism, voltage

Using numerical tools to describe and analyse a quadrupole mass spectrometer.

Calculating the total current propagating through a resistor network.

magnetism, Lorentz' law, ode, explicit euler method

Solving Lorentz force law for a charged particle traveling in a uniform magnetic field using Euler's method.

An introduction to the compressible Euler equations and methods for solving them numerically.

Simulating movement of an oil spill outside the norwegian west-coast simplified as dissolvment of a chemical.

explicit euler method, lennard-jones potential

A simple physical model that approximates the interaction between a pair of neutral atoms or molecules.

Self-avoiding random walks on the square lattice are performed using random sampling. The probability distribution of how many steps a random walker uses before it traps itself is studied. The notebook is based on an article by S. and P. C. Hemmer.

witten, fractal, box counting, diffusion, sander, random walk

Describing aggregation using random walk and estimating its fractal dimension

attenuation, radiation, image filtering

Introduces concepts related to computer tomography (CT) and uses this to create a sinogram from a picture and computes the direct back projection.

polymer, hemmer, hansen, lennard-jones potential, sparse matrix, nygård, elasticity

Simulates the disentanglement of a polymer from a surface using an increasing electric field

speed of sound, doppler, discrete fourier transform

Calculating the speed of a passing train by Fourier analysis of the corresponding sound file.

euler, eigenvalue, poisson's equation, integration, interpolation, newton, simpson's method

Analyzing sloshing using a numerical approach based on a linear model, which reduces the problem to a Steklov eigenvalue problem.

sound filtering, beat, nyquist-shannon sampling theorem, discrete fourier transform, music

Programming with sounds and using Fourier transforms to filter sound signals.

curve fitting, radiation, radioactive decay

Introduces curve fitting in Python and uses this to estimate the half-life of the Ba-137m isotope.

monte carlo, electroweak, pythia, feynman diagrams, photon, historgram, neutrino

Uses the event generator Pythia 8.230 to compute the energy spectrum from electron positron annihilation at the Z resonance.