------------------------------------------------------------ revno: 2910 committer: Chiara Modenese <[email protected]> branch nick: yade timestamp: Mon 2011-08-29 18:31:34 +0000 message: - Fix bug in Periodic Boundary. scene->cell->prevVelGrad was never updated. It was equivalent to apply homoDeform=2 in place of homoDeform=3. (Thanks, Vaclav) modified: pkg/dem/NewtonIntegrator.cpp
-- lp:yade https://code.launchpad.net/~yade-dev/yade/trunk Your team Yade developers is subscribed to branch lp:yade. To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'pkg/dem/NewtonIntegrator.cpp' --- pkg/dem/NewtonIntegrator.cpp 2011-04-22 09:01:59 +0000 +++ pkg/dem/NewtonIntegrator.cpp 2011-08-29 18:31:34 +0000 @@ -190,7 +190,7 @@ //NOTE : if the velocity is updated before moving the body, it means the current velGrad (i.e. before integration in cell->integrateAndUpdate) will be effective for the current time-step. Is it correct? If not, this velocity update can be moved just after "state->pos += state->vel*dt", meaning the current velocity impulse will be applied at next iteration, after the contact law. (All this assuming the ordering is resetForces->integrateAndUpdate->contactLaw->PeriCompressor->NewtonsLaw. Any other might fool us.) //NOTE : dVel defined without wraping the coordinates means bodies out of the (0,0,0) period can move realy fast. It has to be compensated properly in the definition of relative velocities (see Ig2 functors and contact laws). //This is the convective term, appearing in the time derivation of Cundall/Thornton expression (dx/dt=velGrad*pos -> d²x/dt²=dvelGrad/dt+velGrad*vel), negligible in many cases but not for high speed large deformations (gaz or turbulent flow). - if (homoDeform==Cell::HOMO_VEL_2ND) state->vel+=scene->cell->prevVelGrad*state->vel*dt; + if (homoDeform==Cell::HOMO_VEL_2ND) state->vel+=prevVelGrad*state->vel*dt; //In all cases, reflect macroscopic (periodic cell) acceleration in the velocity. This is the dominant term in the update in most cases Vector3r dVel=dVelGrad*state->pos;
_______________________________________________ Mailing list: https://launchpad.net/~yade-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp

