Introduction of defects

Asked by loiseaurare

Hi everybody,

I am new to Yade, and I am trying to model the fragmentation of a very simple sample.

Up to now I have managed to create the sample, and make it fall on a plate. I would like to complexify this model and introduce a serie of defects in the bonds of the material.

Initially I thought working directly on the interaction would be a good idea, but then searching trough the launchpad, I found out that apparently it was possible to add forces directly in the force container.

However Yade seems to say it is not possible to iterate on the force container. Does anybody have an idea of how to deal with that ?

Here is my script :

from yade import pack

# INPUTS
# Geometry
LxBox = 0.1
LyBox = 0.1
LzBox = 0.1
LzImp = 0.3
RadSphere = 0.02
WallPos = -LzBox
WallAxis = (0.,0.,1.)

# Material
EyCohFrictMat = 1e7
poissonCohFrictMat = 0.25
densityCohFrictMat = 2600.
FrictAngSphere = 30.*pi/180.
NCohesionCohFrictMat = 6.5e4
SCohesionCohFrictMat = 6.5e4

EyFrictMat = 1e7
poissonFrictMat = 0.25
densityFrictMat = 2600.
FrictAngWall = 30.*pi/180.

# Calculation
damp=0.5
gz=-9.81

################################################################################"
# SIMULATION BEGINNING - SIMULATION BEGINNING - SIMULATION BEGINNING

## CREATE MATERIAL - CREATE MATERIAL - CREATE MATERIAL
O.materials.append(
  CohFrictMat(
  young = EyCohFrictMat,
  poisson= poissonCohFrictMat,
  density= densityCohFrictMat ,
  frictionAngle = FrictAngSphere,
  normalCohesion = NCohesionCohFrictMat ,
  shearCohesion = SCohesionCohFrictMat ,
  momentRotationLaw=False,
  etaRoll=0.1,
  isCohesive =True,
  label='MatSpheres'))

O.materials.append(
  FrictMat(
  young = EyFrictMat,
  poisson= poissonFrictMat,
  frictionAngle=FrictAngWall,
  density= densityFrictMat ,
  label='MatFrictWalls'))

## CREATE SPHERES - CREATE SPHERES - CREATE SPHERES -
pred=pack.inAlignedBox((0.,0.,0.),(LxBox,LyBox,LzBox))

block=pack.randomDensePack(pred,radius=0.005, material = 'MatSpheres', rRelFuzz=0.3,spheresInCell=200,color=(1,0,1), returnSpherePack = False)

O.bodies.append(block)

### Create BOX - Create BOX - Create BOX (Changer )
O.bodies.append(utils.box(center=(0.,0.,-LzImp),extents=(25*LxBox,25*LyBox,0.01*LxBox),material='MatFrictWalls',fixed=True))

#O.bodies.append( à tester sur un autre script )
#utils.wall(
#position=WallPos,
#axis=WallAxis,
#sense=0,
#color=(10, 25, 51),
#material='MatFricWalls'
#))

## CALCULATION - CALCULATION - CALCULATION
newton=NewtonIntegrator(damping=damp)
newton.gravity=(0,0,gz)

def introduceDefects () :
 print O.iter
 for f in O.forces :
  f.addF((-1,0,0))

O.engines=[

 #introduceDefects(),
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
 InteractionLoop(
  #Il faut rentrer toutes les lois pour tout les types de matériau
  [Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom()],
  [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True),
  Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom6D_CohFrictPhys_CohesionMoment(useIncrementalForm = True, label='cohlaw'),
  Law2_ScGeom_FrictPhys_CundallStrack()]
 ),
 #GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=1,timestepSafetyCoefficient=0.2, defaultDt=4*PWaveTimeStep()),
 NewtonIntegrator(gravity=(0,0,gz),damping=damp),
]

O.dt = 1e-4

## DISPLAY CONTROLLERS - DISPLAY CONTROLLERS - DISPLAY CONTROLLERS
yade.qt.Controller(), yade.qt.View()

## CHECK - CHECK - CHECK

O.step()
print 'maxOverlap', max(i.geom.penetrationDepth for i in O.interactions)
print 'maxNormalForce', max(i.phys.normalForce.norm for i in O.interactions)
print 'maxShearForce', max(i.phys.shearForce.norm for i in O.interactions)

O.run(1000,True)
print 'maxOverlap', max(i.geom.penetrationDepth for i in O.interactions)
print 'maxNormalForce', max(i.phys.normalForce.norm for i in O.interactions)
print 'maxShearForce', max(i.phys.shearForce.norm for i in O.interactions)

from yade import export
export.text("bloc.txt")

Cheers

Question information

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

Hello,

I am new to Yade

welcome :-)

        for f in O.forces :
> f.addF((-1,0,0))

for b in O.bodies:
   O.forces.addF(b.id,(-1,0,0)) # [1]

cheers
Jan

[1]
https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.ForceContainer.addF

Revision history for this message
loiseaurare (loiseaurare) said :
#2

Thanks Jan Stransky, that solved my question !

Revision history for this message
loiseaurare (loiseaurare) said :
#3

Thanks Jan Stránský, that solved my question.

Revision history for this message
Luc Scholtès (luc) said :
#4

Hi,

If you want to include actual material defects such as weakness planes, have a look at the JCFPM class which was designed to take into account fracture networks into the modelling or rock masses. It could be also used at a smaller scale to include micro-defects such as cracks, bedding planes or schistosity.

Luc

Revision history for this message
loiseaurare (loiseaurare) said :
#5

Hi Luc Scholtès,

Thanks for the advice, actually I am aware that this class exists, however at the moment I am still trying to understand the functioning of YADE and DEM. I will come to that later !