← Back to team overview

yade-users team mailing list archive

I think it should be a bug in the code of some constitutive model

 

Hi Luc Scholtes,

I have read the code in CohesiveFrictionalPM.cpp written by you. I read them carefully, so I found there would be a bug in the file. In the part of description of moment, this part of code is as followed:
/*Plastic moment */
    if(scalarMoment > MomentMax)
    {
      Real ratio = 0;
      ratio *= MomentMax/scalarMoment; // to fix the moment to its yielding value
      moment *= ratio;       
      moment_twist *=  ratio;
      moment_bending *= ratio;
    }
Furthermore, the same code is in CohesionlessMomentRotation.cpp to calculate the moment when the moment is over the plastic limit. It is distinct bug that is " ratio *= MomentMax/scalarMoment;".  it is written as this, then the ratio will still be zero during the simulation. Then the moment will be zero in the plastic stage. That is different from the algorithms. So, this one should be changed to "ratio = MomentMax/scalarMoment;", others don't need to modify. Do you agree with me?

Look forward your reply. thank you!

Regards
Liqing
 

Follow ups