← Back to team overview

yade-users team mailing list archive

Re: [Question #681474]: force chain in paraview

 

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

    Status: Needs information => Open

Alireza Sadeghi gave more information on the question:
Hello Jan,

Thank you very much for your response. I think the vtk export express just the initial interaction, because at the beginning there is no interaction between the particles. 
This is my complete code:


from yade import utils, plot
from yade import pack, qt
from datetime import datetime
from yade import export

qtr=qt.Renderer()
qtr.bgColor=(1,1,1)


#===========================================================
#==================set a periodic boundary==================
#===========================================================

O.periodic=True
O.cell.refSize=(2e-1,2e-1,2e-1)

#==============================================================
#================= define the materials =======================
#==============================================================

O.materials.append(CohFrictMat(normalCohesion= 1e20, shearCohesion=
1e20, isCohesive= True, young=6.81e8, density=1377.5, poisson=0.3,
frictionAngle= 0.31, fragile=False, label='Coke'))

#===============================================================
#=================== define packing ============================
#===============================================================

nums=['t']

mats=['Coke']

coke=(5e-3,150)

nums=pack.SpherePack()

nums.makeCloud((0,0,0),(2e-1,2e-1,2e-1),rMean=coke[0],rRelFuzz=0,num=coke[1])

O.bodies.append([utils.sphere(c,r,material=mats[0],color=(0,0,1)) for
c,r in nums])



sigmaIso=-1e8


#===============================================================
#=============================VTK===============================
#===============================================================

vtkExporter = export.VTKExporter('VTK_simulatione')


#===============================================================
#=================== define Engine =============================
#===============================================================


O.engines=[
     ForceResetter(),

     InsertionSortCollider([Bo1_Sphere_Aabb()]),
     InteractionLoop(
        [Ig2_Sphere_Sphere_ScGeom()],
        [Ip2_FrictMat_FrictMat_FrictPhys()],
        [Law2_ScGeom_FrictPhys_CundallStrack()]
     ),

     PeriTriaxController(label='triax',
		goal=(sigmaIso,sigmaIso,sigmaIso),stressMask=7,
		dynCell=True,maxStrainRate=(1,1,1),
		maxUnbalanced=.01,relStressTol=1e-3,
		doneHook='compactionFinished()'
     ),
     NewtonIntegrator(damping=0.4),
    
     PyRunner(iterPeriod=100, command="vtkExporter.exportInteractions(ids='all',what=[('forceN','i.phys.normalForce.norm()')])"),
     PyRunner(command='history()',iterPeriod=10,label='recorder'),
]


O.dt=1e-6

O.saveTmp()


def history():
	plot.addData(unbalanced=unbalancedForce(),
	             szz=-triax.stress[2],ezz=-triax.strain[2],i=O.iter,)

        print 'porosity:', porosity()
        print 'iteration', O.iter


O.run()


plot.plots={'ezz':('szz')}
plot.plot()

def compactionFinished():
	print 'Finished'
	O.pause()

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