Showing value of a parameter from the Ip2_FrictMat_FrictMat_MindlinPhys

Asked by Antoine FAULCONNIER

Dear all,

This might be an easy question, but as I am not yet a Yade nor a Python champion I am asking it here.

How can I access the value of a parameter from the Ip2_FrictMat_FrictMat_MindlinPhys contact engine ?

I tried typing "Ip2.en" in the Yade\python console to see the value of the normal restitution coefficient but it only returns "<MatchMaker instance at 0x557287eaed30>" which does not really help me.
So what is the correct syntax to get it ?

To give a bit of context, I am trying to solve the question : why do I still have Energy dissipated through viscous damping eventhough I set both tangential and normal restitution coefficients to 1. Hence my question to check these values.

Thank you for your help,
Antoine

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

> I tried typing "Ip2.en" ... but it only returns "<MatchMaker instance at 0x557287eaed30>" which does not really help me.
> So what is the correct syntax to get it ?

The syntax is correct.
What you got is exactly what Ip2.en is.
It is a MatchMaker, which you can get other info from. See documentation [1].

Another, and maybe better, quantity to check is the values of IPhys created by the Ip2, not Ip2 itself.

Cheers
Jan

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

Revision history for this message
Antoine FAULCONNIER (afaulconnier) said (last edit ):
#2

Thanks a lot Jan, that answered my question.

The syntax I was looking for was "Ip2.en.val".
And the value is coherent with what I inputed.

I will look into the IPhys values, thanks for the help.

Cheers
Antoine

Revision history for this message
Antoine FAULCONNIER (afaulconnier) said :
#3

Hello Jan and everyone,

Sorry to bother you again.
I have the response to my original question, but the global problem remains.

I am checking the IPhys values and it raises an other similar question, I would like to check values from MindlinPhys in particular.
But for example MindlinPhys.betan is a "property" class and I don't find anywhere in the documentation how to access the numerical value of such object.

Please help

Thank you,
Antoine

Revision history for this message
Jan Stránský (honzik) said :
#4

> I have the response to my original question, but the global problem remains.

Then next time please open a new question, even though "the global problem remains", as described in [2], point 5.

> But for example MindlinPhys.betan is a "property" class and I don't find anywhere in the documentation how to access the numerical value of such object.

interaction.phys.betan

Cheers
Jan

[2] https://www.yade-dem.org/wiki/Howtoask

Revision history for this message
Antoine FAULCONNIER (afaulconnier) said :
#5

> Then next time please open a new question, even though "the global problem remains", as described in [2], point 5.

Sorry I thought it was close enough to consider it the same question.
The global problem was just to give context.

> Interaction.phys.betan

This doesn't work because 'Interaction.phys' has no attribute 'betan'.
It exists in the MindlinPhys class but I can't access the value.

Thank you
Antoine

Revision history for this message
Best Jan Stránský (honzik) said :
#6

> I thought it was close enough

The title mention Ip2_FrictMat_FrictMat_MindlinPhys, here we come to MindlinPhys.
As you already discovered, it is really a different topic.

> Interaction.phys

I wrote interaction.phys, not Interaction. You call it on specific Interaction instance, not Interaction class itself. For example:

for interaction in O.interactions: print(interaction.phys.betan)

Cheers
Jan

Revision history for this message
Antoine FAULCONNIER (afaulconnier) said :
#7

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