Using Hertz - Mindlin Contact Law

Asked by Hossein

Hi everybody
I want to carry out triaxial simulation on sand with considering a non-linear contact law (Hertz-Mindlin). I mention the code in below which is working very well with Cohesion moment law but in terms of Hertz- MIndlin there are some problems in the case of creating a pack such as an unacceptable unbalanced (almost 0.67) force for desire void ratio which is around 0.83.
Do you know what should I do to well-create a pack with this non-linear contact law ?
Also, I need to get to know the Hertz-Mindlin equations that are using on YADE, do you know the references of this contact law?

# encoding: utf-8

import matplotlib; matplotlib.rc('axes',grid=True)
import matplotlib.pyplot as plt
from yade import pack
import pylab
from numpy import *
import numpy as np
from math import *

utils.readParamsFromTable(seed=1,num_spheres=10000,compFricDegree = 25.0)
from yade.params import table

seed=table.seed
num_spheres=table.num_spheres# number of spheres
compFricDegree = table.compFricDegree # initial contact friction during the confining phase (will be decreased during the REFD compaction process)
confiningS=-1e5
rate=5

psdSizes,psdCumm=[0.00012,0.00014,0.00018,0.00021,],[0.0030,0.039,0.21,1]
psdSizesArray=np.array(psdSizes)
psdSizesMeter=psdSizesArray*0.001 #Convert the size of particles to meter
sp=pack.SpherePack()
mn,mx=Vector3(0,0,0),Vector3(0.0001,0.0001,0.0001)
sp.makeCloud(minCorner=mn,maxCorner=mx,psdSizes=psdSizesMeter,psdCumm=psdCumm,distributeMass=True,num=num_spheres,seed=seed)
sp.psd(bins=10,mass=True)

## create material #0, which will be used as default
O.materials.append(FrictMat(young=5e9,poisson=.3,frictionAngle=radians(compFricDegree),density=2600,label='spheres'))
O.materials.append(FrictMat(young=5e9,poisson=.3,frictionAngle=0,density=0,label='frictionless'))

## create walls around the packing
walls=aabbWalls((mn,mx),thickness=0,material='frictionless')
wallIds=O.bodies.append(walls)

O.bodies.append([utils.sphere(center,rad,material='spheres') for center,rad in sp])

triax=TriaxialStressController(
 internalCompaction=False,
 goal1=confiningS,
 goal2=confiningS,
 goal3=confiningS,
 max_vel=10,
 label="triax"
)

newton=NewtonIntegrator(damping=0)

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_MindlinPhys()],
  [Law2_ScGeom_MindlinPhys_Mindlin(includeAdhesion=False,includeMoment=False)]
 ),
 GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
 VTKRecorder(iterPeriod=1000,fileName="./export",recorders=['spheres','intr','color'],dead=1,label='VTK'),
 triax,
 newton
]

#s11=[];e22=[]
while 1:
  O.run(1000,True)
  unb=unbalancedForce()
  print ('unb=', unb,'meanstress:',abs(triax.goal1-triax.meanStress)/abs(triax.goal1),'e=', triax.porosity/(1-triax.porosity), 'Size=', (triax.width))
  if unb<0.01 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.01 and (triax.porosity)/(1-triax.porosity)<0.8399999999 :
    break
print ("Particle.Distribution.is.stable")
 ########################################################
 ##Turn into triaxil test
 ########################################################

finalFricDegree = 18.0
triax.internalCompaction=False
setContactFriction(radians(finalFricDegree))
while 1:
  O.run(1000,True)
  unb=unbalancedForce()
  if unb<0.01 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.01:
    break
    #ei0=-triax.strain[0];ei1=-triax.strain[1];ei2=-triax.strain[2]
    #si0=-triax.stress(0)[0];si1=-triax.stress(2)[1];si2=-triax.stress(4)[2]

triax.depth0=triax.depth
triax.height0=triax.height
triax.width0=triax.width
triax.stressMask=5
triax.goal1=triax.goal3=confiningS
triax.goal2=-rate
triax.wall_bottom_activated=0
#O.engines[2].lawDispatcher.functors[1].always_use_moment_law=True
VTK.dead=1
#cohesiveLaw.always_use_moment_law=False
#recorder.dead=0

Exaxil=[5.98e-04,6.11e-04,0.00125,0.0013,0.00249,0.0031,0.00491,0.00729,0.010,0.017,0.025]
Exdev=[8.69,16.30,51.09,81.52,92.40,110.88,142.40,170.67,196.77,218.54,229.44]

ee=[];e22=[];s22=[]
file=open('Results'+'.txt',"w")

while 1:
  O.run(1000,True)
  ee.append((triax.porosity)/(1-triax.porosity))
  s22.append(((-triax.stress(triax.wall_top_id)[1])-(-triax.stress(triax.wall_right_id)[0]-triax.stress(triax.wall_front_id)[2])/2.0)*1e-3)
  e22.append((-triax.strain[1]))
  print('ax=',(-triax.strain[1]), 'deviatoric=',(((-triax.stress(triax.wall_top_id)[1])-(-triax.stress(triax.wall_right_id)[0]-triax.stress(triax.wall_front_id)[2])/2.0)*1e-3), 'ee=', (triax.porosity)/(1-triax.porosity), 's11=',((-triax.stress(triax.wall_top_id)[1])*1e-3), 's33=',(((-triax.stress(triax.wall_right_id)[0])-(triax.stress(triax.wall_front_id)[2]))/2.0)*1e-3)
  if abs(-triax.strain[1])>0.1 :
   break
print(" Triaxil test is finished ")

file.write(str(s22)+" "+str(e22)+"\n")
file.write(str(s22)+" "+str(ee)+"\n")
file.close()

plt.figure()
plt.xlabel('Axial strain')
plt.ylabel('deviatoric')
plt.grid(True)
plt.plot(Exaxil,Exdev,linestyle='-',marker="*", markersize=8,color='g',linewidth=2)
plt.plot(e22,s22,linestyle='-',marker="^", markersize=8,color='r',linewidth=2)
plt.legend(('Exprimental data','simulation data'),loc='upper right', shadow=True)

plt.show()

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Hossein
Solved:
Last query:
Last reply:
Revision history for this message
Karol Brzezinski (kbrzezinski) said (last edit ):
#1

Hi Hossein,

Please provide a minimum working example (MWE [1]), reproducing your problem. Right now, it looks like there is a lot of code that is not crucial for the question. Also, I have a general remark that running simulation in the 'while' loop just to control the end condition is not the best practice. This way, the console and Controller are blocked and you can't inspect your simulation for a deeper understanding of the problem. A better approach is to create a function and run it by PyRunner as in the 'Gravity deposition' example from the tutorial [2].

When it comes to Hertz-Mindlin model theory, the "Contact mechanics" of Jonson is excellent. An interesting discussion with the basic equations related to contact stiffness can be found in this topic[4]. More features are described in documentation [5-6], and in case of doubts, you can look into the source code.

How long does it take for your simulation to reach the void ratio condition? I couldn't wait that long, but I have a guess. I think that after you reach desired void ratio, you should stop walls and run simulation so the energy could dissipate through contact sliding. If there is no specific reason for setting damping = 0, I would recommend increasing it to 0.1 or 0.2 to speed up the energy dissipation.

Cheers,
Karol

[1] https://www.yade-dem.org/wiki/Howtoask
[2] https://yade-dem.org/doc/tutorial-examples.html?highlight=examples#gravity-deposition
[3] Johnson, K. L. (1987). Contact mechanics. Cambridge university press.
[4] https://answers.launchpad.net/yade/+question/668072
[5] https://yade-dem.org/doc/yade.wrapper.html?highlight=ip2_frictmat_frictmat_mindlinphys#yade.wrapper.Ip2_FrictMat_FrictMat_MindlinPhys
[6] https://yade-dem.org/doc/yade.wrapper.html?highlight=mindlin#yade.wrapper.Law2_ScGeom_MindlinPhys_Mindlin

Revision history for this message
Hossein (hossein75) said :
#2

Hi Karol
Thanks for your answer, some of my questions were solved but I'm still interested in:

1) The point that you have mentioned about stopping the wall, Did you mean after creating the pack with desire void ratio, and during shearing processes internal compaction must become true?
2 ) Regarding, damping, what type of damping must be increased? viscous damping? Local damping?

Cheers,
Hossein

Revision history for this message
Karol Brzezinski (kbrzezinski) said :
#3

Hi Hossein,

1) The walls are pushing your particles together. It makes them collide, and when the packing becomes dense, collisions turn to vibrations. It occurs until kinetic energy is dissipated. I expect that energy to decrease in time (if there is a way it can be dissipated - see point 2). So, once you reach desired porosity, stop compressing the particles further (I mean leave the walls in their positions). When simulation "calms down", proceed with the next steps.

2) There are different options to do this, the simplest is numerical damping [7] that you set this line:
> newton=NewtonIntegrator(damping=0)
You could increase it slightly to speed up the dissipation process.

Cheers,
Karol

[7] https://yade-dem.org/doc/formulation.html#numerical-damping

Revision history for this message
Hossein (hossein75) said :
#4

Thanks Karol
Your answer were helpful

Cheers,
Hossein