Difference between revisions of "Triangulation"

From Yade

(Created page with '*Description The engine MicroMacroAnalyzer computes quantities like fabric tensor, local porosity, local deformation, and other micromechanicaly defined quantities based on tria…')
 
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
  +
==TesselationWrapper==
*Description
 
   
  +
TesselationWrapper (still in development) can be used for building and performing basic operations on the triangulation or tesselation of sphere packings. It should be accessed directly from python or included in another engine doing more complex things (e.g. MicroMacroAnalyser - see below, TriangulationCollider, VolumicContactLaw).
  +
  +
==MicroMacroAnalyzer==
 
The engine MicroMacroAnalyzer computes quantities like fabric tensor, local porosity, local deformation, and other micromechanicaly defined quantities based on triangulation/tesselation of the packing.
 
The engine MicroMacroAnalyzer computes quantities like fabric tensor, local porosity, local deformation, and other micromechanicaly defined quantities based on triangulation/tesselation of the packing.
 
This class is using a separate library built from lib/triangulation sources.
 
 
[[User:Bchareyre|Bchareyre]] 17:59, 7 December 2009 (UTC)
 
 
*Discussion
 
 
Currently, if you put MicroMacro engine in your simulation, MMA::action() will (in short) :
 
- scan bodies and build a regular(*) triangulation of the spheres each N iterations;
 
- compute the average strain in each tetrahedron and assign it to grains (so that the "strain" of one grain is a sum over adjacent tetrahedra), based on the dispacements of particules on the interval [n,n+N].
 
- save the state of the sample in a text file (with a specific convention), so that strains can be recomputed later (out of yade) with different interval sizes (like [n,n+2N], [n,n+3N], etc.)
 
- write local strains, porosity, fabric tensor, and other micromechanical quantities in txt files too.
 
 
Problems :
 
- This engine is doing always the same thing, you can't change what it does if you don't modify the code and recompile. It is a pitty, since many geometrical functions available in lib/Triangulation could be usefull as well (e.g. computing the dual Voronoi graph).
 
- If you want to access to quantities like porosity at the scale of tetrahedra, you have no way to do that in yade, because you need to access the CGAL structure using the concepts of cell_iterators, edge_iterators,... which are not defined in yade.
 
 
So, I'm wondering how to improve that, and I hesitate between 2 approaches :
 
 
a) enrich the interface of TesselationWrapper or MicroMacro, so that instead of just "MM::action()", many members could be accessed via python, and different things can be computed on demand, and returned in a standard format. e.g. for the porosity in a cell of the triangulation, there could something like:
 
 
pair<int [4], Real porosity> MMAnalyzer::porosityInNextCell (void);// usage : while (porosity!=-1) porosity = porosityInNextCell().second;
 
 
   
 
(*) Regular is for weighted points (center + radius), while the usual Delaunay is for points.
b) expose and make full usage of all typedefs defined in def_types.h. In that case, no need for interface any more, the full lists of edges, cells, or facets can be visited, but the user need to learn how to use CGAL and/or my triangulation classes before doing anything. Example :
 
   
  +
[[File:StrainLocPeriodic.png|500px|thumb|left|Fig. 1: Deviatoric srain map in a triaxial test simulation with periodic bondary conditions (10k spheres and elastic-frictional contacts), evidencing strain localization. Output files generated by MicroMacroAnalyzer and post-processed using [http://www.paraview.org Paraview].]]
for (finite_cell_iterator cell=MMA->triangulation->finite_cells_begin; cell != MMA->triangulation->finite_cells_end; cell++)
 
{
 
porosity = MMA::Porosity(cell);
 
if (cell->vertex(2)->id == x) do something;//etc.
 
}
 
   
  +
[[File:cell_volume.png|500px|thumb|right|Fig.2 Defining a local volume for spheres in a packing ([[Publications | Hartong et al. (2010)]])]]
(*) Regular is for weighted points (center + radius), while the usual Delaunay is for points. It can make a big difference (and Delaunay can give stupid result) when radii are not all the same.
 

Latest revision as of 20:53, 22 December 2010

TesselationWrapper

TesselationWrapper (still in development) can be used for building and performing basic operations on the triangulation or tesselation of sphere packings. It should be accessed directly from python or included in another engine doing more complex things (e.g. MicroMacroAnalyser - see below, TriangulationCollider, VolumicContactLaw).

MicroMacroAnalyzer

The engine MicroMacroAnalyzer computes quantities like fabric tensor, local porosity, local deformation, and other micromechanicaly defined quantities based on triangulation/tesselation of the packing.

(*) Regular is for weighted points (center + radius), while the usual Delaunay is for points.

Fig. 1: Deviatoric srain map in a triaxial test simulation with periodic bondary conditions (10k spheres and elastic-frictional contacts), evidencing strain localization. Output files generated by MicroMacroAnalyzer and post-processed using Paraview.
Fig.2 Defining a local volume for spheres in a packing ( Hartong et al. (2010))