← Back to team overview

yade-users team mailing list archive

Re: [Question #632015]: gravity for certain material instance

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Behzad,
you can mimic (anti)gravity by prescribin permanent force on certain bodies.

########################################
bs = (
   sphere(( 0,0,0),1),
   sphere(( 5,0,0),2),
   sphere((11,0,0),3),
   sphere((20,0,0),4),
)
O.bodies.append(bs)

for i,b in enumerate(bs):
   m = b.state.mass
   g = ((-1)**i) * Vector3(0,1e-6,0)
   f = m*g
   O.forces.addF(i,f,permanent=True)
########################################

Cheers
Jan

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