This is a simulation of heat flow in a metal bar. Use your mouse to draw a graph of the bar's starting temperature - a higher point means you are heating it more there (e.g. holding a blowtorch to it). Then click the button to show how the heat in the bar would change over time.
The tutorial is NOT my own work. It is taken (not quite copied, but almost :/) from https://ocw.mit.edu/courses/mathematics/18-303-linear-partial-differential-equations-fall-2006/lecture-notes/heateqni.pdf I am nowhere near smart enough to make that on my own! ----------------------------------------------------------------------------------------- Problems: Firstly, the time scale. In this simulation, it takes about 5 hours for a bar heated fully in the middle to cool to normal temperature. This seems unrealistic, way too long! The actual shape of the curve over time does seem very realistic and correct though, so maybe I am just missing a multiplier somewhere. However, I cannot find where this could be in the code. Who can help with this!? Sometimes the graph glitches by jumping up or down at the endpoints. If you draw two very separate peaks, there will be temporarily be a sub-zero dip the moment the simulation begins. This definitely should not happen! When drawing the graph at the start, it often stops following. This is a result of Scratch's limitations - I could fix this, but it would be at the expense of the resolution of the graph. ------------------------------------------------------------------------------------------ Updates: 14th July: Added the tutorial section. 10th July: Added a simple thumbnail, improved the information on the screen, decreased lag, allowed resetting. 9th July: Shared 6th July: Created. Took a lot of research and learning time to make the equations! ------------------------------------------------------------------------------------------ Information: > What is the heat equation: https://en.wikipedia.org/wiki/Heat_equation > Thermal diffusivity table of values: https://en.wikipedia.org/wiki/Thermal_diffusivity > How to solve the heat equation: https://en.wikipedia.org/wiki/Heat_equation > What is a differential equation: https://www.mathsisfun.com/calculus/differential-equations.html > What is calculus: https://www.mathsisfun.com/calculus/index.html Keywords: heat equation solving graphing pde partial differential equation math maths mathematics equations thermal physics conduction simulation computational modelling temperature gradient separation of variables