← Back to team overview

yade-users team mailing list archive

Re: [Question #197438]: No interactions after erasing body

 

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

    Status: Answered => Open

Mark S. Bentley is still having a problem:

Sure, good idea :) This modified version of the bouncing ball script 
shows either my problem, or what stupid mistake I'm making ;-) I am 
running yade-daily on ubuntu from the PPA (version 2+3128+30~precise1, 
from 2012-05-16) and the script below shows the dynamic particle 
bouncing in the first case, and penetrating in the second, and that the 
bound of the re-created body is not initialised.

Regards, Mark

-----

ids = O.bodies.append([
    utils.sphere(center=(0,0,0),radius=.5,fixed=True),
    utils.sphere((0,0,2),.5)
])

O.engines=[
    ForceResetter(),
    InsertionSortCollider([Bo1_Sphere_Aabb()]),
    InteractionLoop(
       [Ig2_Sphere_Sphere_L3Geom()],
       [Ip2_FrictMat_FrictMat_FrictPhys()],
       [Law2_L3Geom_FrictPhys_ElPerfPl()]
    ),
    GravityEngine(gravity=(0,0,-9.81)),
    NewtonIntegrator(damping=0.1),
    
VTKRecorder(fileName='vtk/test-',recorders=['spheres','id','velocity'],iterPeriod=1000)
]

O.dt=.5e-4*utils.PWaveTimeStep()

O.run(2100000, True)

print 'Particle IDs and boundings: ' + str(ids)
print str([pcle.bound for pcle in O.bodies])

O.bodies.erase(ids[1])

# Run a few timesteps to ensure interactions are cleared/updated etc.
O.run(10, True)

#Create new body
new_id = O.bodies.append([utils.sphere((0,0,2),.5)])

O.run(2100000, True)

print 'Particle IDs and boundings: ' + str(ids)
print str([pcle.bound for pcle in O.bodies])


On 16/05/12 16:15, Anton Gladky wrote:
> Question #197438 on Yade changed:
> https://answers.launchpad.net/yade/+question/197438
>
>      Status: Open =>  Answered
>
> Anton Gladky proposed the following answer:
> It would be good to see a simple test-script, which demonstrates the
> problem.
>
> Anton
>

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