Computational Physics, Physics, Heat Equation, Python, Math.
plate_length)) # Initial condition everywhere inside the grid u_initial = 0.0 # Boundary conditions (fixed temperature) u_top = 100.0 u_left = 0.0 u_bottom = 0.0 u_right = 0.0 # Set the initial condition u.fill(u_initial) # Set the boundary conditions u[:, (plate_length-1):, :] = u_top u[:, :, :1]