Heat (or diffusion) equation is
where u(x, y, t) is the temperature field that varies in space and time, and α is thermal diffusivity constant. The two dimensional Laplacian can be discretized with finite differences as
Given an initial condition (u(t=0) = u0) one can follow the time dependence of the temperature field with explicit time evolution method:
Note: Algorithm is stable only when
Implement two dimensional heat equation with NumPy using the initial temperature field in the file bottle.dat (the file consists of a header and 200 x 200 data array). As a boundary condition use fixed values as given in the initial field. You can start from the skeleton code in the file skeleton.py.