Computational Physics, Physics, Heat Equation, Python, Math.
in range(1, plate_length-1, delta_x): u[k + 1, i, j] = gamma * (u[k][i+1][j] + u[k][i-1][j] + u[k][i][j+1] + u[k][i][j-1] - 4*u[k][i][j]) + u[k][i][j] return u def plotheatmap(u_k, k): # Clear the current plot figure plt.clf() plt.title(f"Temperature at t = {k*delta_t:.3f} unit time")