← Back to team overview

yade-users team mailing list archive

Re: [Question #237047]: BubbleMat updated, interaction not working after 1 or 2 contacts

 

Question #237047 on Yade changed:
https://answers.launchpad.net/yade/+question/237047

    Status: Answered => Solved

Nolan Dyck confirmed that the question is solved:
Alright the bugs are fixed. The bubble contacts are very stable now, I
am no longer encountering the problem of the original post. I have
pushed the changes to my fork.

The first problem was, as Bruno mentioned. not initializing the bubble
phys object.

After that was corrected, the old problem of bubbles dissapearing and
their contact forces reporting NaN. As it turns out, the problem was in
the Newton-Raphson iteration loop. Occasionally, a negative value for
the 'ret' variable was being computed. On the next iteration it would
try to compute BubbleMat.cpp Line 40:

 g = log(ret*c2);

As mentioned above, c2 is always > 0, so a negative number was passed to
the log function. The logarithm of a negative number is undefined, so it
returned NaN.  The remedy was to add an if statement to reset ret to a
positive value if a negative value was ever computed, and force the next
iteration.

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.