SimpleSphere vs RotParticle

Asked by Lukas Liebisch


in ESyS-Particle you can create new single particles through different functions:

particle1 = SimpleSphere(...)
particle2 = RotSphere(...)

and add them to the simulation through the same function:


The difference between SimpleSphere() and RotSphere() seems to be that they are from different packages and that a RotSphere-Object has more/different functions associated with it. Anything else?

More importantly, after I add them to the simulation via createParticle(), is there still a difference between the two?

Best regards,

edit: a word

Question information

English Edit question
ESyS-Particle Edit question
No assignee Edit question
Solved by:
Dion Weatherley
Last query:
Last reply:

This question was reopened

Revision history for this message
Dion Weatherley (d-weatherley) said :

Hi Lukas,

SimpleSpheres only have translational degrees of freedom whereas RotSpheres also have rotational degrees of freedom. In ESyS-Particle the additional 3D orientation of each particle is represented by a Quaternion. The RotSphere() class implements additional subroutines for getting and setting the rotational properties of particles (e.g. orientation, angular velocity and angular acceleration), in addition to subroutines related to translational properties.

Whether you createParticles(..) using SimpleSphere or RotSphere depends upon your specified particleType provided as an argument to sim.initNeighbourSearch(..). If you selected "NRotSphere", then create particles using SimpleSphere. If you selected particleType="RotSphere", then use RotSphere objects to create particles.

Once particles are added to the simulation, they retain the properties appropriate for that particleType. Note that it is not possible to have NRotSpheres in a simulation with particleType="RotSphere" and vice versa. You can however suppress the rotational motion of specific particles using sim.setParticleNonRotational(..) for example.

I hope this helps.



Revision history for this message
Lukas Liebisch (lliebisch) said :

Thanks Dion Weatherley, that solved my question.

Revision history for this message
Lukas Liebisch (lliebisch) said :

After clicking the "Problem Solved"-Button I realized that I have an adjacent question.

If I create particles using RandomBoxPacker (RBP) I use the following steps (as I learned from the Tutorial):
packer = RandomBoxPacker(...)
particleList = packer.getSimpleSphereCollection()
for particle in particleList:
 (some stuff like assigning tags)

Because there is a function called getSimpleSphereCollection(), to me it looks like RBP generates a list of SimpleSphere objects. Can I use RBP in a simulation with RotSpheres even if it generates SimpleSpheres? The Tutorial does this so I assume the answer is yes? And following that, can I in general use SimpleSpheres in a RotSpheres-simulation? Dion's previous answer says no, but if RBP generates SimpleSpheres and the Tutorial uses RBP in RotSphere simulations, the answer would be yes. I hope you can see why I'm confused.

Best regards,

Revision history for this message
Best Dion Weatherley (d-weatherley) said :

Hi Lukas,

My apologies. Yes it is possible to add SimpleSpheres or SimpleSphereCollections to simulations using RotSpheres. In that instance, the orientation of RotSpheres are initially set equal to a default value.

If I am reading the code correctly, it is not possible to add RotSpheres to a NRotSphere simulation though. This will generate an error message.



Revision history for this message
Lukas Liebisch (lliebisch) said :

Thanks Dion Weatherley, that solved my question.