Bug Report: Issues with torque calculation due to p_ref

Submitted by ryan.houlihan on Wed, 07/18/2012 - 02:17

Hello,

Recently I noticed that using fix/mesh/gran/move and fix/gran/stressanalysis the torques were quite off. A stable force will lead to a ever increasing torque which is clearly immpossible. Under further investigation I found that the variable, p_ref, which is the center of the mesh, is not updated throughout the execution cycle.

Torque is computed as follows:

vectorSubtract3D(contactPoint,p_ref,tmp);
vectorCross3D(tmp,frc,tmp2);
vectorAdd3D(torque_total,tmp2,torque_total);

Since p_ref is not updated and the mesh is moving it will interact with granules ever far away from its original position the torque will thus continuously increase (or decrease) without an increase (or decrease) in force. Although I have found the culprit to my problems I was unable to fix it. I understand I need to, each time step, increase the x, y, and z coordinates of the p_ref by vx*dt, vy*dt, and vz*dt respectively. However my one attempt which was adding this to fix_move_tri.cpp was unsuccessful since it has no reference to p_ref.

So my question is where should i make these changes to fix this problem?

Thanks for your time.

Ryan Houlihan

ckloss's picture

ckloss | Wed, 07/18/2012 - 09:01

Yes, you're correct. I'll fix that for LIGGGHTS 2.0.4

Thanks, Christoph

PS: For 1.5.3, you would have to add a callback somewhere, which is kind of a quirk...

ryan.houlihan | Wed, 07/18/2012 - 18:07

Chris,

Is there anyway you could elaborate on the placement of the callback function? I would like to get this properly working in 1.5.3 ASAP.

Thanks,

Ryan

ckloss's picture

ckloss | Thu, 07/19/2012 - 10:57

In a nutshell, you will have to add integration of the reference point and have FixMoveTri call FixMeshAnalyze to inform about the movement of the reference point.

Cheers, Christoph