How to understand getStress?

Asked by 张文卿

I‘m using getStress() to monitor my 'peri'.In doucumentation,it says stress is negative for repulsive contact forces.So,I wanna try if it'scorrect.I used it for a simple example:bouncingbubble.py.And something wierd show up.Stress is(nan,nan,nan,0,0,12.644,0,0,34.8838).Can anyone explain that?

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
Jan Stránský (honzik) said :
#1

Hello,
getStress() function computes the result based on normalForce and
shearForce of interactions. BubblePhys is one of a few IPhys classes, that
does not have shearForce.. The code probably should throw some error, but
it does not so you get a strange result..

If you change BubbleMat to FrictMat, it should work ok.. What material are
you using in other simulations?

cheers
Jan

2017-01-07 14:57 GMT+01:00 张文卿 <email address hidden>:

> New question #432620 on Yade:
> https://answers.launchpad.net/yade/+question/432620
>
> I‘m using getStress() to monitor my 'peri'.In doucumentation,it says
> stress is negative for repulsive contact forces.So,I wanna try if
> it'scorrect.I used it for a simple example:bouncingbubble.py.And something
> wierd show up.Stress is(nan,nan,nan,0,0,12.644,0,0,34.8838).Can anyone
> explain that?
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

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

Hi Jan,
I'm not sure we can something about it.
I think static_casting to wrong type has undefined behavior, and "undefined" include the possibility of continuing silently...
A debug build would show the error very explicitely though (since it would be a dynamic_cast).
Bruno

Can you help with this problem?

Provide an answer of your own, or ask 张文卿 for more information if necessary.

To post a message you must log in.