How to update volume of cells in PeriodicFlowEnigne

Asked by Chu

Dear all,

I'd like to use PeriodicFlowEngine to get Volume of Voronoi cell.I run MWE and I get Volume of Voronoi cell successfully in the first time. But the volume is not updated as the pack changes. How to update volume of cells in PeriodicFlowEngine?

Thanks for your any suggestions.

#####MWE#####

from yade import pack,qt
O.periodic=True

O.cell.hSize=Matrix3(0.2, 0, 0,
    0 ,0.2, 0,
    0, 0, 0.2)

sp=pack.SpherePack()
radius=5e-3
num=sp.makeCloud(Vector3().Zero,O.cell.refSize,radius,.2,5000,periodic=True) # min,max,radius,rRelFuzz,spheresInCell,periodic
O.bodies.append([sphere(s[0],s[1]) for s in sp])

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb()],verletDist=.05*radius),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
 ),
 PeriTriaxController(dynCell=True,mass=0.2,maxUnbalanced=0.01,relStressTol=0.02,goal=(-1e4,-1e4,0),stressMask=3,globUpdate=5,maxStrainRate=(1.,1.,1.),label='triax'),
    NewtonIntegrator(damping=.2),
    PeriodicFlowEngine(dead=1,useSolver=3,label="flow"),
    PyRunner(command='test()',iterPeriod=1000)
]
O.dt=PWaveTimeStep()
O.run();
qt.View()

def test():
    volume=0
    flow.compTessVolumes()
    for b in O.bodies:
        volume += flow.volume(b.id)
    print (volume)

Question information

Language:
English Edit question
Status:
Invalid
For:
archivedbychu Edit question
Assignee:
No assignee Edit question
Solved by:
Chu
Solved:
Last query:
Last reply:
Revision history for this message
Jérôme Duriez (jduriez) said :
#1

Did you try playing with PeriodicFlowEngine.updateTriangulation ?

Revision history for this message
Robert Caulk (rcaulk) said :
#2

>PeriodicFlowEngine(dead=1,

Certainly a starting point would be to activate the PeriodicFlowEngine with dead=0.

Revision history for this message
Chu (chu-1) said :
#3

it's not a good question