Fix nvt - continous vs interval

Dear LAMMPS community,

I’m currently studying a Lennard-Jones solid (finite) sphere containing \approx 500 atoms. The interaction parameters for all systems have been set as follows: \sigma = 1, \epsilon = 1, m = 1, r_{cut} = 5.0, dt = 0.005, To preserve the free surface of the finite sphere, I’ve placed it in a large box and under NVT ensemble conditions. Then I first equilibrated the system [NVT with T = 0.3 for 5 \times 10^6 steps] at a temperature where it remains in a stable solid state.

I am interested in observing the rate of atom ejection from the sphere’s surface at a specific temperature (T = 0.4), which is higher than the sublimation temperature of this system. To accomplish this, I’ve conducted two types of simulations.

  • In the first method, with the equillibrated configuration, I have fixed the system’s temperature at T = 0.4 and let the simulation run continuously for 4 \times 10^7 steps.
fix		1 all nvt temp 0.4 0.4 0.5
run		40000000
unfix		1
  • The second method also involves, with the equillibrated configuration, fixing the temperature at T = 0.4; but the simulation is segmented into intervals of 2 \times 10^6 , with the total still amounting to 4 \times 10^7 steps.
fix		1 all nvt temp 0.4 0.4 0.5
run		2000000
unfix		1

fix		1 all nvt temp 0.4 0.4 0.5
run		2000000
unfix		1
.
.
.

Interestingly, the rates of atom ejection obtained from these two methods are noticeably different.

If both simulations are conducted under seemingly “identical” conditions, I would greatly appreciate it if anyone could provide insights into why such differences might be manifesting in the results.

Thank you for your help,
Bose

[I’ve attached the relevant LAMMPS input and data for your reference.]

data.np_d10_T0.3_eq_rc_5 (71.6 KB)
lj_continous.in (1.5 KB)
lj_step.in (2.5 KB)

Since the system is continuously losing atoms in the simulation, one should typically use dynamic/dof for temperature calculation:

compute mytemp all temp
compute_modify mytemp dynamic/dof yes
fix 1 all nvt temp 0.4 0.4 0.5
fix_modify 1 temp mytemp

and set thermo_modify temp mytemp to get correct temperature in thermo outputs.

By default fix nvt assumes the system has fixed number of atoms, and since number of atoms is involved in temperature calculation (ke=(dim/2)*NkT, see compute temp command — LAMMPS documentation), the temperature of system may go severely wrong if a lot of atoms are lost.

In your second scenario (fix and unfix repeatedly) the number of atoms is recalculated each time a fix is specified, so the temperature would be closer to the desired value (but still has errors), which may explain your observation (I didn’t run through that 40M steps though).

1 Like