Skip to content
/ heat Public

Heat simulation of a 2D plate using the finite difference method

Notifications You must be signed in to change notification settings

ollenurb/heat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heat

Heat is a real time 2D heat equation solver. It uses SDL2 to simulate a hypothetical "plate" in a 2D space and the evolution of its temperature through time.

Motivations

I recently came across this beautiful YouTube playlist, where I had the opportunity to learn a little more about differential equations, so I decided to write this program with the hope of consolidating that knowledge and to learn some numerical methods for solving PDEs. I also decided to use CUDA to accelerate the computations using a GPU.

Running the program

You can run the program either by using the Nix package manager (recommended) or CMake. It is mandatory that you have a CUDA capable GPU to run the program with hardware acceleration.

Nix

If you are already using Nix you should probably already know the drill.
Simply start nix-shell inside the directory and you are done.

CMake

  1. Grab the latest CUDA toolkit available
  2. Clone this repository
  3. Run cmake inside it.

By default, GPU acceleration is ON. You can turn it off with cmake -DGPU=OFF.

About

Heat simulation of a 2D plate using the finite difference method

Topics

Resources

Stars

Watchers

Forks