the sensibility of the number of the bodies

Asked by liukeqi

Hi, everyone
  I want to make a simple example to simulate the behaviour of concrete under pressure load. I used the periodic boundary and I suffered a question. I found that the stress-strain relationship will dramatically altered as I changed the size of the periodic boundary(that is the number of the bodies), but I need the relative stability result to convince others. I want to know how many number of bodies will lead to a steady result that will not dramatically alter as the number of bodies continue increasing. The following is my code, and you can alter the initSize to change the size of the periodic boundary. Can you give me some suggestions? Thank you.

#################################################
#!/usr/bin/python
import string
from yade import plot,qt
from yade.pack import *
from yade import pack, plot

O.materials.append(CpmMat(young=24e9,density=4800,frictionAngle=atan(0.8),poisson=0.2,sigmaT=600e6,epsCrackOnset=1e-4,relDuctility=35))

initSize=0.025

sp=pack.randomPeriPack(radius=.000625,initSize=Vector3(initSize,initSize,initSize))
O.periodic=True
sp.toSimulation()

O.dt=1e-7

plot.plots={'ey':('sy',)}
def plotAddData():
 plot.addData(
  sy=p3d.stress[1],
  ey=p3d.strain[1],
  ex=p3d.strain[0]
 )

EnlargeFactor=1.5
EnlargeFactor=1.0
O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=EnlargeFactor,label='bo1s')]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=EnlargeFactor,label='ig2ss')],
  [Ip2_CpmMat_CpmMat_CpmPhys()],[Law2_ScGeom_CpmPhys_Cpm()]),
 NewtonIntegrator(),
 Peri3dController(

       nSteps=4000, # how many time steps the simulation will last
       # after reaching nSteps do doneHook action
       doneHook='print "Simulation with Peri3dController finished."; O.pause()',

       # the prescribed path (step,value of stress/strain) can be defined in absolute values

       # or in relative values

       # if the goal value is 0, the absolute stress/strain values are always considered (step values remain relative)plot.plots={'ex':('sx',)}

       # if ##Path is not explicitly defined, it is considered as linear function between (0,0) and (nSteps,goal)
       # as in yzPath and xyPath
       # the relative values are really relative (zxPath gives the same - except of the sign from goal value - result as yyPath)

       # variables used in the first step
       label='p3d'
       ),
 PyRunner(command='plotAddData()',iterPeriod=1),
]

p3d.stressMask=0b100001 # prescribed ex,ey,sz,syz,ezx,sxy; e..strain; s..stress
p3d.goal=(0,-0.008,0,0,0,0) #xx, yy, zz, yz, zx, xy
O.step()
bo1s.aabbEnlargeFactor=ig2ss.interactionDetectionFactor=1.
O.run(); O.wait()
plot.plot(subPlots=False)

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
Last reply:
Revision history for this message
Chareyre (bruno-chareyre-9) said :
#1

Hello. This question is to vague hence unlikely to receive a response. What
is the meaning of "dramatically altered"? Is it certain that the script
generates a sensible mechanical system for every size? Etc

Le 19 oct. 2016 06:08, "liukeqi" <email address hidden> a
écrit :

> New question #403169 on Yade:
> https://answers.launchpad.net/yade/+question/403169
>
> Hi, everyone
> I want to make a simple example to simulate the behaviour of concrete
> under pressure load. I used the periodic boundary and I suffered a
> question. I found that the stress-strain relationship will dramatically
> altered as I changed the size of the periodic boundary(that is the number
> of the bodies), but I need the relative stability result to convince
> others. I want to know how many number of bodies will lead to a steady
> result that will not dramatically alter as the number of bodies continue
> increasing. The following is my code, and you can alter the initSize to
> change the size of the periodic boundary. Can you give me some suggestions?
> Thank you.
>
> #################################################
> #!/usr/bin/python
> import string
> from yade import plot,qt
> from yade.pack import *
> from yade import pack, plot
>
> O.materials.append(CpmMat(young=24e9,density=4800,frictionAngle=atan(0.8),
> poisson=0.2,sigmaT=600e6,epsCrackOnset=1e-4,relDuctility=35))
>
> initSize=0.025
>
> sp=pack.randomPeriPack(radius=.000625,initSize=Vector3(
> initSize,initSize,initSize))
> O.periodic=True
> sp.toSimulation()
>
>
> O.dt=1e-7
>
>
> plot.plots={'ey':('sy',)}
> def plotAddData():
> plot.addData(
> sy=p3d.stress[1],
> ey=p3d.strain[1],
> ex=p3d.strain[0]
> )
>
> EnlargeFactor=1.5
> EnlargeFactor=1.0
> O.engines=[
> ForceResetter(),
> InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=
> EnlargeFactor,label='bo1s')]),
> InteractionLoop(
> [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=
> EnlargeFactor,label='ig2ss')],
> [Ip2_CpmMat_CpmMat_CpmPhys()],
> [Law2_ScGeom_CpmPhys_Cpm()]),
> NewtonIntegrator(),
> Peri3dController(
>
> nSteps=4000,
> # how many time steps the simulation will last
> # after reaching
> nSteps do doneHook action
> doneHook='print
> "Simulation with Peri3dController finished."; O.pause()',
>
> # the prescribed
> path (step,value of stress/strain) can be defined in absolute values
>
> # or in relative
> values
>
> # if the goal
> value is 0, the absolute stress/strain values are always considered (step
> values remain relative)plot.plots={'ex':('sx',)}
>
> # if ##Path is not
> explicitly defined, it is considered as linear function between (0,0) and
> (nSteps,goal)
> # as in yzPath and
> xyPath
> # the relative
> values are really relative (zxPath gives the same - except of the sign from
> goal value - result as yyPath)
>
>
> # variables used
> in the first step
> label='p3d'
> ),
> PyRunner(command='plotAddData()',iterPeriod=1),
> ]
>
>
>
> p3d.stressMask=0b100001 # prescribed ex,ey,sz,syz,ezx,sxy;
> e..strain; s..stress
> p3d.goal=(0,-0.008,0,0,0,0) #xx, yy, zz, yz, zx, xy
> O.step()
> bo1s.aabbEnlargeFactor=ig2ss.interactionDetectionFactor=1.
> O.run(); O.wait()
> plot.plot(subPlots=False)
>
>
>
>
>
>
>
> --
> 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 : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>
>

Revision history for this message
Jérôme Duriez (jduriez) said :
#2

Hello,

A number of 10000 - 20000 particles is classical and appropriate for REV simulations (of triaxial tests, for instance) with usual (non-periodic) boundaries

If you use such number in periodic boundaries, I think you can be sure you have enough particles.

Revision history for this message
Jan Stránský (honzik) said :
#3

Hello,

a few comments:
- periodic boundary conditions are not very good for compression, as the
failure mode would not be periodic (unlike in the case of tension)
- the material model exhibits fracture of interactions of fixed size, so if
you change specimen size, you can get different stress-strain diagrams
(especially in the post-peak range)
- you preserve strain rate, but the size differs and therefore absolute
velocities and their differences also differ between different sizes. Try
to inrease nSteps to see what happens (I guess for the same size and
different nSteps you get different results)
- see Jerome's answer, the number of spheres should be large enough. What
numbers of particles did you try and still the results were "dramatically
altered"?
- are you sure your stressMask and goal in Peri3dController are what you
want?

So there a few possible reasons :-)

cheers
Jan

2016-10-19 17:37 GMT+02:00 Jérôme Duriez <
<email address hidden>>:

> Question #403169 on Yade changed:
> https://answers.launchpad.net/yade/+question/403169
>
> Jérôme Duriez proposed the following answer:
> Hello,
>
> A number of 10000 - 20000 particles is classical and appropriate for REV
> simulations (of triaxial tests, for instance) with usual (non-periodic)
> boundaries
>
> If you use such number in periodic boundaries, I think you can be sure
> you have enough particles.
>
> --
> 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 : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
liukeqi (891979456-h) said :
#4

Hello,

I want to use YADE to couple with FEM software, just like the "Multiscale FEMxDEM".

So I need use YADE model with periodic boundary as an RVE. The RVE should be small enough to reduce the computation cost.

That is why I want to know how many number of bodies in YADE model with periodic boundary will lead to a steady result.

Revision history for this message
Best Jan Stránský (honzik) said :
#5

thanks, the motivation why to use PBC is clear. Just that they might not
reflect the reality in the best way (like failure under uniaxal
compression).. The other points I mentioned also may play some role

You can try to run several simulations for each size and do some statistics
(average and standard deviation). I have tried your script with 10000 and
40000 particles and the results were not "dramatically altered", maybe
averaging a few runs would give you better answer that just comparing two
individual simulations. If you did it already and the results for different
sizes differs a lot, you can be pretty sure that the number of particles is
not enough to obtain "steady" results.

cheers
Jan

2016-10-23 9:53 GMT+02:00 liukeqi <email address hidden>:

> Question #403169 on Yade changed:
> https://answers.launchpad.net/yade/+question/403169
>
> liukeqi posted a new comment:
> Hello,
>
> I want to use YADE to couple with FEM software, just like the
> "Multiscale FEMxDEM".
>
> So I need use YADE model with periodic boundary as an RVE. The RVE
> should be small enough to reduce the computation cost.
>
> That is why I want to know how many number of bodies in YADE model with
> periodic boundary will lead to a steady result.
>
> --
> 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 : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
liukeqi (891979456-h) said :
#6

Thanks Jan Stránský, that solved my question.