Save/compute average strain 0.5*(∇u+∇u^t)

Asked by Hongyang Cheng

Dear all,

The TesselationWrapper is able to compute deformation from given chronological states/positions of a packing. Though it writes particle-based strain tensors to in vtk format and returns the average strain (sym_grad_u), I didn't find a way to save the strain in Matrix3 format so that I can compute the deviatoric part.

An alternative way is to triangulate the packing (Regular/Delaunay) following Bagi's method such that the products would be similar to what TesselationWrapper produces. The Delaunay triangulation can be easily imported from scipy [1], but the regular triangulation [2] looks more preferable because it is also used in Yade. Unfortunately I don't know how to import it to Yade.

Is it possible to save the average strain returned from the TesselationWrapper? If not, could anyone tell me how to import the regular triangulation package to Yade without touching the source code?

[1] http://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.spatial.Delaunay.html
[2] http://doc.cgal.org/latest/Triangulation_3/

Cheers
Alex

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Bruno Chareyre
Solved:
Last query:
Last reply:
Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#1

Hi,

>I didn't find a way to save the strain in Matrix3

You can do simply this (ugly, obviously we need to shortcut that):
eps=matrix3(TW.deformation(10,0,0), TW.deformation(10,0,1), ..., TW.deformation(10,2,2))

This would be the strain tensor for particle 10.

>An alternative way is to triangulate the packing

This is exactly what we are doing (with regular triangulation), else the concept of "closest neighbours" would be undefined.
In the first place the strain is defined per tetrahedron, but this field gives very unpleasant artifacts. So, we compute strain per particle as a weighted average of the incident cell's strain.
The strain per tetrahedron can't be accessed directly from python but it is somewhere in memory, not very difficult to get if you need it.

>Is it possible to save the average strain returned from the TesselationWrapper?

Since you can read it (as in the line above), you can also write it into a file. Is that what you mean by "save"?

>how to import the regular triangulation package to Yade

CGAL does not offer a proper python binding, so I would say no, you can't import anything.

Bruno

Revision history for this message
Hongyang Cheng (alex-cheng) said :
#2

Hi, Bruno

>This is exactly what we are doing (with regular triangulation), else the concept of "closest neighbours" would be undefined.

Thanks. Now I know how the TW, MMA and KLA work.

>Since you can read it (as in the line above), you can also write it into a file. Is that what you mean by "save"?

I would like to compute the macro deviatoric strain. The function KLA.computeParticlesDeformation() [1] returns 'ParticleDeformation' but only ouputs 'Total volume ', 'grad_u', and 'sym_grad_u' on the screen. If it is saved in memory can you tell me how to get it?

[1] https://github.com/yade/trunk/blob/283afb47ed4fdb86047618f0cb3ac892c040ef88/lib/triangulation/KinematicLocalisationAnalyser.cpp#L837

Alex

Revision history for this message
Best Bruno Chareyre (bruno-chareyre) said :
#3

You can generate a big table with all strain tensors, volume of the voronoi cells and porosity, using
TW.getVolPoroDef()

grad_u and others are not registered variables. You can't access them, but they are not difficult to calculate. They are weighted averages of the local values. And you have values and weights (volumes) in this volPoroDef table.

What kind of boundary conditions do you have? Usually the maco strain can be directly deduced from them, that's why there is no real point returning them.

Revision history for this message
Hongyang Cheng (alex-cheng) said :
#4

Thanks, Bruno. I'll try TW.getVolPoroDef().

I am simulating triaxial test on a soilbag in the periodic boundary condition. The macro strain is given as Vector3. I am just curious whether it has non zero off-diagonal parts because the boundary is not smooth.

Revision history for this message
Hongyang Cheng (alex-cheng) said :
#5

Thanks Bruno Chareyre, that solved my question.