← Back to team overview

yade-users team mailing list archive

[Question #706766]: How to get Micro-strain field from a 2D simulation in YADE

 

New question #706766 on Yade:
https://answers.launchpad.net/yade/+question/706766

Hi,

YADE example [1] shows how to export the microstrain vtk from a 3D case.
I would like to ask how to get the micro-strain from a (quasi) 2D simulation in YADE.

I made a 2D MWE below (not a perfect 2D), where I use the approach demonstrated in [1] to get the microstrain. The calculated matrix is all zero. When the vtk file is imported into paraview, there is nothing. Possibly because it is based on volume calculation, while in quasi-2D, there is no volume.

Do you have any idea of how to get the microstrain vtk for a 2D case in YADE?

Thanks,
Leonard

################### 2D MWE #############
from __future__ import division
from yade import pack, plot

num_spheres=1000

rate=-0.01
damp=0.6
stabilityThreshold=0.001 
young=5e6
confinement=6.7e3

mn,mx=Vector3(0,0,0.02),Vector3(1,2,0.02)

O.materials.append(FrictMat(young=young, poisson=0.5, frictionAngle=radians(30), density=2600, label='spheres'))
O.materials.append(FrictMat(young=young, poisson=0.5, frictionAngle=0, density=0, label='walls')) 
walls=aabbWalls([Vector3(0,0,0),Vector3(1,2,0.04)],thickness=0,material='walls')
wallIds=O.bodies.append(walls)

sp=pack.SpherePack()
sp.makeCloud(mn,mx,-1,0.3333,num_spheres,False, 0.75,seed=1)

O.bodies.append([sphere(center,rad,material='spheres') for center,rad in sp])

Gl1_Sphere.quality=3

for b in O.bodies:
        if isinstance(b.shape,Sphere):
                b.state.blockedDOFs='zXY'
                b.shape.color=[1,1,1]

triax=TriaxialStressController(
        thickness = 0,
        stressMask = 7,
        internalCompaction=False,
)

newton=NewtonIntegrator(damping=damp)

O.engines = [
        ForceResetter(),
        InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Box_Aabb()]),
        InteractionLoop([Ig2_Sphere_Sphere_ScGeom(), Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()]),
        GlobalStiffnessTimeStepper(active=1, timeStepUpdateInterval=100, timestepSafetyCoefficient=0.8),
        triax,
        newton
]

triax.goal1=triax.goal2=triax.goal3=-confinement

while 1:
  O.run(1000, True)
  unb=unbalancedForce()
  print 'unbF:',unb,' meanStress: ',-triax.meanStress,'top:',-triax.stress(triax.wall_top_id)[1],'left:',-triax.stress(triax.wall_left_id)[0],'front:',-triax.stress(triax.wall_front_id)[2]
  if unb<stabilityThreshold and abs(-confinement-triax.meanStress)/confinement<0.0001:
          break

print "###     state 1 completed     ###"


TW=TesselationWrapper()
TW.triangulate()
TW.computeVolumes()
TW.volume(10)
TW.setState(0)
O.run(500,True)
TW.setState(1)
TW.defToVtk("strain_2D.vtk")

############


[1]https://yade-dev.gitlab.io/trunk/user.html?highlight=paraview#micro-strain

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.