yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #12009
Re: [Question #275779]: Strain (localization) history
Question #275779 on Yade changed:
https://answers.launchpad.net/yade/+question/275779
Status: Solved => Open
behzad is still having a problem:
hmm, but it seems that using it is not straightforward!
I'm running the following script. Is there anything wrong with that? I do not get the strain history even if I define several states as TW.setState(1)...TW.setState(10).
Is the script to make the view in [1] published?
[1] https://yade-dem.org/doc/user.html#micro-strain
Thanks.
from yade import utils, plot,export
from yade import pack, qt
#================= define the materials =======================
O.materials.append(CohFrictMat(normalCohesion= 1e20, shearCohesion= 1e20, isCohesive= False, young=5e4,
density=1523.6, poisson=0.3, frictionAngle= 0.28, fragile=False, label='coke'))
############################
### DEFINING ENGINES ###
############################
O.engines=[
ForceResetter(),
# GlobalStiffnessTimeStepper(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb(),Bo1_Facet_Aabb()]),
InteractionLoop([Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()])
,NewtonIntegrator(damping=0.4,gravity=[0,0,-10])
]
O.dt=1e-5
#========= creating walls ======================
walls=aabbWalls([(-0.025,-0.025,-0.005),(0.025,0.025,0.055)],thickness=0.0001,oversizeFactor=1.0,material='coke')
wallIds=O.bodies.append(walls)
#==============
bind1=pack.SpherePack()
bind1.makeCloud((-0.02,-0.02,0),(0.02,0.02,0.05),rMean=1.0e-3,rRelFuzz=0.0,num=5000)
O.bodies.append([utils.sphere(c,r,material='coke') for c,r in bind1])
############################
### Display settings ###
############################
for x in range(len(O.bodies)):
if (O.bodies[x]):
if isinstance(O.bodies[x].shape,Sphere):
if O.bodies[x].isStandalone:
O.bodies[x].shape.color=(0.2,0.3,0.6)
else:
O.bodies[x].shape.color=(0.7,0.63,0.0)
else:
O.bodies[x].shape.color=(0.2,0.3,0.1)
qtr=qt.Renderer()
qtr.bgColor=(1,1,1)
#===============================================
#=============== Compaction ====================
#===============================================
boxIds=[]
for x in range(len(O.bodies)):
if (O.bodies[x]):
if isinstance(O.bodies[x].shape,Box):
boxIds.append(O.bodies[x].id)
print O.bodies[boxIds[-1]].shape.wire
O.bodies[boxIds[-1]].shape.wire=False
print boxIds
triax=TriaxialStressController(
maxMultiplier=1.000,
finalMaxMultiplier=1.000,
thickness = 0,
stressMask = 7,
internalCompaction=False,
)
O.engines=O.engines+[triax]
triax.goal1=-100
triax.goal2=-100
triax.goal3=-100
triax.wall_front_id=boxIds[-1]
triax.wall_back_id=boxIds[-2]
triax.wall_top_id=boxIds[-3]
triax.wall_bottom_id=boxIds[-4]
triax.wall_right_id=boxIds[-5]
triax.wall_left_id=boxIds[-6]
triax.wall_back_activated=True
O.engines[-3].gravity=[0,0,-10]
TW=TesselationWrapper()
TW.triangulate()
TW.computeVolumes()
TW.setState(0)
O.run(5000,True)
TW.setState(1)
TW.defToVtk("strain.vtk")
--
You received this question notification because your team yade-users is
an answer contact for Yade.