particle tag

Asked by Dian

Hi all,

I am wondering if the particles can be assigned 2 or more particleTag # at one simulation. For example, all particles in a model need a particleTag (e.g., 1) for creating particle-particle interaction by BrittleBeamPrms, meanwhile, another particleTag (e.g., 2) is needed for the particles along the margins of a model and those particles are bonded with walls by NRotBondedWallPrms. Is there any conflict to do that?

Best,
Dian

Question information

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

This question was reopened

  • by Dian
Revision history for this message
SteffenAbe (s-abe) said :
#1

Hi Dian,

Assigning more than one tag to a particle is not possible, but can be emulated by the use of "tag masks".
However, I'm not sure if this is actually relevant to your problem, because while NRotBondedWallPrms takes a _particle_ tag as parameters, BrittleBeamPrms takes a _bond_ tag.

If you're actually looking at ways how to set up bonds between particles with a specific tag and then bond some of those particles to a wall there are two ways, both of which require the use of gengeo to setup the geometry. The in-simulation geometry creation can not be used here because the bond generation via ConnectionFinder doesn't support particle tags.

Now the simple approach would be to tag the particles you want to bond, do the necessary generateBondsTagged call, and then re-tag the particles you want to bond to the wall using tagParticlesAlongPlane.

The elegant way is to use tag masks. The relevant functions to set up interactions based on tags all take a "mask" as an additional argument. This mask is combined with the tag via a bit-wise AND before the tag is used in this function. So in the most simple case where you want to use one tag for a particle-particle interaction and one for a particle-wall interaction you can instead use two different masks in the relevant function calls. For example use mask "1" in the particle-particle interaction and mask "2" for the particle wall interaction. Then all particles with tags which have bit 1 set (1,3,5,...) will particitate in the particle-particle interaction and all particle with bit 2 set (2,3,6,7...) will participate in the particle-wall interaction. Which means that a particle which needs to be in both interactions should have both bits 1 and 2 set (3,7,...) and so on.

I hope that helps.

Steffen

Revision history for this message
Dian (hedian18) said :
#2

Thanks SteffenAbe, that solved my question.

Revision history for this message
Dian (hedian18) said :
#3

Hi Steffen,

I just appreciated that tag+mask functionality you pointed out above is quite efficient. Thanks for that. Here I just want to throw out a few minor suggestions which I think may make the input files more readable.

(1) Change the name of parameter "tag" that is supposed to be a bond_tag (i.e., bondID in GenGeo) , for instance, in the BrittleBeamPrms, to "bondID", which will be consistent with the name in GenGeo. Meanwhile, we are able to easily distinguish it from the "particleTag", for instance, in the NRotBondedWallPrms.

(2) Based on your response above, I found out that there are two types of "mask" -- one is associated with particle tag; the other is bond mask. For example, the parameter "mask" in the MNTable2D.generateBondsWithMask (in GenGeo) is a bond mask, whereas the "tagMask" in the NRotBondedWallPrms is a particle tag mask. So, in the same way, why not call the former as "bondMask" and the latter as "tagMask" or, even more clear, "particleTagMask".

(3) Since there are some InteractionPrms (e.g., NRotBondedWallPrms) that include both particle tag and tag mask, it would be nice to add the mask (tagMask or bondMask) parameters for those who only have tags (particleTag or bondID) (e.g., BrittleBeamPrms). I think that it would be more versatile to play with.

I am kind a newbie about this software, so I am not sure whether you have already taken these into account. Or maybe they are just dumb questions for developers.

Best,
Dian

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

Hi Dian,

Many thanks for these suggestions. I always appreciate feedback from users on how to improve ESyS-Particle.

I agree that the use of the generic term 'tag' for both particle tags and bond tags can be a little ambiguous at times and converting to 'particleTag' and 'bondTag' would be a good idea. The development team will consider introducing this notation in future versions of ESyS-Particle however it may not be possible to do so whilst maintaining backwards compatibility. A number of ESyS-Particle users (myself included) have a considerable library of simulation scripts that we re-use regularly. Consequently the development team tries to avoid making changes to the code that will render these scripts inoperable. On occassion maintaining backwards compatibility is not possible if a particular feature is implemented. It then becomes a question of whether the benefits of the new feature out-weighs the inconvenience of changing older simulation scripts. The development team will discuss your suggestions in that context.

Cheers,

Dion

Revision history for this message
Dian (hedian18) said :
#5

Thanks Dion Weatherley, that solved my question.