Project: Heat Diffusion
Given an insulated cylindrical metal rod with a heat source at each end, the
temperature of the rod will eventually stabilize so that it varies linearly be-
tween the temperatures of the two heat sources. The physics and mathematics
describing this process are beyond the scope of this course (see, e.g., [2]), but
we will be able to simplify the mathematics and use Python lists to simulate
the diffusion of heat in the rod.
The key idea in translating from the physical situation to a program is to
discretize the problem, meaning, in this case, that we break up the continuous
rod into a discrete set of short pieces. That allows us ...
Get A Concise Introduction to Programming in Python now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.