/
Particle Properties
Particle Properties
Every particle has a wide variety of properties such as velocity, id, density, or vorticity:
- These attributes can be read out and user for further calculations or actions.
- RealFlow's different particle types also have different numbers of attributes.
To get the properties, a loop is necessary – here for a Dyverso domain, but the concept is exactly the same for Hybrido domains and standard particle emitters:
# Mind the leading spaces, because otherwise you will get syntax errors! dyversoDomain = scene.get_DY_Domain("DY_Domain01") dyversoParticles = dyversoDomain.getParticles() for singleParticle in dyversoParticles: particleAge = singleParticle.getAge() particleVelocity = singleParticle.getVelocity() particleId = singleParticle.getId() particlePosition = singleParticle.getPosition()
In the script above, the properties are read out with a get...
command. With the appropriate set...
commands it is possible to define new position and velocity vectors.
Related content
Looping - Particles
Looping - Particles
More like this
Channels
Channels
More like this
Looping: for ... in
Looping: for ... in
More like this
Finding Particle Neighbours
Finding Particle Neighbours
More like this
SPH - Statistics
SPH - Statistics
More like this
Shifting and Deleting Particles
Shifting and Deleting Particles
More like this