We describe a new local grand canonical
Monte
Carlo method to treat fluids in pores in chemical equilibrium with
a reference bulk. The method is applied to Lennard-Jones particles
in pores of different geometry and is shown to be much more accurate
and efficient than other techniques such as traditional grand canonical
simulations or Widom’s particle insertion method. It utilizes
a penalty potential to create a gas phase, which is in equilibrium
with a more dense liquid component in the pore. Grand canonical Monte
Carlo moves are employed in the gas phase, and the system then maintains
chemical equilibrium by “diffusion” of particles. This
creates an interface, which means that the confined fluid needs to
occupy a large enough volume so that this is not an issue. We also
applied the method to confined charged fluids and show how it can
be used to determine local electrostatic potentials in the confined
fluid, which are properly referenced to the bulk. This precludes the
need to determine the Donnan potential (which controls electrochemical
equilibrium) explicitly. Prior approaches have used explicit bulk
simulations to measure this potential difference, which are significantly
costly from a computational point of view. One outcome of our analysis
is that pores of finite cross-section create a potential difference
with the bulk via a small but nonzero linear charge density, which
diminishes as ∼1/ln(L), where L is the pore length.