# young in PeriTriaxController

Hi,

Let me give another example.Copying script from (https://yade-dev.gitlab.io/trunk/tutorial-examples.html)

Using my own custom materials.

materials.append(FrictMat(young=64e9,poisson=0.12,density=2650,frictionAngle=0.23)

In the second compression, change triax.maxStrainRate=(0,0,0).If I adjust young's modulus to young=64e7, it can maintain the stress of the first isotropic compression, otherwise the stress becomes 0.

I wonder why young's modulus can cause such a big change? How can I adjust:)

Thanks

#####################
# encoding: utf-8

sigmaIso=-1e5

#import matplotlib
#matplotlib.use('Agg')

# generate loose packing
from yade import pack, qt, plot

O.periodic=True

sphere=O.materials.append(FrictMat(young=64e9,poisson=0.12,density=2650,frictionAngle=0.23,label='sphere'))
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(2,2,2),rMean=.1,rRelFuzz=.3,periodic=True)
sp.toSimulation()

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
PeriTriaxController(label='triax',
# specify target values and whether they are strains or stresses
# type of servo-control
dynCell=True,maxStrainRate=(10,10,10),
# wait until the unbalanced force goes below this value
maxUnbalanced=.1,relStressTol=1e-3,
# call this function when goal is reached and the packing is stable
doneHook='compactionFinished()'
),
NewtonIntegrator(damping=.2),
]
O.dt=.5*PWaveTimeStep()

sxx=triax.stress[0],syy=triax.stress[1],szz=triax.stress[2],
exx=triax.strain[0],eyy=triax.strain[1],ezz=triax.strain[2],
# save all available energy data
Etot=O.energy.total(),**O.energy
)

# enable energy tracking in the code
O.trackEnergy=True

# define what to plot
plot.plots={'i':('unbalanced',),'i ':('sxx','syy','szz'),' i':('exx','eyy','ezz'),
# energy plot
' i ':(O.energy.keys,None,'Etot'),
}
# show the plot
plot.plot()

def compactionFinished():
# set the current cell configuration to be the reference one
O.cell.trsf=Matrix3.Identity
# change control type: keep constant confinement in x,y, 20% compression in z
triax.goal=(sigmaIso,sigmaIso,-.2)
# allow faster deformation along x,y to better maintain stresses
triax.maxStrainRate=(0,0,0)
# next time, call triaxFinished instead of compactionFinished
triax.doneHook='triaxFinished()'
# do not wait for stabilization before calling triaxFinished
triax.maxUnbalanced=10

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

## Question information

Language:
English Edit question
Status:
Solved
For:
Assignee:
No assignee Edit question
Solved by:
Bruno Chareyre
Solved:
2019-02-16
Last query:
2019-02-16
2019-02-11
 Chareyre (bruno-chareyre-9) said on 2019-02-09: #1

The «why» is long storry. The «how» is in my first reply to your previous

Le sam. 9 févr. 2019 07:08, jamespaul <email address hidden>
a écrit :

> New question #678440 on Yade:
>
> Hi,
>
> That's my other question. (
>
> Let me give another example.Copying script from (
>
> Using my own custom materials.
>
>
> materials.append(FrictMat(young=64e9,poisson=0.12,density=2650,frictionAngle=0.23)
>
> In the second compression, change triax.maxStrainRate=(0,0,0).If I adjust
> young's modulus to young=64e7, it can maintain the stress of the first
> isotropic compression, otherwise the stress becomes 0.
>
> I wonder why young's modulus can cause such a big change? How can I
>
> Thanks
>
> #####################
> # encoding: utf-8
>
> sigmaIso=-1e5
>
> #import matplotlib
> #matplotlib.use('Agg')
>
> # generate loose packing
> from yade import pack, qt, plot
>
> O.periodic=True
>
>
> sphere=O.materials.append(FrictMat(young=64e9,poisson=0.12,density=2650,frictionAngle=0.23,label='sphere'))
> sp=pack.SpherePack()
> sp.makeCloud((0,0,0),(2,2,2),rMean=.1,rRelFuzz=.3,periodic=True)
> sp.toSimulation()
>
> O.engines=[
> ForceResetter(),
> InsertionSortCollider([Bo1_Sphere_Aabb()]),
> InteractionLoop(
> [Ig2_Sphere_Sphere_ScGeom()],
> [Ip2_FrictMat_FrictMat_FrictPhys()],
> [Law2_ScGeom_FrictPhys_CundallStrack()]
> ),
> PeriTriaxController(label='triax',
> # specify target values and whether they are strains or
> stresses
> # type of servo-control
> dynCell=True,maxStrainRate=(10,10,10),
> # wait until the unbalanced force goes below this value
> maxUnbalanced=.1,relStressTol=1e-3,
> # call this function when goal is reached and the packing
> is stable
> doneHook='compactionFinished()'
> ),
> NewtonIntegrator(damping=.2),
> ]
> O.dt=.5*PWaveTimeStep()
>
>
> sxx=triax.stress[0],syy=triax.stress[1],szz=triax.stress[2],
>
> exx=triax.strain[0],eyy=triax.strain[1],ezz=triax.strain[2],
> # save all available energy data
> Etot=O.energy.total(),**O.energy
> )
>
> # enable energy tracking in the code
> O.trackEnergy=True
>
> # define what to plot
> plot.plots={'i':('unbalanced',),'i ':('sxx','syy','szz'),'
> i':('exx','eyy','ezz'),
> # energy plot
> ' i ':(O.energy.keys,None,'Etot'),
> }
> # show the plot
> plot.plot()
>
> def compactionFinished():
> # set the current cell configuration to be the reference one
> O.cell.trsf=Matrix3.Identity
> # change control type: keep constant confinement in x,y, 20%
> compression in z
> triax.goal=(sigmaIso,sigmaIso,-.2)
> # allow faster deformation along x,y to better maintain stresses
> triax.maxStrainRate=(0,0,0)
> # next time, call triaxFinished instead of compactionFinished
> triax.doneHook='triaxFinished()'
> # do not wait for stabilization before calling triaxFinished
> triax.maxUnbalanced=10
>
> def triaxFinished():
> print 'Finished'
> O.pause()
>
> --
>
> _______________________________________________
> Post to : <email address hidden>
>
>

 jamespaul (jamespauljames) said on 2019-02-10: #2

Thank you so much,I always trouble you.I've been losing sleep over this for a few nights. Please help me.(ㄒoㄒ)

>Depending on stiffness of particles, pseudo-mass of the cell, and damping, it will oscillate more or less.
Related parameters in PeriTriaxController: growDamping, mass, maxStrainRate.

As young's modulus increases (6e10), how do I set these values.It's a shame that I lack knowledge of physics. I don't have any experience.

I checked the documentation.

1.growDamping(=.25)
Damping of cell resizing (0=perfect control, 1=no control at all); see also wallDamping in TriaxialStressController.

2.mass(=NaN)
mass of the cell (user set); if not set and dynCell is used, it will be computed as sum of masses of all particles.

I'm using dynCell, and I think it will compute as sum of masses of all particles automatically.

3.maxStrainRate(=Vector3r(1, 1, 1))
Maximum strain rate of the periodic cell.

I set it to(0,0,0)

4.O.dt=.05*PWaveTimeStep()
Should I also reduce the step size as the young's modulus increases?

 jamespaul (jamespauljames) said on 2019-02-11: #3

What's the meaning of perfect control and no control?No control means the wall won't move?

 Jérôme Duriez (jduriez) said on 2019-02-11: #4

Regarding 4. of #2,

Yes, O.dt has to change when young parameter changes. This is kind of part of DEM fundamentals I would say (no offense meant), see [*] and 2.2 + Appendix of [AboulHosn2017], and related references for instance.

I would advice you use GlobalStiffnessTimeStepper [**] if you're concerned with time step values

 Bruno Chareyre (bruno-chareyre) said on 2019-02-11: #5

Hi,
If maxStrainRate=0 then the cell geometry is fixed and then stress will not be corrected. It should be >0, and that's probably the main parameter to set if you change stiffness and want to avoid too much oscillations for stiff materials.

> No control means the wall won't move?

Yes, just like maxStrainRate=0. :)

 jamespaul (jamespauljames) said on 2019-02-12: #6

Thanks Bruno and Jérôme,

Because I'm doing x-axis one-dimensional compression experiment.

triax.goal=(0,0,-1000000)
triax.globUpdate=1
triax.growDamping=1
triax.maxStrainRate=(.1,.1,.1)

Am I setting this up correctly?

 jamespaul (jamespauljames) said on 2019-02-12: #7

Hi Jérôme,

>PWaveTimeStep

Get timestep accoring to the velocity of P-Wave propagation; computed from sphere radii, rigidities and masses.

So I think it will automatically adjust according to the young's modulus of the ball and the number of particles in the ball (if each ball is the same). I do not need to adjust the coefficient before PWaveTimeStep.

>GlobalStiffnessTimeStepper

If i use:

GlobalStiffnessTimeStepper(timeStepUpdateInterval=1,timestepSafetyCoefficient=0.8,label='ts')

TimestepSafetyCoefficient coefficient is also like PWaveTimeStep automatic adjustment, and I don't need to adjust?

James

 Jérôme Duriez (jduriez) said on 2019-02-12: #8

I thought you were changing "young" in the course of one simulation. I realize it may not be the case, and updating time step indeed is less of a concern.

 jamespaul (jamespauljames) said on 2019-02-12: #9

I just changed the friction. I found that the increase of particles and young's modulus would make the simulation distorted.I don't know why.

 jamespaul (jamespauljames) said on 2019-02-16: #10

Thanks Bruno Chareyre, that solved my question.