Periodic triaxial test

Asked by Alireza Sadeghi

hello all,

1. How can I control strain in the "PeriTriaxController"?
2.Is it possible to add shear on the boundary condition with this engine?
3. another question is that I can not draw diagram of Stress in compaction direction vs strain in compaction direction. what is the problem in your opinion?
my code is:

from yade import utils, plot
from yade import pack, qt
from datetime import datetime

O.periodic=True
O.cell.refSize=(2e-1,2e-1,2e-1)

O.materials.append(CohFrictMat(normalCohesion= 1e20, shearCohesion= 1e20, isCohesive= True, young=6.81e8, density=1377.5, poisson=0.3, frictionAngle= 0.31, fragile=False, label='Coke'))

nums=['t']

mats=['Coke']

coke=(5e-3,1000)

nums=pack.SpherePack()

nums.makeCloud((0,0,0),(2e-1,2e-1,2e-1),rMean=coke[0],rRelFuzz=1e-4,num=coke[1])

O.bodies.append([utils.sphere(c,r,material=mats[0]) for c,r in nums])

sigmaIso=-1e5

O.engines=[
     ForceResetter(),

     InsertionSortCollider([Bo1_Sphere_Aabb()]),
     InteractionLoop(
        [Ig2_Sphere_Sphere_ScGeom()],
        [Ip2_FrictMat_FrictMat_FrictPhys()],
        [Law2_ScGeom_FrictPhys_CundallStrack()]
     ),

     PeriTriaxController(label='triax',
  goal=(sigmaIso,sigmaIso,sigmaIso),stressMask=7,
  dynCell=True,maxStrainRate=(10,10,10),
  maxUnbalanced=.1,relStressTol=1e-3,
  doneHook='compactionFinished()'
     ),

     NewtonIntegrator(damping=0.4),

     PyRunner(command='addPlotData()',iterPeriod=100),

]

O.dt=0.5*PWaveTimeStep()

def addPlotData():
 plot.addData(unbalanced=unbalancedForce(),i=O.iter,
  sxx=triax.stress[0],syy=triax.stress[1],szz=triax.stress[2],
  exx=triax.strain[0],eyy=triax.strain[1],ezz=triax.strain[2])
# print 'normal stress', triax.stress[2]

# print 'normal strain', triax.strain[2]

plot.plots={('ezz'):('szz')}

plot.plot()

def compactionFinished():

 O.cell.trsf=Matrix3.Identity

 triax.goal=(sigmaIso,sigmaIso,-.2)
 triax.stressMask=3

 triax.maxStrainRate=(10,10,10)

 triax.doneHook='triaxFinished()'

 triax.maxUnbalanced=10

def triaxFinished():
 print 'Finished'
 O.pause()

The code does not draw "plot.plots={('ezz'):('szz')}". I was wondering if you could help me to fix this problem. Thank you very much for your help in advance.

Best Regards

Alireza

Question information

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

This question was reopened

Revision history for this message
Robert Caulk (rcaulk) said :
#1

Hello,

Usually for the sake of organization, we try to limit each thread to one question [3]. Thank you for your future cooperation!

>> 1.How can I control strain in the "PeriTriaxController"?
With [1].

>>2.Is it possible to add shear on the boundary condition with this engine?
According to the example script, you would use O.cell.vellGrad [2]

>> 3. The code does not draw "plot.plots={('ezz'):('szz')}".
It is tough to diagnose the problem without any reports of a symptom :-) Please describe your symptom(s) so that I can try to help you [3]

Cheers,

Robert

[1]https://yade-dev.gitlab.io/trunk/yade.wrapper.html#yade.wrapper.PeriTriaxController.goal
[2]https://gitlab.com/yade-dev/trunk/blob/master/examples/PeriodicBoundaries/periodic-simple-shear.py
[3]https://yade-dem.org/wiki/Howtoask

Revision history for this message
Alireza Sadeghi (asadeghime) said :
#2

Dear Robert,

Thank you very much for your help. I will obey the law (one question with one object).

Thanks for your help. for [1], is there any example for it?

for question number 3, it doesn't have any lines in the diagram. the diagram is empty. without any error. I run the sample which I put in this question, but I could not draw the diagram.

Thank you for your help.

Best Regards

Alireza

Revision history for this message
Robert Caulk (rcaulk) said :
#3

>>for [1], is there any example for it?

Yeah, same folder [1].

>>it doesn't have any lines in the diagram

Looks like you are trying to plot vectors. PeriTriaxController.stress returns a vector [2], you will need to index that vector to obtain the value you want. Same with strain.

def addPlotData():
 plot.addData(unbalanced=unbalancedForce(),i=O.iter,szz=triax.stress[2][2],ezz=triax.strain[2][2])

[1]https://gitlab.com/yade-dev/trunk/blob/master/examples/PeriodicBoundaries/periodic-triax.py
[2]https://yade-dev.gitlab.io/trunk/yade.wrapper.html#yade.wrapper.PeriTriaxController.stress

Revision history for this message
Robert Caulk (rcaulk) said :
#4

Hello,

Sorry, I need to correct the second part of my last response, I though PeriTriaxController.stress acted the same way as TriaxStressController.stress, but it does not. In fact, your script should work as it is. I ran your script and it plots szz vs ezz.

Cheers,

Robert

Revision history for this message
Alireza Sadeghi (asadeghime) said :
#5

Thanks Robert Caulk, that solved my question.

Revision history for this message
Alireza Sadeghi (asadeghime) said :
#6

Dear Robert,

Thank you very much for your help.

My script does not work and it can not plot any thing. I don't know how should I fix it. Thank you for your help.

Best Regards

Alireza

Revision history for this message
Best Robert Caulk (rcaulk) said :
#7

I ran your script with the standard yade installation and it plots a line.

Revision history for this message
Alireza Sadeghi (asadeghime) said :
#8

Thanks Robert Caulk, that solved my question.