Write an MC code for a fluid of (N) hard spheres in a two-dimensional (L times L)

Question:

Write an MC code for a fluid of \(N\) hard spheres in a two-dimensional \(L \times L\) square box and include a one-body gravity term \(\sum_{i=1}^{N} m g y_{i}\) in the algorithm, that is, accept otherwise legal configurations with probability \(\exp (-\beta m g \Delta y)\). You will need to use hard-wall boundary conditions on the top and bottom walls. Determine the average number density as a function of the vertical position in the box.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Statistical Mechanics

ISBN: 9780081026922

4th Edition

Authors: R.K. Pathria, Paul D. Beale

Question Posted: