Omniadisce

Computational physics 19.5: The Metropolis rule

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

  • State the Metropolis rule: a change down in energy is always made, one up by ΔW with chance e^(−ΔW/kT)
  • Write e^x in NumPy: np.exp
  • Make a change with a given chance: r < chance, with r = rng.random(N)
  • Check that two levels end up in the ratio of the Boltzmann factor

Who it is for: Anyone who has done lesson 19.4, and physics lesson 20.3 (the Boltzmann factor, kT).

The steps

  1. A rule instead of collisions
  2. e^x in NumPy
  3. The chance of a step up
  4. Making a change with a chance
  5. A step down
  6. Two levels, 4000 molecules
  7. The Metropolis line
  8. A hotter gas
  9. Change the temperature
  10. Where they started
  11. Why a shortcut?

Discussion 0 comments

Log in to join the discussion.

× Enlarged view