How does the interaction.erase function work in the agglomerate examples?

Asked by Wang Yu on 2020-05-15

Hello everyone,
I am new to Yade. I have run the script simulation.py in agglomerate examples in the trunk version
 https://github.com/yade/trunk/tree/master/examples/agglomerate

It use O.interactions.erase(i.id1,i.id2) (line 52) to delete specified interactions that has been created using Ip2_CpmMat_CpmMat_CpmPhys(cohesiveThresholdIter=1) IPhys and Law2_ScGeom_CpmPhys_Cpm() Lawfunctor.

So,what IPhys and Law would be used in these pairs of partcles in the following simulation by default or any manual definition when they are deleted already?

I have found that there really exist interaction between a pair of bodies (their interaction have been deleted before),but I don't understand how to define the interaction attribute

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
2020-05-17
Last query:
2020-05-17
Last reply:
2020-05-16
Jan Stránský (honzik) said : #1

Hello,

> I am new to Yade

welcome :-)

> what IPhys and Law would be used in these pairs of partcles in the following simulation by default or any manual definition when they are deleted already?

deleting existing interaction has no particular effect on future interactions.
New interactions are simply created according to particles' materials and Ig2, Ip2 and Law2 functors [1].

> I have found that there really exist interaction between a pair of bodies (their interaction have been deleted before),but I don't understand how to define the interaction attribute

Please be more specific what is "interaction attribute". The creation is governed by particles' materials and Ig2, Ip2 and Law2 functors.
You can then access the interaction and do other modifications if needed.

cheers
Jan

[1] https://yade-dem.org/doc/user.html#functors-choice

Wang Yu (wangyu93) said : #2

Thanks a lot Jan!

Maybe I have some misunderstanding with O.interactions.erase. If deleting existing interaction has no particular effect on future interactions,so what's the purpose of this function?

I found that partcles within an agglomerate are bonded tightly (their interaction may have some "cohesive" property). If the new interactions(partcles between different agglomerates) are created according to the same functors(Ig2, Ip2 and Law2 for CpmMat spheres), why aren't there the same cohesive properties (there are no bond between partcles from two agglomerates)?

According to my guess(may be wrong),O.interactions.erase break the interaction for a moment, and the bond part of interaction (like cohesive) can not be rebuilt because of the special property of CpmMat. Am I right?

In fact, I want to creat some agglomerates:
A-type-interaction between partcles within an agglomerate is different from B-type-interaction between agglomerates. Is there any example or advise for my question?

Thanks
Wang

Wang Yu (wangyu93) said : #3

Thanks a lot Jan!

Maybe I have some misunderstanding with O.interactions.erase. If deleting existing interaction has no particular effect on future interactions,so what's the purpose of this function?

I found that partcles within an agglomerate are bonded tightly (their interaction may have some "cohesive" property). If the new interactions(partcles between different agglomerates) are created according to the same functors(Ig2, Ip2 and Law2 for CpmMat spheres), why aren't there the same cohesive properties (there are no bond between partcles from two agglomerates)?

According to my guess(may be wrong),O.interactions.erase break the interaction for a moment, and the bond part of interaction (like cohesive) can not be rebuilt because of the special property of CpmMat. Am I right?

In fact, I want to creat some agglomerates:

A-type-interaction between partcles within an agglomerate is different from B-type-interaction between agglomerates. Is there any example or advise for my question?

PS:With my current ideas,I think out of two approaches:
1. A-type-interaction and B-type-interaction use the same Ip2 and Law2 functors but with different arguments(about stiffness or cohesive property)
2. Two types of interactions use different Ip2 and Law2 functors.
Do these approaches accessible in Yade?

Thanks

Wang

At 2020-05-16 04:41:00, "Jan Stránský" <email address hidden> wrote:
>Your question #690742 on Yade changed:
>https://answers.launchpad.net/yade/+question/690742
>
> Status: Open => Answered
>
>Jan Stránský proposed the following answer:
>Hello,
>
>> I am new to Yade
>
>welcome :-)
>
>> what IPhys and Law would be used in these pairs of partcles in the
>following simulation by default or any manual definition when they are
>deleted already?
>
>deleting existing interaction has no particular effect on future interactions.
>New interactions are simply created according to particles' materials and Ig2, Ip2 and Law2 functors [1].
>
>> I have found that there really exist interaction between a pair of
>bodies (their interaction have been deleted before),but I don't
>understand how to define the interaction attribute
>
>Please be more specific what is "interaction attribute". The creation is governed by particles' materials and Ig2, Ip2 and Law2 functors.
>You can then access the interaction and do other modifications if needed.
>
>cheers
>Jan
>
>[1] https://yade-dem.org/doc/user.html#functors-choice
>
>--
>If this answers your question, please go to the following page to let us
>know that it is solved:
>https://answers.launchpad.net/yade/+question/690742/+confirm?answer_id=0
>
>If you still need help, you can reply to this email or go to the
>following page to enter your feedback:
>https://answers.launchpad.net/yade/+question/690742
>
>You received this question notification because you asked the question.

Best Jan Stránský (honzik) said : #4

The idea is to let Yade connect automatically all "close" particles with cohesive bonds (using 'factor', aabbEnlargeFactor and interactionDetectionFactor).
It connects particles within a grain, which is OK.
But it also connect close particles form different grains. These interactions are deleted by O.interactions.erase

"the special property of CpmMat" is Ip2_CpmMat_CpmMat_CpmPhys.cohesiveThresholdIter, which tells Yade to consider new interactions ad s non-cohesive if O.iter > this value.

cheers
Jan

Wang Yu (wangyu93) said : #5

Thanks Jan Stránský, that solved my question.

Wang Yu (wangyu93) said : #6

Thanks Jan Stránský, that solved my question.

Wang Yu (wangyu93) said : #7

Thanks for your reply

It's that mean my understanding of "O.interactions.erase break the interaction for a moment, and the cohesive part of interaction can not be rebuilt because of the cohesiveThresholdIter of CpmMat" is right?

And I will open an new question about "How to creat some agglomerates:the interaction between partcles within an agglomerate is different from interaction between agglomerates by their different arguments or absolutely different Ip2 and Law2 functors" after a while.

Hope to communicate with you again

Thank you again!

At 2020-05-16 21:20:50, "Jan Stránský" <email address hidden> wrote:
>Your question #690742 on Yade changed:
>https://answers.launchpad.net/yade/+question/690742
>
> Status: Open => Answered
>
>Jan Stránský proposed the following answer:
>The idea is to let Yade connect automatically all "close" particles with cohesive bonds (using 'factor', aabbEnlargeFactor and interactionDetectionFactor).
>It connects particles within a grain, which is OK.
>But it also connect close particles form different grains. These interactions are deleted by O.interactions.erase
>
>"the special property of CpmMat" is
>Ip2_CpmMat_CpmMat_CpmPhys.cohesiveThresholdIter, which tells Yade to
>consider new interactions ad s non-cohesive if O.iter > this value.
>
>cheers
>Jan
>
>--
>If this answers your question, please go to the following page to let us
>know that it is solved:
>https://answers.launchpad.net/yade/+question/690742/+confirm?answer_id=3
>
>If you still need help, you can reply to this email or go to the
>following page to enter your feedback:
>https://answers.launchpad.net/yade/+question/690742
>
>You received this question notification because you asked the question.

Jan Stránský (honzik) said : #8

yes, "the cohesive part of interaction" is not "rebuild" be default.
Concerning "can not be rebuilt", I guess there are ways how to do it if needed (I have not used such feature).

cheers
Jan