Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 1.59 KB

README.md

File metadata and controls

43 lines (33 loc) · 1.59 KB

Two dimensional heat equation

Heat (or diffusion) equation is

img

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

img

Given an initial condition (u(t=0) = u0) one can follow the time dependence of the temperature field with explicit time evolution method:

img

Note: Algorithm is stable only when

img

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. The main program that is provided in heat_main.py can be used as such, implement the required functionality in the module heat.py (look for TODOs).