Add an orientation to spherical particles

Submitted by apeskhov on Wed, 01/01/2014 - 16:22

Hi all,

I want to add an orientation, and track it's evolution, to the spherical particles using a quaternion (I will use it after to add a force to the spheres in the direction of the orientation). I have added a quaternion array and a flag to the atom.cpp/h .

Now I want to update accordingly the atom_vec_sphere source files. I have added the quaternion array to the header file but I am a bit stuck with all the routines in the cpp file. As I don't need to communicate the orientation of one particle to the others I suspect that the only routines that I should update are; grow, grow_reset, copy, (un)pack_exchange, (size, pack, unpack)_restart, create_atom, data_atom_hybrid and memory_usage.

I am hesitating if I need to update the "border" routines? I think I don't need to change the "comm" routines?

I have tried to look how it's done in the ellipsoid case, but they need to communicate the orientation to the other particles so naturally they update all the routines. They also add the orientation info through the "bonus" and not through the atom.cpp as I did, so I think this also change a lot of things.

Thanks for help,
Anton

ckloss's picture

ckloss | Fri, 06/06/2014 - 16:19

Hi Anton,

you can have a look at the integrators in the ASPHERE package,
https://github.com/CFDEMproject/LIGGGHTS-PUBLIC/tree/master/src/ASPHERE
soem of them already do what you want.

>>I am hesitating if I need to update the "border" routines?
>> I think I don't need to change the "comm" routines?
You will need to "border" and "comm" the quaternion
information, to be sure ghosts have it

Adding via bonus vs. Atom: The difference is that if added via bonus, not all
particles have the quaternion property, which will be beneficial if you have mixtures
of e.g. lots of small spheres and few large ellipsoids

Christoph