File Exchange

image thumbnail

Simple Heat Equation solver

version (5.3 MB) by michio
Simple Heat Equation solver using finite difference method


Updated 06 Dec 2019

From GitHub

View Version History

View license on GitHub

A live script that describes how finite difference methods works solving heat equations.

Cite As

michio (2021). Simple Heat Equation solver (, GitHub. Retrieved .

Comments and Ratings (5)

Hi. Do you konow about finite volume method and heat transfer? I'm looking for a guys who can helpme with a program. Maybe could you helpme?

Arislan Makhmudov

Jim Boelrijk

Hi Michio,
Thanks for the quick response! I have to solve the exact same heat equation (using the ODE suite), however on the 1D heat equation. So du/dt = alpha * (d^2u/dx^2). I already have working code using forward Euler, but I find it difficult to translate this code to make it solvable using the ODE suite. Your code seems to do it really well, but as i said I need to translate it in 1D. And I do not have to use Neumann boundary conditions. I have as initial values for y=1, t=0, v=1 and for y=0, v=0. Do you have any tips on what I need to adjust?


Thanks, Jim. What kind of issues are you having? Could you be more specific so that I could help?
Note: pdepe function can be of use for 1D purpose.

Jim Boelrijk

Very nice code, I want to translate this code into 1D. I do however have some issues with the getRHS code. Do you have any tips on what I should change to make it 1D?

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!