About the transformation of the cohesivePhys interaction to the FrictPhys interaction

Asked by xuanshenyu

Hi,everyone!

I write a case of merely two particles, in which the CohFritMat and Ip2_CohFrictMat_CohFrictMat_CohFrictPhys were used.
Besides, I added a pair of opposing and periodic forces, which are line increase with O.iter, to the two particles, and the python file as below:

############
from yade import pack
from numpy import genfromtxt
from yade import utils
from yade import export
from yade import ymport
from yade import wrapper
import csv
import numpy as np
import gts, os.path, locale
#locale.setlocale(locale.LC.ALL,'en_US.UTF-8')
rho=920
gravity=0
#mat
mat1 = O.materials.append(CohFrictMat(isCohesive=True, frictionAngle=radians(15.6), density=rho_ice, poisson=0.33, young=5.358e8, alphaKr=0.242, alphaKtw=0.1, normalCohesion=2e5, shearCohesion=2e5))
Mat1=O.materials[mat1]

#sphere
coordinates=numpy.genfromtxt("zuobiao.csv",delimiter=",")
particle=[sphere((x,y,z),radius=0.01,material=Mat1,color=(1,1,0)) for x,y,z in coordinates]
Particle=O.bodies.append(particle)

#add engines
O.engines=[
      ForceResetter(),
      InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.1), Bo1_Facet_Aabb()]),
      InteractionLoop(
              [Ig2_Sphere_Sphere_ScGeom6D(interactionDetectionFactor=1.1)],
              [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True),Ip2_FrictMat_FrictMat_FrictPhys()],
              [Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]
      ),
      NewtonIntegrator(gravity=(0, 0, -gravity), damping=0.2),
      PyRunner(command='addForce()',iterPeriod=1),
      VTKRecorder(iterPeriod=100,recorders=['all'],fileName='out-')
]

def addForce():
     a=math.sin(O.iter*0.01)
    O.forces.addF(0,Vector3(0,0,-100*a))
    O.forces.addF(1,Vector3(0,0,100*a))
#timestep
O.dt = .1* PWaveTimeStep()
O.step()
O.run(5000,True)
O.saveTmp()
#############
At the first timestep of the simulation, the bond of the two particles are created, and the interaction is Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(). At a moment, the bond is broken, and the bond is nerver established again.
However, when the two particle come into contact again, what kind of contact law yade uses for dealing with the contact again? Ip2_CohFrictMat_CohFrictMat_CohFrictPhys or Ip2_FrictMat_FrictMat_FrictPhys()?

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
xuanshenyu
Solved:
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

> I write a case of merely two particles

very good for MWE, thanks!

However:
- almost all imports are not used. Then it should not be in MWE
- numpy.genfromtxt("zuobiao.csv", ...) breaks W=working part of MWE, as we cannot run it (without zuobiao.csv file). Please put the coordinates of the two spheres directly in the script

> the interaction is Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()

more accurately, the interation.phys is created using Ip2_CohFrictMat_CohFrictMat_CohFrictPhys

> what kind of contact law yade uses for dealing with the contact again? Ip2_CohFrictMat_CohFrictMat_CohFrictPhys or Ip2_FrictMat_FrictMat_FrictPhys()?

If nothing is changed (like O.engines or material of the particles), it should be the same process, i.e. for interaction.phys Ip2_CohFrictMat_CohFrictMat_CohFrictPhys is used.

Strictly speaking about law in Yade meaning, Law2_ScGeom6D_CohFrictPhys_CohesionMoment is used.

This you can easily test yourself, just "put" the particles together (most simply set b.state.pos *) and see what is the result.
* = normally it is discouraged to set b.state.pos directly in Yade, but in this testing case it is OK

Cheers
Jan

Revision history for this message
xuanshenyu (shenyuxuan) said :
#2

Thanks for your comment :) :) :) about MWE and the contact law.

However, I also have one question about the contact law. Is it possible to use other physical models(maybe Ip2_FrictMat_FrictMat_FrictPhys() and Law2_ScGeom_FrictPhys_CundallStrack()) for the re-contacted particles?

Revision history for this message
Jan Stránský (honzik) said :
#3

> Is it possible to use other physical models(maybe Ip2_FrictMat_FrictMat_FrictPhys() and Law2_ScGeom_FrictPhys_CundallStrack()) for the re-contacted particles?

Yes.
One way how to do it is to:
- add Law2_ScGeom_FrictPhys_CundallStrack in InteractionLoop
- change material of particles after CohFrictPhys interactions are created (change of particle material has no effect on existing interactions, but determines future interactions)

Cheers
Jan

Revision history for this message
xuanshenyu (shenyuxuan) said :
#4

thanks for reply, Jan.

I will have a try, changing the material with the following code:
########
def change():
      if O.iter==1:
            for i in Particle:
                O.bodies[i].material = O.materials[frict]
########
Just like your suggestion in [1]:-).

Good Luck for us.

Revision history for this message
Jérôme Duriez (jduriez) said :
#5

Hi,

In the end, I'm not sure what your question exactly is.

If you wonder what happens about 2 spheres with an initially truly cohesive physics of CohFrictPhys type (e.g., phys.normalAdhesion and/or phys.shearAdhesion != 0), after their cohesion is lost (phys.normalAdhesion and phys.shearAdhesion = 0, typically), I would say that it is still Law2_ScGeom6D_CohFrictPhys_CohesionMoment that applies, just taking into account the zero values of cohesive terms.

Which should be essentially equivalent to Law2_ScGeom_FrictPhys_CundallStrack() (even though it might be good to check since you never know..) without the need for replacing engines / materials in the course of the simulation.

Aiming still for script simplicity and clarity, I would advice against using also Ip2_FrictMat_FrictMat_FrictPhys(), in addition to Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(), in your InteractionLoop

Revision history for this message
xuanshenyu (shenyuxuan) said :
#6

Thank you for your shearing about the CohFrictPhys, Jérôme. This Solved My Problem