Question #556907 on Yade changed: https://answers.launchpad.net/yade/+question/556907
Status: Answered => Open weijy is still having a problem: I'm afraid it doesn't work quite well on my try. I wrote: O.engines: ... Bo1_Sphere_Aabb(label = 'bo1s'),... Ig2_Sphere_Sphere_ScGeom(label = 'ig2ss'),... Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=0, label = 'ip2jj'),... ... triax, newton, PyRunner(..., label = 'checker'), ....... def set_interaction(): bo1s.aabbEnlargeFactor = intRadius ig2ss.interactionDetectionFactor = intRadius ip2jj.cohesiveTresholdIteration = O.iter + 2 checker.iterPeriod = 1 checker.command = 'check_cohesion()' def check_cohesion(): bo1s.aabbEnlargeFactor = -1 ig2ss.interactionDetectionFactor = -1 for i in O.interactions: if isinstance(O.bodies[i.id1].shape,Sphere) and isinstance(O.bodies[i.id2].shape,Sphere): if i.phys.FnMax > 0: num_coh += 1 And the num_coh showed 0. -- At 2017-03-14 00:52:55, "Luc Scholtès" <question556...@answers.launchpad.net> wrote: >Your question #556907 on Yade changed: >https://answers.launchpad.net/yade/+question/556907 > > Status: Open => Answered > >Luc Scholtès proposed the following answer: >I guess that using the labels, you can get what you want. Here is a >suggestion that actually I never used myself since I prepare my dense >samples with a dedicated separate script (I then import these dense >samples directly in my simulations, e.g. for triaxial deviatoric >testing): > >For the isotropic compaction phase, define default values in engines >such as interactions take place between strictly contacting particles ( >aabbEnlargeFactor=1, interactionDetectionFactor=1) and particles >interact without cohesion (cohesiveTresholdIteration=0). > >Then, when the confined state is reached (I guess you have a test for >checking that), just use one step where you define the bonds at the >right interaction range with the labels: > >SSgeom.interactionDetectionFactor=intR >Saabb.aabbEnlargeFactor=intR >interactionPhys.cohesiveTresholdIteration=O.iter+1 > >O.step() > >Then initialize the interaction range (if you want): > >SSgeom.interactionDetectionFactor=-1. >Saabb.aabbEnlargeFactor=-1. > >Then run the deviatoric phase. > >Let me know if it solves your problem. > >Luc > >-- >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/556907/+confirm?answer_id=2 > >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/556907 > >You received this question notification because you asked the question. -- 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 : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp