model independent incremental force behaviour

Asked by Marco Previtali on 2019-10-16

Hello,

I want to change the properties of an existing contact while still taking in consideration its "history".

For example, let's say the Young modulus of the material changes due to plasticity and I need to update the contact kn.
However, as
 F = kn * u * n (1)
updating the value of kn changes the contact force based on the current displacement, as if the material always had the updated young modulus.

What I actually need is

F(step) = F(step-1) + kn * (u (step)-u(step-1) * n (2)

Is storing the previous state of each contact the most reasonable solution if you are not too worried about efficiency? Assume that the specific contact law you use does not implement something like this.

Is there any build-in method to do so in Yade that supersedes individual laws or I need to implement (2) with python?

As far as I know, most contact laws are derived from ElasticContactLaw.cpp, which uses (1), which may suggest there is no such method. <- this is wrong

Thank you for your time.

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Robert Caulk
Solved:
2019-10-17
Last query:
2019-10-17
Last reply:
2019-10-17
Best Robert Caulk (rcaulk) said : #1

Hello,

WRT shear, I believe you could simply modify the shear stiffness at each timestep without losing its "history" since it is updated incrementally [1]. However I am not aware of a law in Yade that applies the same incremental methodology to normal force (but one might very well exist without me knowing). If one does not exist, I think your best bet is to dive into C++. It will be much cleaner and more efficient. *I guess* you could use python to hijack all the force calculations by storing the 'normalIncrement' in each contact. But there is no doubt that it will be much slower (possibly prohibitive) depending on your simulation size.

Cheers,

Robert

[1]https://yade-dem.org/doc/formulation.html#shear-deformation

Jan Stránský (honzik) said : #2

Hi,

> most contact laws are derived from ElasticContactLaw.cpp, which uses (1)

any reference? I think it is not true..
Most materials are derived from FrictMat [1], most IPhys are derived from FrictPhys [2], bat laws themselves are mostly "independent" [3].
Just because not to use just (1) :-)

> Is there any build-in method to do so in Yade or I need to implement (2) with python?

the best option is (as mentioned by Robert) to implement it in C++, which might be difficult and time consuming without (and even with :-) prior experience.

In principle, you can achieve this by:
- before ForceResetter, store the values of current forces
- before NewtonIntegrator:
   - store current displacements (whatever it means)
   - modify interactions (kn, normalForce) with the values from previous and current step
according to definition, it might be a "build-in method" or a "implementation with python" :-)

> Is storing the previous state of each contact the most reasonable solution if you are not too worried about efficiency?

Using c++, it would be the most (or at least almost the most) reasonable solution.
Using python, let's say it is a reasonable solution and for sure you should "not too worried about efficiency"

cheers
Jan

[1] https://yade-dem.org/doc/yade.wrapper.html#material
[2] https://yade-dem.org/doc/yade.wrapper.html#iphys
[3] https://yade-dem.org/doc/yade.wrapper.html#constitutive-laws

Hi,
My impression is that you are approaching the problem the wrong way. There is actually nothing special in the situation you describe, w.r.t. what is already implemented.

First of all, your equation (2) is _exactly_ what is done for the shear force in most laws. I don't know if we should call it "saving the previous state" though. Simply the force is the force, we increment it. If the question is: "are every interactions forgotten at each timestep?" the answer is no, they are not (yade is not a GPU advertising code! ;) ).

About non-linear elastic behaviour (a.k.a. "changing stiffness"), laws using MindlinPhys do just this (in the normal direction especially).
Elastic-plastic response in the normal direction is also implemented in (at least) Law2_ScGeom6D_CohFrictPhys_CohesionMoment, using the plastic displacement as the history variable.

All in all, I would answer "yes there is a builtin method", since basically you describe a rather ordinary situation. You need to be more specific on your governing equation to see if a particular problem exists.
Cheers
Bruno

Marco Previtali (mprev) said : #4

Hi,
I thought so.

I will go with python for a quick band-aid solution since my simulation size is very small.

Cheers,
Marco

Marco Previtali (mprev) said : #5

Apparently I cannot modify comments. My last post was aimed at Robert Caulk.

@Jan Stránský
> most contact laws are derived from ElasticContactLaw.cpp, which uses (1)
My bad, I was looking at IPhys and mixed it up.

> Is there any build-in method to do so in Yade or I need to implement (2) with python?
> Is storing the previous state of each contact the most reasonable solution if you are not too worried about efficiency?
This is what I was planning to do. I am not confident in my ability to do this in a timely manner with C++.

@Bruno Chareyre
The question I should have asked was: is there a law independent method to obtain the described incremental behavior.
I was aware some laws already do this for certain variables, but I wanted to know if an "universal" solution existed, which is the reason I did not specify the laws/models I am using.
I will edit the first post.

Thank you all.

Marco

Marco Previtali (mprev) said : #6

Thanks Robert Caulk, that solved my question.