Implementing NVT and difference with NVE

Hey all,

I was trying to run a simulation of a Couette flow with two immiscible liquids. After going through some literature it seems that both NVT and NVE ensemble has been used to perform similar experiments. I understand the basic differences between the two but still not very clear how its affecting my simulation physically.
While doing runs with NVT ensemble the system temp. for certain high shear rates remains below the specified temp. also for low shears the system temp. takes longer time to reach the specified temp. as compared to the NVE. In addition on viewing the simulation I can notice certain clear differences between the two. I havent used NVT ensemble a lot before so I am not sure if I am implementing it wrong. If not I am unable to figure the precise reason for these differences in the two ensembles.
Find below a portion of the log file for both.

Any help would be appreciated.

1) NVT implementation:

compute mobile_thermo all temp/partial 0 0 1
fix 1 all nvt temp 1.10 1.10 699483
fix_modify 1 temp mobile_thermo
thermo_modify temp mobile_thermo
.
Step Temp E_pair E_mol TotEng Press Volume
        0 1.0197573 -3.7128231 0 -3.2029524 2.5195931 243312.67
     1000 0.59840788 -3.1098235 0 -2.8106242 6.733425 243312.67
     2000 0.60908969 -3.1249916 0 -2.8204516 7.1510068 243312.67
     3000 0.62306809 -3.1384345 0 -2.8269053 7.4879776 243312.67
     4000 0.62844619 -3.1407716 0 -2.8265535 7.6139205 243312.67
     5000 0.60948947 -3.113487 0 -2.8087471 7.4118142 243312.67
     6000 0.58817264 -3.0785527 0 -2.784471 7.1243117 243312.67
     7000 0.56917386 -3.0409778 0 -2.7563954 6.9127935 243312.67
     8000 0.5613946 -3.0188694 0 -2.7381765 6.8069541 243312.67
     9000 0.55968288 -3.0163616 0 -2.7365246 6.7981283 243312.67
    10000 0.56353202 -3.0255496 0 -2.743788 6.8751787 243312.67
    11000 0.57583623 -3.0420882 0 -2.7541746 6.9723372 243312.67
    12000 0.58495983 -3.0552307 0 -2.7627554 7.0832902 243312.67
    13000 0.59267762 -3.0625594 0 -2.7662253 7.1340247 243312.67
    14000 0.59345659 -3.0644548 0 -2.7677312 7.1431641 243312.67
    15000 0.59554643 -3.0643475 0 -2.766579 7.1621375 243312.67
    16000 0.59877612 -3.064916 0 -2.7655327 7.1839501 243312.67
    17000 0.60625311 -3.0681451 0 -2.7650234 7.211247 243312.67

2)NVE implementation:
compute mobile_thermo all temp/partial 0 0 1
fix 2 all langevin 1.10 1.10 1.0 699483
fix 1 all nve
fix_modify 2 temp mobile_thermo
thermo_modify temp mobile_thermo
.
Step Temp E_pair E_mol TotEng Press Volume
        0 1.0197573 -3.7128231 0 -3.2029524 2.5195931 243312.67
     1000 0.81138357 -2.8204765 0 -2.4147911 7.763242 243312.67
     2000 0.8959874 -2.6207826 0 -2.172796 8.1390409 243312.67
     3000 0.94151164 -2.5080049 0 -2.0372565 8.1360711 243312.67
     4000 0.98742061 -2.4465777 0 -1.9528752 8.2638975 243312.67
     5000 1.0033264 -2.420619 0 -1.9189637 8.3682508 243312.67
     6000 1.0161084 -2.414238 0 -1.9061917 8.3770801 243312.67
     7000 1.0241281 -2.4068499 0 -1.8947939 8.4218208 243312.67
     8000 1.0242016 -2.4115978 0 -1.899505 8.3913889 243312.67
     9000 1.0242478 -2.4067766 0 -1.8946608 8.3909175 243312.67
    10000 1.0199909 -2.40323 0 -1.8932426 8.3977941 243312.67
    11000 1.0220728 -2.404828 0 -1.8937996 8.3959923 243312.67
    12000 1.0223391 -2.4068242 0 -1.8956627 8.387898 243312.67
    13000 1.022556 -2.4057116 0 -1.8944417 8.3861638 243312.67
    14000 1.0248803 -2.4027174 0 -1.8902853 8.4053191 243312.67
    15000 1.0143922 -2.4071343 0 -1.8999462 8.3758126 243312.67
    16000 1.0218506 -2.4044362 0 -1.8935189 8.3910499 243312.67
    17000 1.02298 -2.4055939 0 -1.8941119 8.3802911 243312.67

Thank you.

BR/Joseph

Hello,

In both implementations, you're integrating Newton's laws with the
same algorithm, the only difference is the thermostat you use. With
fix nve and fix langevin, you're using a Langevin themostat, and with
fix nvt you're using a Nosé-Hoover thermostat. In both cases your
system is neither in the microcanonical ("NVE") nor the canonical
("NVT") ensemble, see previous discussions on the list.

A liquid subjected to shear will heat up, so you have to use a
thermostat. Which thermostat, and which parameters to use in order to
minimize its influence on the liquid flow is a delicate question. From
my experience, when the flow is in one identified direction, I tend to
use a Nosé-Hoover thermostat, only applied to the directions
perpendicular to the flow. For a more complex flow, a DPD thermostat
with adequate parameters could do the trick. In any case, it is very
important to check carefully the influence of the thermostating method
and parameters on the results.

Now to be more specific :

compute mobile_thermo all temp/partial 0 0 1
fix 1 all nvt temp 1.10 1.10 699483

The damping time is quite strange: 699483 ? Please read again the doc
page for fix nvt. Most probably the Nosé-Hoover thermostat is
inneffective because of a very long damping time.

Hello Lammps-users:

Is it possible to perform constant area simulations (constant area in xy dimension, while z dimension fluctuates) using lammps? I did an online search, but could not find if it is implemented or not in Lammps.

Thanks for the help in advance,

Payel

Hi,

In Lammps you have the option of setting the barostat to change only one direction depending on your target pressure. This will leave the other two directions unchanged and fixed to their initial values. This way you can keep your x and y lengths constant while the z length changes so that the target pressure is reached in that direction.

regards,
Karthik

Yes. Try:

fix 1 all npt temp 300 300 100 z 500 500 1000.0

# (temperature=300/k, pressure=500bar, Pdamp=1000.0)

For more information, check here:
http://lammps.sandia.gov/doc/fix_nh.html

Cheers

Andrew

For an example with a rigid slab immersed in a solvent, look here:
http://www.moltemplate.org/examples/translocation/run.in.npt
  system shown here:
http://www.moltemplate.org/images/translocation/walls+solvent+polymer_t=0.jpg
(Disclaimer: the "fix rigid" I used in that example is not endorsed by
Steve or Trung.)

Yes. Try:

sorry, but no.
this will keep "x" and "y" completely fixed.

a constant area MD allows to "x" and "y" to fluctuate,
but hold the xy area constant, as it is often required
in bilayer simulations to enforce a surface area per
molecule ratio.

LAMMPS currently has no implementation for this
specific requirement.

axel.