GridConnection traction test, maximum force
Hi all,
I'm new to Yade. I have a question regarding the normalCohesion value in the yade.wrapper.
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 yade import qt
from yade.gridpfacet import *
from numpy import linspace
from yade import plot
#Materials
O.materials.
O.materials.
### Engines need to be defined first since the function gridConnection creates the interaction
O.engines=[
ForceResetter(),
InsertionSortC
Bo1_Sphere_
Bo1_GridConne
]),
InteractionLoop(
# Geometric interactions
[
],
[
# Interaction phusics
],
# Interaction law
[
]
),
NewtonIntegrat
PyRunner(
]
#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(
### Now create connection between the nodes
for i,j in zip( nodesIds[:-1], nodesIds[1:]):
O.bodies.append( gridConnection(
# 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.
O.forces.
def addPlotdata():
global eps,Ttot
deltaL = s1.state.
eps = deltaL/L #strain along the direction of the applied stress
plot.
plot.plot()
qt.View()
O.saveTmp()
O.run()
O.stopAtIter=
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Fabio Caruso
- Solved:
- 2021-03-16
- Last query:
- 2021-03-16
- Last reply:
- 2021-03-16
This question was reopened
- 2021-03-15 by Fabio Caruso
Klaus Thoeni (klaus.thoeni) said : | #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[
Klaus
[1] https:/
Fabio Caruso (fabiocaruso) said : | #2 |
Thanks Klaus for your clear explanation
Fabio Caruso (fabiocaruso) said : | #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 yade import qt
from yade.gridpfacet import *
from numpy import linspace
from yade import plot
#Materials
O.materials.
O.materials.
### Engines need to be defined first since the function gridConnection creates the interaction
O.engines=[
ForceResetter(),
InsertionSortC
Bo1_Sphere_
Bo1_GridConne
]),
InteractionLoop(
# Geometric interactions
[
],
[
# Interaction phusics
],
# Interaction law
[
]
),
NewtonIntegrat
PyRunner(
]
#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(
### Now create connection between the nodes
for i,j in zip( nodesIds[:-1], nodesIds[1:]):
O.bodies.append( gridConnection(
# 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.
s2.state.vel = (1,0,0) #apply a constant velocity to the second node
def addPlotdata():
L = s2.state.
FN = O.interactions[0, 1].phys.
plot.
plot.plot()
qt.View()
O.saveTmp()
O.run()
O.stopAtIter=
Klaus Thoeni (klaus.thoeni) said : | #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
Fabio Caruso (fabiocaruso) said : | #5 |
Thanks for your time and sorry for the trivial question
Fabio