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

Jérôme Duriez proposed the following answer:
Note that you may face some issues using the assignment phys.unp = 
geom.penetrationDepth, because of an "offset" (during the computation loop) in 
the computations / use of these two variables.
See the example below, where some movements (vanishing here after some 
oscillations) appear.

If, in your case, such oscillations would be annoying, e.g. having an amplitude 
big enough to break the cohesive bonds, you may just perform one cycle with any 
movement frozen (dynamic = False).
So that the initial offset between unp and penetrationDepth can be cancelled 
(uncomment the two corresponding lines in the example, and you won't get any 
movement)


O.materials.append(CohFrictMat(young=50e9,poisson=0.3,frictionAngle=radians(35),normalCohesion=1e10,shearCohesion=35e10))

O.bodies.append(sphere(center=Vector3(0,0,0),radius = 1,fixed=1))
O.bodies.append(sphere(center=Vector3(1.5,0,0),radius = 1))


O.engines=[
    ForceResetter()
    ,InsertionSortCollider([Bo1_Sphere_Aabb()])
    ,InteractionLoop(
        [Ig2_Sphere_Sphere_ScGeom6D()],
        
[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False)],
        [Law2_ScGeom6D_CohFrictPhys_CohesionMoment()])
    ,NewtonIntegrator()
    ,PyRunner(command='saveData()',iterPeriod = 1)
    ]

O.dt = 1e-5
from yade import plot

def saveData():
    plot.addData(uSph = O.bodies[1].state.pos[0]
                 ,fN = O.forces.f(1)[0]
                 ,it = O.iter
                 )

plot.plots={'it':'fN',' it':'uSph'}
plot.plot()
yade.qt.View()

#O.bodies[1].dynamic=False
O.step()
O.interactions[0,1].phys.unp = O.interactions[0,1].geom.penetrationDepth
#O.bodies[1].dynamic=True
O.run(1000,1)

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to