← Back to team overview

yade-users team mailing list archive

Re: Physical action - Force

 

Hi,

Thank you all for your answers!

I have got another question, I used :

ncb->bex.addForce (id1,-f);
ncb->bex.addForce (id2,+f);

to apply a stress on the top and bottom wall (here f is equal to sigma*S) S is the wall surface.
I run my simulation with non dynamic walls ( isdynamic = "0").
I want to know  if the walls need to be dynamic when applying forces on them?



Le mardi 15 juin 2010 à 20:01 +0200, Václav Šmilauer a écrit :
> 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
> 
> 
> 
> _______________________________________________
> 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