Question #429604 on Yade changed:
https://answers.launchpad.net/yade/+question/429604

    Status: Answered => Open

Raphaël Maurin is still having a problem:
Hi Bruno,

Not sure I completely agree with you on all what you are saying. 
- Regarding getIncidentVel, I thought at using shearInc but this gives me only 
the shear component and I also want the normal one so it does not work. I need 
to use getIncidentVel
- Regarding the periodicity,  it is implemented in 
Law2_ScGeom_ViscElPhys_Basic. Indeed, the shift which is necessary to evaluate 
the geometry of the contact between two particles 
(scene->cell->intrShiftPos(cellDist), usually called shift2 in the code) and 
that you are describing, is implemented in it. 
However, the problem does not seem to rely on the periodicity, at least for 
spheres, but on the periodicity for interaction between spheres and other 
objects. This can be very well identified by comparing the contact law with 
Law2_ScGeom_FrictPhys_CundallStrack. In the latter case, a "trick"/an 
approximation is used when considering periodic boundary conditions. It is the 
one I reported: 
if (!scene->isPeriodic && !sphericalBodies) {
  State* de1 = Body::byId(id1,scene)->state.get();
  State* de2 = Body::byId(id2,scene)->state.get();
  applyForceAtContactPoint(-phys->normalForce-shearForce, geom->contactPoint, 
id1, de1->se3.position, id2, de2->se3.position);}
 else {//we need to use correct branches in the periodic case, the following 
apply for spheres only
  Vector3r force = -phys->normalForce-shearForce;
  scene->forces.addForce(id1,force);
  scene->forces.addForce(id2,-force);
  scene->forces.addTorque(id1,(geom->radius1-0.5*geom->penetrationDepth)* 
geom->normal.cross(force));
  scene->forces.addTorque(id2,(geom->radius2-0.5*geom->penetrationDepth)* 
geom->normal.cross(force));
 }
Where we can see that in the case where the conditions are periodic the first 
condition is never fulfilled, and the part following the else is used. In that 
case, what is applied is that the contact point is always considered to be 
situated at the middle of the penetration depth. While this is ok for particles 
of the same size, this to my opinion does not apply when considering the 
interaction of a particle with a wall. My question was (and still is): why is 
it necessary to use this trick/approximation to avoid the bug ? 
- For the fact to implement a potential correction (which I will probably do) 
in CundallStrack, I am not sure it is relevant, especially considering that to 
my knowledge a non-negligible number of people use this contact law and I 
believe it is not a good idea to leave this contact law with a mistake. I could 
simply adjust the formulation to make it similar to CundallStrack, in order to 
have a coherence and correct the mistake (if there is any real one).

Cheers
Raphael

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to