O'Reilly logo

Computational Modeling and Visualization of Physical Systems with Python by Jay Wang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11

Thermal systems

Up to the last chapter, we had built simulations from first principles, i.e., calculations were done from Newton's laws or the Schrödinger equation. Thermal systems, however, require a different, statistical approach since they are made up of large numbers of atoms and molecules. Macroscopic thermal properties are determined by the microscopic interactions between these particles. Given that the number of particles is at least on the order of the Avogadro number ∼ 1023, we cannot hope to simulate thermal systems using first-principle calculations by tracking all the individual particles.1 Nor would we want to. Even if their individual properties such as the energies or velocities were available, we would not be able to make sense out of that many particles without statistics. It turns out that we can model much smaller thermal systems and still simulate the statistical properties of large systems, provided we sample them correctly and be mindful of the limitations.

We begin with thermodynamics of equilibrium, exploring the role of energy sharing, entropy, and temperature as the driving forces toward equilibrium: the Boltzmann distribution. We then introduce the Metropolis algorithm and apply it to study 1D and 2D Ising models, carefully comparing numerical and analytic solutions where possible, including phase transitions. After fully assessing the Metropolis method, we extend it to the study of non-thermal systems such as the hanging tablecloth via simulated ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required