number of molecules in reservoir

We are students at University of Southern California. For our research we need to use LAMMPS.

We are using LAMMPS to do molecular dynamic simulation for gas diffusion in nanotubes. We need to build a reservoir storing gas molecules using Monte Carlo technique. We need the reservoir to be in the steady state and keep the number of molecules in the reservoir constant. Is there any way to keep the number of molecules in the reservoir constant?

This is the link we found for a command that seems to do this work We want to confirm whether it can be applied to our system. If so,how? What are the restrictions and the assumptions that are made?


Congyue Wang

I would talk to Paul Crozier (CCd) about the
fix gcmc command.


Short answer to your question about keeping constant N in the reservoir is that yes, it should be possible. I've not done such simulations using LAMMPS though. And I think it would really depend on whether or not your gas is an atomic gas, and what the density of your gas is. Low density monatomic gases should be quite doable I think. The others are possible, but would likely require some code changes and a lot of additional work that you'd have to do yourselves.

Fix GCMC would be applicable to your system if your gas is monatomic, but it keeps constant chemical potential rather than a constant number of molecules. In the limit of ideal gas, those should be the same.

Fix GCMC could be extended to include molecules, and I am interested in doing so if time and funding allow.