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

Guo, Chang posted a new comment:
Hi Karol,
Thank you very much for your reply.
I've tried to use this function to block DoFs. But it didn't work.

This is part of my code. The clump's DoFs weren't blocked.


OutDiameter=0.1143

PipeRoughR=0.01

SectionNum=20

LongNum=15

WidthX=0.6

HeightZ=3

HeightZ0=0.3

thickness=0.01

gravity=(0,0,-10)

densityPipe=7850


InputR=OutDiameter/2-PipeRoughR

Gap=sin(pi/SectionNum)*2*InputR

LengthY=Gap*(LongNum-1)+PipeRoughR


PipeParticleNum=0

PP=[]

for j in range(LongNum):

    for i in range(SectionNum):

        PipeParticleNum += 1

PP.append(sphere([InputR*sin(i*2*pi/SectionNum)+0.3,j*Gap,InputR*cos(i*2*pi/SectionNum)+0.3],radius=PipeRoughR,,color=(1,1,0)))


PPID=O.bodies.appendClumped(PP)

PPClump=O.bodies[PPID[0]]

PPClump.dynamic=1

PPClump.state.blockDOFs='xyXYZ'

PPClump.state.vel = (0, 1,0)

PPClump.state.angVel = (0,0,0)


h=0.4

sp=pack.SpherePack()

sp.makeCloud((thickness*5,0.001,h),(WidthX-
thickness*5,LengthY-0.001,h+.2),rMean=0.02)

#

sp.toSimulation(material=O.materials[SphereMID])


newton=NewtonIntegrator(damping=0.4,gravity=gravity,dampGravity=0)

O.engines=[

        ForceResetter(),

        #(1) This is where we allow big bodies, else it would crash due
to the very large bottom box:

InsertionSortCollider([Bo1_Box_Aabb(),Bo1_Sphere_Aabb()],allowBiggerThanPeriod=True),

        InteractionLoop(

                [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],

                [Ip2_FrictMat_FrictMat_FrictPhys()],

                [Law2_ScGeom_FrictPhys_CundallStrack()]

        ),

        GlobalStiffnessTimeStepper(),

    newton,

]


for b in O.bodies:

    if isinstance(b.shape,Sphere):

        b.state.vel[2]=-1

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

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to