← Back to team overview

yade-dev team mailing list archive

Re: periodic cell

 

Hi Vaclav,

1/ It seems AABBs are compared with unsheared coordinates in PISCollider, is that true? 2/ What is the meaning of the operations on halfsize, using cosMatrix, in Bo1_Sphere_Aabb.cpp? Is it to compensate the comparison in unsheared coordinates? 3/ The proportional disp. must be applied on wrapped (but at the same time "sheared") coordinates, do you agree with that?

Bruno



Bruno Chareyre a écrit :
Regarding the displayed deformed cell, I think it would make sense to display bodies in a rectangular cell too. Sizes need to be updated, but the rest is as you like : you can see grain passing in a rectangular window (wrap the current euclidian coordinates to a rectangular cell), or display the deformed cell as you seem to do now (wrap unsheared coordinates and display bodies at position totalShear*(wrap(unshear(x))). The second looks better perhaps, but needs more computation.

Do you have working scripts for periodic compression without shear? The ones in trunk return errors. I'll try to look the current implementation and think how it can be generalised. I finally understood why the collider need to be adapted to shear, btw.

Thanks.

Bruno


Bruno Chareyre a écrit :

Vaclav, you can paste this code after l.90 in cell.cc (the modified version). Some more numerical experiments. It is in fact the comparison between one step with dt, and 100 steps with dt/100, for the same velocity.

Bruno


///Again the same, but decomposed in n=100 increments : the constant volume distorsion is represented more accurately : (det(F)-1) is O(1/n). This example shows what will happen in dynamic simulations, as long as we don't have large transformations in only one step.
   C._totalShearTrsf = Id;
   dt /= 100;
   C.Hsize = Matrix3r(C.size[0],0,0,
           0,C.size[1],0,
           0,0,C.size[2]);
   previousHsize = C.Hsize;
   for (int i = 1; i<=100; i++) C.updateCache2(dt);
cerr<<endl<<"incremental volume change (depsv) "<< (C._shearTrsf)(0,0)+(C._shearTrsf)(1,1)+(C._shearTrsf)(2,2)<<endl;
   cerr<<"real incremental volume change (V(t)-V(t-dt)/V(t-dt)) "<<
(C.Hsize.Determinant() - previousHsize.Determinant())/ previousHsize.Determinant() << " =(?) 100 x " << (C._shearTrsf+Id).Determinant() -1 <<endl; cerr<<"total volume change (epsv) "<< (C._totalShearTrsf)(0,0)+(C._totalShearTrsf)(1,1)+(C._totalShearTrsf)(2,2) - 3 <<endl;
   cerr<<"det(F) - 1 = "<< C._totalShearTrsf.Determinant() - 1 <<endl;
cerr<<"real total volume change (dV/V0) "<< ((C.Hsize.Determinant() -initV )/ initV) <<endl; dt *= 100;








Václav Šmilauer a écrit :
Hi there,

I commited a few changes for the period cell shear. For now, just the
underlying Cell class is in place and OpenGLRenderer renders the sheared
cell (no collisions yet, in particular). You can have a look at
scripts/test/periodic-shear.py, it looks pretty :-)

For the python interface, it will have to be changed in some meaningful
way, so please don't use it in your script, it is not stable. In
particular, instead of O.cellSize and O.cellShear, we will have O.cell
returning a Cell object, which will contain the properties, like in c++
(O.cell.size and O.cell.shear, perhaps some more as needed).

If you feel sad and run gnome, press Alt-F2 and run the command "free
the fish" (without quotes).

Cheers, Václav


_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp






--

_______________
Chareyre Bruno
Maître de Conférences

Grenoble INP
Laboratoire 3SR - bureau E145
BP 53 - 38041, Grenoble cedex 9 - France
Tél : 33 4 56 52 86 21
Fax : 33 4 76 82 70 43
________________




Follow ups

References