Spheres are passing through in a new model when they interact

Asked by chanaka Udaya on 2019-09-24

Hi all,

I'm trying to implement a new contact model in Yade referring to following paper,

https://www.dropbox.com/sh/xf5j80hke2s4gd5/AAAoiDIrGHk4YMp0nOe60QQca?dl=0

Initially, I tried to develop tension damage only.But after compiling the code I ran a simple simulation with 2 spheres and when I see the simulation, one sphere is passing through remaining sphere and it did not give any normal or shear force.

The .hpp file and .cpp file regarding the model can be found in following link,

https://www.dropbox.com/sh/50mzxm4s8yrsff9/AAASIoCvDHnKRbCl4M-56A9Sa?dl=0

Could you please help me on this problem?

A minimum working example as follows,

Thanks
Chanaka

MWE-----

from yade import plot,qt
nh=O.materials.append(NhuMat(young=1e6,poisson=.25,frictionAngle=30,TensileStrength=1e5,Cohesion=1e5,DilatancyAngle=3,NormalSoftening=0.1,ShearSoftening=0.1,density=3000))

s1=utils.sphere((0,0,0),radius=1,color=[1,0,0],material=nh,fixed=True)
s2=utils.sphere((0,0,2),radius=1,color=[0,1,0],material=nh)

O.bodies.append(s1)
O.bodies.append(s2)

Gl1_Sphere.quality=3
# engines definition
O.engines=[
    ForceResetter(),
    InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.3,label='bo1s')]),
    InteractionLoop(
        [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=1.3,label='ig2ss')],
        [Ip2_NhuMat_NhuMat_NhuPhys()],
        [Law2_ScGeom_NhuPhys_Nhumodel()]
    ),
    TranslationEngine(ids=[s2.id],translationAxis=[0,0,-1],velocity=.001), #z direction movement
    NewtonIntegrator(damping=0.4),
    PyRunner(iterPeriod=1,command='addPlotData()',label='plotData'),
]
O.dt=0.4*PWaveTimeStep()
O.step()
bo1s.aabbEnlargeFactor=ig2ss.interactionDetectionFactor=1.
def addPlotData():
    plot.addData(i=O.iter,
                 displacement_n=O.bodies[1].state.refPos[2]-O.bodies[1].state.pos[2],
                 NF=O.interactions[0,1].phys.normalForce.norm(),
                 SF=O.interactions[0,1].phys.shearForce.norm(),
                 )

plot.plots={'i':('NF'),
           'displacement_n ':('NF'),
    'i ':('SF'),
   }
plot.plot()
O.run()

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
2019-09-24
Last reply:
2019-09-24

Hi,
I'm afraid nobody is going to download source files on dropbox.
1/ If you want to communicate source code I would suggest to create a gitlab account so you can clone yade's repository under your account and push changes there.
2/ Even so, it is high demanding to ask others to compile and run some code, so don't expect too much.

For your problem. I would suggest to inspect the existence of an interaction between the two spheres first, then the values in IGeom and IPhys. Python plots are not helpful at this point.

Bruno

Can you help with this problem?

Provide an answer of your own, or ask chanaka Udaya for more information if necessary.

To post a message you must log in.