Deactivating NewtonIntegrator.gravity on just a group of particles in the model

Asked by Marcus Moravia

Hi everyone!

In just a few particles of my model, I would like to keep the dynamics, but without the gravitational force on these elements. I mean, I wonder if it's possible to do this by turning off gravitational acceleration (NewtonIntegrator.gravity) on just a part of the model's elements and at the same time having gravitational forces acting on the rest of the model's particles.

Thank you very much,

Marcus

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jérôme Duriez
Solved:
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

it is not possible.
It would not be too difficult (IMO!) to implement if needed.

A simple workaround is to apply "opposite force" on "gravity-free" particles.

cheers
Jan

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#2

Hi,

> A simple workaround is to apply "opposite force" on "gravity-free" particles.

Indeed. Or even set null gravity and assign weight as a permanent force, selectively.
Bruno

Revision history for this message
Marcus Moravia (mgmoravia) said :
#3

Thanks for the answers. I had thought about applying a counter force as suggested by Jan, but the idea of applying a permanent force seems to me to be less costly for the simulation loop than a routine of counter forces. I'm going to test it, but Bruno would you know beforehand if this approach has a lower computational cost?

Thanks.

Revision history for this message
Best Jérôme Duriez (jduriez) said :
#4

Since we have two ways to impose gravity, you may also look at https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.GravityEngine and its "mask" attribute.

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#5

By order of performance I would say, probably:
1. add forces selectively
2. add counter-forces selectively
3. gravity engine #4 (it implies one more loop)

The difference between 1 and 2 is probably negligibly small, though.
Bruno

Revision history for this message
Marcus Moravia (mgmoravia) said :
#6

Thank you to share that Jérôme, it solved my question.

Revision history for this message
Marcus Moravia (mgmoravia) said :
#7

Thank you very much, Bruno.

Revision history for this message
Marcus Moravia (mgmoravia) said :
#8

Thanks Jérôme Duriez, that solved my question.