How to update volume of cells in PeriodicFlowEnigne

Asked by Chu on 2020-07-12

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:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
2020-07-12
Last reply:
2020-07-27
Jérôme Duriez (jduriez) said : #1

Did you try playing with PeriodicFlowEngine.updateTriangulation ?

Robert Caulk (rcaulk) said : #2

>PeriodicFlowEngine(dead=1,

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

Can you help with this problem?

Provide an answer of your own, or ask Chu for more information if necessary.

To post a message you must log in.