sphere particles - setting the angular velocity

Hi all,

I’m trying to write a python wrapper for granular lammps simulations, so that the simulation setup and results are compatible with my existing data and tools. The main part of the job is writing a lammps script generator which takes the particle properties (position, velocity, angular velocity, radius, etc) and generates a list of create_atom and set statements that initialise the values.

However, I’m having trouble setting the angular velocity for spherical particles by hand - I’ve tried two approaches so far.

First, I tried to use the ‘set angmom’ command for ellipsoids, before I’d read the documentation properly. The error message was helpful, and I checked:

http://lammps.sandia.gov/doc/atom_style.html

to find that in fact the sphere style has no extra properties that can be assigned via a ‘set’ keyword.

So, I had a look the ‘velocity’ command:

http://lammps.sandia.gov/doc/velocity.html

and tried something like ''velocity ID set WX WY WZ rot yes" (the capitalised tokens are replaced by my python code). (Incidentally, note that in order to use this command at all, I have to give each atom its own group, which then crashes the application after about 30 or so atoms.) Even then, it appears I am still setting the particle’s linear velocity, rather than angular (which I have checked using dump outputs.)

Is this a bug, or am I doing something wrong? Should I just use the ellipsoid style with all the diameters set the same, with the associated performance penalties and overhead?

Any help greatly appreciated,

Joe

hi joe,

Hi all,

I'm trying to write a python wrapper for granular lammps simulations, so
that the simulation setup and results are compatible with my existing data
and tools. The main part of the job is writing a lammps script generator
which takes the particle properties (position, velocity, angular velocity,
radius, etc) and generates a list of create_atom and set statements that
initialise the values.

why not write out a data file?
that would be much more effective
and easier to program, too.

However, I'm having trouble setting the angular velocity for spherical
particles by hand - I've tried two approaches so far.

First, I tried to use the 'set angmom' command for ellipsoids, before I'd
read the documentation properly. The error message was helpful, and I
checked:

http://lammps.sandia.gov/doc/atom_style.html

to find that in fact the sphere style has no extra properties that can be
assigned via a 'set' keyword.

So, I had a look the 'velocity' command:

http://lammps.sandia.gov/doc/velocity.html

and tried something like ''velocity ID set WX WY WZ rot yes" (the
capitalised tokens are replaced by my python code). (Incidentally, note that
in order to use this command at all, I have to give each atom its own group,
which then crashes the application after about 30 or so atoms.) Even then,

you have to delete groups, after you used them in this context.

it appears I am still setting the particle's linear velocity, rather than
angular (which I have checked using dump outputs.)

Is this a bug, or am I doing something wrong? Should I just use the
ellipsoid style with all the diameters set the same, with the associated
performance penalties and overhead?

using a data file is the recommended approach.

however, if you could provide a minimal input that
confirms that there is a bug in the velocity command,
that would be much appreciated, since that would
allow to correct it. nobody likes to have known bugs,
even if the problem at hand can (and should) be
solved differently.

cheers,
    axel.