Computational Physics, Physics, Heat Equation, Python, Math.
time-step k) plt.pcolormesh(u_k, cmap=plt.cm.jet, vmin=0, vmax=100) plt.colorbar() return plt # Do the calculation here u = calculate(u) def animate(k): plotheatmap(u[k], k) anim = animation.FuncAnimation(plt.figure(), animate, interval=1, frames=max_iter_time, repeat=False)