← Back to team overview

yade-dev team mailing list archive

Re: [deprecated list] ContactLaw1

 

Jerome Duriez said:     (by the date of Fri, 26 Sep 2008 12:28:41 +0200)

Hi Jerome,

In CohesiveFrictionalContactLaw you can disable moment transefer
law, and snow creep. It is all controlled by bool variables. When
they are disabled - calculation is exactly as fast as when their code
is deleted.

So it is better if you simply modify CohesiveFrictionalContactLaw by
adding:

- a new bool veriable to control if 'inelastic behaviour in
  compression' is used. 

- Then put your inelastic code in there inside block:

  if(inelastic behaviour in compression) // pick any name you want for this bool :)
  {
    //.... your law here !
  }


We are trying to remove unnecessary/duplicated laws. There is one reason for it:

- if in the future I will find a serious bug in CohesiveFrictionalContactLaw
  I'll fix it. But I will not fix this bug in your file (which is just
  a copy of mine!).

- and now my file is good, and your file has a bug which was not fixed!

This already happened few times, when I was working with Bruno. And
we had to fix the same calculation bug in several files (with law) - it
is hard to remember about all those laws! The less the better: we are
less likely to forgot that other file has the same bug.



When you finish doing this you can run two simulations - one with
your law, and another with CohesiveFrictionalContactLaw + inelastic
behaviour. And compare:

  - speed
  - if results are the same

If you make no mistake - you will get exactly the same results in the same speed!


You can disable adhesion and cohesion by setting zero
cohesive/adhesive strength for them.


> NB : Moreover I don't know how to rename svn tracked files...

that's 'svn mv old_name new_name' command.


-- 
Janek Kozicki                                                         |



Follow ups

References