# yade-users team mailing list archive

## Re: [Question #696060]: How to make some stress plates consist of 3 circles (that have radius gradually (0.5, 1, 2)?

Description changed to:
Dear All

I am trying to simulate 3 circles of stress plates that have radius
dimension gradually, which has relation with contact force and the area
of each circle.

In order to apply the force that corresponds to each area of circles, I
need to have 3 stress plates with radius 0.5,1, and 2 in XY plane in the
center of the facet.

How can I add those stress plates and how to make some relations among
of each contact force and the area of circle (stress plate)?

Could you please tell me how to do that?

this is my existing code:

##Sphere Cylinder pack
import math
from pylab import rand #for sand color

sp=pack.SpherePack()
sp.makeCloud((-5,-2,-1.5),(5,2,1.5),rMean=.14,rRelFuzz=.1,num=3000)
sp.toSimulation(color=(0.6+0.15*rand(),0.5+0.15*rand(),0.15+0.15*rand()))

##Define material of the grains
#O.bodies[0]
#[b.shape.radius for b in O.bodies if isinstance(b.shape,Sphere)]
O.bodies[0].state.blockedDOFs='xyzXYZ'
O.bodies[0].state.vel=(0,0,0)
O.materials.append(FrictMat(young=1e7,poisson=.3,density=2700,frictionAngle=18))

##Make a floor
O.bodies.append(wall((0,0,-1.5),axis=2))

##Engines and Constitutive Law
O.engines=[ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]), #move for sphere, facet, wall
InteractionLoop([Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()], #interaction between them
[Ip2_FrictMat_FrictMat_FrictPhys()], # ip2 list (just one list!)
[Law2_ScGeom_FrictPhys_CundallStrack()]), # law2 list
NewtonIntegrator(damping=.3,gravity=[0,0,-9.81]),
PyRunner(command='checkUnbalanced()',realPeriod=2,label='checker'),
#VTKRecorder(fileName='tes',recorders=['all'],iterPeriod=100),
]

O.dt=.9*PWaveTimeStep()

def checkUnbalanced():
if O.iter<1000:return # at the very start, unbalanced force can be low as there is only few contacts, but it does not mean the packing 										is stable
global boulder  #without this line, the BOULDER variable would only exist inside this function
boulder=O.bodies[0] 	 #the last particles is the boulder
O.materials.append(FrictMat(young=1e8,poisson=0.2,density=2700,frictionAngle=25))
O.bodies[0].state.mass=2000

if abs(O.forces.f(boulder.id)[0]):
O.run()

b=O.bodies[3011]
ForceP=0
StP=0
ForceP1=0
StP1=0
ForceP2=0
StP2=0
for i in range (10,3009):
m=O.bodies[i]
if(m.state.pos[1]>=-2) and (m.state.pos[1]<=2):
if (m.state.pos[0]>=-1) and (m.state.pos[0]<=1) and (m.state.pos[2]<-.5):
ForceP=abs(O.forces.f(m.id)[2])
StP=ForceP/area1
ForceP1=abs(O.forces.f(m.id)[2])
StP1=ForceP1/area2
ForceP2=abs(O.forces.f(m.id)[2])
StP2=ForceP2/area3

if O.iter>1000:

globals().update(locals())

plot.plots={'i':('z'),'t':('Stress','Stress1','Stress2')}

plot.plot(subPlots=True)

O.saveTmp()