← Back to team overview

yade-users team mailing list archive

Re: [Question #685502]: cpm model tensile contact breakage

 

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

chanaka Udaya posted a new comment:
Hello Jan,

many thanks for the detailed answer.

If I want to delete the contact after damage is reaching to 0.9999, Is
it okay to change the source code like below ?,

 ConcretePM.hpp,(line 281)

((Real,omegaThreshold,((void)">=1. to deactivate, i.e. never delete any
contacts",0.9999),,"damage after which the contact disappears (<1),
since omega reaches 1 only for strain →+∞"))

I have changed the omegaThreshould to 0.9999 and in  .cpp file I did not
change anything.

 if (epsN>0. && ((isCohesive && omega>omegaThreshold) || !isCohesive)) {
  /* if (isCohesive) { */
    const shared_ptr<Body>& body1 = Body::byId(I->getId1(),scene), body2 = Body::byId(I->getId2(),scene); assert(body1); assert(body2);
    const shared_ptr<CpmState>& st1 = YADE_PTR_CAST<CpmState>(body1->state), st2 = YADE_PTR_CAST<CpmState>(body2->state);
   /* nice article about openMP::critical vs. scoped locks: http://www.thinkingparallel.com/2006/08/21/scoped-locking-vs-critical-in-openmp-a-personal-shootout/ */
   { boost::mutex::scoped_lock lock(st1->updateMutex); st1->numBrokenCohesive += 1; /* st1->epsPlBroken += epsPlSum; */ }
   { boost::mutex::scoped_lock lock(st2->updateMutex); st2->numBrokenCohesive += 1; /* st2->epsPlBroken += epsPlSum; */ }
  /* } */
  return false;
 }

After compiling, I got a following message for tension between two
particles after some time,

AttributeError: 'NoneType' object has no attribute 'normalForce'

That means the contact is deleted?

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.