Tensile test

Asked by Swapnil

Hi friends, I am trying a tensile test on a cylindrical sample of spheres. The sample is confined inside a cylindrical boundary using the facetCylinder. I intend to make the last (top)-most particles (at open-end) as a plate which then moves with a certain velocity and pulls the entire sample (body of spheres). The current script is as follows:

from yade import pack,plot
pred=pack.inCylinder((0,0,0),(0,0,0.25),0.10) #create a cylinder geometry
sp=pack.randomDensePack(pred,radius=0.01,spheresInCell=300) #pack cylinder with spheres
O.bodies.append(sp) #add spheres to the body
yade.qt.Controller()
facets = geom.facetCylinder((0,0,0.125),0.1,0.25,wallMask=2|4) #create cylindrical boundary using facets
O.bodies.append(facets) #add facets to the body
global plate # name a new geometry "plate" for the application of load
plate=O.bodies [-1] # the last of the particles act as the plate
plate.state.vel=Vector3(0,0,-0.1) #assign velocity to the plate
O.engines=[ForceResetter(),InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]),InteractionLoop([Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],[Ip2_FrictMat_FrictMat_FrictPhys()],[Law2_ScGeom_FrictPhys_CundallStrack()]),NewtonIntegrator(),PyRunner(iterPeriod=100,command="addPlotData()")] #set up interactions and run for the data desired
O.dt=0.5*PWaveTimeStep() #time step
def addPlotData(): #define the plot data function
  Fz=O.forces.f(plate.id)[2] #load(force) on particle(plate) along z-direction
  Dz=plate.state.pos[2]-plate.state.refPos[2] #displacement of plate along z-direction
plot.addData(i=O.iter,Fz=Fz,Dz=Dz) #add the data to be plotted
plot.plots={'Dz':('Fz')}
plot.plot() #output plot
O.run()

My questions are:
(1) Is there a better alternative to performing the test with the above mentioned scenario?

(2) While running the script I received the error that "Fz" is not defined. I guess that could be something to do with the line plate=O.bodies [-1]. Have been looking for the right method. Any clues?

Thanks....

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

1)
some comments

a)
O.bodies.append(facets) #add facets to the body
global plate # name a new geometry "plate" for the application of load
plate=O.bodies [-1] # the last of the particles act as the plate

now plate is one facet from the side of the cylinder, then it moves parallel the cylinder axis. I am not sure if this is what you want..
you can just freeze spherical particles to see it
##
for b in O.bodies:
   if isinstance(b.shape,Sphere): b.state.blockedDOFs = 'xyzXYZ'
#O.run()
##

b)
pulling particles would not work with FrictMat (no cohesion)

2) as the error says, "Fz" is not defined, nothing more. Fz is defined inside addPlotData function and is not visible outside it. plot.addPlotData(Fz=Fz..) is outside this function, where Fz does not exist any more..

cheers
Jan

Can you help with this problem?

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

To post a message you must log in.