Omniadisce

Computational physics 15.4: A grid of points

Lesson Beginner

Join free to take this lesson

Anyone can look around, but taking a lesson needs a free account. With one, your answers are checked step by step and your progress is saved, so you can stop and pick up where you left off on any device.

11 steps ยท about 30 min

By the end you can

  • Keep a flat grid of potentials in a two-dimensional array: np.zeros((21, 21)), V[i, j]
  • Set a whole row or column: V[-1, :] = 100
  • State the rule on a grid: each point is the average of its four neighbours, and say where it comes from
  • Take the four neighbours of every inside point with slices: V[2:, 1:-1] and the others

Who it is for: Anyone who has done lesson 15.3, and physics lesson 13.4 (Gauss's law).

The steps

  1. From a line to a flat grid
  2. A two-dimensional array
  3. Which point?
  4. Set the lid
  5. Four neighbours
  6. Why the average? A small square with no charge
  7. Is it settled?
  8. Slices on a grid
  9. The first sweep
  10. The neighbours above
  11. The rule, in your own words

Discussion 0 comments

Log in to join the discussion.

× Enlarged view