Abstract
A force-balance simulation method is introduced, where the volume of the cell and the size and shape of inhomogeneities fluctuate in the presence of external potentials. Equilibrium corresponds to the balance of internal and external forces, which allows mechanical quantities such as the pressure and surface tension to be found directly. The technique also enables the geometry to be changed while the confined fluid remains in equilibrium with a bulk reservoir. Here the appropriate ensembles for bulk and inhomogeneous fluids are analysed, including planar, spherical, and cylindrical cavities, cylindrical pores, and interacting planar walls. A method for finding the chemical potential from a fluctuating, partially coupled solvent is discussed. Monte Carlo results are presented for the surface free energy and the adsorption excess of a hard-sphere fluid at a hard wall. It is found that the scaled particle theory remains accurate at quite high densities.