I was doing Poiseuille Flow simulations in LAMMPS and GROMACS with different acceleration values. At a reduced acceleration of 0.1, the velocity profiles obtained from both the codes matched exactly. But when the simulation was run with a reduced acceleration of 1.0, the velocities obtained from GROMACS was higher than that in LAMMPS. On increasing the acceleration by 10 times, the velocities obtained from GROMACS were found to be 10 times higher but those obtained from LAMMPS were only about 7.5-8 times higher.
I was wondering what might be causing this scaling issue in LAMMPS. I have attached the input file.
There's no reason that increasing the acceleration by 10x should
increase the velocity by 10x. Presumably the fluid itself
and the walls resist the acceleration.
In the Stokes flow regime, the flow velocity should indeed be
proportional to the acceleration, as long as the drag force remains
proportional to velocity:
driving force + drag force = 0 => driving force - k v = 0 => v =
1/k * driving force
Yet driving forces used in MD are always HUGE compared to experimental
ones, and one has to check that the system remains in the linear
response regime.
It is hard to diagnostic precisely your problem without the data file
in order to really reproduce your simulation.
However I am concerned about your thermostating method:
fix 2 AR nvt temp 1.0417 1.0417 0.0464148
It is well-know and well documented that thermostating confined flows
is a pain, simply because the thermostat acts on the atom velocities,
and in MD hydrodynamic velocities are not so small compared to thermal
velocities.
A simple trick is to only apply the thermostat to the degrees of
freedom perpendicular to the flow, using compute temp/partial and
fix_modify commands.
Maybe your damping time is a little bit short too.
So you can try to play a little bit with the thermostat to see if
things get better, but anyway maybe it is just that 1.0 is a too large
acceleration. And it is always hard to compare between different MD
codes, simply because they don't use the exact same methods to solve
the equations (e.g. thermostating method). When you look at your
dumps, do they appear to be different with lammps or gromacs?
Thanks for the useful info.
I too was thinking there might be something wrong with how I am applying the thermostat. I will run the simulations with thermostat applied only to y and z directions and post the results.
I think that GROMACS automatically applies thermostating only in the y and z direction if there is a force in the x direction. So that might be the reason for the inconsistency.
I did these simulations with different thermostating techniques available in LAMMPS and I believe that the acceleration is very high which means that the system is no longer in the linear regime.
With a different system however,both GROMACS and LAMMPS match even at high acceleration.
If you need more help with this, could you give more information (e.g.
differences between the two systems)? It is hard to give you relevant
answers without being able to reproduce your problem...