Ip2_FrictMat_FrictViscoMat_FrictViscoPhys() law body assignation problem

Bug #1718872 reported by Loic Dugelas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yade
New
Undecided
Unassigned

Bug Description

Hi,

I was working with the Ip2_FrictMat_FrictViscoMat_FrictViscoPhys() law and I think there is a bug with it. In this little script, the two particles must be glued after contact, it is the case with the option 2 but in the option 1 it is not. The difference between the two options is only the position of the spheres (in one case the frictmat in on the top and in the other case this is the frictviscomat).
I think the bug comes from this assignation of the material 1 and 2 in the C++ code but I'm not enough familiar with it to solve it.

I'm working with yadedaily : Yade 2017.01a-99-968a759~trusty

Loïc

Here's the script:
###########################################################################################

from yade import qt, plot
from yade.gridpfacet import *
import gts, os, locale, sys
import numpy as np

O.engines=[
    ForceResetter(),
    InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor = 1)]),
    InteractionLoop([Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor = 1)],
            [Ip2_FrictMat_FrictViscoMat_FrictViscoPhys()],
            [Law2_ScGeom_FrictViscoPhys_CundallStrackVisco()]),
    NewtonIntegrator(gravity=(0,0,0),damping=0.3,label='newton'),
]

R = 0.008

##### Materiaux #####

FrictViscoMat = O.materials.append( FrictViscoMat(betan = 1,young=5e9, poisson=0.3, frictionAngle=radians(10),density = 4000))
FrictMat = O.materials.append( FrictMat(young=5e9, poisson=0.3, frictionAngle=radians(10),density = 4000))

#### Option 1 => Not Working
s1 = O.bodies.append(utils.sphere((0,0,2), radius=R,color=[1,0,0], material = FrictViscoMat))
s2 = O.bodies.append(utils.sphere((0,0,0), radius=R,color=[0,1,0], material = FrictMat))
O.bodies[s1].state.vel[2] = -5
O.bodies[s2].state.vel[2] = 5

#### Option 2 => Working
#s1 = O.bodies.append(utils.sphere((0,0,0), radius=R,color=[1,0,0], material = FrictViscoMat))
#s2 = O.bodies.append(utils.sphere((0,0,2), radius=R,color=[0,1,0], material = FrictMat))
#O.bodies[s1].state.vel[2] = 5
#O.bodies[s2].state.vel[2] = -5

#######
v=qt.Controller()
v=qt.View()
v.viewDir = (0,1,0)
v.eyePosition = Vector3( 0, -5,1)
O.run()
O.dt = 1e-7
O.saveTmp()

#########################################################################################

Loic Dugelas (ldugelas)
description: updated
Revision history for this message
Klaus Thoeni (klaus.thoeni) wrote :

Hi Loic,

thanks for reporting. I found the problem. Will try to fix it.

Klaus

Revision history for this message
Janek Kozicki (cosurgi) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.