PDE Stability

  • Write the FTCS method for the parabolic PDE $$\frac{\partial f}{\partial t} = \alpha\frac{\partial^2f}{\partial x^2} + \alpha\frac{\partial^2f}{\partial y^2} +S $$
  • How does using index arrays avoid needing for loops in python/julia?
  • What does the np.ix_ function allow? (See the little test cases involving A at the bottom of the notes.)
  • For FTCS, note how Dirichlet BC’s don’t need any special treatment if the solution array includes the boundary points. (Look at the code example to confirm your understanding of this.)
  • Write the BTCS method for the parabolic PDE noted above
  • For a 4x4 grid of unknowns, write a schematic of the matrix that arises from BTCS.
    • Indicate points that are zero due to boundary conditions.
    • Note the elements of the b vector that are augmented by boundaries (note which boundary).
    • (You are basically reproducing the image from the notes. By doing this, you are solidifying your understanding of this figure in relation to the BTCS advancement.)
  • What is the equation to convert from (i,j) in a 2D matrix to a corresponding index when the 2D array is “strided” onto a 1D array?