← Back to team overview

yade-users team mailing list archive

Re: [Question #700031]: postprocessing data with tassellationWrapper

 

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

    Status: Open => Answered

Karol Brzezinski proposed the following answer:
Hi Marco,

when you say you don't see anything after loading the file with ParaView
you mean completely nothing, or just the result is not 'impressive'? In
this example, the results don't show any distinct features. The strain
fields are be uniform, with some noise.  Maybe try this modification.


from yade import pack
pred=pack.inAlignedBox((0,0,0),(1,1,1))
spheres=pack.randomDensePack(pred,spheresInCell=2000,radius=.05,rRelFuzz=0,returnSpherePack=True)
spheres.toSimulation()
TW=TesselationWrapper()
TW.triangulate() #compute regular Delaunay triangulation, don’t construct tesselation
TW.computeVolumes() #will silently tesselate the packing, then compute volume of each Voronoi cell
TW.setState(0) #store current positions internaly for later use as the "0" state
for b in O.bodies:
	if isinstance(b.shape,Sphere):
		b.state.blockedDOFs = 'xyz'
		if b.state.pos[0]>0.5:
			b.state.vel = (0,1,0)

O.run(20,True) #make particles move a little (let's hope they will!)
TW.setState(1) #store current positions internaly in the "1" (deformed) state
#Now we can define strain by comparing states 0 and 1, and average them at the particles scale
TW.defToVtk("strain.vtk")


Cheers,
Karol

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