On a direct method of calculating pressure in the canonical ensemble

J Chem Phys. 2024 Feb 14;160(6):064101. doi: 10.1063/5.0187585.

Abstract

Determining fluid pressure in Monte Carlo simulations can be a challenging task due to the reduced arsenal of computational tools available to perform such measurements. In addition, none of these tools is general enough to calculate the equilibrium pressure for a wide variety of models. The Gibbs-Duhem method, for example, is a very useful option, but only for pure (one component) systems. To enrich this arsenal, we propose here a direct method to calculate pressure in the canonical ensemble, which could easily be extended to mixtures at low densities. In analogy with the Widom method, our approach is based on the free energy variation with volume, described in terms of the removal of an empty or particle-occupied lattice column. We tested our approach for the lattice gas model and compared the results with exact Onsager solutions. Furthermore, the appearance of thermodynamic instabilities (loops) in the pressure isotherms during the phase transition and their relationship with interface effects are discussed. Finally, a phase diagram is obtained from these isotherms using the Hill construction.