Precrack

Asked by mrhappy on 2020-01-30

Hi,

I want to put a precrack in my model. Currently, my model consists of 5 by 6 particles in the xy plane. Each particle is linked with its neighbouring particle. I want to zero out the bonds (a precrack) between particle 11 and 16, 12 and 17, and 13 and 18. How do I do this?

Thanks!

MY CODE:
#MATERIAL PROPERTIES
intR = 1.00 #connectivity parameter
DENS = 2500.00 #Density (kg/mm^3)
YOUNG = 1800.00 #Young's modulus (N/mm^2)
FRICT = 7.00 #Friction angle (degrees)
ALPHA = 0.10 #Poisson's ratio
TENS = 100.00 #Tensile strength (N/mm^2)
COH = 100.00 #Shear strength (N/mm^2)
iterMax = 1.00 #Max Itteration
rate = 0.00 #pull rate

O.materials.append(JCFpmMat(type=1,density=DENS,young=YOUNG,poisson=ALPHA,frictionAngle=radians(FRICT),tensileStrength=TENS,cohesion=COH,label='mat1'))

# PARTICLES
O.bodies.append([
sphere(center=( 1.00, 1.00,0),radius= 0.50,material='mat1'),
sphere(center=( 2.00, 1.00,0),radius= 0.50,material='mat1'),
sphere(center=( 3.00, 1.00,0),radius= 0.50,material='mat1'),
sphere(center=( 4.00, 1.00,0),radius= 0.50,material='mat1'),
sphere(center=( 5.00, 1.00,0),radius= 0.50,material='mat1'),
sphere(center=( 1.00, 2.00,0),radius= 0.50,material='mat1'),
sphere(center=( 2.00, 2.00,0),radius= 0.50,material='mat1'),
sphere(center=( 3.00, 2.00,0),radius= 0.50,material='mat1'),
sphere(center=( 4.00, 2.00,0),radius= 0.50,material='mat1'),
sphere(center=( 5.00, 2.00,0),radius= 0.50,material='mat1'),
sphere(center=( 1.00, 3.00,0),radius= 0.50,material='mat1'),
sphere(center=( 2.00, 3.00,0),radius= 0.50,material='mat1'),
sphere(center=( 3.00, 3.00,0),radius= 0.50,material='mat1'),
sphere(center=( 4.00, 3.00,0),radius= 0.50,material='mat1'),
sphere(center=( 5.00, 3.00,0),radius= 0.50,material='mat1'),
sphere(center=( 1.00, 4.00,0),radius= 0.50,material='mat1'),
sphere(center=( 2.00, 4.00,0),radius= 0.50,material='mat1'),
sphere(center=( 3.00, 4.00,0),radius= 0.50,material='mat1'),
sphere(center=( 4.00, 4.00,0),radius= 0.50,material='mat1'),
sphere(center=( 5.00, 4.00,0),radius= 0.50,material='mat1'),
sphere(center=( 1.00, 5.00,0),radius= 0.50,material='mat1'),
sphere(center=( 2.00, 5.00,0),radius= 0.50,material='mat1'),
sphere(center=( 3.00, 5.00,0),radius= 0.50,material='mat1'),
sphere(center=( 4.00, 5.00,0),radius= 0.50,material='mat1'),
sphere(center=( 5.00, 5.00,0),radius= 0.50,material='mat1'),
sphere(center=( 1.00, 6.00,0),radius= 0.50,material='mat1'),
sphere(center=( 2.00, 6.00,0),radius= 0.50,material='mat1'),
sphere(center=( 3.00, 6.00,0),radius= 0.50,material='mat1'),
sphere(center=( 4.00, 6.00,0),radius= 0.50,material='mat1'),
sphere(center=( 5.00, 6.00,0),radius= 0.50,material='mat1'),
])
nbSpheres = 30.00

# BOUNDARY CONDITIONS
O.bodies[0].state.blockedDOFs = "xyzXYZ"
O.bodies[0].state.vel = (0,-0.000010,0)
O.bodies[0].state.angVel = (0,0,0)
O.bodies[1].state.blockedDOFs = "xyzXYZ"
O.bodies[1].state.vel = (0,-0.000010,0)
O.bodies[1].state.angVel = (0,0,0)
O.bodies[2].state.blockedDOFs = "xyzXYZ"
O.bodies[2].state.vel = (0,-0.000010,0)
O.bodies[2].state.angVel = (0,0,0)
O.bodies[3].state.blockedDOFs = "xyzXYZ"
O.bodies[3].state.vel = (0,-0.000010,0)
O.bodies[3].state.angVel = (0,0,0)
O.bodies[4].state.blockedDOFs = "xyzXYZ"
O.bodies[4].state.vel = (0,-0.000010,0)
O.bodies[4].state.angVel = (0,0,0)
O.bodies[25].state.blockedDOFs = "xyzXYZ"
O.bodies[25].state.vel = (0,0.000010,0)
O.bodies[25].state.angVel = (0,0,0)
O.bodies[26].state.blockedDOFs = "xyzXYZ"
O.bodies[26].state.vel = (0,0.000010,0)
O.bodies[26].state.angVel = (0,0,0)
O.bodies[27].state.blockedDOFs = "xyzXYZ"
O.bodies[27].state.vel = (0,0.000010,0)
O.bodies[27].state.angVel = (0,0,0)
O.bodies[28].state.blockedDOFs = "xyzXYZ"
O.bodies[28].state.vel = (0,0.000010,0)
O.bodies[28].state.angVel = (0,0,0)
O.bodies[29].state.blockedDOFs = "xyzXYZ"
O.bodies[29].state.vel = (0,0.000010,0)
O.bodies[29].state.angVel = (0,0,0)

# FUNCTIONAL COMPONENTS
def addPlotData1():
 plot.addData(t=O.time,DX1 = O.bodies[25].state.pos[0], DY1 = O.bodies[25].state.pos[1], DZ1 = O.bodies[25].state.pos[2], FX1 = O.forces.f(25)[0], FY1 = O.forces.f(25)[1], FZ1 = O.forces.f(25)[2], DX2 = O.bodies[26].state.pos[0], DY2 = O.bodies[26].state.pos[1], DZ2 = O.bodies[26].state.pos[2], FX2 = O.forces.f(26)[0], FY2 = O.forces.f(26)[1], FZ2 = O.forces.f(26)[2], DX3 = O.bodies[27].state.pos[0], DY3 = O.bodies[27].state.pos[1], DZ3 = O.bodies[27].state.pos[2], FX3 = O.forces.f(27)[0], FY3 = O.forces.f(27)[1], FZ3 = O.forces.f(27)[2], DX4 = O.bodies[28].state.pos[0], DY4 = O.bodies[28].state.pos[1], DZ4 = O.bodies[28].state.pos[2], FX4 = O.forces.f(28)[0], FY4 = O.forces.f(28)[1], FZ4 = O.forces.f(28)[2], DX5 = O.bodies[29].state.pos[0], DY5 = O.bodies[29].state.pos[1], DZ5 = O.bodies[29].state.pos[2], FX5 = O.forces.f(29)[0], FY5 = O.forces.f(29)[1], FZ5 = O.forces.f(29)[2], )

# PRINTING
from yade import plot
from pprint import pprint

# SIMULATION LOOP
O.engines=[
PyRunner(command='addPlotData1()',iterPeriod=1),
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intR)],
[Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1)],
[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM()]
),
GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=10,timestepSafetyCoefficient=0.5, defaultDt=utils.PWaveTimeStep()),
NewtonIntegrator(damping= 0.10),
]

#TIME STEP
O.dt=0.5e-4*PWaveTimeStep()

#PLOTTING
plot.plots={'DY1':('FY1')}
plot.plot()

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
2020-02-13
Last reply:
2020-02-17
Robert Caulk (rcaulk) said : #1

i.phys.isCohesive = False [1]

Where i is the interaction between two particles of interest (e.g. 11 and 16).

[1]https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.JCFpmPhys.isCohesive

Robert Caulk (rcaulk) said : #2

Also, if you are thinking about using smooth joint logic, then you would use [1].

[1]https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.JCFpmPhys.isOnJoint

mrhappy (mrhappy) said : #3

Hey Robert,

Thanks for your help. I used i.phys.isCohesive = False; however, I noticed that the nodes are still bonded. I then made a funtion that removes the bond every iteration step. I check to see if the bond exisits by pressing the inspect button, then going to bodies, and syping in the element number to see whos attached to it. Can you have a look at my code and suggest a method that will permanently delete the bond between these specific spheres? I want to create a precrack.

Thank you sooo much!

#MATERIAL PROPERTIES
intR = 3.00 #connectivity parameter
DENS = 2500.00 #Density (kg/mm^3)
YOUNG = 1800.00 #Young's modulus (N/mm^2)
FRICT = 18.00 #Friction angle (degrees)
ALPHA = 0.20 #Poisson's ratio
TENS = 100000000.00 #Tensile strength (N/mm^2)
COH = 100000000000000.00 #Shear strength (N/mm^2)
iterMax = 1.00 #Max Itteration
rate = 0.00 #pull rate

O.materials.append(JCFpmMat(type=1,density=DENS,young=YOUNG,poisson=ALPHA,frictionAngle=radians(FRICT),tensileStrength=TENS,cohesion=COH,label='mat1'))

# PARTICLES
O.bodies.append([
#ALOT OF SPHERES WHICH I AM NOT SHOWING NOW.
])
nbSpheres = 400.00

# BOUNDARY CONDITIONS

# FUNCTIONAL COMPONENTS
def addPlotData1():
 plot.addData(t=O.time,Displacement = O.bodies[209].state.pos[1] - 11.000, DX1 = O.bodies[210].state.pos[0], DY1 = O.bodies[210].state.pos[1], DX2 = O.bodies[211].state.pos[0], DY2 = O.bodies[211].state.pos[1], DX3 = O.bodies[212].state.pos[0], DY3 = O.bodies[212].state.pos[1], DX4 = O.bodies[213].state.pos[0], DY4 = O.bodies[213].state.pos[1], DX5 = O.bodies[214].state.pos[0], DY5 = O.bodies[214].state.pos[1], DX6 = O.bodies[215].state.pos[0], DY6 = O.bodies[215].state.pos[1], DX7 = O.bodies[216].state.pos[0], DY7 = O.bodies[216].state.pos[1], DX8 = O.bodies[217].state.pos[0], DY8 = O.bodies[217].state.pos[1], DX9 = O.bodies[218].state.pos[0], DY9 = O.bodies[218].state.pos[1], DX10 = O.bodies[219].state.pos[0], DY10 = O.bodies[219].state.pos[1], )

def saveData1():
 plot.saveDataTxt('/home/nabid/Desktop/SCRIPTS/Fracture_Model/ForceBC/ForceFD.txt',vars=('t','Displacement'))

def saveData2():
 plot.saveDataTxt('/home/nabid/Desktop/SCRIPTS/Fracture_Model/ForceBC/Data.txt',vars=('t','DX1', 'DY1','DX2', 'DY2','DX3', 'DY3','DX4', 'DY4','DX5', 'DY5','DX6', 'DY6','DX7', 'DY7','DX8', 'DY8','DX9', 'DY9','DX10', 'DY10',) ),

def ForceBC():
 if O.time < 800:
  O.forces.setPermF(209,(0,0.01000*O.time,0))
  O.forces.setPermF(210,(0,0.01000*O.time,0))
  O.forces.setPermF(189,(0,-0.01000*O.time,0))
  O.forces.setPermF(190,(0,-0.01000*O.time,0))
 else:
  O.forces.setPermF(209,(0,8.00000,0))
  O.forces.setPermF(210,(0,8.00000,0))
  O.forces.setPermF(189,(0,-8.00000,0))
  O.forces.setPermF(190,(0,-8.00000,0))

# PRINTING
from yade import plot
from pprint import pprint

# SIMULATION LOOP
O.engines=[
PyRunner(command='addPlotData1()',iterPeriod=1),
PyRunner(command='saveData1()',iterPeriod=1000),
PyRunner(command='saveData2()',iterPeriod=1000),
PyRunner(command='DelEle()',iterPeriod=1),
PyRunner(command='ForceBC()',iterPeriod=1),
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intR)],
[Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1)],
[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM()]
),
GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=10,timestepSafetyCoefficient=0.5, defaultDt=utils.PWaveTimeStep()),
NewtonIntegrator(damping= 0.80),
]

#TIME STEP
O.dt=0.5e-4*PWaveTimeStep()

#Precrack
def DelEle():
    ncrack = 0
    for i in O.interactions:
        if (i.id1 == 189 and i.id2 == 208):
            i.phys.isCohesive = False
            ncrack = ncrack + 1
        if (i.id1 == 189 and i.id2 == 209):
            i.phys.isCohesive = False
            ncrack = ncrack + 1
        if (i.id1 == 189 and i.id2 == 210):
            i.phys.isCohesive = False
            ncrack = ncrack + 1
        if (i.id1 == 208 and i.id2 == 189):
            i.phys.isCohesive = False
            ncrack = ncrack + 1
        if (i.id1 == 209 and i.id2 == 189):
            i.phys.isCohesive = False
            ncrack = ncrack + 1
        if (i.id1 == 210 and i.id2 == 189):
            i.phys.isCohesive = False
            ncrack = ncrack + 1
        if (i.id1 == 190 and i.id2 == 209):
            i.phys.isCohesive = False
            ncrack = ncrack + 1
        if (i.id1 == 190 and i.id2 == 210):
            i.phys.isCohesive = False
            ncrack = ncrack + 1
        if (i.id1 == 190 and i.id2 == 211):
            i.phys.isCohesive = False
            ncrack = ncrack + 1
        if (i.id1 == 209 and i.id2 == 190):
            i.phys.isCohesive = False
            ncrack = ncrack + 1
        if (i.id1 == 210 and i.id2 == 190):
            i.phys.isCohesive = False
            ncrack = ncrack + 1
        if (i.id1 == 211 and i.id2 == 190):
            i.phys.isCohesive = False
            ncrack = ncrack + 1
        if (i.id1 == 210 and i.id2 == 191):
            i.phys.isCohesive = False
            ncrack = ncrack + 1
        if (i.id1 == 209 and i.id2 == 188):
            i.phys.isCohesive = False
            ncrack = ncrack + 1
        print("Total crack length " +str(ncrack) +" out of " +str(6))

#PLOTTING
plot.plots={'t':('Displacement')}
plot.plot()

mrhappy (mrhappy) said : #4

I have used other methods such as:
O.interactions[4949,5048].phys.isBroken = True
O.interactions[5048,4949].phys.isBroken = True

O.interactions[4949,5048].phys.isCohesive = False
O.interactions[5048,4949].phys.isCohesive = False

But still I cannot confirm that the interaction between these nodes are zeroed. Can you suggest another method to zero-out the interaction between these selected particles?

Thanks!

Jérôme Duriez (jduriez) said : #5

> I noticed that the nodes are still bonded

How did you notice it, and what do you call exactly a "bond" ?

If a "bond" is a cohesive interaction (with eg a tensile threshold), Robert's answer should most probably do the trick.

If you call a "bond" any kind of interaction, whatever its local strength properties, then what you want is to delete interaction, probably.
O.interactions.erase(), see [*], might help, though a thorough understanding of YADE interaction logic would help for proper use.

PS: GUI inspector is great. Python functions such that O.interactions.has or O.interactions.withBody are even better ! See [*]

[*] https://yade-dem.org/doc/yade.wrapper.html#interactioncontainer
[**] https://yade-dem.org/doc/user.html#creating-interactions, at least

Robert Caulk (rcaulk) said : #6

To add to Jèrôme: isCohesive=False means there can be frictional contact, but not cohesive contact. The only time a bond will truly disappear is if the particles are not frictionally in contact with one another because they have moved normally away from one another (tensile break).

Can you help with this problem?

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

To post a message you must log in.