← Back to team overview

yade-users team mailing list archive

Re: [Question #648734]: DOFs of facetSphere

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello Huihuang,
facets have zero mass and inertia by default. It does not matter if they are fixed, but once you let them move, you have zero division in acceleratio=force/mass
have a try this script (also note appendClumped, which I suppose is what you want)
#####
s = sphere((0,3,0),1)
O.bodies.append(s)
facets = geom.facetSphere((0,0,0),1,fixed=False)
for f in facets:
   f.state.mass = 1
   f.state.inertia = (1,1,1)
cid,ids = O.bodies.appendClumped(facets)
fs = O.bodies[cid]
fs.state.mass = s.state.mass
#
fs.state.blockedDOFs = 'xzXYZ'
fs.state.vel = (0,1,0)
#
O.engines = [
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
   InteractionLoop(
      [Ig2_Facet_Sphere_ScGeom()],
      [Ip2_FrictMat_FrictMat_FrictPhys()],
      [Law2_ScGeom_FrictPhys_CundallStrack()],
   ),
   NewtonIntegrator()
]
O.dt = 1e-5
#####

cheers
Jan

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