mindlin-Deresiewicz contact law
Dear all,
I want to use mindlin-Deresiewicz contact law but there is a broblem with the output. Tangential forces aquired from the model are all equal to zero! why is it happening? It seems no friction is taken into account but why?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Chiara Modenese
- Solved:
- Last query:
- Last reply:
Revision history for this message
![]() |
#1 |
Hi Sina,
please provide us with a short script reproducing your problem.
Thanks
Jan
2013/12/21 Sina Jafari <email address hidden>
> New question #241108 on Yade:
> https:/
>
> Dear all,
> I want to use mindlin-Deresiewicz contact law but there is a broblem with
> the output. Tangential forces aquired from the model are all equal to zero!
> why is it happening? It seems no friction is taken into account but why?
>
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______
> Mailing list: https:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More help : https:/
>
Revision history for this message
![]() |
#2 |
for example in the following script I have modified the triaxial example script a little bit to study the effect of contact law on the output, the point is when I use mindlin-Deresiewicz contact law, no shear force is recorded in the output which is in contradiction with the results obtained by, say, cundall law. Why is this happening? do I need to define a parameter or somethin'? Thanks for your answers. here is the script:
# -*- coding: utf-8 -*-
#******
# Copyright (C) 2010 by Bruno Chareyre *
# bruno.chareyre_
# *
# This program is free software; it is licensed under the terms of the *
# GNU General Public License v2 or later. See file LICENSE for details. *
#******
## This script details the simulation of a triaxial test on sphere packings using Yade
## See the associated pdf file for detailed exercises
## the algorithms presented here have been used in published papers, namely:
## * Chareyre et al. 2002 (http://
## * Chareyre and Villard 2005 (https:/
## * Scholtès et al. 2009 (http://
## * Tong et al.2012 (http://
##
## Most of the ideas were actually developped during my PhD.
## If you want to know more on micro-macro relations evaluated by triaxial simulations
## AND if you can read some french, it is here: http://
from yade import pack,plot
import matplotlib; matplotlib.
import pylab
#######
### DEFINING VARIABLES AND MATERIALS ###
#######
key='_Kenney_'
num_spheres=48710
psdSizes,
#targetPorosity = 0.387 #the porosity we want for the packing
compFricDegree = 26.5 # initial contact friction during the confining phase (will be decreased during the REFD compaction process)
finalFricDegree = 26.5 # contact friction during the deviatoric loading
rate=0.0001 # loading rate (strain rate)
damp=0.2 # damping coefficient!
stabilityThresh
young=540e6 # contact stiffness
mn,mx=Vector3(
## create materials for spheres and plates
O.materials.
O.materials.
# create walls around the packing
walls=aabbWalls
wallIds=
## use a SpherePack object to generate a random loose particles packing
sp=pack.
sp.particleSD2(
O.bodies.
#or alternatively (higher level function doing exactly the same):
#sp.toSimulatio
#######
### DEFINING ENGINES ###
#######
triax=TriaxialS
## ThreeDTriaxialE
## this control of boundary conditions was used for instance in http://
maxMultiplier=
finalMaxMultip
thickness = 0,
## switch stress/strain control using a bitmask. What is a bitmask, huh?!
## Say x=1 if stess is controlled on x, else x=0. Same for for y and z, which are 1 or 0.
## Then an integer uniquely defining the combination of all these tests is: mask = x*1 + y*2 + z*4
## to put it differently, the mask is the integer whose binary representation is xyz, i.e.
## "100" (1) means "x", "110" (3) means "x and y", "111" (7) means "x and y and z", etc.
stressMask = 7,
internalCompac
)
newton=
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
## We will use the global stiffness of each body to determine an optimal timestep (see https:/
GlobalStiffnes
triax,
TriaxialStateR
newton
]
#######
#### APPLYING CONFINING PRESSURE ###
#######
#the value of (isotropic) confining stress defines the target stress to be applied in all three directions
triax.goal1=
while 1:
O.run(1000, True)
#the global unbalanced force on dynamic bodies, thus excluding boundaries, which are not at equilibrium
unb=unbalance
print 'unbalanced force:',unb,' mean stress: ',triax.meanStress
if unb<stabilityTh
break
O.save(
print "### Isotropic state saved ###"
print 'ACN=',
#######
#### REACHING A SPECIFIED POROSITY PRECISELY ###
#######
### We will reach a prescribed value of porosity with the REFD algorithm
### (see http://
### http://
#import sys #this is only for the flush() below
#while triax.porosity>
# # we decrease friction value and apply it to all the bodies and contacts
# compFricDegree = 0.95*compFricDegree
# setContactFrict
# print "\r Friction: ",compFricDegree," porosity:
# sys.stdout.flush()
# # while we run steps, triax will tend to grow particles as the packing
# # keeps shrinking as a consequence of decreasing friction. Consequently
# # porosity will decrease
# O.run(500,1)
#O.save(
#print "### Compacted state saved ###"
#print 'ACN=',
#######
### DEVIATORIC LOADING ###
#######
#We move to deviatoric loading, let us turn internal compaction off to keep particles sizes constant
triax.internalC
# Change contact friction (remember that decreasing it would generate instantaneous instabilities)
setContactFrict
#set stress control on x and z, we will impose strain rate on y
triax.stressMask = 0
#now goal2 is the target strain rate
triax.goal2=-rate
# we define three lateral stresses during the test, here the same 10kPa as for the initial confinement.
triax.goal1=-rate
triax.goal3=-rate
#we can change damping here. What is the effect in your opinion?
#newton.damping=0.1
#Save temporary state in live memory. This state will be reloaded from the interface with the "reload" button.
O.saveTmp()
#######
### Example of how to record and plot data ###
#######
from yade import plot
# a function saving variables
def avgcoord():
stress=
plot.
P=
plot.
def addplotdirect():
utils.
f = open('%
def numint():
i=O.iter
f.write('%s\n'%' ')
f.write('%s\n'%' ')
f.write('%s\n'%' ')
f.write(
f.write(
f.write(
f.write(
f.write(
f.write(
f.write(
for m in O.bodies:
intrs=m.intrs()
nintrs=len(intrs)
bodyid=m.id
if isinstance(
radii=
else:
radii="NaN"
f.write(
f.write(
f.write(
f.write(
f.write(
g = open('%
def cntctforce():
stress=
if (stress>
g.write(
g.write(
for j in O.interactions:
if not j.isReal: continue
fn = j.phys.
fs = j.phys.
g.write(
g.write(
# include a periodic engine calling that function in the simulation loop
O.engines=
#plot.plots=
#plot.plot()
O.run(100,True)
O.run(1000000)
#### PLAY THE SIMULATION HERE WITH "PLAY" BUTTON OR WITH THE COMMAND O.run(N) #####
Revision history for this message
![]() |
#3 |
Hi,
The contact law you are attempting to use is in fact not available. I started coding it during my PhD but I never completed it since I decided that the simplified HM law was good enough for my purposes. Please see below the link with the list of contact laws currently in use with Yade and which have been tested and accurately verified by means of elements contact tests.
https:/
Please feel free to add your contact law should you need the complete path described by the HM law (and not the simplified version which is now in the code).
Cheers,
Chiara
On 27 Dec 2013, at 18:56, Sina Jafari wrote:
> Question #241108 on Yade changed:
> https:/
>
> Status: Answered => Open
>
> Sina Jafari is still having a problem:
> for example in the following script I have modified the triaxial example script a little bit to study the effect of contact law on the output, the point is when I use mindlin-Deresiewicz contact law, no shear force is recorded in the output which is in contradiction with the results obtained by, say, cundall law. Why is this happening? do I need to define a parameter or somethin'? Thanks for your answers. here is the script:
> # -*- coding: utf-8 -*-
> #******
> # Copyright (C) 2010 by Bruno Chareyre *
> # bruno.chareyre_
> # *
> # This program is free software; it is licensed under the terms of the *
> # GNU General Public License v2 or later. See file LICENSE for details. *
> #******
>
> ## This script details the simulation of a triaxial test on sphere packings using Yade
> ## See the associated pdf file for detailed exercises
> ## the algorithms presented here have been used in published papers, namely:
> ## * Chareyre et al. 2002 (http://
> ## * Chareyre and Villard 2005 (https:/
> ## * Scholtès et al. 2009 (http://
> ## * Tong et al.2012 (http://
> ##
> ## Most of the ideas were actually developped during my PhD.
> ## If you want to know more on micro-macro relations evaluated by triaxial simulations
> ## AND if you can read some french, it is here: http://
>
> from yade import pack,plot
> import matplotlib; matplotlib.
> import pylab
> #######
> ### DEFINING VARIABLES AND MATERIALS ###
> #######
> key='_Kenney_'
> num_spheres=48710
> psdSizes,
> #targetPorosity = 0.387 #the porosity we want for the packing
> compFricDegree = 26.5 # initial contact friction during the confining phase (will be decreased during the REFD compaction process)
> finalFricDegree = 26.5 # contact friction during the deviatoric loading
> rate=0.0001 # loading rate (strain rate)
> damp=0.2 # damping coefficient!
> stabilityThresh
> young=540e6 # contact stiffness
> mn,mx=Vector3(
>
>
> ## create materials for spheres and plates
> O.materials.
> O.materials.
>
> # create walls around the packing
> walls=aabbWalls
> wallIds=
>
> ## use a SpherePack object to generate a random loose particles packing
> sp=pack.
> sp.particleSD2(
> O.bodies.
> #or alternatively (higher level function doing exactly the same):
> #sp.toSimulatio
>
> #######
> ### DEFINING ENGINES ###
> #######
>
> triax=TriaxialS
> ## ThreeDTriaxialE
> ## this control of boundary conditions was used for instance in http://
> maxMultiplier=
> finalMaxMultipl
> thickness = 0,
> ## switch stress/strain control using a bitmask. What is a bitmask, huh?!
> ## Say x=1 if stess is controlled on x, else x=0. Same for for y and z, which are 1 or 0.
> ## Then an integer uniquely defining the combination of all these tests is: mask = x*1 + y*2 + z*4
> ## to put it differently, the mask is the integer whose binary representation is xyz, i.e.
> ## "100" (1) means "x", "110" (3) means "x and y", "111" (7) means "x and y and z", etc.
> stressMask = 7,
> internalCompact
> )
>
> newton=
>
> O.engines=[
> ForceResetter(),
> InsertionSortCo
> InteractionLoop(
> [Ig2_Sphere_
> [Ip2_FrictMat_
> [Law2_ScGeom_
> ),
> ## We will use the global stiffness of each body to determine an optimal timestep (see https:/
> GlobalStiffness
> triax,
> TriaxialStateRe
> newton
> ]
>
> #######
> #### APPLYING CONFINING PRESSURE ###
> #######
>
> #the value of (isotropic) confining stress defines the target stress to be applied in all three directions
> triax.goal1=
>
> while 1:
> O.run(1000, True)
> #the global unbalanced force on dynamic bodies, thus excluding boundaries, which are not at equilibrium
> unb=unbalancedF
> print 'unbalanced force:',unb,' mean stress: ',triax.meanStress
> if unb<stabilityTh
> break
>
> O.save(
> print "### Isotropic state saved ###"
> print 'ACN=',
>
> #######
> #### REACHING A SPECIFIED POROSITY PRECISELY ###
> #######
>
> ### We will reach a prescribed value of porosity with the REFD algorithm
> ### (see http://
> ### http://
>
> #import sys #this is only for the flush() below
> #while triax.porosity>
> # # we decrease friction value and apply it to all the bodies and contacts
> # compFricDegree = 0.95*compFricDegree
> # setContactFrict
> # print "\r Friction: ",compFricDegree," porosity:
> # sys.stdout.flush()
> # # while we run steps, triax will tend to grow particles as the packing
> # # keeps shrinking as a consequence of decreasing friction. Consequently
> # # porosity will decrease
> # O.run(500,1)
>
> #O.save(
> #print "### Compacted state saved ###"
> #print 'ACN=',
>
> #######
> ### DEVIATORIC LOADING ###
> #######
>
> #We move to deviatoric loading, let us turn internal compaction off to keep particles sizes constant
> triax.internalC
>
> # Change contact friction (remember that decreasing it would generate instantaneous instabilities)
> setContactFrict
>
> #set stress control on x and z, we will impose strain rate on y
> triax.stressMask = 0
> #now goal2 is the target strain rate
> triax.goal2=-rate
> # we define three lateral stresses during the test, here the same 10kPa as for the initial confinement.
> triax.goal1=-rate
> triax.goal3=-rate
>
> #we can change damping here. What is the effect in your opinion?
> #newton.damping=0.1
>
> #Save temporary state in live memory. This state will be reloaded from the interface with the "reload" button.
> O.saveTmp()
>
> #######
> ### Example of how to record and plot data ###
> #######
>
> from yade import plot
> # a function saving variables
> def avgcoord():
> stress=
> plot.addData(
> P=stress,
> plot.saveDataTx
> def addplotdirect():
> utils.plotDirec
>
> f = open('%
> def numint():
> i=O.iter
> f.write('%s\n'%' ')
> f.write('%s\n'%' ')
> f.write('%s\n'%' ')
> f.write(
> f.write(
> f.write(
> f.write(
> f.write(
> f.write(
> f.write(
> for m in O.bodies:
> intrs=m.intrs()
> nintrs=len(intrs)
> bodyid=m.id
> if isinstance(
> radii=m.
> else:
> radii="NaN"
> f.write(
> f.write(
> f.write(
> f.write(
> f.write(
>
> g = open('%
> def cntctforce():
> stress=
> if (stress>
> g.write(
> g.write(
> for j in O.interactions:
> if not j.isReal: continue
> fn = j.phys.
> fs = j.phys.
> g.write(
> g.write(
>
>
>
>
> # include a periodic engine calling that function in the simulation loop
> O.engines=
> #plot.plots=
> #plot.plot()
>
> O.run(100,True)
> O.run(1000000)
> #### PLAY THE SIMULATION HERE WITH "PLAY" BUTTON OR WITH THE COMMAND O.run(N) #####
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______
> Mailing list: https:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More help : https:/
Revision history for this message
![]() |
#4 |
Thanks Chiara Modenese, that solved my question.