← Back to team overview

yade-dev team mailing list archive

Re: reversedForces and Co.

 


I was thinking about the meaning of bools like reversedForces, compressivePositive and so on. Recently I was quite confused about that and my point is: say that in our contact law we decide that compressive forces are positive. Then, why not be consistent and take compressive stresses also positive? Do you agree that the bools above generate a lot of confusion? Why do we need them?
My opinion is that it would be nice if one script can be used with different contact laws, just by changing Ig2/Ip2/Law2 functors; if stress depends on the contact law, then one has to adjust also stress values (goal stresses, for instance), and keep in mind which contact law uses which convention etc.

I added the Scene::flags thing recently, which should automatize this, so that the contact law would say itself which way it stores force, i.e. whether NormShearPhys.{normal,shear}Force are forces applied on id1 or id2, and then functions like stress tensor would just query that value.

It is a shame that code is not consistent in this respect, but if there is no interesting to fix the cause, it can be worked around in this way.

Cheers, v.



Follow ups

References