← Back to team overview

yade-users team mailing list archive

Re: Physical action - Force

 

In the current version (0.50 and around), the code would read

  scene->forces.addForce(id1,-f);
  /* ... */

or you could use LawFunctor::applyForceAtContactPoint which does both
force and torque application on both particles.

Hope this helps, Vaclav



> 
> 			ncb->bex.addForce (id1,-f);
> 			ncb->bex.addForce (id2,+f);
> 			ncb->bex.addTorque(id1,-c1x.Cross(f));
> 			ncb->bex.addTorque(id2, c2x.Cross(f));
> while in the old version:
> 			static_cast<Force*>   (ncb->physicalActions->find( id1 , actionForce  ->getClassIndex()).get())->force    -= f;
> 			static_cast<Force*>   (ncb->physicalActions->find( id2 , actionForce  ->getClassIndex()).get())->force    += f;
> 
> 			static_cast<Momentum*>( ncb->physicalActions->find( id1 ,  actionMomentum->getClassIndex() ).get())->momentum -= c1x.Cross(f);
> 			static_cast<Momentum*>( ncb->physicalActions->find( id2 ,  actionMomentum->getClassIndex() ).get())->momentum += c2x.Cross(f);
> 
> 
> I hope it useful.
> 
> Lin Cheung
> 
> ======= 2010-06-15 19:27:48 =======
> 
> >Hi evrybody,
> >
> >has the physicalAction-Action force (existing in the old versions of
> >Yade) been fusioned into another class (in the newer versions). Does it
> >exist anymore? 
> >Actually, I want to apply a force or a stress on a wall, how can it be
> >done with the newer versions?  
> >
> >_______________________________________________
> >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
> 
> 
> 
> __________________________________________________
> 赶快注册雅虎超大容量免费邮箱?
> http://cn.mail.yahoo.com
> 
> _______________________________________________
> 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





Follow ups

References