Re: [Yade-dev] Sign convention or name O.energy['gravWork']

2020-04-29 Thread Bruno Chareyre
It's all fine provided that you keep it backward-compatible. Else it's
worst than the initial pb in my view.
Cheers
Bruno


Le mer. 29 avr. 2020 09:37, Jerome Duriez  a écrit :

> Thanks for feedback, what about just a change in name: gravWork ->
> gravPotential ?
>
> There would be no more doubts whether it is work by gravity or work
> against gravity ; and decrease of that quantity during a fall would seem
> more logical to me (and others ?)
>
> I agree otherwise with your general remarks about O.energy, but since
> it's there (we won't remove it anyway, will we ?) I think it could be
> worth to make such a small improvement.
>
> Jérôme
>
>
> --
> Chargé de Recherche / Research Associate
> Inrae, RECOVER
> 3275 route Cezanne – CS 40061 13182 Aix-en-Provence Cedex 5 FRANCE
> +33 (0)4 42 66 99 21
>
> https://www6.paca.inrae.fr/recover/membres-du-laboratoire/pages-personnelles/jerome-duriez
>
> On 28/04/2020 16:27, Bruno Chareyre wrote:
> > Hi Jérôme,
> > I feel like it is a question of perspective, and undecidable overall.
> > Is it work by gravity or work against gravity? You can find the two
> > meanings easily. It's still a work in both cases.
> >
> > OTOH it seems these energies are underdocumented overall. I did not find
> > a list of available energies anywhere in the doc.
> > I must say trackEnergy=True is slow. It computes many un-needed things
> > (gravitational work is a good example, why should we increment
> > G-=g*vel*dt at every iteration while we can get at any point in time
> > -g*pos? same issue with elastic work).
> > In current design I would not recommend it although it is elegant and
> > handy for quick tests.
> > Cheers
> > Bruno
> > So
> >
> > Bruno
> >
> > On Mon, 20 Apr 2020 at 16:13, Jerome Duriez  > > wrote:
> >
> > I now think the most logical would be to keep this expression with a
> > minus sign [*], but rename 'gravWork' into 'gravPotential' (like we
> > have
> > 'elastPotential').
> >
> > It would reconcile for me the name with the coded expression, and be
> > more logical with the existence of O.energy.total() function (which
> > sums
> > all terms in O.energy and certainly is expected to be constant)
> >
> >
> > Thoughts ?
> >
> > [*]
> >
> https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/NewtonIntegrator.cpp#L85
> >
> > --
> > Chargé de Recherche / Research Associate
> > Inrae, RECOVER
> > 3275 route Cezanne – CS 40061 13182 Aix-en-Provence Cedex 5 FRANCE
> > +33 (0)4 42 66 99 21
> >
> https://www6.paca.inrae.fr/recover/membres-du-laboratoire/pages-personnelles/jerome-duriez
> >
> > On 20/04/2020 10:25, Jerome Duriez wrote:
> >  > Hi,
> >  >
> >  > Is there a consensus (outside myself) for the extra minus sign in
> >  > O.energy['gravWork'], computed in NewtonIntegrator at [*].
> >  >
> >  > It seems that code line was initially introduced by Vaclav in
> >  > GravityEngine in commit [**] (and made finally its way into
> >  > NewtonIntegrator).
> >  >
> >  > As far as I'm concerned, I can not make sense of the comment
> > justifying
> >  > that sign, just above [*], neither of a consequent negative power
> of
> >  > weight during some free fall.
> >  >
> >  >
> >  > Jérôme
> >  >
> >  >
> >  > [*]
> >  >
> >
> https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/NewtonIntegrator.cpp#L85
> >
> >  >
> >  >
> >  > [**]
> >  >
> >
> https://gitlab.com/yade-dev/trunk/-/commit/d41480acf2ad616268c9ed562b625952c87c98a5
> ,
> >
> >  > see also corresponding file from that time at
> >  >
> >
> https://gitlab.com/yade-dev/trunk/-/blob/d41480acf2ad616268c9ed562b625952c87c98a5/pkg/common/GravityEngines.cpp#L33
> >
> >  >
> >  > --
> >  > Chargé de Recherche / Research Associate
> >  > Inrae, RECOVER
> >  > 3275 route Cezanne – CS 40061 13182 Aix-en-Provence Cedex 5 FRANCE
> >  > +33 (0)4 42 66 99 21
> >  >
> >
> https://www6.paca.inrae.fr/recover/membres-du-laboratoire/pages-personnelles/jerome-duriez
> >
> >  >
> >
> > ___
> > Mailing list: https://launchpad.net/~yade-dev
> > Post to : yade-dev@lists.launchpad.net
> > 
> > Unsubscribe : https://launchpad.net/~yade-dev
> > More help   : https://help.launchpad.net/ListHelp
> >
> >
> >
> > --
> > --
> > ___
> > Bruno Chareyre
> > Associate Professor
> > ENSE³ - Grenoble INP
> > Lab. 3SR
> > BP 53
> > 38041 Grenoble cedex 9
> > Tél : +33 4 56 52 86 21
> > 
> >
> > Email too brief?
> > Here's why: email charter
> >  >
>
> ___
> Mailing list: https://launchpad.net/~yade-dev
> Post to : yade-dev@lists.launchpad.net
> Unsubscribe : 

Re: [Yade-dev] Sign convention or name O.energy['gravWork']

2020-04-29 Thread Jerome Duriez
Thanks for feedback, what about just a change in name: gravWork -> 
gravPotential ?


There would be no more doubts whether it is work by gravity or work 
against gravity ; and decrease of that quantity during a fall would seem 
more logical to me (and others ?)


I agree otherwise with your general remarks about O.energy, but since 
it's there (we won't remove it anyway, will we ?) I think it could be 
worth to make such a small improvement.


Jérôme


--
Chargé de Recherche / Research Associate
Inrae, RECOVER
3275 route Cezanne – CS 40061 13182 Aix-en-Provence Cedex 5 FRANCE
+33 (0)4 42 66 99 21
https://www6.paca.inrae.fr/recover/membres-du-laboratoire/pages-personnelles/jerome-duriez

On 28/04/2020 16:27, Bruno Chareyre wrote:

Hi Jérôme,
I feel like it is a question of perspective, and undecidable overall.
Is it work by gravity or work against gravity? You can find the two 
meanings easily. It's still a work in both cases.


OTOH it seems these energies are underdocumented overall. I did not find 
a list of available energies anywhere in the doc.
I must say trackEnergy=True is slow. It computes many un-needed things 
(gravitational work is a good example, why should we increment 
G-=g*vel*dt at every iteration while we can get at any point in time 
-g*pos? same issue with elastic work).
In current design I would not recommend it although it is elegant and 
handy for quick tests.

Cheers
Bruno
So

Bruno

On Mon, 20 Apr 2020 at 16:13, Jerome Duriez > wrote:


I now think the most logical would be to keep this expression with a
minus sign [*], but rename 'gravWork' into 'gravPotential' (like we
have
'elastPotential').

It would reconcile for me the name with the coded expression, and be
more logical with the existence of O.energy.total() function (which
sums
all terms in O.energy and certainly is expected to be constant)


Thoughts ?

[*]

https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/NewtonIntegrator.cpp#L85

--
Chargé de Recherche / Research Associate
Inrae, RECOVER
3275 route Cezanne – CS 40061 13182 Aix-en-Provence Cedex 5 FRANCE
+33 (0)4 42 66 99 21

https://www6.paca.inrae.fr/recover/membres-du-laboratoire/pages-personnelles/jerome-duriez

On 20/04/2020 10:25, Jerome Duriez wrote:
 > Hi,
 >
 > Is there a consensus (outside myself) for the extra minus sign in
 > O.energy['gravWork'], computed in NewtonIntegrator at [*].
 >
 > It seems that code line was initially introduced by Vaclav in
 > GravityEngine in commit [**] (and made finally its way into
 > NewtonIntegrator).
 >
 > As far as I'm concerned, I can not make sense of the comment
justifying
 > that sign, just above [*], neither of a consequent negative power of
 > weight during some free fall.
 >
 >
 > Jérôme
 >
 >
 > [*]
 >

https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/NewtonIntegrator.cpp#L85

 >
 >
 > [**]
 >

https://gitlab.com/yade-dev/trunk/-/commit/d41480acf2ad616268c9ed562b625952c87c98a5,

 > see also corresponding file from that time at
 >

https://gitlab.com/yade-dev/trunk/-/blob/d41480acf2ad616268c9ed562b625952c87c98a5/pkg/common/GravityEngines.cpp#L33

 >
 > --
 > Chargé de Recherche / Research Associate
 > Inrae, RECOVER
 > 3275 route Cezanne – CS 40061 13182 Aix-en-Provence Cedex 5 FRANCE
 > +33 (0)4 42 66 99 21
 >

https://www6.paca.inrae.fr/recover/membres-du-laboratoire/pages-personnelles/jerome-duriez

 >

___
Mailing list: https://launchpad.net/~yade-dev
Post to     : yade-dev@lists.launchpad.net

Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp



--
--
___
Bruno Chareyre
Associate Professor
ENSE³ - Grenoble INP
Lab. 3SR
BP 53
38041 Grenoble cedex 9
Tél : +33 4 56 52 86 21


Email too brief?
Here's why: email charter 



___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Sign convention or name O.energy['gravWork']

2020-04-28 Thread Bruno Chareyre
Hi Jérôme,
I feel like it is a question of perspective, and undecidable overall.
Is it work by gravity or work against gravity? You can find the two
meanings easily. It's still a work in both cases.

OTOH it seems these energies are underdocumented overall. I did not find a
list of available energies anywhere in the doc.
I must say trackEnergy=True is slow. It computes many un-needed things
(gravitational work is a good example, why should we increment G-=g*vel*dt
at every iteration while we can get at any point in time -g*pos? same issue
with elastic work).
In current design I would not recommend it although it is elegant and handy
for quick tests.
Cheers
Bruno
So

Bruno

On Mon, 20 Apr 2020 at 16:13, Jerome Duriez  wrote:

> I now think the most logical would be to keep this expression with a
> minus sign [*], but rename 'gravWork' into 'gravPotential' (like we have
> 'elastPotential').
>
> It would reconcile for me the name with the coded expression, and be
> more logical with the existence of O.energy.total() function (which sums
> all terms in O.energy and certainly is expected to be constant)
>
>
> Thoughts ?
>
> [*]
>
> https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/NewtonIntegrator.cpp#L85
>
> --
> Chargé de Recherche / Research Associate
> Inrae, RECOVER
> 3275 route Cezanne – CS 40061 13182 Aix-en-Provence Cedex 5 FRANCE
> +33 (0)4 42 66 99 21
>
> https://www6.paca.inrae.fr/recover/membres-du-laboratoire/pages-personnelles/jerome-duriez
>
> On 20/04/2020 10:25, Jerome Duriez wrote:
> > Hi,
> >
> > Is there a consensus (outside myself) for the extra minus sign in
> > O.energy['gravWork'], computed in NewtonIntegrator at [*].
> >
> > It seems that code line was initially introduced by Vaclav in
> > GravityEngine in commit [**] (and made finally its way into
> > NewtonIntegrator).
> >
> > As far as I'm concerned, I can not make sense of the comment justifying
> > that sign, just above [*], neither of a consequent negative power of
> > weight during some free fall.
> >
> >
> > Jérôme
> >
> >
> > [*]
> >
> https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/NewtonIntegrator.cpp#L85
> >
> >
> > [**]
> >
> https://gitlab.com/yade-dev/trunk/-/commit/d41480acf2ad616268c9ed562b625952c87c98a5,
>
> > see also corresponding file from that time at
> >
> https://gitlab.com/yade-dev/trunk/-/blob/d41480acf2ad616268c9ed562b625952c87c98a5/pkg/common/GravityEngines.cpp#L33
> >
> > --
> > Chargé de Recherche / Research Associate
> > Inrae, RECOVER
> > 3275 route Cezanne – CS 40061 13182 Aix-en-Provence Cedex 5 FRANCE
> > +33 (0)4 42 66 99 21
> >
> https://www6.paca.inrae.fr/recover/membres-du-laboratoire/pages-personnelles/jerome-duriez
> >
>
> ___
> Mailing list: https://launchpad.net/~yade-dev
> Post to : yade-dev@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-dev
> More help   : https://help.launchpad.net/ListHelp
>


-- 
-- 
___
Bruno Chareyre
Associate Professor
ENSE³ - Grenoble INP
Lab. 3SR
BP 53
38041 Grenoble cedex 9
Tél : +33 4 56 52 86 21


Email too brief?
Here's why: email charter

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Sign convention or name O.energy['gravWork']

2020-04-20 Thread Jerome Duriez
I now think the most logical would be to keep this expression with a 
minus sign [*], but rename 'gravWork' into 'gravPotential' (like we have 
'elastPotential').


It would reconcile for me the name with the coded expression, and be 
more logical with the existence of O.energy.total() function (which sums 
all terms in O.energy and certainly is expected to be constant)



Thoughts ?

[*] 
https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/NewtonIntegrator.cpp#L85


--
Chargé de Recherche / Research Associate
Inrae, RECOVER
3275 route Cezanne – CS 40061 13182 Aix-en-Provence Cedex 5 FRANCE
+33 (0)4 42 66 99 21
https://www6.paca.inrae.fr/recover/membres-du-laboratoire/pages-personnelles/jerome-duriez

On 20/04/2020 10:25, Jerome Duriez wrote:

Hi,

Is there a consensus (outside myself) for the extra minus sign in 
O.energy['gravWork'], computed in NewtonIntegrator at [*].


It seems that code line was initially introduced by Vaclav in 
GravityEngine in commit [**] (and made finally its way into 
NewtonIntegrator).


As far as I'm concerned, I can not make sense of the comment justifying 
that sign, just above [*], neither of a consequent negative power of 
weight during some free fall.



Jérôme


[*] 
https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/NewtonIntegrator.cpp#L85 



[**] 
https://gitlab.com/yade-dev/trunk/-/commit/d41480acf2ad616268c9ed562b625952c87c98a5, 
see also corresponding file from that time at 
https://gitlab.com/yade-dev/trunk/-/blob/d41480acf2ad616268c9ed562b625952c87c98a5/pkg/common/GravityEngines.cpp#L33 


--
Chargé de Recherche / Research Associate
Inrae, RECOVER
3275 route Cezanne – CS 40061 13182 Aix-en-Provence Cedex 5 FRANCE
+33 (0)4 42 66 99 21
https://www6.paca.inrae.fr/recover/membres-du-laboratoire/pages-personnelles/jerome-duriez 



___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp