# yade-users team mailing list archive

## Re: [Question #169689]: Velocity gradient

```Question #169689 on Yade changed:

For 1), you can also use cell->prevVelGrad in the function and
everywhere in Newton (and update it). This attribute is currently useless.

For 2), I think the two corrections should really be at different times.
The convective term is a correction of velocity accounting for the
displacement that occured between t-dt and t. This displacement is
exactly v(t-dt/2)*dt.
The term with dVelGrad reflects an "impulse" (or acceleration) occuring
at time t, yes, but it actually defines the velocity between t and t+dt
(what we call v(t+dt/2).
In other words, we correct the old, then we define the new.

Computing an average velGrad for time t would not make much sense since
velocities are never defined for integer steps.
If you apply this idea in the cycle I described, if I'm not wrong, it
would result in:

* first step: v=v-0.25*0=0 (convective); v=dVelGrad*pos=-0.5 (like before)
* second step: v=v+0*meanVel=-0.5 (no correction); v=v+dVelGrad*pos=0

As you see the particle is stuck at second step. The cell is deforming
but the particle doesn't move.
I'm not really sure I'm applying your suggestion correctly because in
fact this equation looks recursive to me:

It means: