determine the force applied on the particle
Hello everyone,
I want to calculate the potential energy of the beam and the work performed on the beam in 3-points bending test.
To calculate the energy potential in each particle i use this formula:
'Ub(particle) = m(mass of particle)
and the work performed in each particle on the boundary of the model, i use this formula:
'W(particle)
My question is how can i determine the force exerced on each particle and the displacement of each particle?
Thanks so much
Jabrane
from yade import ymport, utils, pack, export
from yade import plot
from pylab import *
import math
#---------------- SIMULATIONS DEFINED HERE (assembly, material, boundary conditions)
#### packing (previously constructed)
PACKING=
OUT=PACKING+
#### Simulation Control
DAMP=0.4 # numerical damping
saveData=1000 # data record interval
iterMax=10000 # maximum number of iteration (to be adjusted)
saveVTK=1000 # Vtk files record interval
#### Material microproperties -> Lac du Bonnet granite (cf. A DEM model for soft and hard rock, Scholtes & Donze, JMPS 2013)
intR=1.6684# allows near neighbour interaction and coordination number K=13 (determined with coordinationNum
DENS=4000 # could be adapted to match material density: dens_DEM=
YOUNG=65e9
FRICT=10
ALPHA=0.4
TENS=8e6
COH=160e6
#### material definition
sphereMat = JCFpmMat(
wallMat = JCFpmMat(
for mat in (sphereMat,
O.materials.
#### preprocessing to get dimensions
O.bodies.
dim=utils.
xinf=dim[0][0]
xsup=dim[1][0]
X=xsup-xinf
yinf=dim[0][1]
ysup=dim[1][1]
Y=ysup-yinf
zinf=dim[0][2]
zsup=dim[1][2]
Z=zsup-zinf
r=X/15.
#### preprocessing to get dimensions
R=0
Rmax=0
numSpheres=0.
for o in O.bodies:
if isinstance(
numSpheres+=1
R+=o.
if o.shape.
Rmax=
Rmean=R/numSpheres
O.reset() # all previous lines were for getting dimensions of the packing to create walls at the right positions (below) because walls have to be genrated after spheres for FlowEngine
O.bodies.
O.bodies.
piston=
p0=O.bodies[
### packing
beam=O.
# Definition of the facets for joint's geometry
alpha = 90 #angle of the crack with horizontal (pi/4.)
c = 0.375*Y # length of the crack
# 4 points pour l'entaille
ptA = gts.Vertex( X/2., c, 8./7.*Z)
ptB = gts.Vertex( X/2., 0, 8./7.*Z)
ptApr = gts.Vertex(X/2., c, -1./7.*Z)
ptBpr = gts.Vertex(X/2., 0, -1./7.*Z)
e1 = gts.Edge(ptA,ptB)
e2 = gts.Edge(ptA,ptApr)
e3 = gts.Edge(ptApr,ptB)
f1 = gts.Face(e1,e2,e3)
e4 = gts.Edge(ptB,ptBpr)
e5 = gts.Edge(
f2 = gts.Face(e4,e5,e3)
s1 = gts.Surface()
s1.add(f1)
s1.add(f2)
facet = gtsSurface2Face
O.bodies.
## Determinate the particle in the boundary
limite=[]
limite=range(0, len(beam))
for i in range(0, len(beam)):
if X/3. <= O.bodies[
limite[i] = 0
else:
limite[i] = beam[i]
for i in range(0, len(limite)):
try:
limite.
except ValueError:
pass
## Determinate the initial position of the particle on the boundary
poslimx=[]
poslimy=[]
poslimz=[]
poslimx=
poslimy=
poslimz=
for i in range(0,
poslimx[
for i in range(0,
poslimy[
for i in range(0,
poslimz[
### set a color to the spheres
for o in O.bodies:
if isinstance(
o.shape.
#---------------- ENGINES DEFINED HERE
#### simulation is defined here (DEM loop, interaction law, servo control, recording, etc...)
##### simulation piston's motion
for i in range(0,
O.bodies[
##### simulation beam's grains motion
O.engines=[
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
]
## Determinate the initial position of all particles of the model
posx=[]
posy=[]
posz=[]
posx=range(
posy=range(
posz=range(
for i in range(0,len(beam)):
posx[i]
for i in range(0,len(beam)):
posy[i]
for i in range(0,len(beam)):
posz[i]
## Calculate the work on the boundary of model
W=[]
W=range(
## W est le travail effectue sur les billes du limite de modele
#for i in range(0, len(W)):
# W[i]=utils.
## gravitational acceleration
g=[0,0,-9.8]
## calculate the potential energy of model
Ub=[]
Ub=range(
## Ub is the potential energy of the model
for i in range(0, len(Ub)):
Ub[i]=
# if you want to plot during simulation
plot.plots=
#plot.plot()
#---------------- SIMULATION STARTS HERE
#### manage interaction detection factor during the first timestep and then set default interaction range ((cf. A DEM model for soft and hard rock, Scholtes & Donze, JMPS 2013))
O.step();
### initializes the interaction detection factor
SSgeom.
Saabb.aabbEnlar
O.run(iterMax)
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Yor1 for more information if necessary.