Omniadisce

Computational physics 14.8: Going further — implicit steps, Crank–Nicolson

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.

14 steps · about 40 min

By the end you can

  • Write the implicit step for one piece, with the new temperatures in the bracket
  • Turn the implicit step into a matrix with 1 + 2r on the diagonal and −r beside it, and solve it each step
  • See the implicit step stay calm at r = 2 and beyond, where the explicit step blows up
  • Take a Crank–Nicolson step, half old and half new, and compare its accuracy

Who it is for: Anyone who has done unit 14 of this course (lessons 14.1-14.6), lessons 12.2-12.3 (a matrix, np.linalg.solve), and maths lessons 18.1-18.2 (finite differences, stability, implicit schemes).

The steps

  1. The price of the rule
  2. Use the new temperatures
  3. One hot piece, implicitly
  4. Three pieces, three equations
  5. The middle row
  6. A matrix for the whole rod
  7. The implicit step, at a safe dt
  8. The explicit step at dt = 2 s
  9. The implicit step, past the limit
  10. Half old, half new: Crank–Nicolson
  11. Crank–Nicolson's matrix
  12. How accurate?
  13. Stable means right?
  14. Why solve equations every step?

Discussion 0 comments

Log in to join the discussion.

× Enlarged view