How to make certain particles "invisibles" to others?

Asked by Luc Scholtès

Hi guys,

What would you suggest in order to make certain particles "invisible" to others while keeping them in the simulation?

I know that particles can be deleted using the erase function but it is not satisfactory in my case because it does not allow to post process correctly my simulations. For instance, if I delete particles during the simulation, I cannot compute displacements fields (I usually do that using Paraview from vtk files recorded at different intervals) nor strain fields (using the Tesselation wrapper from text files recorded at different intervals) since these computations rely on the comparison between 2 states.

Any suggestion would be greatly appreciated.

Luc

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Klaus Thoeni (klaus.thoeni) said :
#1

Hi Luc,

what do you mean by invisible? No interaction between certain particles? In that case I would try mask/groupMask [1].

HTH
Klaus

[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Body.groupMask

Revision history for this message
Luc Scholtès (luc) said :
#2

Yes, by "invisible" I mean that they won't interact with other (and that will happen during the simulation so their state would change from "visible" to "invisible").

I tried to find more information about the groupmask but the description is kind of short in the doc ("Bitmask for determining interactions" ).

Is there any example where I could grasp more precisely the idea?

Thanks

Revision history for this message
Klaus Thoeni (klaus.thoeni) said :
#3

Not sure if there is a good example. Long story short it is a bit wise comparison. Here a short example assuming three bodies:

O.bodies[0].mask=1 # 00000001 -> corresponds to 1 in the binary system
O.bodies[1].mask=2 # 00000010 -> corresponds to 2 in the binary system
O.bodies[2].mask=3 # 00000011 -> corresponds to 3 in the binary system

In this example, O.bodies[0] and O.bodies[1] would not interact whereas O.bodies[2] would interact with both.

HTH
Klaus

Revision history for this message
Luc Sibille (luc-sibille) said :
#4

Salut Luc,

There is a discussion about this topic here:
https://answers.launchpad.net/yade/+question/240275
it helps to make things clearer even if it is not complete...

Best,
Luc

Le 27/10/2016 à 13:58, Luc Scholtès a écrit :
> Question #403534 on Yade changed:
> https://answers.launchpad.net/yade/+question/403534
>
> Status: Answered => Open
>
> Luc Scholtès is still having a problem:
> Yes, by "invisible" I mean that they won't interact with other (and that
> will happen during the simulation so their state would change from
> "visible" to "invisible").
>
> I tried to find more information about the groupmask but the description
> is kind of short in the doc ("Bitmask for determining interactions" ).
>
> Is there any example where I could grasp more precisely the idea?
>
> Thanks
>

--
Luc Sibille
Université Grenoble Alpes / IUT1 de Grenoble
Laboratoire 3SR UMR CNRS

Tel lab.: +33 (0)4 76 82 63 48
Tel IUT: +33 (0)4 76 82 53 36

Revision history for this message
Luc Scholtès (luc) said :
#5

OK, many thanks guys.

I see now more clearly how to use groupmask.

I am still not sure this would be the best way to deal with my problem since the particles that I want to be invisible from the other "visible particles" should also be invisible from each others (I don't want them to interact with anything).

Using groupmask, I would thus have to define a different bitmask for each of them, making sure they cannot interact one with each other... I am not sure this would be practical since I should then define the bitmask equal to 2^i for each of the i-th invisible particle and thus would probably be limited in the number of particles I can actually set as invisible...

I hope this was clear enough...

Luc

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

Can you help with this problem?

Provide an answer of your own, or ask Luc Scholtès for more information if necessary.

To post a message you must log in.