On 7 May 2010 15:51, chiara modenese <[email protected]> wrote: > > > On 7 May 2010 13:31, Bruno Chareyre <[email protected]> wrote: > >> >>> Ok, can I change something in Shop for the dt/2 shift or should I save >>> velocities and accelerations and then interpolate? >>> >>> >> You can change in shop. >> > I changed in shop the kinetic as > > > ret+=.5*(b->state->mass*(b->state->vel+b->state->accel*dt/2).SquaredLength()+(b->state->angVel+b->state->angAccel*dt/2).Dot(diagMult(b->state->inertia,(b->state->angVel+b->state->angAccel*dt/2)))); > > I tried the sample example with the two balls and the time step estimated > by PWave. I attach the figure. > Now I suppose that if the kinetic energy is computed correctly (is it?) the > problem relies on the elastic energy. You said yourself that the total > energy is "approximately" constant. Is this approximation due to the > numerical scheme, is not it? If so the time step plays a role also on the > total energy, no? >
To also note that the total energy computed considering the corrected kinetic energy at time step t+dt/2, it is less close to the expected value than the case in which kinetic energy is not shifted. Now I guess if computing the kinetic energy through the linear interpolation of the velocities we are actually altering the numerical scheme.. Not sure here.. > > > >> Another note : your remark on different dt for different problems is >> correct. PWave and GSTS both consider a dense packing. >> If you have problems where fast collisions between particles matter, there >> is another constraint on dt. In short, particles must not go through each >> other in only one time-step. It results in a definition of dt based on size >> of particles and incident velocities only, disregarding mass and stiffness. >> >> >> >> Bruno >> >> _______________________________________________ >> Mailing list: >> https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users> >> Post to : [email protected] >> Unsubscribe : >> https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users> >> More help : https://help.launchpad.net/ListHelp >> > >
_______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp

