srd velocity scaling

Dear All,

I am trying to extend the srd in lammps so that it can take specified boundary velocities, such as in the case of shear flow. One thing I noted is that the average velocity i got from the simulation is not consistent with the bc velocity i set. for example, in shear flow case, the top wall velocity is set to 0.8, it will give me 0.76 as a average of the srd velocity in the top layer (layer size is 1/20 of the channel width).
It seems reasonable in this case. However, once i change the bc velocity to 8 or 0.1, the resultant average velocity for the top layer is around 2.8 and 0.05, respectively. Particularly, in both 0.8 and 8 case, i can clearly see the shear flow profile, while in 0.1 case, the velocity is still random.

The algorithm in my extension about bc is that once a particle collides with the wall, the particle's normal velocity to the wall follows normal distribution, the tangent velocity equals Rayleigh distribution plus the wall velocity, which is similar to the noslip bc in srd.

After checking the source code, i notice that there is a maximum velocity limitation for srd solvent in Fixsrd::parameterize()

   sigma = lamda/dt_srd;
   dmax = 4.0*lamda;
   vmax = dmax/dt_srd;
   vmaxsq = vmax*vmax;

once the particle velocity is larger than vmaxsq, it will be scaled back in several other functions.
My question is what is the reason to set up the vmax? Is there any other places that the velocity is scaled/changed?

Thank you very much.

Sincerely,

Jifu Tan

My question is what is the reason to set up the vmax? Is there any other
places that the velocity is scaled/changed?

It is b/c there is finite chance (due to sampling from a distribution
of velocities after being thermalized by the wall), that a particle
will be assigned a huge velocity (tail of the distribution). That
would mean in a single timestep the particle could travel across
the entire simulation domain, miss collisions with colloidal particles,
be lost by skipping processor domains, etc. So LAMMPS puts
an upper bound on the velocity. There are a couple places
in fix srd with that logic. You can find them by searching.

Steve