← Back to team overview

yade-users team mailing list archive

Re: [Question #258258]: Cohesion creation- a new constitutive law

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Than the problem might be in Law2::go implementation. It should return true
for existing interactions and false for interactions to be deleted. Could
you check your implementation if takes cohesion into account?
cheers
Jan


2014-11-30 21:36 GMT+01:00 behzad
<question258258@xxxxxxxxxxxxxxxxxxxxx>:

> Question #258258 on Yade changed:
> https://answers.launchpad.net/yade/+question/258258
>
>     Status: Answered => Open
>
> behzad is still having a problem:
> Hi,
>
> I've already done this. And it's actually why I ask to know how an
> interaction becomes cohesive?
>
> For the moment, I'm ignoring the conditions such as if (I->isActive) or
> etc. We want to create a cohesive interaction of two cohesive balls
> which have already define as isCohesive=true with corresponding
> strengths.
>
> in cpp file, I've got:
>
> void Ip2_CohBurgersMat_CohBurgersMat_CohBurgersPhys::go(const
> shared_ptr<Material>& b1, const shared_ptr<Material>& b2, const
> shared_ptr<Interaction>& interaction) {
>   if(interaction->phys) return;
>   shared_ptr<CohBurgersPhys> phys (new CohBurgersPhys());
>   Calculate_CohBurgersMat_CohBurgersMat_CohBurgersPhys(b1, b2,
> interaction, phys);
>   interaction->phys = phys;
>
>   CohBurgersPhys* contactPhys =
> YADE_CAST<CohBurgersPhys*>(interaction->phys.get());
>   phys->cohesionBroken = false;
>   phys->initCohesion   = true;
>   cohesionDefinitionIteration = -1;
>   setCohesionNow = true;
> }
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

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