← Back to team overview

yade-users team mailing list archive

Re: clumps

 

> I heavily edited the NewtonDampedLaw in order to integrate a new
> rotation algo in the framework. Seems it works , but, please, review it.
> NewtonDampedLaw have a flag accRigidBodyRot (false default).
> If it is true, when the new algo  is used for a clumps rotation (and can
> be used for rotation of a non spheral standalone bodies; see code, you
> will see). If it is false (default), when the old algo is used.
> Rotate cundallDamp can not be used with the new algo because the algo
> does not use the angular accel. Any comments?

Hi, sorry to replying now and not earlier. Thanks for your contribution.
A few suggestions:

1. naming:

1a. rename lfTranslate etc -> leapfrogTranslate etc (it is not used in
expressions and is more readable
1b. lfSpheralRotate -> leapfrogSphericalRotate (spherical is the english
adjective)
1c. lfRigidBodyRotate -> leapfrogAsphericalRotate (spheres are also
rigid bodies)
(1d. accRigidBodyRot is not very readable either, given that it is an
option users will fiddle with... but that might be just matter of taste.
I would call it exactAsphericalRot ;-) )

2. duplicate code:

Try to somehow put together handleClumpMemeber and very similar loop in
your code; it is different in only a few places and a bool flag might do
the trick. If not possible, at least move the FOREACH body out of the
NewtonsDampedLaw::action; the main loop must be as readable as possible,
it is quite fundamental piece of code.



I would be nice to have some analytically-solved case for aspherical
rigid body motion and check the results. I have no idea if something
like that can be found.

Cheers, Vaclav




References