← Back to team overview

yade-users team mailing list archive

Re: [Question #693984]: How to export VTK file of walls

 

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

    Status: Answered => Open

Leonard is still having a problem:
Hi Jan,

Thanks for your reply.

The general way to output VTK files could be (in O.engines):
VTKRecorder(fileName='vtkRecorder',recorders=['all'],iterPeriod=500),

In this way I can gain all the items (spheres, walls...) which is really
good. But it exports the files evey 500 iters, which doesn't ensure I
get the files at the strains that I want, and also it generates many
files at other strains which I don't need.

The way I export the VTK files by using VTKExporter at some interested
strain level is like:

vtkExporter = export.VTKExporter('sphere')

strainLevel=[0.01,0.02,0.03]
def outputVTK_sphere():
	if -triax.strain[1]>strainLevel[0]:
		vtkExporter.exportSpheres(ids='all',what=[('linVel','b.state.vel'),('linVelLen','b.state.vel.norm()'),('id',"b.id")])
		strainLevel.remove(strainLevel[0])

And then I put this function to the engines as:
PyRunner(command='outputVTK_sphere()',iterPeriod=100)
But in this way exporting the "wall" is not (yet) supported as you mentioned.

>they are interchangeable.
Do you have any idea to make the VTKRecorder being executed only at the desired strain? As something like the above example.

Thanks
Leonard

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