Math, Python, Simulation, Heat Equation, Numerical Analysis.
numpy.linspace(0, total_time, int(total_time/dt)) # defines an empty 2D numpy array to store the values of u(t, x) as # we solve for them u = numpy.zeros([len(t_vec), len(x_vec)]) Since our rod is going to be continuously heated at both ends, then we want the left and right side of the rod to