# GridConnection traction test, maximum force

Hi all,
I'm new to Yade. I have a question regarding the normalCohesion value in the yade.wrapper.CohFrictMath
I've written a simple code, with two nodes connected by a gridconnection. I've applied a permanent force on the nodes along the x-direction (like a normal tensile test)
How can I determine the maximum applied force at which the cohesive link breaks?
In the following code the normalCohesion value is set to 1e5 and if Fapplied<4 the cohesive link doesn't break, when Fapplied>5 the choesive link breaks.
Is there an analytical way to compute the Fapplied that breaks the cohesive link?

# encoding: utf-8
"""
Tensile test with 2 nodes and one gridconnection
"""
from builtins import zip
from numpy import linspace

#Materials

### Engines need to be defined first since the function gridConnection creates the interaction
O.engines=[
ForceResetter(),
InsertionSortCollider([
Bo1_Sphere_Aabb(),
Bo1_GridConnection_Aabb(),
]),
InteractionLoop(
# Geometric interactions
[
Ig2_GridNode_GridNode_GridNodeGeom6D(),
Ig2_GridConnection_GridConnection_GridCoGridCoGeom(),
Ig2_Sphere_GridConnection_ScGridCoGeom(), # used for the cohesive sphere-cylinder interaction
],
[
# Interaction phusics
Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False),
],
# Interaction law
[
Law2_ScGeom6D_CohFrictPhys_CohesionMoment(),
Law2_ScGridCoGeom_CohFrictPhys_CundallStrack(),
Law2_GridCoGridCoGeom_FrictPhys_CundallStrack(),# used for the cohesive sphere-cylinder interaction
]
),
NewtonIntegrator(gravity=(0,0,0),damping=0,label='newton'),
]

#Timestep
O.dt=5e-07

rCyl=0.01
nL=2
L=0.3
### Create the two nodes :
nodesIds=[]
for i in linspace(0,L,nL):
nodesIds.append( O.bodies.append(
gridNode([i,0,0],rCyl,wire=True,fixed=False,material='gridNodeMat') ) )

### Now create connection between the nodes
for i,j in zip( nodesIds[:-1], nodesIds[1:]):
O.bodies.append( gridConnection(i,j,rCyl,
material='gridCoMat'
) )

# rename the two nodes
s1 = O.bodies[0]
s2 = O.bodies[1]
#Define what you want to plot
plot.plots = {'i': 'eps'}

#Apply 2 normal force along the x direction on the nodes (Simulating tensile stress)

Fapplied = 4
O.forces.setPermF(int(nodesIds[0]), (-Fapplied, 0, 0))
O.forces.setPermF(int(nodesIds[-1]), (Fapplied, 0, 0))

global eps,Ttot
deltaL = s1.state.pos[0]-s2.state.pos[0]
eps = deltaL/L #strain along the direction of the applied stress

plot.plot()
qt.View()
O.saveTmp()

O.run()

O.stopAtIter=int(0.5/O.dt)

## Question information

Language:
English Edit question
Status:
Solved
For:
Assignee:
No assignee Edit question
Solved by:
Fabio Caruso
Solved:
Last query:

## This question was reopened

 Revision history for this message Klaus Thoeni (klaus.thoeni) said on 2021-03-13: #1

Hi Fabio,

welcome!

You can look at the code to see how the threshold is calculated [1], but it's basically the value you define in CohFrictMat * r^2, which in your case is 10. Applying 5+5 makes 10 (note that you are doing a dynamic calculation, the force will oscillate between 0 and 10, plot the force and you will see it). Now, I would suggest you fix one node and apply a velocity at the other node and plot displacement vs normalForce in the interaction, i.e. replace eps with fN = O.interactions[0,1].phys.normalForce[0].

Klaus

 Revision history for this message Fabio Caruso (fabiocaruso) said on 2021-03-13: #2

Thanks Klaus for your clear explanation

 Revision history for this message Fabio Caruso (fabiocaruso) said on 2021-03-15: #3

Hi Klaus,
I tried your suggestion to fix one node and apply a velocity at the other node and plot displacement vs normalForce in the interaction but yade gives me an error saying: 'NoneType' object has no attribute 'normalForce'

Below the code:

# encoding: utf-8
"""
Tensile test with 2 nodes and one gridconnection
"""
from builtins import zip
from numpy import linspace

#Materials

### Engines need to be defined first since the function gridConnection creates the interaction
O.engines=[
ForceResetter(),
InsertionSortCollider([
Bo1_Sphere_Aabb(),
Bo1_GridConnection_Aabb(),
]),
InteractionLoop(
# Geometric interactions
[
Ig2_GridNode_GridNode_GridNodeGeom6D(),
Ig2_GridConnection_GridConnection_GridCoGridCoGeom(),
Ig2_Sphere_GridConnection_ScGridCoGeom(), # used for the cohesive sphere-cylinder interaction
],
[
# Interaction phusics
Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False),
],
# Interaction law
[
Law2_ScGeom6D_CohFrictPhys_CohesionMoment(), #internal forces, similar to cundallstrack but incorporates adhesion as well as bending and twisting moments
Law2_ScGeom_FrictPhys_CundallStrack() #used for the external forces, takes into account elastic and frictional forces
]
),
NewtonIntegrator(gravity=(0,0,0),damping=0,label='newton'),
]

#Timestep
O.dt=5e-07

rCyl=0.01
nL=2
L=0.3
### Create the two nodes :
nodesIds=[]
for i in linspace(0,L,nL):
nodesIds.append( O.bodies.append(
gridNode([i,0,0],rCyl,wire=True,fixed=False,material='gridNodeMat') ) )

### Now create connection between the nodes
for i,j in zip( nodesIds[:-1], nodesIds[1:]):
O.bodies.append( gridConnection(i,j,rCyl,
material='gridCoMat'
) )

# rename the two nodes
s1 = O.bodies[0]
s2 = O.bodies[1]
#Define what you want to plot
plot.plots = {'L': 'FN'}

#Apply 2 normal force along the x direction on the nodes (Simulating tensile stress)

s1.state.blockedDOFs = 'x' #fix the first node
s2.state.vel = (1,0,0) #apply a constant velocity to the second node

L = s2.state.pos[0]-s1.state.pos[0]
FN = O.interactions[0, 1].phys.normalForce[0]

plot.plot()
qt.View()
O.saveTmp()

O.run()

O.stopAtIter=int(10/O.dt)

 Revision history for this message Klaus Thoeni (klaus.thoeni) said on 2021-03-16: #4

Well that's because you interaction fails after a certain time. You should check if the interaction exists and/or stop the simulation once the interaction breaks.

Klaus

 Revision history for this message Fabio Caruso (fabiocaruso) said on 2021-03-16: #5

Thanks for your time and sorry for the trivial question

Fabio