# Wiki

# heateq / Home

## heateq

**heateq** is a small Python/C application that solves or simulates the heat equation in either 1D or 2D. It is intended for demonstrational and experimental purposes only. It's unstable and the interface is subject to change.

### Screenshots

### Installation

Clone the Mercurial repository.

$ hg clone http://bitbucket.org/jeadorf/heateq

Requirements are: numpy, scipy, cairo, gtk. Use Python easy_install for installation, for example:

$ easy_install --user .

### Usage

Simulate the 1D heat equation with constant boundary conditions:

$ heateq

Simulate the 2D heat equation on a 100x100 grid with sinusoid boundary conditions, i.e. the temperature at the boundary is a sinus function:

$ heateq -D 2 -m 100 -n 100

Change the diffusivity of the material in the interior of the simulated region:

$ heateq -D 2 -m 100 -n 100 -d 20000

Solve the 2D heat equation of a cooking pot heated from below.

$ heateq -s -m 35 -n 35 -D 2

### Tests

When nosetests is installed, you can run the tests from the repository root directory via

$ nosetests -v

### Troubleshooting

This software has most recently been tested on 2013-01-07 on Arch Linux. Please report, if you experience any troubles.

### Theory

Uses finite differences to approximate the Laplace operator.

[Bungartz2009] http://www.springer.com/computer/theoretical+computer+science/book/978-3-540-79809-5

Updated