I find a confusing problem about temperature calculation when I test fix gcmc in lammps (20151026).
The test case models the filling of N2 molecules into an empty box under a certain chemical potential. The N2 molecule is modeled in a molecule file, in which the mass of each of the two atoms is assigned (M_mol). In the meanwhile, the mass of N atom is also indicated in the input script (M_in). I think the two values should be consistent, i.e. M_mol=M_in=14.
However, what I find is that the temperature I get from the thermal output, which is about 150K, is always half of the value I assigned in fix gcmc command, which is 300K. (I have put 'compute_modify thermo_temp dynamic yes' in the input script already).
Moreover, I also tried to make some modifications as follows.
1. If the mass value was not assigned in the molecule file, I got 150K.
2. If I assign a large mass value (28=2*14) in the input script and keep the value in the molecule file being 14, I got 300K.
So I think that there may be some problem dealing with the mass for temperature calculation.
See the attachment for the input script and molecule file.
pure_gas.in (1.13 KB)
N2.molecule (392 Bytes)
Here is what the doc page says:
"Inserted atoms and molecules are assigned random velocities based on
the specified temperature T. Because the relative velocity of all
atoms in the molecule is zero, this may result in inserted molecules
that are systematically too cold."
A nitrogen molecule has 6 degrees of freedom, but the 3 internal
degrees of freedom have zero velocity. This is why the inserted
temperature is only half the target value. Not only that, but if you
read on you will be alerted to a second problem:
"In addition, the intramolecular potential energy of the inserted
molecule may cause the kinetic energy of the molecule to quickly
increase or decrease after insertion.
In your case, you are inserting molecules with the minimum energy
conformation. Equipartition will soon convert some of the
translational energy into potential energy.
However, help is on the way in the next sentence:
"The tfac_insert keyword allows the user to counteract these effects
by changing the temperature used to assign velocities to inserted
atoms and molecules by a constant factor."
Finally, please do not forget to read the last sentence in this section:
"For a particular application, some experimentation may be required to
find a value of tfac_insert that results in inserted molecules that
equilibrate quickly to the correct temperature."
2015-10-30 10:07 GMT-06:00 Chen Mingyang <[email protected]>:
Thank you very much. I used to stick to the old version of manual and didn't see the new 'tfac_insert' option. Sorry about that.
According to my understanding, 'tfac_insert' is a way to adjust the temperature for GCMC simulation. So, if I run a hybrid MD/GCMC simulaton (NVT + muVT) in lammps, I suppose the MD part will help me to adjust the temperature to the target temperature. In this case, are there any needs to employ 'tfac_insert'?
Whether you need or not depends on what you are trying to accomplish
in your simulation. If you just want to insert a small number of
molecules into a larger system, then the MD thermostat and the
collisions with existing molecules will quickly equilibrate the
velocities of the newly inserted molecules. But, if you are inserting
a lot of molecules in a short space of time, you will see a pronounced
cooling, which you can counteract using tfac_insert. Ultimately, it
is your responsibility to use LAMMPS in a way that generates results
that are relevant to the particular science question you are trying to
2015-11-03 0:17 GMT-07:00 Chen Mingyang <[email protected]>: