Computational Physics, Physics, Heat Equation, Python, Math.
transfer coefficient lx = 1. # Size of computational domain # Grid parameters nx = 21 # number of grid points dx = lx / (nx-1) # grid spacing x = np.linspace(0., lx, nx) # coordinates of grid points # Time parameters ti = 0. # initial time tf = 5. # final time fourier = 0.49 # Fourier number dt =