yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #14269
[Question #515400]: Introduction of defects
New question #515400 on Yade:
https://answers.launchpad.net/yade/+question/515400
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
--
You received this question notification because your team yade-users is
an answer contact for Yade.