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.