a problem about micro-stress computing

Asked by xjin

I am trying to run a packing model,and try to use TesselationWrapper() to obtain the Micro-stress as the example given by YADE official website: https://www.yade-dem.org/doc/user.html#micro-stress-and-micro-strain.

My specific script is like tihs:
---------------------------------------------------------------
O.reset()
O.bodies.append(geom.facetBox((.5,.5,.5),(.5,.5,.5),wallMask=63))

from yade import pack
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(1,1,1),rMean=0.02, rRelFuzz=0.1)
sp.toSimulation()

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
   InteractionLoop(
      [Ig2_Sphere_Sphere_L3Geom(),Ig2_Facet_Sphere_L3Geom()],
      [Ip2_FrictMat_FrictMat_FrictPhys()],
      [Law2_L3Geom_FrictPhys_ElPerfPl()]
   ),
   NewtonIntegrator(gravity=(0,0,-19.81),damping=0.4),

]
O.dt=0.05*PWaveTimeStep()
----------------------------------------------------------------------

Then I reset the Δt=5.0e-05。Then I type following script:

----------------------------------------------------------------------
O.run(6343)
TW=TesselationWrapper()
TW.computeVolumes()
s=bodyStressTensors()
stress=s[100]**4.*pi/3.*O.bodies[100].shape.radius**3/TW.volume(100)
#These codes are written exactly as the YADE manualy(https://www.yade-dem.org/doc/user.html#micro-stress-and-micro-strain).
----------------------------------------------------------------------

I get message:

----------------------------------------------------------------------
unsupported operand type(s) for ** or pow(): 'Matrix3' and 'float'
----------------------------------------------------------------------
Can someone help me?Thanks very much!

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
xjin
Solved:
Last query:
Last reply:

This question was reopened

  • by xjin
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

> stress=s[100]**4

it is a typo, should be
stress=s[100]*4
with single * symbol

cheers
Jan

Revision history for this message
xjin (jpeng22) said :
#2

Thanks Jan Stránský (honzik) very much!
And I compute:
--------------------------------------------------------------------------------------------------------------
stress=s[200]*4.*pi/3.*O.bodies[200].shape.radius**3/TW.volume(200)
--------------------------------------------------------------------------------------------------------------
Then I type: stress,
The result is like this:
---------------------------------------------------------------------------------------------------------------
Yade [19]:obtain stress
    -> [19]: Matrix3(-0.13752527190640026,0.03607936010975411,0.0008634995770584191, 0.03445913198778846,-0.06373525199754092,0.006348443944983994, -0.0012487034856438542,0.014427579541476804,-0.11692017375785213)
--------------------------------------------------------------------------------------------------------------------
Can you explain the meanings of the values of the Matrix?
Thanks again!

Revision history for this message
Jan Stránský (honzik) said :
#3

The matrix is a matrix representation of stress tensor [1], so the values you get are
stress = (s_x, t_xy, t_xz, t_yx, s_y, t_yz, t_zx, t_zy, s_z)
s ... normal stress
t ... shear stress

cheers
Jan

[1] https://en.wikipedia.org/wiki/Cauchy_stress_tensor

Revision history for this message
xjin (jpeng22) said :
#4

Thanks Jan Stránský, that solved my question.

Revision history for this message
xjin (jpeng22) said :
#5

Thanks Jan Stránský, the original problem have already been solved.
Another confusion makes me want to ask you for help.

As the explanation mentioned before, stress = (s_x, t_xy, t_xz, t_yx, s_y, t_yz, t_zx, t_zy, s_z).
And the example I obtain:
------------------------------------------------------------------------------------------------------------------------------------------------------------
Yade [19]:obtain stress
     -> [19]: Matrix3(-0.13752527190640026,0.03607936010975411,0.0008634995770584191, 0.03445913198778846,-0.06373525199754092,0.006348443944983994, -0.0012487034856438542,0.014427579541476804,-0.11692017375785213)

------------------------------------------------------------------------------------------------------------------------------------------------------------
Therefore,
-------------------------------------------------------------------------------------------------------------------------------------------------------------
  s_x=-0.13752527190640026
t_xy=0.03607936010975411
t_xz=0.0008634995770584191
t_yx=0.03445913198778846
  s_y=-0.06373525199754092
t_yz=0.006348443944983994
t_zx=-0.0012487034856438542
t_zy=0.014427579541476804
  s_z=-0.11692017375785213
-------------------------------------------------------------------------------------------------------------------------------------------------------------
for the values, I find t_xy does not equal to t_yx,t_xz does not equal to t_zx and t_yz does not equal to t_zy.
As the knowledge of Elasticity shows, the t_xy=t_yx and so on.
Is the reason that the stress calculation is approximate calculation?
Thank you!

Revision history for this message
Jan Stránský (honzik) said :
#6

> Is the reason that the stress calculation is approximate calculation?

oppositely, the reason is exact calculation :-) in general, stress may be non-symmetric because the particle assembly is not in static equlibrium from moment point of view

in "classical" mechanics, t_xy=t_yx holds under assumption of zero rotation, you assume strain=symgrad(displacement) and you don't care of antisym part anymore. In DEM, rotation and moments are important (in "classical" continuum, you have forces, but no moments)... just a veeery brief intro, have a look e.g. at [1] (1st google result of "Cosserat continuum", see especially slide 15) or other similar materials. In case, open a new question

cheers
Jan

[1] http://alertgeomaterials.eu/data/school/2010/03%20Papamichos%20E%20Cosserat%20theory.pdf

Revision history for this message
xjin (jpeng22) said :
#7

Thanks Jan Stránský!