SimpleSphere vs RotParticle

Asked by Lukas Liebisch on 2020-01-10

Hi,

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:

sim.createParticle(particle1)
sim.createParticle(particle2)

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,
Lukas

edit: a word

Question information

Language:
English Edit question
Status:
Solved
For:
ESyS-Particle Edit question
Assignee:
No assignee Edit question
Solved by:
Dion Weatherley
Solved:
2020-01-14
Last query:
2020-01-14
Last reply:
2020-01-14

This question was reopened

Dion Weatherley (d-weatherley) said : #1

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.

Cheers,

Dion

Lukas Liebisch (lliebisch) said : #2

Thanks Dion Weatherley, that solved my question.

Lukas Liebisch (lliebisch) said : #3

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(...)
packer.generate()
particleList = packer.getSimpleSphereCollection()
for particle in particleList:
 (some stuff like assigning tags)
 sim.createParticle(particle)

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,
Lukas

Best Dion Weatherley (d-weatherley) said : #4

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.

Cheers,

Dion

Lukas Liebisch (lliebisch) said : #5

Thanks Dion Weatherley, that solved my question.