yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #00676
Re: ContactLaw1
-
To:
yade-dev@xxxxxxxxxxxxxxxxxxx
-
From:
Janek Kozicki <janek_listy@xxxxx>
-
Date:
Sat, 27 Sep 2008 13:37:34 +0200
-
Face:
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEUBAQEtLS1KSkpRUVFXV1dYWFhjY2Nzc3N3d3eHh4eKioqdnZ24uLjLy8vc3NxVIagyAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH2AIVEzgS1fgQtQAAAjRJREFUOMtt1DFv00AUAOAzFQNbjigSyoQaRaBMhKgLUyKXpVNNeUpk9vyDqFJhQ1kiBuaqAwJCqvPtSLY7RlTn5+5IdnYkkt/AOyfxXVLe5vf53Z1875kd34tOEax8djmj6GyjhB5bxz50GdsVZr9fqRjZwAtKOJw5Wqs2MMZ16ALHsaDncF7xAHix1oEFHAB8f+pRjcO4gfZDykcYzbiucRolOLUJ6kjA0xtVt+A6TySlM0RajIpK6DzwKZ/nOYbF/gclHMo1ZOHYY/+Ha+AWuM+3oMS4eeqYzZ8FiCltgUqI8cd2wwAVpJk+8LWYjBtnJdQpHQqJMd4Oxt4bU9ESiFGc5hkqaH74asAX4iabP5I5gZ+qjgGlJCqZa3h3lxhoeVcSE1qLQC4sqKOK9MGW9E3izFqqHokoztLFEgXg31sbZEKnWi2T74A4NxfVQqlkjKtcAWD+zcArFEES01dR0E/nnV0IgugmDd/2L84sOAouRBBHEc7gtc8teDkRlE0iNQPo2w3Xhh/D4TCIQ4LRLoTvgwjj6RRgavdurxYGMaIuGOyAW/PpNlCcU9/93AHenAWYjPoAwa+G3e3to/MgFNTAEKvKDjzuCzHTnY3qqdXtx24VijzQfZ0yewZ5cwRFQaa+mIYr1uI0I76+3W4xhlvoVRwOA0Fdl64HlJnxP6T8YpX/Lga4Wv4A3ErrU5oTfN7Mu/llXMl8RXEPji/lQkN3H7qXqgC2By47EXeU/7PJ/wPxRKMnuZwIeAAAAABJRU5ErkJggg==
-
In-reply-to:
<48DE0B9C.1050009@arcig.cz>
Václav S(milauer said: (by the date of Sat, 27 Sep 2008 12:31:56 +0200)
> Constitutive law (normally) is a function that converts from strains to
> streses (or displacements to forces) and I think it should do _just_ that.
> > 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.
> >
> If the constitutive law is simple as
>
> // loop over interactions etc
> Fn=contactGeom->strainN()*crossSection*E;
> Ft=contactGeom->strainT()*crossSection*G;
> // apply forces here
>
> the code for computing strain being elsewhere, then that code is still
> in one place (and can be fixed at one place) and the constitutive law is
> not a mess of flags.
Yes, this solution is much better. Care to split the laws into such
parts? This would make all those laws a lot simpler.
I was telling him the solution which is currently being used. bool
flags (and an evergrowing law file) is a little better than 200 lines of
code (with possible bugs) duplicated in several places.
But of course splitting the laws into several independent files
is *A LOT* better.
> > if(inelastic behaviour in compression) // pick any name you want for this bool :)
> > {
> > //.... your law here !
> > }
> >
> I disagree with this approach. The code that computes mutual rotation
> etc. is geometry problem and should be coded once in
> SpheresContactGeometry and not in cohesive frictional law.
och. I didn't tknow that he is doing something that belongs to SpheresContactGeometry (I didn't look at this code, to be honest, sorry).
If you say that his "extra" changes from my law should be done in SpheresContactGeometry - then move them there of course :)
> How about
> someone needing a completely different law (my own Brefcom comes in
> mind), not just a bool flag in existing one?
then of course it must be a new law :) Lattice is another example :>
--
Janek Kozicki |
Follow ups
References