← Back to team overview

yade-users team mailing list archive

Re: [Question #660590]: Loading and manipulating a saving file

 

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

    Status: Answered => Open

amir is still having a problem:
Dear Jérôme and Jan:

I've finally found the solution. From the resultant force (almost 2
times more) and number of interactions (2 times more) can understand
that the sphere from 1st simulation could not be completely removed from
the calculation cycle in the first time-step of the 2nd simulation. So,
I used the command "O.reset()" to reset the simulation to empty state.
Ça marche.

####################################################
sp=SpherePack(); sp.fromSimulation()

for b in O.bodies:
    if isinstance (b.shape,Sphere): O.bodies.erase(b.id)

O.bodies.clear()

O.reset()

O.materials.append(FrictMat(young=E1,poisson=poisson1,frictionAngle=frictionAngle,density=density1,
label='mat_spheres'))

sp.toSimulation()

O.bodies.append(utils.geom.facetBox((1,1,1),(1,1,1),wallMask=31))
################################################

Does it mean that users has to always apply  "O.reset()" when they have
"erase" and "clear" in their Yade scripts?

Many thanks to you.

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