yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #00675
Re: [deprecated list] ContactLaw1
-
To:
yade-dev@xxxxxxxxxxxxxxxxxxx
-
From:
Václav S(milauer <eudoxos@xxxxxxxx>
-
Date:
Sat, 27 Sep 2008 12:31:56 +0200
-
In-reply-to:
<20080926141211.18247d5f@szpak>
-
User-agent:
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.17) Gecko/20080925 Lightning/0.8 Thunderbird/2.0.0.17 Mnenhy/0.7.5.666
> 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 !
> }
>
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. How about
someone needing a completely different law (my own Brefcom comes in
mind), not just a bool flag in existing one?
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.
V.
Follow ups
References