Re: [Yade-users] Combining engines prescribing movement
Hi (Anton), actually this question came to my mind after reading about the new engine :-) My idea was if there is something similar to predicates, like O.engines = [ , TranslationEngine(...) + RotationEngine(...), ... ] or another solution could be O.engines = [ ... , TranslationEngine(...), RotationEngine(...), ... ] according to your reaction, the first option is not possible (at least now), but what about the second one? In fact I want to add some noise (imperfection) to the InterpolatingHelixEngine (to add some more translation in all directions for example), so before implementing InterpolatingImperfectHelixEngine, I wanted to know, if there is some easier way :-) Thanks Jan __ Od: Anton Gladky gladky.an...@gmail.com Komu: yade-users@lists.launchpad.net Datum: 19.11.2010 10:45 Předmět: Re: [Yade-users] Combining engines prescribing movement Hi, Jan! Yesterday I created one more motion engine. I did not find a better solution for my task. I think we should unite in one file Translation and Rotation Engines, as they do almost the same task. What do you think? (Vaclav?) Thanks. Anton 2010/11/19 Jan Stránský _hon...@centrum.cz Hello, is it possible to combine more engines prescribing movement? for example (I know there is HelixEngine implemented, but suppose for a while it is not :-) if I want to combine translation and rotation to create a helix, can I somehow combine them, or for every such combination would I need to implement new engine? thanks and have a nice day Regards Jan ___ Mailing list: https://launchpad.net/~yade-usershttps://launchpad.net/%7Eyade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-usershttps://launchpad.net/%7Eyade-users More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] Combining engines prescribing movement
is it possible to combine more engines prescribing movement? for example (I know there is HelixEngine implemented, but suppose for a while it is not :-) if I want to combine translation and rotation to create a helix, can I somehow combine them, or for every such combination would I need to implement new engine? Hi Jan, you could combine engines, just put the one after another in O.engines, with the same ids. Though looking at the code it is not clear to me how they work. E.g. TranslationEngine updates position and changes velocity as well. That means that the motion will be applied twice, unless the body is non-dynamic...?! Someone could comment on that? Am I overlooking something? If I see it right, the combination would work fine on non-dynamic bodies (such as facets, which carry no mass), except for the velocity which would be bogus (the second engine would overwrite velocity of the first one). Clearly, to make combination of such engines seamless, they would have to change velocity, but in such a way that this change only applies in the current step -- say adding vel and angVel to ForceContainer -- beside force, torque, displacement and rotation that we have already. Or perhaps displacement and rotation could be replaced by vel and angVel value, since displacement and rotation can always be obtained by vel=du/dt. What about that? Cheers, v. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] Combining engines prescribing movement
What if if do so in Translation/Rotation engines?: if (!b-isDynamic())b-state-pos+=dt*velocity; Anton 2010/11/19 Václav Šmilauer e...@doxos.eu OK, after some thinking and skyping w/ Chiara: I will remove displacements and rotations in ForceContainer, and replace them by one-time velocity and angularVelocity: they will be added to state-vel and state-angVel in NewtonIntegrator, but reset by ForceResetter; and they can accumulate, just like forces do. Further, Body::isDynamic will change its meaning to be simply state-blockedDOFs=State::DOF_ALL. Remembering that blockedDOFs block forces (not displacements per se), therefore, non-dynamic bodies _will_ be moved by NewtonIntegator if they will have non-zero velocity! That might break existing simulations, but now is the right period to do that (and see also shamefully long-lasting https://bugs.launchpad.net/yade/+bug/398089). I will also modify TranslationEngine accordingly, and will add regression tests to make sure two TranslationEngines can be combined and so on. That will ensure that the behavior will be consistent in the future. Comments (besides that it should not change because it will break old simulations, please; run those with frozen version of yade)? (-yade-dev) Cheers, v. ___ Mailing list: https://launchpad.net/~yade-usershttps://launchpad.net/%7Eyade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-usershttps://launchpad.net/%7Eyade-users More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] Combining engines prescribing movement
I mean just for now. Ah, sorry. But I plan to do those changes in next few hours/days. v. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] Combining engines prescribing movement
In many cases (perhaps not yours) the simpler way is to prescribe velocity on non-dynamic bodies. That way, you don't need engines, and you are sure you are not breaking any of the constitutive laws. Eh? This exactly will not work: NewtonIntegrator.cpp:109 says if(!b-isDynamic()) continue; For removing RotationEngine -- every time I used it it was to rotate a particle along an axis somewhere else in the space, that will not work with angVel. v ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] Combining engines prescribing movement
vel=(P_axis-Pos).cross(spin*axis) rotVel=spin*axis I thought the point was that the integrator would do it for you (which it can, for translation). Of course this is what RotationEngine does. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp