Positive value in history becomes negative

Submitted by Guesnet Etienne on Fri, 05/27/2016 - 16:42

Hi,

I am trying to use history in liggghts law (like in tangential_history or normal_model_hooke_hysteresis). I have observed a positive history value becoming negative.

I have reproduced this comportment in a slightly modified tangential_history law. I only add a second value memorized, initialised at 1 (if -0.1 < value < 0.1, then value = 1). If this value become negative, liggghts stops. The input file is packing official example without modification and modified tangential law is linked. Liggghts stops between the 7000 and 8000 time step.

This seems strange the sign of an unmodified variable can change. If you try the symmetric situation (initialised negative, stop if positive), liggghts stops in the same condition.

If you has any idea, I am interested.

Regards.

AttachmentSize
Binary Data negative_history.tar_.gz4.22 KB
aaigner's picture

aaigner | Mon, 06/06/2016 - 17:02

Hi Etienne,

if you add a history value with add_history_value (like here) the second argument is the newtonflag as defined here. If it is 1 the history value may change its sign depending on how the particles interact (i->j or j->i) . In your case you may use 0.

Bests
Andreas

Guesnet Etienne | Tue, 06/07/2016 - 09:26

Hi Andreas,
Exact, it works fine.
Thanks a lot!