how to get fabric tensor and micro information?

Asked by ehsan benabbas on 2019-10-11


I'm new with Yade and using it for my Ph.D. work in Geotechnics. I have coded a simple triaxial test but don't know how can I get micro-scale information such as fabric tensor, contact normal, branch vectors, interparticle forces, strains, etc.

My supervisor asked me to provide all of those in 2 days and I have no idea what should I do :-(

Would you please tell me how I can get that information? (and also if my code has any issue)

This is my code:

# encoding: utf-8
# the script demonstrates a simple case of triaxial simulation using TriaxialCompressionEngine.

from yade import pack

## corners of the initial packing
mn, mx=Vector3(0,0,0), Vector3(10,10,10)

## box between mn and mx, average radius -+ 1/2(20%) , 2k spheres
sp.makeCloud(minCorner=mn,maxCorner=mx,rRelFuzz=0.2,num=2000) # it can be defined based on porosity instead of num or even use a range of radius instead of a fixed radius

## create material #0, which will be used as defult
O.materials.append(FrictMat(young=15e6,poisson=0.4,frictionAngle=radians(30),density=2600,label='spheres')) # for particles
O.materials.append(FrictMat(young=15e6,poisson=0.4,frictionAngle=0,density=0,label='frictionless')) # for walls # density is 0 because these walls are not exist in real and they ae kind of virtual to force particles to be in our virtual box (we want walls just to be as boundaries)

## Assign section, copy spheres from the packing into the scene
## use defult material, don't care about that for now
O.bodies.append([sphere(center,rad,material='spheres') for center, rad in sp]) #assign material to particles
## create walls around the packing
walls=aabbWalls(thickness=1e-10,material='frictionless') # assign material to walls # aabb models a cube boundary for the problem and Walls defines that the square will be created as walls ,,, thickness is so small due to not existence of walls (walls are virtual)
wallIds=O.bodies.append(walls) # assign ID to the walls

 ## define the rest of triaxial parameters here, see in pkg/dem/PreProcessor/TriaxialTest.cpp:524 etc, which are assigned in the c++ preprocessor actually

 ForceResetter(), # reset forces on boundaries in each step
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), # first arugemnt is a radisu which defines a certain lentgh to define collision between 2 particles, this lentgh consider as a spherical space or a circle and that's why we need a radius here
 [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], # interaction between 2 particles or a particle and box
 [Ip2_FrictMat_FrictMat_FrictPhys()], # FrictPhys is the Linear Elastic-Plastic Interaction
 [Law2_ScGeom_FrictPhys_CundallStrack()] # # CundallStrack is the Linear Elastic-Plastic Interaction
 # you can add TriaxialStateRecorder and such here...

from yade import plot
def history():




Question information

English Edit question
Yade Edit question
No assignee Edit question
Last query:
Last reply:
Jérôme Duriez (jduriez) said : #1


For instance, fabric tensor is at [*], contact normal is typically [**] and obtained typing
cont.geom.normal # with cont one Interaction object

If I were your supervisor, I would first ask you to read YADE documentation and get some YADE practice (this may take more than 2 days). It will help !


Can you help with this problem?

Provide an answer of your own, or ask ehsan benabbas for more information if necessary.

To post a message you must log in.