[Yade-users] [Question #677986]: after changing material

2019-01-22 Thread fengjingyu
New question #677986 on Yade:
https://answers.launchpad.net/yade/+question/677986

Hi,

I changed the properties of the material while adjusting the isotropic 
compression to the one-dimensional  compression.I track the stresses and 
strains on the z-axis.But i found that the strain was changed in the second 
compression because in a one-dimensional compression, the stress should be 
increasing.

 (-15104.1021154-0.322694610286
-15040.6585685  -0.322695012996
-14956.6075828  -0.322696878321
-13491.3917129  -6.25046306966e-09
-10620.4527817  -6.32724609453e-09
-7614.76213004  -6.4040291194e-09
-4974.45004156  -6.48081214428e-09
-2838.2818472   -6.55759516916e-09)

What should I do to inherit the stress?

Thanks,

Feng


###
# encoding: utf-8

sigmaIso=-15000

from yade import pack, qt, plot

O.periodic=True

O.materials.append(FrictMat(young=64e9,poisson=0.12,density=2650,frictionAngle=0.0005,label='spheres'))
s=O.materials.append(FrictMat(young=64e9,poisson=0.12,density=2650,frictionAngle=0.24))

sp=pack.SpherePack()
sp.makeCloud((0,0,0),(3,3,3),rMean=.1,rRelFuzz=.3,periodic=True)
n=sp.toSimulation(material='spheres')

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=.1),
   PyRunner(command='addPlotData()',iterPeriod=1000),
]
O.dt=.5*PWaveTimeStep()

def addPlotData():
plot.addData(z=triax.stress[2],c=triax.strain[2],)
print(triax.stress[2],triax.strain[2])

def compactionFinished():
   for i in n:
O.bodies[i].material = O.materials[s]
   O.cell.trsf=Matrix3.Identity
   triax.goal=(sigmaIso,sigmaIso,-.5)
   triax.stressMask=3
   triax.maxStrainRate=(0,0,0)
   triax.doneHook='triaxFinished()'
   triax.maxUnbalanced=10

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


-- 
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 #677518]: strain of PeriTriaxController

2019-01-19 Thread fengjingyu
Question #677518 on Yade changed:
https://answers.launchpad.net/yade/+question/677518

Status: Answered => Solved

fengjingyu confirmed that the question is solved:
Thanks Jérôme Duriez, 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


[Yade-users] [Question #677931]: material in PeriTriaxController

2019-01-19 Thread fengjingyu
New question #677931 on Yade:
https://answers.launchpad.net/yade/+question/677931

Hi,

I just added a line of code about the material and didn't use it when 
generating the cloud.But I found that the results changed. Why is that?

I've tried to generate default material in the cloud ( 
FrictMat(density=2e3,young=30e9,poisson=.3,frictionAngle=.5236)).But we can't 
get to the first stable state.

Thanks,

Feng


# encoding: utf-8

sigmaIso=-25000

idSteel=O.materials.append(FrictMat(young=210e9,poisson=.25,frictionAngle=.8,label="steel"))

from yade import pack, qt, plot

O.periodic=True

sp=pack.SpherePack()
sp.makeCloud((0,0,0),(2,2,2),rMean=.1,rRelFuzz=.3,periodic=True)
#sp.toSimulation(material='sphereMat')
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',
  goal=(sigmaIso,sigmaIso,sigmaIso),stressMask=7,
  dynCell=True,maxStrainRate=(10,10,10),
  maxUnbalanced=.1,relStressTol=1e-3,
  doneHook='compactionFinished()'
   ),
   NewtonIntegrator(damping=.2),
   PyRunner(command='addPlotData()',iterPeriod=100),
]
O.dt=.5*PWaveTimeStep()

def addPlotData():
plot.addData(x=triax.stress[0],y=triax.stress[1],z=triax.stress[2],
a=triax.strain[0],b=triax.strain[1],c=triax.strain[2],
q=triax.stress[2]-0.5*(triax.stress[0]+triax.stress[1]), 
p=(triax.stress[0]+triax.stress[1]+triax.stress[2])/3,
k=(triax.stress[0]*0.5+triax.stress[1]*0.5)/triax.stress[2] 
   
)
print(triax.stress[2],triax.strain[2])
plot.saveDataTxt('kz2.txt',vars=('k','z','c'))

def compactionFinished():
   O.cell.trsf=Matrix3.Identity
   triax.goal=(sigmaIso,sigmaIso,-.5)
   triax.stressMask=3
   triax.maxStrainRate=(0,0,.1)
   triax.doneHook='triaxFinished()'
   triax.maxUnbalanced=10

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

-- 
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 #677504]: calculate porosity

2019-01-17 Thread fengjingyu
Question #677504 on Yade changed:
https://answers.launchpad.net/yade/+question/677504

fengjingyu posted a new comment:
Thanks Jérôme,

I am using voxelPorosity.But it is not absolutely accurate.So I wonder
if there is a way to get the exact amount of overlap.

Feng

-- 
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 #677518]: strain of PeriTriaxController

2019-01-11 Thread fengjingyu
Question #677518 on Yade changed:
https://answers.launchpad.net/yade/+question/677518

Description changed to:
Hi,

1.When I saved the strain to TXT, I found that the strain was reset in the 
second compression.
  From -0.319026939509 changed to-0.000567920400817 
 Maybe i misunderstand the meaning of O.cell.trsf=Matrix3.Identity

2.My idea is to change the first isotropic compression into an axial 
compression.How do i set the triax.goal and  triax.stressMask?
  Maybe triax.goal=(-25000,-25000,-80)   triax.stressMask=4
triax.maxStrainRate=(0,0,0.5)

Thanks,

Feng

#
# encoding: utf-8
from yade import pack, qt, plot
import matplotlib; matplotlib.rc('axes',grid=True)
import pylab

sigmaIso=-25000

O.periodic=True

spheres=O.materials.append(FrictMat(young=64e9,poisson=0.12,density=2650,frictionAngle=0.0005))
s=O.materials.append(FrictMat(young=64e9,poisson=0.12,density=2650,frictionAngle=0.24))

psdSizes,psdCumm=[0.01,.012,.015,.019,.020,.023,.027,.028,.030,.032,.033,.050],[0.0001,0.003,0.03,0.11,0.25,0.43,0.70,0.85,0.95,0.97,0.98,1]

sp=pack.SpherePack()
sp.makeCloud((0,0,0),(.2,.2,.2),psdSizes=psdSizes,psdCumm=psdCumm,distributeMass=True,periodic=True)
n=sp.toSimulation(material=spheres)

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=(0.7,0.7,0.7),
  maxUnbalanced=1,relStressTol=0.05,
  doneHook='compactionFinished()'
   ),
   NewtonIntegrator(damping=.1),
   PyRunner(command='addPlotData()',iterPeriod=2000),
]

O.dt=1*PWaveTimeStep()
O.trackEnergy=True
   
def addPlotData():
plot.addData(s0=triax.stress[0],s1=triax.stress[1],s2=triax.stress[2],
x=triax.strain[0],y=triax.strain[1],z=triax.strain[2],
q=triax.stress[2]-0.5*(triax.stress[0]+triax.stress[1]), 
p=(triax.stress[0]+triax.stress[1]+triax.stress[2])/3
)

plot.saveDataTxt('pq.txt.bz2',vars=('x'))

qt.View()
qt.Controller()
O.saveTmp()

def compactionFinished():
   for i in n:
O.bodies[i].material = O.materials[s]
   O.cell.trsf=Matrix3.Identity
   triax.goal=(-80,-80,-80)
   triax.stressMask=7  
   triax.maxStrainRate=(0.5,0.5,0.5)
   triax.maxUnbalanced=10
   triax.doneHook='triaxFinished()'

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

-- 
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 #677518]: strain of PeriTriaxController

2019-01-11 Thread fengjingyu
New question #677518 on Yade:
https://answers.launchpad.net/yade/+question/677518

Hi,

When I saved the strain to TXT, I found that the strain was reset in the second 
compression.My idea is to change the first isotropic compression into an axial 
compression, but the obtained strain is different, so I cannot analyze it.My 
understanding of the second compression is not very good.Plz help me.

Thanks,

Feng

#
# encoding: utf-8
from yade import pack, qt, plot
import matplotlib; matplotlib.rc('axes',grid=True)
import pylab

sigmaIso=-25000

O.periodic=True

spheres=O.materials.append(FrictMat(young=64e9,poisson=0.12,density=2650,frictionAngle=0.0005))
s=O.materials.append(FrictMat(young=64e9,poisson=0.12,density=2650,frictionAngle=0.24))

psdSizes,psdCumm=[0.01,.012,.015,.019,.020,.023,.027,.028,.030,.032,.033,.050],[0.0001,0.003,0.03,0.11,0.25,0.43,0.70,0.85,0.95,0.97,0.98,1]

sp=pack.SpherePack()
sp.makeCloud((0,0,0),(.2,.2,.2),psdSizes=psdSizes,psdCumm=psdCumm,distributeMass=True,periodic=True)
n=sp.toSimulation(material=spheres)

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=(0.7,0.7,0.7),
  maxUnbalanced=1,relStressTol=0.05,
  doneHook='compactionFinished()'
   ),
   NewtonIntegrator(damping=.1),
   PyRunner(command='addPlotData()',iterPeriod=2000),
]

O.dt=1*PWaveTimeStep()
O.trackEnergy=True
   
def addPlotData():
plot.addData(s0=triax.stress[0],s1=triax.stress[1],s2=triax.stress[2],
x=triax.strain[0],y=triax.strain[1],z=triax.strain[2],
q=triax.stress[2]-0.5*(triax.stress[0]+triax.stress[1]), 
p=(triax.stress[0]+triax.stress[1]+triax.stress[2])/3
)

plot.saveDataTxt('pq.txt.bz2',vars=('x'))

qt.View()
qt.Controller()
O.saveTmp()

def compactionFinished():
   for i in n:
O.bodies[i].material = O.materials[s]
   O.cell.trsf=Matrix3.Identity
   triax.goal=(-80,-80,-80)
   triax.stressMask=7  
   triax.maxStrainRate=(0.5,0.5,0.5)
   triax.maxUnbalanced=10
   triax.doneHook='triaxFinished()'

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

-- 
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 #677504]: calculate porosity

2019-01-11 Thread fengjingyu
Question #677504 on Yade changed:
https://answers.launchpad.net/yade/+question/677504

fengjingyu posted a new comment:
I forgot to say.I calculate porosity of the PeriTriaxController.So i can
obtain the box volume.

-- 
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 #677504]: calculate porosity

2019-01-11 Thread fengjingyu
New question #677504 on Yade:
https://answers.launchpad.net/yade/+question/677504

Hi,

I'm studying porosity.Using voxelPorosity is convenient,but how can i calculate 
by hands.I have seen i.geom.penetrationVolume in others script.Can this 
function be used to calculate porosity?For example,sum Volume - (sum  
i.geom.penetrationVolume)/2.

Thanks,

Feng



-- 
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 #677437]: Save the txt

2019-01-11 Thread fengjingyu
Question #677437 on Yade changed:
https://answers.launchpad.net/yade/+question/677437

Status: Answered => Solved

fengjingyu 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


[Yade-users] [Question #677437]: Save the txt

2019-01-10 Thread fengjingyu
New question #677437 on Yade:
https://answers.launchpad.net/yade/+question/677437

Hi,

I want to save the result to txt.I learned the code 
here,https://answers.launchpad.net/yade/+question/209832.But I found the data 
in txt.bz2  is just 5000 iter at the beginning.How do I get all the data?

Thanks,

Feng

Here's my code:
##
# encoding: utf-8
from yade import pack, qt, plot
import matplotlib; matplotlib.rc('axes',grid=True)
from yade import pack
import pylab
import yade.timing;

O.timingEnabled=True

sigmaIso=-25000

O.periodic=True

spheres=O.materials.append(FrictMat(young=64e9,poisson=0.12,density=2650,frictionAngle=0.0005))
s=O.materials.append(FrictMat(young=64e9,poisson=0.12,density=2650,frictionAngle=0.24))

psdSizes,psdCumm=[0.1,0.12,0.15,0.19,0.20,0.23,0.27,0.28,0.30,0.32,0.33,0.50],[0.0001,0.003,0.03,0.11,0.25,0.43,0.70,0.85,0.95,0.97,0.98,1]

sp=pack.SpherePack()
sp.makeCloud((0,0,0),(3,3,3),psdSizes=psdSizes,psdCumm=psdCumm,distributeMass=True,periodic=True)
n=sp.toSimulation(material=spheres)

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=(0.5,0.5,0.5),
  maxUnbalanced=1,relStressTol=0.05,
  doneHook='compactionFinished()'
   ),
   NewtonIntegrator(damping=.1),
   PyRunner(command='addPlotData1()',iterPeriod=200),
]
O.dt=1*PWaveTimeStep()
O.trackEnergy=True
  
def addPlotData1():
   
plot.addData(s0=triax.stress[0],s1=triax.stress[1],s2=triax.stress[2],q=triax.stress[2]-0.5*(triax.stress[0]+triax.stress[1]),
 p=(triax.stress[0]+triax.stress[1]+triax.stress[2])/3)
   print('stress1',triax.stress[0],triax.stress[1],triax.stress[2])
   print('strain',triax.strain[0],triax.strain[1],triax.strain[2])
   
print('q',triax.stress[2]-0.5*(triax.stress[0]+triax.stress[1]),'p',(triax.stress[0]+triax.stress[1]+triax.stress[2])/3)

pylab.semilogx(*sp.psd(bins=30,mass=True),label='Mass PSD of (free) %d random 
spheres'%len(sp))
pylab.legend()
pylab.show()

O.run(5000,True)
plot.plots={'q':('p',)}
plot.plot()
plot.saveDataTxt('pq.txt.bz2')

qt.Controller()
O.saveTmp()

def compactionFinished():   
   O.cell.trsf=Matrix3.Identity
   triax.goal=(sigmaIso,sigmaIso,-80)
   triax.stressMask=4  
   triax.maxStrainRate=(0,0,0.5)
   triax.maxUnbalanced=10
   triax.relStressTol=0.05
   triax.doneHook='triaxFinished()'

def triaxFinished():
   print 'Finished'
   print(yade.timing.stats())
   O.pause()

-- 
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 #677261]: Simulation speed on Vmware

2019-01-03 Thread fengjingyu
Question #677261 on Yade changed:
https://answers.launchpad.net/yade/+question/677261

Status: Answered => Solved

fengjingyu 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 #677261]: Simulation speed on Vmware

2019-01-03 Thread fengjingyu
Question #677261 on Yade changed:
https://answers.launchpad.net/yade/+question/677261

fengjingyu posted a new comment:
>> If you have 8 physical cores and you assign 12 to the VM, you will be
moving into hyperthreading territory.

I can allocate memory and processor cores within vmware. What I can be
sure of is that I can allocate less processor cores than the processor
cores of the computer, otherwise it will report an error. So I think I
should make no mistake about using -j4 at yade.

>>how many bodies are in your simulation?

About 4k.

-- 
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 #677261]: Simulation speed on Vmware

2019-01-03 Thread fengjingyu
Question #677261 on Yade changed:
https://answers.launchpad.net/yade/+question/677261

fengjingyu posted a new comment:
>> How many cores does your processor have?

My computer has 16 processor and i allocated 12 processors to the
virtual machine.

>>Can you provide the output/numbers?

After 2100 iter,yade -j4 a.py use 3441112582us  and yade a.py use
3100565993us.It's strange.

My code is :

#
# encoding: utf-8
from yade import pack, qt, plot
import matplotlib; matplotlib.rc('axes',grid=True)
from yade import pack
import pylab
import yade.timing;
O.timingEnabled=True
yade.timing.stats()

sigmaIso=-25000

O.periodic=True

spheres=O.materials.append(FrictMat(young=64e9,poisson=0.12,density=2650,frictionAngle=0.231))
s=O.materials.append(FrictMat(young=64e9,poisson=0.12,density=2650,frictionAngle=0.24))

psdSizes,psdCumm=[0.1,0.12,0.15,0.19,0.20,0.23,0.27,0.28,0.30,0.32,0.33,0.50],[0.0001,0.003,0.03,0.11,0.25,0.43,0.70,0.85,0.95,0.97,0.98,1]

sp=pack.SpherePack()
sp.makeCloud((0,0,0),(4,4,4),psdSizes=psdSizes,psdCumm=psdCumm,distributeMass=True,periodic=True)
n=sp.toSimulation(material=spheres)

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=(0.5,0.5,0.5),
  maxUnbalanced=1,relStressTol=0.05,
  doneHook='compactionFinished()'
   ),
   NewtonIntegrator(damping=.1),
   PyRunner(command='addPlotData()',iterPeriod=30),
]
O.dt=1*PWaveTimeStep()
O.trackEnergy=True

def particleNumber():
   print(O.bodies[-1].id)

   
def addPlotData():
   plot.addData(unbalanced=unbalancedForce(),i=O.iter,
  porosityy=voxelPorosity(800,(2,2,2),(3,3,3)),coordNum=avgNumInteractions()
  
   )
   
  
   
print('p',voxelPorosity(800,(2,2,2),(3,3,3)),'s',triax.stress[0],triax.stress[1],triax.stress[2],'t',O.iter,yade.timing.stats())

pylab.semilogx(*sp.psd(bins=30,mass=True),label='Mass PSD of (free) %d random 
spheres'%len(sp))
pylab.legend()
pylab.show()

plot.plots={'i':('unbalanced',),'i ':('sxx','syy','szz'),' 
i':('exx','eyy','ezz'),' i ':('porosityy',),}
plot.plot()

qt.View()
qt.Controller()
O.saveTmp()

def compactionFinished():
   triax.maxUnbalanced=10
   triax.doneHook='triaxFinished()'


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

-- 
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 #677261]: Simulation speed on Vmware

2019-01-02 Thread fengjingyu
New question #677261 on Yade:
https://answers.launchpad.net/yade/+question/677261

Hi,

I installed ubantu on vmware workstation.I allocated 32G of memory and 12 
processors to the virtual machine.However, I found that yade's running speed 
was not qualitatively changed compared with 4G memory and 2 processors.Do I 
need to add some parallel code to my code?

Thanks,

Feng

-- 
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 #676980]: PeriTriaxController control

2018-12-22 Thread fengjingyu
Question #676980 on Yade changed:
https://answers.launchpad.net/yade/+question/676980

Status: Open => Solved

fengjingyu confirmed that the question is solved:
Hi everyone,

I understand the meaning of relStressTol.It must be a percentage.

I'm sorry to ask such a silly 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 #676831]: control the porosity

2018-12-22 Thread fengjingyu
Question #676831 on Yade changed:
https://answers.launchpad.net/yade/+question/676831

fengjingyu posted a new comment:
Hi Jan,

Thanks your remind.But as a beginner, I don't know what imo is. I didn't
find it on the Internet. Could you be more specific? Thank you.

Feng

-- 
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 #676980]: PeriTriaxController control

2018-12-22 Thread fengjingyu
New question #676980 on Yade:
https://answers.launchpad.net/yade/+question/676980

Hi,

While learning PeriTriaxController,I think I misunderstood the meaning of the 
parameters.The goal is the target pressure and relStressTol gives the target a 
range to float up and down.The condition at the end of compression is that any 
axis is within the range of goal+or-relStressTol and the unbalanced force is 
lower than maxUnbalanced.But  the terminal displays this data.
(0.0, 0.0, 0.0, nan)
(0.0, 0.0, 0.0, nan)
(0.0, 0.0, 0.0, nan)
(0.0, 0.0, 0.0, nan)
(0.0, 0.0, 0.0, nan)
(0.0, 0.0, 0.0, nan)
(0.0, 0.0, 0.0, nan)
(0.0, 0.0, 0.0, nan)
Finished

Please point out my mistake, thank you.
Feng

Here's my script

##
# encoding: utf-8
from yade import pack, qt, plot

O.periodic=True

spheres=O.materials.append(FrictMat(young=64e9,poisson=0.12,density=2650,frictionAngle=0.0005))
s=O.materials.append(FrictMat(young=64e9,poisson=0.12,density=2650,frictionAngle=0.231))

sp=pack.SpherePack()
sp.makeCloud((0,0,0),(5,5,5),rMean=.5,rRelFuzz=.5,periodic=True)
n=sp.toSimulation(material=spheres)

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb()]),
   InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
   ),
   PeriTriaxController(label='triax',
  goal=(20,20,20),stressMask=7,
  dynCell=True,maxStrainRate=(0.2,0.2,0.2),
  maxUnbalanced=1,relStressTol=1,
  doneHook='compactionFinished()'
   ),
   NewtonIntegrator(damping=.1),
   PyRunner(command='addPlotData()',iterPeriod=300),
]
O.dt=1*PWaveTimeStep()
O.trackEnergy=True
  
def addPlotData():
   print(triax.stress[0],triax.stress[1],triax.stress[2],unbalancedForce())

qt.View()
qt.Controller()
O.saveTmp()

def compactionFinished():
   for i in n:
O.bodies[i].material = O.materials[s]

   triax.doneHook='triaxFinished()'
   triax.maxUnbalanced=1

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

-- 
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 #676841]: the definition of porosity

2018-12-22 Thread fengjingyu
Question #676841 on Yade changed:
https://answers.launchpad.net/yade/+question/676841

fengjingyu posted a new comment:
Thanks Bruno too.
Feng

-- 
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 #676841]: the definition of porosity

2018-12-22 Thread fengjingyu
Question #676841 on Yade changed:
https://answers.launchpad.net/yade/+question/676841

Status: Answered => Solved

fengjingyu confirmed that the question is solved:
Thanks Jan Stránský, 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 #676841]: the definition of porosity

2018-12-17 Thread fengjingyu
Question #676841 on Yade changed:
https://answers.launchpad.net/yade/+question/676841

fengjingyu posted a new comment:
Hi, Jan

Ask another question.When I run the code above. I increased maxLoad=1e6
to maxLoad=1e8. Why do some little balls go through walls? Is it because
the wall goes through the center of the ball? I don't really understand
how this works.

Thanks,
Feng

-- 
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 #676831]: control the porosity

2018-12-17 Thread fengjingyu
Question #676831 on Yade changed:
https://answers.launchpad.net/yade/+question/676831

fengjingyu posted a new comment:
Hi Jan,

You've already seen my other
question(https://answers.launchpad.net/yade/+question/676841).I think my
porosity is different from the paper probably because the porosity
function that comes with yade doesn't take into account particle
overlap.I will use voxelPorosity try again.

Besides,the paper i am reading is .

Thanks,
Feng

-- 
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 #676830]: maxStrainRate in the PeriTriaxController

2018-12-17 Thread fengjingyu
Question #676830 on Yade changed:
https://answers.launchpad.net/yade/+question/676830

Status: Answered => Solved

fengjingyu confirmed that the question is solved:
Thanks Jan Stránský, 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 #676841]: the definition of porosity

2018-12-17 Thread fengjingyu
Question #676841 on Yade changed:
https://answers.launchpad.net/yade/+question/676841

fengjingyu posted a new comment:
Hi Jan,

Thank you for spending so much time with me. I don't know how to repay
you.Thank you again.

You said Yade (DEM in general) considers particles as perfectly rigid.
But when I run the following Oedometric test script(from https://yade-
dem.org/doc/tutorial-examples.html).I found that the wall would be
compressed into the upper ball, and in addition, the ball would overlap
with the ball.So i think it is soft ball model.I may have a problem with
my understanding. Please point out my mistake. Thank you.

Feng


# gravity deposition, continuing with oedometric test after stabilization
# shows also how to run parametric studies with yade-batch

# The components of the batch are:
# 1. table with parameters, one set of parameters per line (ccc.table)
# 2. readParamsFromTable which reads respective line from the parameter file
# 3. the simulation muse be run using yade-batch, not yade
#
# $ yade-batch --job-threads=1 03-oedometric-test.table 03-oedometric-test.py
#

# load parameters from file if run in batch
# default values are used if not run from batch
readParamsFromTable(rMean=.05,rRelFuzz=.3,maxLoad=1e6,minLoad=1e4)
# make rMean, rRelFuzz, maxLoad accessible directly as variables later
from yade.params.table import *

# create box with free top, and ceate loose packing inside the box
from yade import pack, plot
O.bodies.append(geom.facetBox((.5,.5,.5),(.5,.5,.5),wallMask=31))
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(1,1,1),rMean=rMean,rRelFuzz=rRelFuzz)
sp.toSimulation()

O.engines=[
   ForceResetter(),
   # sphere, facet, wall
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]),
   InteractionLoop(
  # the loading plate is a wall, we need to handle sphere+sphere, 
sphere+facet, sphere+wall
  
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
   ),
   NewtonIntegrator(gravity=(0,0,-9.81),damping=0.5),
   # the label creates an automatic variable referring to this engine
   # we use it below to change its attributes from the functions called
   PyRunner(command='checkUnbalanced()',realPeriod=2,label='checker'),
]
O.dt=.5*PWaveTimeStep()

# the following checkUnbalanced, unloadPlate and stopUnloading functions are 
all called by the 'checker'
# (the last engine) one after another; this sequence defines progression of 
different stages of the
# simulation, as each of the functions, when the condition is satisfied, 
updates 'checker' to call
# the next function when it is run from within the simulation next time

# check whether the gravity deposition has already finished
# if so, add wall on the top of the packing and start the oedometric test
def checkUnbalanced():
   # at the very start, unbalanced force can be low as there is only few 
contacts, but it does not mean the packing is stable
   if O.iter<5000: return 
   # the rest will be run only if unbalanced is < .1 (stabilized packing)
   if unbalancedForce()>.1: return 
   # add plate at the position on the top of the packing
   # the maximum finds the z-coordinate of the top of the topmost particle
   O.bodies.append(wall(max([b.state.pos[2]+b.shape.radius for b in O.bodies if 
isinstance(b.shape,Sphere)]),axis=2,sense=-1))
   global plate# without this line, the plate variable would only exist 
inside this function
   plate=O.bodies[-1]  # the last particles is the plate
   # Wall objects are "fixed" by default, i.e. not subject to forces
   # prescribing a velocity will therefore make it move at constant velocity 
(downwards)
   plate.state.vel=(0,0,-.1)
   # start plotting the data now, it was not interesting before
   O.engines=O.engines+[PyRunner(command='addPlotData()',iterPeriod=200)]
   # next time, do not call this function anymore, but the next one 
(unloadPlate) instead
   checker.command='unloadPlate()'

def unloadPlate():
   # if the force on plate exceeds maximum load, start unloading
   if abs(O.forces.f(plate.id)[2])>maxLoad:
  plate.state.vel*=-1
  # next time, do not call this function anymore, but the next one 
(stopUnloading) instead
  checker.command='stopUnloading()'

def stopUnloading():
   if abs(O.forces.f(plate.id)[2])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 #676841]: the definition of porosity

2018-12-16 Thread fengjingyu
New question #676841 on Yade:
https://answers.launchpad.net/yade/+question/676841

Hi

I am calculating the porosity in the period triaxial compression.From the 
documentation,the porosity is defined as (V-Vs)/V,where V is overall volume and 
Vs is volume of spheres.For periodic simulations, current volume of the Cell is 
used.Yade should be a soft ball model.So while calculating,Vs is the volume of 
the compressed sphere or the volume of the original sphere?

Thanks 

Feng

-- 
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 #676831]: control the porosity

2018-12-15 Thread fengjingyu
New question #676831 on Yade:
https://answers.launchpad.net/yade/+question/676831

Hi,

I'm reproducing a paper on isotropic compression.My material is exactly the 
same as the numerical value in the paper.However, to speed up the simulation, I 
used 1/100th of his particles and magnified them 100 times. I ended up 30 
percent less porosity than he was. Does adjusting the number and size of 
particles really have that much effect on porosity? How should I adjust it at 
this time?

Thanks,

Feng

-- 
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 #676830]: maxStrainRate in the PeriTriaxController

2018-12-15 Thread fengjingyu
Question #676830 on Yade changed:
https://answers.launchpad.net/yade/+question/676830

Description changed to:
Hi,

In the PeriTriaxController,there is a parameter called maxStrainRate. I
want to know the meaning of it.If i set it to 0.1,it means the wall is
shrinking at 0.1m/s or shrink the sides of the box by 0.1 times per
second

Thanks,

Feng

-- 
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 #676830]: maxStrainRate in the PeriTriaxController

2018-12-15 Thread fengjingyu
New question #676830 on Yade:
https://answers.launchpad.net/yade/+question/676830

Hi,

In the PeriTriaxController,there is a parameter called maxStrainRate. I want to 
know the meaning of it.If i  set it to 0.1,it means the wall is shrinking at 
0.1m/s or shrink the sides of the box by 0.1 per second.

Thanks,

Feng

-- 
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 #676810]: obtain angle of shearing resistance

2018-12-15 Thread fengjingyu
Question #676810 on Yade changed:
https://answers.launchpad.net/yade/+question/676810

Summary changed to:
obtain angle of shearing resistance

Description changed to:
Hi everyone,

I'm recreating someone else's paper about triaxial compression. So I
want to get critical state angle of shearing resistance and peak angle
of shearing resistance and deviator stress.

How can I get these value?

thanks in advance.

Feng

-- 
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 #676810]: angle of shearing resistance in triaxial compression

2018-12-15 Thread fengjingyu
Question #676810 on Yade changed:
https://answers.launchpad.net/yade/+question/676810

Summary changed to:
angle of shearing resistance in triaxial compression

-- 
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 #676810]: obtain shearing resistance

2018-12-15 Thread fengjingyu
Question #676810 on Yade changed:
https://answers.launchpad.net/yade/+question/676810

Description changed to:
Hi everyone,

I'm recreating someone else's paper. So I want to get critical state angle of 
shearing resistance and peak angle of shearing resistance.
How can I get the angle of shearing resistance?

thanks in advance.

Feng

-- 
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 #676776]: plot psd

2018-12-14 Thread fengjingyu
Question #676776 on Yade changed:
https://answers.launchpad.net/yade/+question/676776

Summary changed to:
plot psd

Description changed to:
Hi,there

how to draw the particle distribution curve

Thanks,

Feng

-- 
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 #676810]: obtain shearing resistance

2018-12-14 Thread fengjingyu
New question #676810 on Yade:
https://answers.launchpad.net/yade/+question/676810

Hi everyone,

I'm recreating someone else's paper. So I want to get critical state angle of 
shearing resistance and peak angle of shearing resistance.
How can I get shearing resistance?

thanks in advance.

Feng

-- 
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 #676776]: obtain shearing resistance

2018-12-14 Thread fengjingyu
Question #676776 on Yade changed:
https://answers.launchpad.net/yade/+question/676776

Summary changed to:
obtain shearing resistance

Description changed to:
Hi there,

I'm reproducing a paper.So I want to plot the peak angle of shearing
resistance and the critical state angle of shearing resistance.

How do I get these two quantities.

Thanks,
Feng

-- 
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 #676776]: how to plot psd

2018-12-13 Thread fengjingyu
Question #676776 on Yade changed:
https://answers.launchpad.net/yade/+question/676776

fengjingyu posted a new comment:
Thanks Bruno,

I have found the script.

Cheers

Feng

-- 
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 #676747]: the way of set psd

2018-12-13 Thread fengjingyu
Question #676747 on Yade changed:
https://answers.launchpad.net/yade/+question/676747

fengjingyu posted a new comment:
thanks Bruno and Jan,u solved my problem too.

-- 
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 #676747]: the way of set psd

2018-12-13 Thread fengjingyu
Question #676747 on Yade changed:
https://answers.launchpad.net/yade/+question/676747

Status: Answered => Solved

fengjingyu confirmed that the question is solved:
Thanks Jérôme Duriez, 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 #676776]: how to plot psd

2018-12-13 Thread fengjingyu
Question #676776 on Yade changed:
https://answers.launchpad.net/yade/+question/676776

Status: Answered => Solved

fengjingyu confirmed that the question is solved:
Thanks Bruno Chareyre, 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 #676747]: the way of set psd

2018-12-13 Thread fengjingyu
Question #676747 on Yade changed:
https://answers.launchpad.net/yade/+question/676747

fengjingyu posted a new comment:
Hi Jan:

I'm wondering if I can generate particles that satisfy the equation that
I set up, like a normal distribution

Regards,
Feng

-- 
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 #676776]: how to plot psd

2018-12-13 Thread fengjingyu
Question #676776 on Yade changed:
https://answers.launchpad.net/yade/+question/676776

fengjingyu posted a new comment:
Hi Bruno:

Thank you for your help. Can you tell me where to search psd.py?

Regards,

Feng

-- 
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 #676776]: how to plot psd

2018-12-12 Thread fengjingyu
Question #676776 on Yade changed:
https://answers.launchpad.net/yade/+question/676776

Description changed to:
Hi there,

I used psdSizes and psdCumm to generate the particles. How to draw a
picture to show particle size distribution.

Since my python foundation is very poor, could you tell me more about
it.

and here is my script:

# encoding: utf-8
from yade import pack, qt, plot

sigmaIso=-25000

O.periodic=True

O.materials.append(FrictMat(young=64e9,poisson=0.12,density=2650,frictionAngle=0.231,label='spheres'))

O.periodic=True
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(5,5,5),psdSizes=[0.1,0.2],psdCumm=[0.1,1],periodic=True)
sp.toSimulation(material='spheres')

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=(0.1,0.1,0.1),
  maxUnbalanced=.1,relStressTol=1e-3,
  doneHook='compactionFinished()'
   ),
   NewtonIntegrator(damping=.1),
   PyRunner(command='addPlotData()',iterPeriod=300),
   PyRunner(command='particleNumber()',iterPeriod=1),
]
O.dt=.5*PWaveTimeStep()
O.trackEnergy=True

def particleNumber():
   print(O.bodies[-1].id)
   
   
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],
  #Etot=O.energy.total(),**O.energy,
  porosity=porosity(),coordNum=avgNumInteractions()
  
   )
   print(triax.stress[2],porosity())

plot.plots={'i':('unbalanced',),'i ':('sxx','syy','szz'),' 
i':('exx','eyy','ezz'),' i ':(('coordNum','r'),None,'porosity'),
}

plot.plot()

qt.View()
qt.Controller()
O.saveTmp()

def compactionFinished():
   O.cell.trsf=Matrix3.Identity
   triax.goal=(sigmaIso,sigmaIso,sigmaIso)
   triax.stressMask=7
   triax.maxStrainRate=(0,0,0)
   triax.doneHook='triaxFinished()'
   triax.maxUnbalanced=0.1

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

Thanks,
Feng

-- 
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 #676776]: how to plot psd

2018-12-12 Thread fengjingyu
Question #676776 on Yade changed:
https://answers.launchpad.net/yade/+question/676776

Description changed to:
Hi there,

I used psdSizes and psdCumm to generate the particles. How to draw a
picture to show particle size distribution.

Since my python foundation is very poor, could you tell me more about
it.

and here is my script:

# encoding: utf-8
from yade import pack, qt, plot

sigmaIso=-25000

O.periodic=True

O.materials.append(FrictMat(young=64e9,poisson=0.12,density=2650,frictionAngle=0.231,label='spheres'))

O.periodic=True
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(5,5,5),rMean=.3,rRelFuzz=.3,num=22312,periodic=True)
sp.toSimulation(material='spheres')

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=(0.1,0.1,0.1),
  maxUnbalanced=.1,relStressTol=1e-3,
  doneHook='compactionFinished()'
   ),
   NewtonIntegrator(damping=.1),
   PyRunner(command='addPlotData()',iterPeriod=300),
   PyRunner(command='particleNumber()',iterPeriod=1),
]
O.dt=.5*PWaveTimeStep()
O.trackEnergy=True

def particleNumber():
   print(O.bodies[-1].id)
   
   
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],
  #Etot=O.energy.total(),**O.energy,
  porosity=porosity(),coordNum=avgNumInteractions()
  
   )
   print(triax.stress[2],porosity())

plot.plots={'i':('unbalanced',),'i ':('sxx','syy','szz'),' 
i':('exx','eyy','ezz'),' i ':(('coordNum','r'),None,'porosity'),
}

plot.plot()

qt.View()
qt.Controller()
O.saveTmp()

def compactionFinished():
   O.cell.trsf=Matrix3.Identity
   triax.goal=(sigmaIso,sigmaIso,sigmaIso)
   triax.stressMask=7
   triax.maxStrainRate=(0,0,0)
   triax.doneHook='triaxFinished()'
   triax.maxUnbalanced=0.1

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

Thanks,
Feng

-- 
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 #676776]: how to plot psd

2018-12-12 Thread fengjingyu
New question #676776 on Yade:
https://answers.launchpad.net/yade/+question/676776

Hi there,

I used psdSizes and psdCumm to generate the particles. How to draw a picture to 
show particle size distribution.

Since my python foundation is very poor, could you tell me more about it.

Thanks,
Feng

-- 
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 #676747]: the way of set psd

2018-12-11 Thread fengjingyu
New question #676747 on Yade:
https://answers.launchpad.net/yade/+question/676747

Hi everyone,

I would like to know that ,In addition to generating particle distribution 
according to psdSizes, psdCumm, rMean and rRelFuzz, there are other ways to 
generate particles of different sizes.For example,particles are generated in 
proportion to a log curve.

thanks in advance.

-- 
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 #676713]: calculate particle number

2018-12-09 Thread fengjingyu
New question #676713 on Yade:
https://answers.launchpad.net/yade/+question/676713

Hi all! i am a beginner.Sorry for asking so stupid question.

How to calculate the particle number?

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 #676713]: calculate particle number

2018-12-09 Thread fengjingyu
Question #676713 on Yade changed:
https://answers.launchpad.net/yade/+question/676713

Description changed to:
i asked a stupid question ,how to delete it ? oh, so ashamed

-- 
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