using clump in PeriTriaxController

Asked by Alireza Sadeghi on 2020-01-17

Hello All,

I want to use clump shape particles instead of spherical particles in the PeriTriaxController. As you can see in the following code, there is only one particle in the middle of a cell. There is no interactions between the boundaries and the particle at the begininng. Why the stress at the boundaries are not zero?
I asked this question several times, and nobody answered me. Therfore, the questions were expired and removed. I have stopped in this position for two months. I will be so grateful if you could help me.

Thank you very much for your help in advance.

Best Regards,

Alireza

######code######

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

#==================set a periodic boundary==================

O.periodic=True
O.cell.refSize=(10e-3,10e-3,10e-3)

#================= define the materials =======================

#O.interactions.clear()

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='aggregate-48'))

#===================clump shape=================================

radz1=[3e-3,3e-3]
poz1= [[0,0,-1e-3],[1e-3,0,0]]
template1= []
template1.append(clumpTemplate(relRadii=radz1,relPositions=poz1))

nums=['t']

mats=['aggregate-48']

coke=(1e-3,1)

color=((0,0,1))

tolerance=[(2e-4)]

temps=[template1]

nums=pack.SpherePack()

nums.makeCloud((3e-3,3e-3,3e-3),(7e-3,7e-3,7e-3),rMean=coke[0],rRelFuzz=tolerance[0],num=coke[1])

O.bodies.append([utils.sphere(c,r,material=mats[0],color=color[0]) for c,r in nums])
O.bodies.replaceByClumps(temps[0],[1.0],discretization=5)

#O.interactions.clear()

#====================Engine====================

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=.01,relStressTol=1e-3,
  doneHook='compactionFinished()'
     ),
     NewtonIntegrator(damping=0.4,gravity=[0,0,0]),

     PyRunner(command='history()',iterPeriod=1,label='recorder'),
]

O.dt=5e-8

def history():
 plot.addData(unbalanced=unbalancedForce(),
  sxx=-triax.stress[0],syy=-triax.stress[1],szz=-triax.stress[2],
  exx=-triax.strain[0],eyy=-triax.strain[1],ezz=-triax.strain[2],
                q=-(triax.stress[2]-triax.stress[1]), p=-(triax.stress[2]+triax.stress[1]+triax.stress[0])/3,
                por=porosity(),i=O.iter,)

        print 'porosity:', porosity(),'Unbalancing:',unbalancedForce(),'Strain',-triax.strain[2], 'Stress',-triax.stress[2]

def compactionFinished():
 O.pause()

Question information

Language:
English Edit question
Status:
Expired
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
2020-01-24
Last reply:
2020-02-09
Jan Stránský (honzik) said : #1

Hello,

I could not reproduce your problem. I have run 1M steps, but
triax=O.engines[3]
print(triax.stress)
shows
Vector3(0,0,0)
and also "Stress -0.0" is printed while running

what version of Yade do you use?

cheers
Jan

Alireza Sadeghi (asadeghime) said : #2

Hello Jan,

Thank you very much for your reply. Do you mean that you get zero stress at the boundaries for 1M initial steps?
I am using YADE 2018.02b. Does the problem come from my YADE version?
Thank you very much for your help.

Best Regards,

Alireza

Jan Stránský (honzik) said : #3

> Do you mean that you get zero stress

yes with relatively new version
no with 2018.02b

> Does the problem come from my YADE version?

seems like that

cheers
Jan

Alireza Sadeghi (asadeghime) said : #4

Dear Jan,

Thank you very much for your response. I will install the newest version of YADE and see what will be happened. I will definitely let you know about the problem.

Thank you very much.

Best Regards,

Alireza

Alireza Sadeghi (asadeghime) said : #5

Dear Jan,

I see that yade 2018.02b is newest one for Ubuntu 18.04.
1. Is it possible to give me the exact version of YADE you are using?

2. How about yadedaily?I installed it on my computer but I cannot run my code with it. How does it work?Does it work as the same as YADE with writing "yade test.py" in the terminal??

3. For the last version, Should I install Ubuntu 19??If yes, do you think that it could solve my problem?

Thank you very much.

best regards,

Alireza

Jan Stránský (honzik) said : #6

Hello,

1.
2020-01-06.git-f6677ba
compiled from source code

2.
> but I cannot run my code with it

please be more specific

> Does it work as the same as YADE with writing "yade test.py" in the terminal?

yes, instead of "yade" use "yadedaily"

I have tried now yadedaily, resulting in zero stress

3.
I am using Ubuntu 18.04, so this should not be the issue.
Newer Ubuntu may solve your problem, you can (before reinstalling/upgrading the system) e.g. test it using virtualbox and install the newer system there.

conclusion: the easiest approach seems to be using yadedaily

cheers
Jan

Alireza Sadeghi (asadeghime) said : #7

Dear Jan,

Thank you very much for your response. I installed yade-2020-01-git-146d6de. Now I don't know how should I run my code. Because in YADE, I just type for example (yade -j2 test.py), but now I have to go through the folder that yade-2020-01-git-146d6de is located. Thank you very much.

Best Regards,

Alireza

Jan Stránský (honzik) said : #8

> I installed yade-2020-01-git-146d6de

please be more specific (like provide the command you have used)

thanks
Jan

Alireza Sadeghi (asadeghime) said : #9

Hello Jan,

Thank you very much for your reply. When I work with YADE (2018.02b), I just type "yade -j4 test.py" in the test.py file directory.
Now, I am using yade-2020-01-git-146d6de. In the directory of "yade-2020-01-git-146d6de", I typed "./yade-2020-01-02.git-146d6de". I have:

alsac8@GMN-HA-02LX:~/yade-dev/install/bin$ ./yade-2020-01-02.git-146d6de
Welcome to Yade 2020-01-02.git-146d6de
Using python version: 3.6.9 (default, Nov 7 2019, 10:44:02)
[GCC 8.3.0]
TCP python prompt on localhost:9000, auth cookie `dasksc'
XMLRPC info provider on http://localhost:21000
[[ ^L clears screen, ^U kills line. F12 controller, F11 3D view (press "h" in 3D view for help), F10 both, F9 generator, F8 plot. ]]

In [1]:

Now, how should I run my code (for example test.py which is located in a directory different with directory of yade-2020-01-02.git-146d6de) ?

Thank you very much.

Best Regards,

Alireza

Jan Stránský (honzik) said : #10

> Now, I am using yade-2020-01-git-146d6de

how did you install it?

Launchpad Janitor (janitor) said : #11

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.