Re: [Yade-users] [Question #688609]: Elastic Plastic Material Behavior for Grid Connection Model

2020-02-12 Thread Jeffrey Knowles
Question #688609 on Yade changed:
https://answers.launchpad.net/yade/+question/688609

Status: Open => Solved

Jeffrey Knowles confirmed that the question is solved:
Actually, it looks like I figured it out. I just by adjusted some of the
other parameters in the CohFrictMat class while still using the grid
connection method.

However, now my model sometimes completely disappears when I make a
rectangular frame (closed loop).

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #688720]: model a direct shear test

2020-02-12 Thread veerawat
New question #688720 on Yade:
https://answers.launchpad.net/yade/+question/688720

I want to make a model a direct shear test . But i still can't do it once 
.Similar questions cannot work. Anyone who knows ? writes the code for me  
Plese !!

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #688719]: Model a bearing capacity

2020-02-12 Thread veerawat
New question #688719 on Yade:
https://answers.launchpad.net/yade/+question/688719

>From this code I want to have a square that can be sized Crush the particles. 
>By determining the force , What should I do ?

from __future__ import print_function

from yade import pack
from pylab import rand
from yade import qt

O.periodic=True
length=0.4
height=0.6
width=0.2
thickness=0.01

O.cell.hSize=Matrix3(length, 0, 0,
0 ,3.*height, 0,
0, 0, width)

O.materials.append(FrictMat(density=1,young=1e5,poisson=0.3,frictionAngle=radians(30),label='boxMat'))
lowBox = box( center=(length/2.0,height-thickness/2.0,width/2.0), 
extents=(length*1000.0,thickness/2.0,width*1000.0) ,fixed=True,wire=False)
O.bodies.append(lowBox)

radius=0.01
O.materials.append(FrictMat(density=1000,young=1e4,poisson=0.3,frictionAngle=radians(30),label='sphereMat'))
sp=pack.SpherePack()
sp.makeCloud((0.*length,height+1.2*radius,0.25*width),(0.5*length,2*height-1.2*radius,0.75*width),-1,.2,2000,periodic=True)
O.bodies.append([sphere(s[0],s[1],color=(0.6+0.15*rand(),0.5+0.15*rand(),0.15+0.15*rand()))
 for s in sp])

O.dt=0.2*PWaveTimeStep()
O.usesTimeStepper=True
newton=NewtonIntegrator(damping=0.6,gravity=(0,-10,0))

O.engines=[
ForceResetter(),
#(1) This is where we allow big bodies, else it would crash due to the 
very large bottom box:

InsertionSortCollider([Bo1_Box_Aabb(),Bo1_Sphere_Aabb()],allowBiggerThanPeriod=True),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),

GlobalStiffnessTimeStepper(timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8,defaultDt=O.dt),
newton
]

Gl1_Sphere.stripes=1

from yade import qt
qt.View()
print('Press PLAY button')

Video from the code
https://www.youtube.com/watch?v=_SeA5KDzxpg&feature=youtu.be




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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688643]: How to do model bearing capacity of soil

2020-02-12 Thread veerawat
Question #688643 on Yade changed:
https://answers.launchpad.net/yade/+question/688643

Status: Answered => Open

veerawat is still having a problem:
 I want to make a model of soil weight bearing. Which the pressure that I use 
is needed as a square of various sizes. 
but my code is not scalable. What should I do?

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688681]: Contact laws and Input stiffness directly rather than young parameter

2020-02-12 Thread ehsan benabbas
Question #688681 on Yade changed:
https://answers.launchpad.net/yade/+question/688681

ehsan benabbas gave more information on the question:
> I would check your stop conditions and which phase is "freezing" the 
> simulation.
My stop/finishing criterion is the target strain which is 0.25 (it's 
reasonable). With using FricMat and value for "young" in terms of Kn,  The code 
will take so long in the deviatoric part and cannot reach the stop/finishing 
criterion easily.

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688681]: Contact laws and Input stiffness directly rather than young parameter

2020-02-12 Thread ehsan benabbas
Question #688681 on Yade changed:
https://answers.launchpad.net/yade/+question/688681

Status: Answered => Open

ehsan benabbas is still having a problem:
> why you "should get the same behavior", if you use a different material, 
> different Ip2 and different Law2?
I get your point. However, it is not a different material (for me at least). 
When we are considering the same specimen, and this specimen is a real subject 
in our minds, we should get the same mechanical behavior apart from the 
scientific approach we look at the specimen.  In fact, the material, the 
specimen, and its properties, all are the same, so, just changing the contact 
law should not lead to a different mechanical behavior (new stress-strain 
curve). 

> And if you think/are sure that with certain parameters it leads to the same 
> physics, why to change it?
With the FricMat,  I get the dens behavior (with peak) which makes sense as the 
porosity is 0.4 and grains are in the sphere shape and fully rounded. The 
problem with this contact law is the "young" parameter which makes the code to 
be run so long as for 3 weeks. However, with the ViscElMat I get only the 
hardening behavior which refers to a loose specimen (with cn=cs=0)  but the 
code will be run only in 15 minutes.
Again, for the FricMat, when I define the "young" based on Kn, it gets a value 
which makes the run-time so long.

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688345]: Precrack

2020-02-12 Thread mrhappy
Question #688345 on Yade changed:
https://answers.launchpad.net/yade/+question/688345

mrhappy gave more information on the question:
I have used other methods such as:
O.interactions[4949,5048].phys.isBroken = True
O.interactions[5048,4949].phys.isBroken = True 
 
O.interactions[4949,5048].phys.isCohesive = False 
O.interactions[5048,4949].phys.isCohesive = False 

But still I cannot confirm that the interaction between these nodes are
zeroed. Can you suggest another method to zero-out the interaction
between these selected particles?

Thanks!

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #688715]: Adding an interaction

2020-02-12 Thread mrhappy
New question #688715 on Yade:
https://answers.launchpad.net/yade/+question/688715

Hi,

To delete an interaction between two bodies, I do the following:

O.interactions.erase(id1,id2)

How do I add an interactyion between id1 and id2?

Thanks!


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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688696]: Calculate the number of broken bonds in Cpm mat

2020-02-12 Thread Akm
Question #688696 on Yade changed:
https://answers.launchpad.net/yade/+question/688696

Status: Needs information => Open

Akm gave more information on the question:
Hi Jan and Robert,

My script is pretty lengthy and has a lot of imports. So let me just
stick to those commands where I calculate the bond breakage statistics.

I do not get any change in the cohesive bond numbers even when I can see
particles flying after bond breakage.

###At the start of the program
global cohesive_count
cohesive_count=0
for i in O.interactions:
if hasattr(i.phys, 'isCohesive'):
if i.phys.isCohesive == True:
cohesive_count+=1

###Inside a Pyrunner:
presentcohesive_count = 0
for i in O.interactions:
if hasattr(i.phys, 'isCohesive'):
if i.phys.isCohesive == 1:
presentcohesive_count+=1
noncohesive_count= cohesive_count-presentcohesive_count
print (noncohesive_count)

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688685]: permeability - PFV

2020-02-12 Thread Othman Sh
Question #688685 on Yade changed:
https://answers.launchpad.net/yade/+question/688685

Othman Sh gave more information on the question:
I have some updates. I realized that since I'm fixing the spheres in
their position and I don't want any deformation in the packing, I don't
need the mechanical engine so I removed it (This was based on answer #7
in [1]). The errors are now fixed but I don't get any results. For
instance, flow.averageVelocity() is nan.

Would you please help?

Thanks, 
Othman


[1] https://answers.launchpad.net/yade/+question/685707 


---
# -*- coding: utf-8 -*-

import numpy as np
from yade import pack, ymport, plot


radiuscyl=.08
heightcyl=.25

dP=4e3 #Pa
visc=1e-3 #Pa.sec
density=1000 #kg/m3
g=9.81 #m/s2
O.materials.append(FrictMat(young = 5e10, poisson = 0.15,frictionAngle = 
atan(.2), density=1920))

 spheres #
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(.4,.4,2),rMean=0.0083,rRelFuzz=0.1)   
 cylinder extraction

pred=pack.inCylinder((.3,.3,0),(.3,.3,heightcyl),radiuscyl) 

spFilter=filterSpherePack(pred,sp,Material=Material, returnSpherePack=True) 

spFilter.toSimulation()

yade.qt.View()
Height=max(utils.aabbDim())

#Fix all particles in their positions. No deformation
for i in O.bodies:
i.state.blockedDOFs='xyzXYZ'


#B. Activate flow engine and set boundary conditions in order to get 
permeability
flow=FlowEngine()
flow.useSolver=3
flow.viscosity=visc
flow.boundaryUseMaxMin=[1,1,1,1,1,1] #if you want wall to be boundary, set this 
0. If you don't have a wall, make it 1 so that spheres will be boundary
flow.bndCondIsPressure=[0,0,0,0,1,1] #[xmin,xmax,ymin,ymax,zmin,zmax]
flow.bndCondValue=[0,0,0,0,0,dP]


#Permeability calculations
Q=max(flow.averageVelocity())
Permeability=abs((density*g*Q*Height)/dP)
print ("average velocity: ",Q, "Permeability: ",Permeability)

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688690]: pack.SpherePack.save() function saved particles data format

2020-02-12 Thread Jan Stránský
Question #688690 on Yade changed:
https://answers.launchpad.net/yade/+question/688690

Status: Open => Needs information

Jan Stránský requested more information:
Please provide a MWE [1] (e.g. a packing with 3 manually inserted
spheres), then it will be much easier to help you..

thanks
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688690]: pack.SpherePack.save() function saved particles data format

2020-02-12 Thread gaoxuesong
Question #688690 on Yade changed:
https://answers.launchpad.net/yade/+question/688690

Status: Needs information => Open

gaoxuesong gave more information on the question:
The error is shown as,

RuntimeError: bad lexical cast: source type value could not be
interpreted as target

Thanks.

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688685]: permeability - PFV

2020-02-12 Thread Othman Sh
Question #688685 on Yade changed:
https://answers.launchpad.net/yade/+question/688685

Status: Needs information => Open

Othman Sh gave more information on the question:
Hi Robert,

Are you referring to reducing the time step? I did reduce the time step
until 1e-7 and I still have this issue.

Also, I don't know if my code lines are in the correct order or not. Is
there a problem in triangulation or is it about the time step?


Thanks,
Othman

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688652]: CpmMat elastic calibration difficulty

2020-02-12 Thread Mumić
Question #688652 on Yade changed:
https://answers.launchpad.net/yade/+question/688652

Status: Needs information => Solved

Mumić confirmed that the question is solved:
Hello again and thanks for the reply.

>set epsCrackOnset and sigmaT to arbitrary large values (like 1e99)

I ran some simulations using 1e99 and looks like this solved the problem, now 
Macro Poisson is varying with the Micro value.
Low kT/kN values are now behaving like expected based on Šmilauer's thesis 
(e.g. kT/kN=0 ⇒ v≃0.259)

Thank you for the support, I'll continue now towards the inelastic part
of the calibration.

Best regards!

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688696]: Calculate the number of broken bonds in Cpm mat

2020-02-12 Thread Jan Stránský
Question #688696 on Yade changed:
https://answers.launchpad.net/yade/+question/688696

Jan Stránský requested more information:
> ... tried to plot it using the concept where I check if
'iscohesive==True '

please be more specific (ideally post a MWE [1])

> Is there any other way to get these numbers?

no, because "the concept where I check if 'iscohesive==True'" is the
correct one

cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688681]: Contact laws and Input stiffness directly rather than young parameter

2020-02-12 Thread Jan Stránský
Question #688681 on Yade changed:
https://answers.launchpad.net/yade/+question/688681

Status: Open => Answered

Jan Stránský proposed the following answer:
> I was wondering setting cn = cs = 0 in "ViscElMat" gives me the same
result as "FrictMat" as the density of specimen has not changed (because
of the specimen which is the same as when I used "FrictMat") and I
should get the same behavior.

why you "should get the same behavior", if you use different material, 
different Ip2 and different Law2?
And if you think / are sure that with certain parameters it leads to the same 
physics, why to change it?

> more than 3 weeks ... less than 15 minutes

I would check your stop conditions and which phase is "freezing" the
simulation..

cheers
Jan

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688643]: How to do model bearing capacity of soil

2020-02-12 Thread Robert Caulk
Question #688643 on Yade changed:
https://answers.launchpad.net/yade/+question/688643

Status: Open => Answered

Robert Caulk proposed the following answer:
>But I can’t resize the pressure wall. I want to resize the pressed
wall, what to do?

What is the pressure/pressed wall? It would help to understand if you
mention the methods you have already tried. (e.g. I tried to change
_insert command here_ but I see that it doesn't change the size).

I think maybe you want to use facets [1] to model the application of
weight, but I am still a bit unsure what you are asking.

[1]https://yade-dem.org/doc/yade.geom.html

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688690]: pack.SpherePack.save() function saved particles data format

2020-02-12 Thread Robert Caulk
Question #688690 on Yade changed:
https://answers.launchpad.net/yade/+question/688690

Status: Open => Needs information

Robert Caulk requested more information:
>there is an format error when reading the file

What is the error?

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688696]: Calculate the number of broken bonds in Cpm mat

2020-02-12 Thread Robert Caulk
Question #688696 on Yade changed:
https://answers.launchpad.net/yade/+question/688696

Status: Open => Needs information

Robert Caulk requested more information:
>but it doesn't work

Why doesn't it work?

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688588]: Compilation error

2020-02-12 Thread Lingran Zhang
Question #688588 on Yade changed:
https://answers.launchpad.net/yade/+question/688588

Lingran Zhang confirmed that the question is solved:
Thanks Robert Caulk, that solved my question.

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688588]: Compilation error

2020-02-12 Thread Lingran Zhang
Question #688588 on Yade changed:
https://answers.launchpad.net/yade/+question/688588

Status: Answered => Solved

Lingran Zhang confirmed that the question is solved:
Thank you very much Robert!

Lingran

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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #688696]: Calculate the number of broken bonds in Cpm mat

2020-02-12 Thread Akm
New question #688696 on Yade:
https://answers.launchpad.net/yade/+question/688696

Hi,

I am trying to calculate the number of bonds broken at each iteration in my 
simulation. I am using the cpm material  and tried to plot it using the concept 
where I check if 'iscohesive==True ' but it doesn't work. Is there any other 
way to get these numbers?

Many thanks,
Arun




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

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688439]: effect of rolling stiffness on peak friction angle of sample

2020-02-12 Thread Luc Sibille
Question #688439 on Yade changed:
https://answers.launchpad.net/yade/+question/688439

Luc Sibille proposed the following answer:
Did you check if there is actually a rolling moment not nil at the 
contacts between spheres?
Luc

Le 09/02/2020 à 10:23, Elham Hosseinkhani a écrit :
> Question #688439 on Yade changed:
> https://answers.launchpad.net/yade/+question/688439
>
> Elham Hosseinkhani posted a new comment:
> Hello,
> Unfortunately,I couldn't get the results that I expected based on the papers. 
> I changed my script and modify the script in YADE examples. I added 
> CohesionMomentLaw and necessary parameters like alphaKr and etaRoll. I get 
> PrincipalStressRatio  about 2.4 with this parameters in this script. But I 
> expect more PrincipalStressRatio after using CohesionMomentLaw.
>
> Could you please run this script and check PrincipalStressRatio?
> Is there any problem that i couldn't get changes in PrincipalStressRatio and 
> peak friction angle?
>
> # -*- coding: utf-8 -*-
> from yade import pack
>
>
> nRead=readParamsFromTable(
>   num_spheres=1,
>   young = 500e6,
>   poisson = 0.4,
>   compFricDegree = 30,
>   alphaKr = 1.25,
>   etaRoll = 0.55,
>   finalFricDegree = 30,
>   targetPorosity = 0.4,
>   confining =-30,
>   unknownOk=True
> )
> from yade.params import table
> num_spheres=table.num_spheres
> young = table.young
> poisson = table.poisson
> compFricDegree = table.compFricDegree
> alphaKr = table.alphaKr
> etaRoll = table.etaRoll
> finalFricDegree = table.finalFricDegree
> targetPorosity = table.targetPorosity
> confining = table.confining
> rate=-0.02
> damp=0.2
>
> key='_P='+str(confining)
> stabilityThreshold=0.01
> mn,mx=Vector3(0,0,0),Vector3(1,2,1)
>
> O.materials.append(CohFrictMat(young=young,poisson=poisson,density=2600,frictionAngle=radians(compFricDegree),normalCohesion=1e6,shearCohesion=1e6,alphaKr=alphaKr,alphaKtw=1e-10,momentRotationLaw=True,etaRoll=etaRoll,label='spheres'))
> O.materials.append(FrictMat(young=young,poisson=poisson,frictionAngle=0,density=0,label='walls'))
>
> walls=aabbWalls([mn,mx],thickness=0,material='walls')
> wallIds=O.bodies.append(walls)
>
> sp=pack.SpherePack()
>
> clumps=False
> if clumps:
>
>   volume = (mx[0]-mn[0])*(mx[1]-mn[1])*(mx[2]-mn[2])
>   mean_rad = pow(0.09*volume/num_spheres,0.)
>   
> c1=pack.SpherePack([((-0.2*mean_rad,0,0),0.5*mean_rad),((0.2*mean_rad,0,0),0.5*mean_rad)])
>   sp.makeClumpCloud(mn,mx,[c1],periodic=False)
>   sp.toSimulation(material='spheres')
>   O.bodies.updateClumpProperties()
> else:
>   sp.makeCloud(mn,mx,-1,0.,num_spheres,False, 0.95,seed=1) #"seed" make 
> the "random" generation always the same
>   O.bodies.append([sphere(center,rad,material='spheres') for center,rad in 
> sp])
>
> triax=TriaxialStressController(
>   maxMultiplier=1.+2e5/young,
>   finalMaxMultiplier=1.+2e4/young,
>   thickness = 0,
>   stressMask = 7,
>   internalCompaction=True,
> )
>
> 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(),Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(label="cohesiveIp")],
>   
> [Law2_ScGeom_FrictPhys_CundallStrack(),Law2_ScGeom6D_CohFrictPhys_CohesionMoment(
>   useIncrementalForm=True,
>   always_use_moment_law=False,
>   label='cohesiveLaw')]
>   ),
>   
> GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
>   triax,
>   TriaxialStateRecorder(iterPeriod=100,file='WallStresses'),
>   newton
> ]
>
> Gl1_Sphere.stripes=0
> if nRead==0: yade.qt.Controller(), yade.qt.View()
>
> triax.goal1=triax.goal2=triax.goal3=confining
>
> while 1:
>O.run(1000, True)
>unb=unbalancedForce()
>print ('unbalanced force:',unb,' mean stress: ',triax.meanStress)
>if unb abs(confining-triax.meanStress)/abs(confining)<0.01:
>  break
>
> import sys
> while triax.porosity>targetPorosity:
>   compFricDegree = 0.95*compFricDegree
>   setContactFriction(radians(compFricDegree))
>   print ("\r Friction: ",compFricDegree," porosity:",triax.porosity)
>   sys.stdout.flush()
>   O.run(500,1)
>
> #
> ##   DEVIATORIC LOADING   ###
> #
>
> triax.internalCompaction=False
> setContactFriction(radians(finalFricDegree))
> triax.stressMask = 5
> triax.goal2=rate
> triax.goal1=confining
> triax.goal3=confining
> O.engines[2].lawDispatcher.functors[1].always_use_moment_law = True
> #cohesiveLaw.always_use_moment_law=True
> triax.wall_bottom_activated=False
> newton.damping=0.1
> O.saveTmp()
>
> from yade import plot
>
> def history():
>   plot.addData(e11=-triax.strain[0], e22=-triax.strain[1], 
> e33=-triax.strain[2],
>