Microstrain for an assembly of clumps in direct shear test

Asked by Nima Goudarzi

Hi there,
I'm trying to export VTK of strains during a direct shear test on an assembly of clumps of spheres to no avail so far. I've read the relevant micro-stress and micro-strain sections in the manual and also have tried some workarounds proposed in QAs.
I'm trying to visualize the localization (shear band) during the shearing phase FOR ALL SPHERES. What I have implemented is:

TW=TesselationWrapper()
TW.triangulate()
TW.computeVolumes()
TW.volume()
TW.setState(0)
step=0
while 1:
   stresses = bodyStressTensors()
   strains = [Matrix3(*[TW.deformation(b.id,i,j) for i in range(0,3) for j in range(0,3)]) for b in O.bodies]
   step +=1
   O.run(1000,True)
   TW.setState(1)
   TW.defToVtk("strain_"+str(step)+".vtk")

which does not work. I realize that this is not a proper approach for strain calculation of an assembly since I get the "triangualtion failed for body ..." in the command window and consequently paraview crashes displaying the results. Here, I need advice for getting strains for the clump assembly (if possible at all).
1- Is it necessary to explicitly extract the strain tensor like
strains = [Matrix3(*[TW.deformation(b.id,i,j) for i in range(0,3) for j in range(0,3)]) for b in O.bodies]????

Thanks so much

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

just an idea: use another simulation where the clumps are "mirrored" into spheres with same position and rotation as the corresponding clumps and do the strain analysis on that sample.

Cheers
Jan

Revision history for this message
Nima Goudarzi (nimagoudarzi58) said :
#2

Hi Jan,

Thanks so much. By mirroring do you mean releasing from clumps or this is a specific technique I am not aware of. And, do you imply that the strain analyses for clumps themselves is not possible for clumps yet?

Sincerely
Nima

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

> And, do you imply that the strain analyses for clumps themselves is not possible for clumps yet?

I have no idea (I do not use this stuff almost at all).
The approach below should work, you can experiment with other approaches.

> By mirroring do you mean releasing from clumps

No. By mirroring I mean just create separate simulation where for the strain analysis purposes, clumps are replaced ("mirrored") by spheres with same state.pos and state.ori as the original clumps.

Below is a MWE.
Be careful with the scene switching, always "return" back where you want to continue.

I am not sure if sphere sizes should be adjusted or not..

######
def mirror():
    # extract state from cumps
    states = [(b.state.pos,b.state.ori) for b in clumps]
    # switch to "spherical" simulation
    O.switchScene()
    # set states to the spheres
    for (pos,ori),b in zip(states,O.bodies):
        b.state.pos = pos
        b.state.ori = ori

# create dummy clump packing
for x in (0,1):
    for y in (0,1):
        for z in (0,1):
            clumpId,ids = O.bodies.appendClumped([
                sphere((x,y,z),0.1),
                sphere((x+0.2,y,z),0.1),
            ])

clumps = [b for b in O.bodies if b.isClump]

# create spheres in separate simulation (same amount as the clumps)
O.switchScene()
O.bodies.append([sphere((0,0,0),0.1) for _ in clumps])
O.switchScene()

mirror() # note: simulation is switched
TW=TesselationWrapper()
TW.triangulate()
TW.computeVolumes()
TW.setState(0)
O.switchScene() # switch back to "clump" simulation

# some artificial motion
O.bodies[clumpId].state.vel = (1,1,1)
O.step()

mirror() # note: simulation is switched
TW.setState(1)
TW.defToVtk("strain.vtk")

O.switchScene() # switch back to "clump" simulation
######

Cheers
Jan

Revision history for this message
Jérôme Duriez (jduriez) said :
#4

From the top of my head / the doc [*], the starting point of the TesselationWrapper approach might be quite sphere-specific, but you can look at the relevant literature [**] to see how much this is true / could be extended

[*] https://yade-dem.org/doc/user.html#micro-stress-and-micro-strain
[**] e.g. https://yade-dem.org/doc/publications.html#catalano2014a

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

Hi,
I confirm that clumps are not supported in this case. In fact, it should work if the clumped spheres are not overlapping too much, but in the general case it won't.
Jan suggests a good workaround in #3.

Note: a newer function [1] will let you switch from
> Matrix3(*[TW.deformation(b.id,i,j) for i in range(0,3) for j in range(0,3)])
to
> TW.deformationTensor(b.id)

since the first is obviously a pain.

[1] https://gitlab.com/yade-dev/trunk/-/merge_requests/943/diffs#4571c09191fb63b1bdb53a5ad573e72677b1892b_176_177
Should be reflected in yadedaily very soon.

Can you help with this problem?

Provide an answer of your own, or ask Nima Goudarzi for more information if necessary.

To post a message you must log in.