← Back to team overview

yade-users team mailing list archive

[Question #706626]: attach force to a certain point of the box

 

New question #706626 on Yade:
https://answers.launchpad.net/yade/+question/706626

Hello there.
I attach a force at the box (by using ForceEngine) and as I know this force affects at mass center of the box or something like this.
I would like attach force to a certain box point (e.g. to the center of upper facet).
I will appreciate if you tell me how to do it. Thanks!

##############################
box_size = Vector3(3, 3, 5)
box_center = Vector3(box_size[0]/2, box_size[1]/2, box_size[2]/2)
pile_size = Vector3(1, 3, 3)
pile_center = box_center

O.periodic = True
O.cell.hSize = (box_size[0],0,0,0,box_size[1],0,0,0,box_size[2])
sp = pack.SpherePack()
sp.makeCloud(box_center-box_size/2,
                box_center+box_size/2,
                rMean=0.07
             )
sp.toSimulation(color=(0,1,0))
pile_id = O.bodies.append(box(
    pile_center,
    pile_size/2
))
O.bodies[pile_id].state.blockedDOFs = 'yzXZ'

O.engines = [
    ForceResetter(),
    InsertionSortCollider([Bo1_Sphere_Aabb(),
                            Bo1_Box_Aabb()],
                            allowBiggerThanPeriod=True),
    InteractionLoop(
            [Ig2_Sphere_Sphere_ScGeom(),
                Ig2_Box_Sphere_ScGeom()],
            [Ip2_FrictMat_FrictMat_FrictPhys()],
            [Law2_ScGeom_FrictPhys_CundallStrack()]
    ),
    ForceEngine(ids=[pile_id], force=(1000,0,0)),
    NewtonIntegrator(damping=0.1, label='newton'),
    GlobalStiffnessTimeStepper()
]


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