# Applying pressure on simulation box

We have a 3D simulation box (cubic, side $L$) filled with $N$ non-overlapping objects (say spheres). We are interested to study the evolution of the system under an applied pressure in the z-direction (so the pressure has only a non-zero component orthogonal to the top face of the cube). In a simulation, let's for clarity assume it is a Monte Carlo type of simulation (so at each MC step objects are moved randomly such that no overlap is introduced), one often hears the following: "pressure is modeled/mimicked by re-scaling simply the distances between the objects". I understand this intuitively, as it is just saying that: applying pressure reduces the volume, namely $\Delta V = \Delta z L_y L_x,$ this in turn means in the applied direction of the pressure the objects get closer and closer.

• The question is more at the implementation level: How does one implement such a scheme, i.e., make the mapping of pressure to re-scaled distances? Are there existing techniques that are often employed for such purposes?

• Finally, does it matter for such scheme if the objects are anisotropic?

Also any references (textbooks or papers) that you see fit for tackling such questions are very welcome here.

## 1 Answer

You are looking for numerical schemes to sample from the isobaric-isothermal ensemble (also known as NPT ensemble). This amounts to sampling from a specific probability distribution (determined by the integrand in the partition function corresponding to the NPT ensemble).

You can find a discussion of the theory and practice of simulations in the NPT ensemble using Monte Carlo methods in Section 5.4 of Frenkel, D., & Smit, B. (2002). Understanding Molecular Simulation (Second). Elsevier. http://doi.org/10.1016/B978-012267351-1/50000-6

Another good reference would be Chapter 5 of Tuckerman, M. (2010). Statistical Mechanics: Theory and Molecular Simulation. Oxford University Press.