Re: [Yade-users] [Question #683851]: contact detection between polyhedra and sphere

2019-09-12 Thread lip
Question #683851 on Yade changed:
https://answers.launchpad.net/yade/+question/683851

Status: Answered => Open

lip is still having a problem:
Hi, Jan
for instance, for two spheres,If the distance between the centers of a 
sphere is greater than the sum of the radii of two spheres, we can say that the 
two spheres came into contact.  what you say above is something that we already 
know polyhedra and sphere are contact, what i want to know is how to detect 
that wether polyhedra and sphere are contact or not.

-- 
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 #683851]: contact detection between polyhedra and sphere

2019-09-11 Thread lip
Question #683851 on Yade changed:
https://answers.launchpad.net/yade/+question/683851

Status: Needs information => Open

lip gave more information on the question:
in general

-- 
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 #683851]: contact detection between polyhedra and sphere

2019-09-11 Thread lip
New question #683851 on Yade:
https://answers.launchpad.net/yade/+question/683851

hello 
i want to know the principle of contact detection between polyhedra and 
sphere,can you give me some advice?

-- 
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 #683176]: how to use clump to make a desired shape

2019-08-22 Thread lip
Question #683176 on Yade changed:
https://answers.launchpad.net/yade/+question/683176

Status: Needs information => Open

lip gave more information on the question:
> uniform vs. PSD?
 i want to use PSD

> create new spheres for it or use existing spheres from larger assemblies?
i want to create new spheres for it

>  it is really not clear what you want to do.
what i want to do is that:
first,create a clump such as :
 clump1=O.bodies.appendClumped([\
 sphere([0,0,1], material=Mat, radius=0.5),\
 sphere([0.2,0,1], material=Mat, radius=0.5)\
])
second,create a  binary sphere particles system contained both big and small 
particles,like that:
  sp=pack.SpherePack()
 
sp.makeCloud((0.2,0.2,2),(2.4,2.4,18),psdSizes=[0.1,0.1,0.4,0.4],psdCumm=(0.0,0.8,0.8,1),seed=1,porosity=1)
  
third, replace the big sphere particles by cerated clump,like that:
 for r,c in sp:
if r>0.1:
  #replace the sphere by clump

-- 
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 #683176]: how to use clump to make a desired shape

2019-08-22 Thread lip
Question #683176 on Yade changed:
https://answers.launchpad.net/yade/+question/683176

lip gave more information on the question:
by the way, the clump means a clump body

-- 
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 #683176]: how to use clump to make a desired shape

2019-08-22 Thread lip
Question #683176 on Yade changed:
https://answers.launchpad.net/yade/+question/683176

Status: Needs information => Open

lip gave more information on the question:
dear Jan:
 sorry for wasting your time because of my unclear expression. 
 i am glad to say that what you guess is exactly what i want to ask.
 i have two questions:
 question 1:
 how to use  clump of spheres to creat a clump of tetrahedral shapes
 question 2:
 once the clump of tetrahedral shapes is cerated, how can i replace spheres 
by it,the spheres  are cerated by sp.makeCloud(),

-- 
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 #683176]: how to use clump to make a desired shape

2019-08-22 Thread lip
Question #683176 on Yade changed:
https://answers.launchpad.net/yade/+question/683176

lip gave more information on the question:
Comment to my first question:
  sorry for my misrepresentation, what i mean is not use clump to create a  
tetrahedron, Instead, what i want is create a clump in the shape of a 
tetrahedron

-- 
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 #683176]: how to use clump to make a desired shape

2019-08-22 Thread lip
Question #683176 on Yade changed:
https://answers.launchpad.net/yade/+question/683176

lip gave more information on the question:
by the way, when the clump is  created, i want to replace sphere which
created by function makeCloud() by the clump, as far as i know, clump is
a tuple object, so it do not have positon attribute, which make it can
not replace the sphere according to the positon of sphere, can you give
me some advice to help me solve that problem, lookforward for your reply

-- 
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 #683176]: how to use clump to make a desired shape

2019-08-22 Thread lip
New question #683176 on Yade:
https://answers.launchpad.net/yade/+question/683176

hello
i want to use clump to cerat a tetrahedron,can you give me some advice?

-- 
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 #683160]: problem of pyRunner()

2019-08-22 Thread lip
New question #683160 on Yade:
https://answers.launchpad.net/yade/+question/683160

hello
 i have defined a function named energysb() to culculate the linear kinetic 
energy of polyhedra and sphere seperately when the number of iterations is 
k*3000 , where k=1,2,3,...,  but it turn out to be that the calculation occured 
when the iter number more than 1,i do not know where is wrong, can you give 
me some advice? 
below is part of my code:
   O.load('10-1.xml.bz2')
   O.engines = [
ForceResetter(),

InsertionSortCollider([Bo1_Polyhedra_Aabb(),Bo1_Sphere_Aabb(),Bo1_Wall_Aabb()]),
InteractionLoop(

[Ig2_Polyhedra_Polyhedra_PolyhedraGeom(),Ig2_Sphere_Polyhedra_ScGeom(),Ig2_Wall_Polyhedra_PolyhedraGeom(),Ig2_Wall_Sphere_ScGeom(),Ig2_Sphere_Sphere_ScGeom()],

[Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys(),Ip2_FrictMat_PolyhedraMat_FrictPhys(),Ip2_FrictMat_FrictMat_FrictPhys()],
  

[Law2_ScGeom_FrictPhys_CundallStrack(),Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()]
  
),
# GravityEngine(gravity=(0,0,-9.81)),
NewtonIntegrator(damping=0.5, gravity=(0, 0, -9.81)),

PyRunner(command='changecolor()', realPeriod=15),
PyRunner(command='checkUnbalanced()', realPeriod=15),
qt.SnapshotEngine(fileBase='3d-',iterPeriod=1,label='snapshot'),
PyRunner(command='energysb()', realPeriod=3000),
]

def energysb():
plke=0
slke=0
for b in O.bodies:
if b.id>18:
if isinstance(b.shape,Polyhedra):
plke=plke+0.5*b.state.mass*b.state.vel.norm()*b.state.vel.norm()
else:
slke=slke+0.5*b.state.mass*b.state.vel.norm()*b.state.vel.norm()
with open('spEnergyChange.txt','a') as text:
text.write('%s\t'%serailsnumble)
text.write('%s\t'%plke)
text.write('%s\n'%slke)
by the way,there exist about 7 sphere particles and 300 polyhedra particles 
in my simulation.

-- 
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 #683102]: how to calculate rotational energy of particle

2019-08-20 Thread lip
Question #683102 on Yade changed:
https://answers.launchpad.net/yade/+question/683102

Status: Answered => Open

lip is still having a problem:
dear Jan:
   thanks for your answer. i noticed that  the code below might solve my 
problem:
   if(b->isAspherical()){
Matrix3r T(state->ori);
// the tensorial expression 
http://en.wikipedia.org/wiki/Moment_of_inertia#Moment_of_inertia_tensor
// inertia tensor rotation from 
http://www.kwon3d.com/theory/moi/triten.html
Matrix3r mI; mI<inertia[0],0,0, 
0,state->inertia[1],0, 0,0,state->inertia[2];

//E+=.5*state->angVel.transpose().dot((T.transpose()*mI*T)*state->angVel);

E+=.5*angVel.transpose().dot((T*mI*T.transpose())*angVel);
}

but i still have a problem, i think the code 'Matrix3r
T(state->ori)' is used to conver quaternionr into a rotating matrix,if
so, how can i achieve that by python? can you give me some advice?

-- 
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 #683102]: how to calculate rotational energy of particle

2019-08-20 Thread lip
Question #683102 on Yade changed:
https://answers.launchpad.net/yade/+question/683102

lip gave more information on the question:
by the way, i know that function yade._utils.kineticEnergy() can be used to 
calculate the total kinetic neergy of all particles, but i want to calculate 
the kinetic energy of polyhedra and sphere separately, which will make the 
function yade._utils.kineticEnergy()
become useless to me, can you give me some advice?

-- 
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 #683102]: how to calculate rotational energy of particle

2019-08-20 Thread lip
New question #683102 on Yade:
https://answers.launchpad.net/yade/+question/683102

hello
  i am simulating a particle column collapse, the particle system is 
consist of sphere and polyhedra,  and i want calculate the energy loss caused 
by friction and the kinetic energy, so i need to know how to calculate the 
rotational energy, can you give me some advice, lookforward  for your answer
 

-- 
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 #683001]: Physic interaction betweem sphere and polyhedra

2019-08-17 Thread lip
New question #683001 on Yade:
https://answers.launchpad.net/yade/+question/683001

hello
 i know that Ig2_Sphere_Polyhedra_ScGeom can calculate the ig between 
polyhedra and sphere, if the material of polyhedra is polyhedraMat and sphere 
is frictMat, the ip between them can be calculate by 
Ip2_FrictMat_PolyhedraMat_FrictPhys, and then use cundall law, the interaction 
between polyhedra and sphere can be solved.
 Ip2_FrictMat_PolyhedraMat_FrictPhys  describe in Polyhedra.cpp is as below:
void Ip2_FrictMat_PolyhedraMat_FrictPhys::go(const shared_ptr& pp1, 
const shared_ptr& pp2, const shared_ptr& interaction){
const shared_ptr& mat1 = YADE_PTR_CAST(pp1);
const shared_ptr& mat2 = YADE_PTR_CAST(pp2);
Ip2_FrictMat_FrictMat_FrictPhys().go(mat1,mat2,interaction);
}

and stiffness culculate in Ip2_FrictMat_FrictMat_FrictPhys() is like that:
Real Kn = 2*Ea*Ra*Eb*Rb/(Ea*Ra+Eb*Rb);
Real Ks = 2*Ea*Ra*Va*Eb*Rb*Vb/(Ea*Ra*Va+Eb*Rb*Vb);

What puzzles me is that polyhedra do not have radius r, then how to calculate 
normal stiffness between polyhedra and sphere use  
Ip2_FrictMat_PolyhedraMat_FrictPhys?
lookforward for your answer.

-- 
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 #682859]: how to calculate anisotropy of contact normal vector

2019-08-13 Thread lip
Question #682859 on Yade changed:
https://answers.launchpad.net/yade/+question/682859

Status: Answered => Open

lip is still having a problem:
hello
  i am sorry for i did not make my question clear.
  maybe you can just give me some advice about how to calculate the contact 
normal vector, for the anisotropy value of contact normal vector  can be 
calculate based on that.

-- 
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 #682857]: how to calculate anisotropy of contact normal vector

2019-08-13 Thread lip
New question #682857 on Yade:
https://answers.launchpad.net/yade/+question/682857

hello
 i want to know how to  calculate anisotropy of contact normal vector 
between particles, is there any funtion in yade can handle that?if not, can you 
give me some advice to help me achieve that in yade?

-- 
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 #682859]: how to calculate anisotropy of contact normal vector

2019-08-13 Thread lip
New question #682859 on Yade:
https://answers.launchpad.net/yade/+question/682859

hello
 i want to know how to  calculate anisotropy of contact normal vector 
between particles, is there any funtion in yade can handle that?if not, can you 
give me some advice to help me achieve that in yade?

-- 
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 #682835]: how to make a particle Invisible while keep interaction with other particle

2019-08-12 Thread lip
New question #682835 on Yade:
https://answers.launchpad.net/yade/+question/682835

hello
i want to know how to make a particle invisible while keep interaction with 
other particles ,is there any function in yade can achieve that? looking 
forward for your answer


-- 
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 #682833]: Irregular variation of unbalanced force during simulation

2019-08-12 Thread lip
New question #682833 on Yade:
https://answers.launchpad.net/yade/+question/682833

hello:
   i am doing a deposit simution contained polyhedra and shpere,particles pile 
up freely in a box formed by polyhedra under the action of gravity. below is my 
code: 
from yade import polyhedra_utils,pack,plot,utils
import random

m  = FrictMat(young=7.2e7,poisson=.2,density=2.5e3)
n = PolyhedraMat(young=7.2e7,poisson=.2,density=2.5e3)

O.materials.append((m,n))

#the boundary of particle flow
v1=((0,0,0),(0,2.7,0),(0,0,40),(0,2.5,40),(-0.1,0,0),(-0.1,2.7,0),(-0.1,0,40),(-0.1,2.7,40))
v2=((0,0,0),(0,0,40),(18,0,0),(18,0,40),(0,0.1,0),(0,0.1,40),(18,0.1,0),(18,0.1,40))
v3=((0,2.5,0),(0,2.5,40),(18,2.5,0),(18,2.5,40),(0,2.6,0),(0,2.6,40),(18,2.6,0),(18,2.6,40))
v4=((0,0,0),(0,2.7,0),(18,2.7,0),(18,0,0),(0,0,-0.1),(0,2.7,-0.1),(18,2.7,-0.1),(18,0,-0.1))
v5=((2.5,0.1,0),(2.5,2.6,0),(2.5,0.1,40),(2.5,2.6,40),(2.6,0.1,0),(2.6,2.6,0),(2.6,0.1,40),(2.6,2.6,40))
b1 = polyhedra_utils.polyhedra(material=n,v=v1,fixed=True) # you can set wire 
at 
b2 = polyhedra_utils.polyhedra(material=n,v=v2,fixed=True) 
b3 = polyhedra_utils.polyhedra(material=n,v=v3,fixed=True)
b4 = polyhedra_utils.polyhedra(material=n,v=v4,fixed=True)
wall = polyhedra_utils.polyhedra(material=n,v=v5,fixed=True)
b1.shape.wire=True
b2.shape.wire=True
b3.shape.wire=True
b4.shape.wire=True
O.bodies.append((b1,b2,b3,b4,wall))

#sphere particles mixed with polyhedra
sp=pack.SpherePack()
sp.makeCloud((0.2,0.2,2),(2.4,2.4,100),psdSizes=[0.1,0.1,0.6,0.6],psdCumm=(0.0,0.9634,0.9634,1),seed=1,porosity=1)
for center,radius in sp:
if radius > 0.1:

t=polyhedra_utils.polyhedra(material=n,size=(0.5386,0.5386/3,0.5386/3),seed=2)
t.state.pos = center # sets polyhedron position according to sphere 
position
O.bodies.append(t)
 else:  

 
t = sphere(center,radius,material=m)
O.bodies.append(t)
#simulation
O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Polyhedra_Aabb(),Bo1_Sphere_Aabb()]),
InteractionLoop(

[Ig2_Polyhedra_Polyhedra_PolyhedraGeom(),Ig2_Sphere_Polyhedra_ScGeom(),Ig2_Sphere_Sphere_ScGeom()],

[Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys(),Ip2_FrictMat_PolyhedraMat_FrictPhys(),Ip2_FrictMat_FrictMat_FrictPhys()],
  

[Law2_ScGeom_FrictPhys_CundallStrack(),Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()]
  
),
# GravityEngine(gravity=(0,0,-9.81)),
NewtonIntegrator(damping=0.5, gravity=(0, 0, -9.81)),
PyRunner(command='checkUnbalanced()', realPeriod=3, label='checker'),
]
def checkUnbalanced():
   print unbalancedForce()
   if unbalancedForce()<.01:
  O.pause()

O.dt=1e-4

when the simulaiton begins, i found that the unbalanced force changed 
Irregularly in a small value field. what i expect is that as the number of 
simulation iterations increases, the unbalanced force decreases gradually.



-- 
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 #682757]: principle of psd in yade

2019-08-12 Thread lip
Question #682757 on Yade changed:
https://answers.launchpad.net/yade/+question/682757

Status: Needs information => Open

lip gave more information on the question:
dear Bruno:
 below is my code:
sp=pack.SpherePack()

sp.makeCloud((0.2,0.2,2),(2.4,2.4,100),psdSizes=[0.1,0.1,0.6,0.6],psdCumm=(0.0,0.7,0.7,1),seed=1,porosity=1)
the purpose of the code is to generate sphere of size 0.1 and 0.6. i notice 
that  the distribution of two sphere in different size is always evenly in the 
box, for example, in height 2-12, the numble of big sphere is about 3 and the 
numble of samll shpere is about 7, in the height 12-22 is the same, i want to 
know how this kind of distribution is formed.

-- 
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 #682757]: principle of psd in yade

2019-08-10 Thread lip
New question #682757 on Yade:
https://answers.launchpad.net/yade/+question/682757

hello
i want to know the pirnciple of psd in yade.
when i use function makeCloud() to generate shere of two different size use 
arguments psdSize and psdCum, i noticed that the distribution of two sphere of 
different size is always uniform in the box. i want to know  how yade acheived 
that?
lookforward for your answer 

-- 
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 #682414]: how to get vertex coordinate of polyhedra created by function polyhedra_utils.fillBox()

2019-07-29 Thread lip
Question #682414 on Yade changed:
https://answers.launchpad.net/yade/+question/682414

Status: Answered => Solved

lip confirmed that the question is solved:
dear Robert:
  i have tried function _polyhedra_utils.PrintPolyhedra

-- 
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 #682414]: how to get vertex coordinate of polyhedra created by function polyhedra_utils.fillBox()

2019-07-29 Thread lip
Question #682414 on Yade changed:
https://answers.launchpad.net/yade/+question/682414

Status: Needs information => Open

lip gave more information on the question:
i am sorry for i did not make my question clear. my question is that:
if i created a polyhedra by function polyhedra_utils.polyhedra like that:
polyhedra_utils.polyhedra(material=m,size=(0.4,0.4,0.8),seed=1)
what should i do to get the vertex of the polyhedra?
lookforward for your answer

-- 
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 #682414]: how to get vertex coordinate of polyhedra created by function polyhedra_utils.fillBox()

2019-07-29 Thread lip
Question #682414 on Yade changed:
https://answers.launchpad.net/yade/+question/682414

Status: Answered => Open

lip is still having a problem:
dear Robert:
 i have tried b.shape, and the problem solved. but i still have a problem 
of how to get the vertex of polyhedra for i  do not know what does the argument 
shape mean, if i just want to get the vertex coordinates of one of the 
polyhedrons,can i achive that according to its id?

-- 
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 #682417]: how to get the volume of polyhedra

2019-07-29 Thread lip
New question #682417 on Yade:
https://answers.launchpad.net/yade/+question/682417

hello
i want to know how to get the volume of polyhedra created by function 
polyhedra_utils.polyhedra(),i have tried t=a.getVolume(),but an error  
appear:AttributeError: 'Body' object has no attribute 'getVolume'
below is my code:
from yade import pack, qt, polyhedra_utils

m=PolyhedraMat()

a=polyhedra_utils.polyhedra(material=m,size=(0.4,0.4,0.8),seed=1)
O.bodies.append(a)
t=a.getVolume()
print t


-- 
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 #682414]: how to get vertex coordinate of polyhedra created by function polyhedra_utils.fillBox()

2019-07-29 Thread lip
Question #682414 on Yade changed:
https://answers.launchpad.net/yade/+question/682414

Status: Answered => Open

lip is still having a problem:
thank you for your answer.i think it may work, but i have not tried it yet for 
i do not know what does the argument shape mean.I just want to get the vertex 
coordinates of one of the polyhedrons according to its id,not all the 
polyhedras.
by the way, if i want to get the volume of a polyhedra, is there any way to 
achieve that?

-- 
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 #682414]: how to get vertex coordinate of polyhedra created by function polyhedra_utils.fillBox()

2019-07-29 Thread lip
New question #682414 on Yade:
https://answers.launchpad.net/yade/+question/682414

hello
i have created many polyhedra by function polyhedra_utils.fillBox, i want to 
know how to obtain the vertex coordinates of any polyhedron. 
lookforward for your answer.

-- 
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 #682111]: how to generate 3-D coordinate system in yade

2019-07-17 Thread lip
Question #682111 on Yade changed:
https://answers.launchpad.net/yade/+question/682111

Status: Answered => Open

lip is still having a problem:
dear Bruno:
thanks very much for your answer.but what i need is a 3-D coordinate system 
with scale values and custom origins, would you please give me some advice to 
heip achieve that?

-- 
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 #682108]: how to display scale on the boundary

2019-07-17 Thread lip
Question #682108 on Yade changed:
https://answers.launchpad.net/yade/+question/682108

Status: Answered => Open

lip is still having a problem:
dear Jan:
   the run-out distance and height means the maximum moving distance and 
stacking height of a particle column after collapse. what i want to know is how 
 to add scale value to the boundary in the "Primary view" window, so that i  
can see the values of run-out distance and height intuitively . a 3-D 
coordinate system with scale value and custom origins may help me too,but i do 
not know how to build this kind of coordinate system either,

-- 
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 #682111]: how to generate 3-D coordinate system in yade

2019-07-17 Thread lip
New question #682111 on Yade:
https://answers.launchpad.net/yade/+question/682111

hello
i want build a  3-D coordinate system in yade,would you please give me some 
advice?
lookforward for your reply

-- 
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 #682108]: how to display scale on the boundary

2019-07-17 Thread lip
New question #682108 on Yade:
https://answers.launchpad.net/yade/+question/682108

hello
i am simulating the collapse of particle column,the boundary is formed by  
polyhedra, i want to know the final run-out distance and height, i think if the 
boundary with scale may help me, but i do not know how to achieve it, can you 
help me?
lookforward for your advice. 

-- 
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 #681970]: How to distinguish sphere and polyhedra in a binary particle system

2019-07-11 Thread lip
New question #681970 on Yade:
https://answers.launchpad.net/yade/+question/681970

hello
i am doing a deposit simulation contained both sphere and polyhedra, and the 
numble is large, i want to calculate the  volume of sphere and polyhedra 
separately, but i do not know how to distinguish polyhedra and sphere, can you 
give me some advice?
looking forward for your answer.

-- 
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 #681691]: how to generate binary particle system

2019-06-29 Thread lip
New question #681691 on Yade:
https://answers.launchpad.net/yade/+question/681691

hello
i want to genetate a particle system with particle of two different size,one 
large and one samll, is there any function in yade can achieve that? if not,can 
you give  me some adivice?
look forward for your answer

-- 
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 #681681]: how to yield color nephogram of velocity in yade

2019-06-29 Thread lip
New question #681681 on Yade:
https://answers.launchpad.net/yade/+question/681681

hello
i was simulating the collapse of particle collummn, and i want to know how to 
yield color nephogram of velocity in yade. i have tried to use function 
scalarOnColorScale,but it did not work well.
below is my code:
from yade import polyhedra_utils,pack,plot,utils
import random

m  = FrictMat(young=5e7,poisson=.3)
n = PolyhedraMat(young=5e7,poisson=.3)

O.materials.append((m,n))

#the boundary of particle deposit
v1=((0,0,0),(0,3.2,0),(0,0,40),(0,3.2,40),(-0.1,0,0),(-0.1,3.2,0),(-0.1,0,40),(-0.1,3.2,40))
v2=((0,0,0),(0,0,40),(18,0,0),(18,0,40),(0,0.1,0),(0,0.1,40),(18,0.1,0),(18,0.1,40))
v3=((0,3.1,0),(0,3.1,40),(18,3.1,0),(18,3.1,40),(0,3.2,0),(0,3.2,40),(18,3.2,0),(18,3.2,40))
v4=((0,0,0),(0,3.2,0),(18,3.2,0),(18,0,0),(0,0,-0.1),(0,3.2,-0.1),(18,3.2,-0.1),(18,0,-0.1))
v5=((3,0.1,0),(3,3.1,0),(3,0.1,40),(3,3.1,40),(3.1,0.1,0),(3.1,3.1,0),(3.1,0.1,40),(3.1,3.1,40))
b1 = polyhedra_utils.polyhedra(material=n,v=v1,fixed=True) # you can set wire 
at 
b2 = polyhedra_utils.polyhedra(material=n,v=v2,fixed=True) 
b3 = polyhedra_utils.polyhedra(material=n,v=v3,fixed=True)
b4 = polyhedra_utils.polyhedra(material=n,v=v4,fixed=True)
wall = polyhedra_utils.polyhedra(material=n,v=v5,fixed=True)
b1.shape.wire=True
b2.shape.wire=True
b3.shape.wire=True
b4.shape.wire=True
  
O.bodies.append((b1,b2,b3,b4,wall))

#sphere particles mixed with polyhedra
sp=pack.SpherePack()
sp.makeCloud((0.2,0.2,5),(2.8,2.8,75),psdSizes=[0.3,0.400,0.8],psdCumm=(0.1,0.8,1),seed=1,porosity=10)

for center,radius in sp:
if radius >= 0.2:
t = polyhedra_utils.polyhedra(n,(0.5,0.5,0.5))
t.state.pos = center # sets polyhedron position according to sphere 
position
O.bodies.append(t)
else:
t = sphere(center,radius,material=m)
O.bodies.append(t)
#simulation

O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Polyhedra_Aabb(),Bo1_Sphere_Aabb()]),
InteractionLoop(

[Ig2_Polyhedra_Polyhedra_PolyhedraGeom(),Ig2_Sphere_Polyhedra_ScGeom(),Ig2_Sphere_Sphere_ScGeom()],

[Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys(),Ip2_FrictMat_PolyhedraMat_FrictPhys(),Ip2_FrictMat_FrictMat_FrictPhys()],
  

[Law2_ScGeom_FrictPhys_CundallStrack(),Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()]
  
),
# GravityEngine(gravity=(0,0,-9.81)),
NewtonIntegrator(damping=0.5, gravity=(0, 0, -9.81)),
PyRunner(command='checkUnbalanced()', realPeriod=3, label='checker'),
PyRunner(command='changecolor()', realPeriod=3)
]

O.dt=10e-4
O.trackEnergy=True

def changecolor():
for b in O.bodies:
if b.id>4:
t=b.state.vel.norm()
b.shape.color=scalarOnColorScale(4*t,0,pi/2.)

def checkUnbalanced():
   print unbalancedForce()
   if unbalancedForce()<.05:
  for b in O.bodies:
  b.state.vel=(0,0,0)
  O.pause()
 
O.saveTmp()

-- 
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 #681292]: contact detection between polyhedra and sphere

2019-06-27 Thread lip
Question #681292 on Yade changed:
https://answers.launchpad.net/yade/+question/681292

Status: Answered => Open

lip is still having a problem:
thank you for your answer,i have seen the code and understand the
principle. but i still have a question,  is there anyone vertified that
principle? if it does, can you offer me some relevent data?

-- 
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 #681383]: problem of the unit of normal force in Law2_PolyhedraGeom_PolyhedraPhys_Volumetric

2019-06-12 Thread lip
Question #681383 on Yade changed:
https://answers.launchpad.net/yade/+question/681383

Status: Answered => Open

lip is still having a problem:
bleow is the code i copy from polyhedra.cpp:
Real Kna= mat1->young
i have read some code in file examples/polyhedra,all the unit of young is 
pa,which means that the unit of kn is pa too. can you explain that?

-- 
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 #681383]: problem of the unit of normal force in Law2_PolyhedraGeom_PolyhedraPhys_Volumetric

2019-06-12 Thread lip
New question #681383 on Yade:
https://answers.launchpad.net/yade/+question/681383

hello
i am read the source code of yade and noticed that the normal force between two 
polyhedra is calculated by:
normalForce=contactGeom->normal*prop*phys->kn
while kn is calculated by:
contactPhysics->kn = Kna*Knb/(Kna+Knb) 
the problem is that the unit of kn is Pa,when it multipy with volume, with unit 
of m³,  then the unit of normal force become N.m,but it suppose to be N. 
look forward for your answer

-- 
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 #681361]: function goReverse()

2019-06-12 Thread lip
New question #681361 on Yade:
https://answers.launchpad.net/yade/+question/681361

hello
i want know what does function goReverse() do in yade, such as code below:

bool Ig2_Polyhedra_Polyhedra_ScGeom::goReverse(const shared_ptr& shape1, 
const shared_ptr& shape2, const State& state1, const State& state2, 
const Vector3r& shift2, const bool& force, const shared_ptr& 
interaction) {
return go(shape1,shape2,state2,state1,-shift2,force,interaction);
}

can somebody explain it for me,i would appreciate it if you can help me 

-- 
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 #681292]: contact detection between polyhedra and sphere

2019-06-08 Thread lip
New question #681292 on Yade:
https://answers.launchpad.net/yade/+question/681292

hello
i noticed that that there is a Ig2_Sphere_Polyhedra_ScGeom in yade, i want to 
know the principle of contact detection between them, such as how to cualculate 
the penetration deepth or pennetration volume between them? is there any papers 
i can read to help me understand that?
lookforward for your answer

-- 
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 #681246]: something do not understand about code in polyhedra_ig2.cpp

2019-06-05 Thread lip
New question #681246 on Yade:
https://answers.launchpad.net/yade/+question/681246

hello
below is the code i am reading:
bool Ig2_Polyhedra_Polyhedra_ScGeom::go(const shared_ptr& shape1, const 
shared_ptr& shape2, const State& state1, const State& state2, const 
Vector3r& shift2, const bool& force, const shared_ptr& 
interaction) {
const Se3r& se31=state1.se3;
const Se3r& se32=state2.se3;
shared_ptr geom;
bool isNew = !interaction->geom;
if (isNew) {
Ig2_Polyhedra_Polyhedra_PolyhedraGeom ppGeom = 
Ig2_Polyhedra_Polyhedra_PolyhedraGeom();
ppGeom.interactionDetectionFactor = interactionDetectionFactor;
bool pp = 
ppGeom.go(shape1,shape2,state2,state1,shift2,force,interaction);
if (!pp) {
return false;
}
shared_ptr pGeom = 
YADE_PTR_CAST(interaction->geom);  
geom = shared_ptr(new ScGeom());
geom->radius1 = (pGeom->contactPoint-se31.position).norm();
geom->radius2 = 
(pGeom->contactPoint-se32.position+shift2).norm();
interaction->geom=geom;
} else {
geom = YADE_PTR_CAST(interaction->geom);
}
const Real& radius1 = geom->radius1;
const Real& radius2 = geom->radius2;
Vector3r normal=(se32.position+shift2)-se31.position;
Real norm=normal.norm(); normal/=norm; // normal is unit vector now
Real penetrationDepth=radius1+radius2-norm;

geom->contactPoint=se31.position+(radius1-0.5*penetrationDepth)*normal;//0.5*(pt1+pt2);
geom->penetrationDepth=penetrationDepth;
scene = Omega::instance().getScene().get();

geom->precompute(state1,state2,scene,interaction,normal,isNew,shift2,false);
return true;
}
question1: what does the parameter shift2 do?
question2:what does se31.position refer to? i know that the position of sphere 
means the centre of it, but as to polyhedra, which point can define the 
position of it? Is the positon means the centroid of polyhedra or something 
else?
lookforward for your answer.

-- 
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 #681224]: how to view normal contact stiffness kn

2019-06-04 Thread lip
Question #681224 on Yade changed:
https://answers.launchpad.net/yade/+question/681224

Status: Answered => Solved

lip 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


[Yade-users] [Question #681224]: how to view normal contact stiffness kn

2019-06-04 Thread lip
New question #681224 on Yade:
https://answers.launchpad.net/yade/+question/681224

hello
i want know to how to view normal contact stiffness kn in python script or in 
the teminal of ubuntu, i have tried  print contactPhysics->kn in python script, 
but the teminal give me an error:SyntaxError: invalid syntax. i would 
qppreciate it if you can help me that

-- 
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 #681203]: contact problem of applying ScGeom on polyhedra particle

2019-06-02 Thread lip
New question #681203 on Yade:
https://answers.launchpad.net/yade/+question/681203

hello
i was applying Ig2_Polyhedra_Polyhedra_ScGeom() to simution the deposit of 
polyhedra particles, the boundary is formed by fixed polyhedra. But when the 
polyhedra particles contacted with the fixed polyhedra boundary, they just get 
through the boundary, i have tried many value of timestep,but it is all the 
same. i do not know what is wrong, i would appreciate it if you can help me.
below is my code:
from yade import polyhedra_utils,pack,plot,utils
import random

n  = FrictMat(young=1e10,poisson=.05)

O.materials.append(n)

#the boundary of particle deposit
v1=((0,0,0),(0,3.2,0),(0,0,6),(0,3.2,6),(-0.1,0,0),(-0.1,3.2,0),(-0.1,0,6),(-0.1,3.2,6))
v2=((0,0,0),(0,0,6),(18,0,0),(18,0,6),(0,0.1,0),(0,0.1,6),(18,0.1,0),(18,0.1,6))
v3=((0,3.1,0),(0,3.1,6),(18,3.1,0),(18,3.1,6),(0,3.2,0),(0,3.2,6),(18,3.2,0),(18,3.2,6))
v4=((0,0,0),(0,3.2,0),(18,3.2,0),(18,0,0),(0,0,-0.1),(0,3.2,-0.1),(18,3.2,-0.1),(18,0,-0.1))
v5=((3,0.1,0),(3,3.1,0),(3,0.1,6),(3,3.1,6),(3.1,0.1,0),(3.1,3.1,0),(3.1,0.1,6),(3.1,3.1,6))
b1 = polyhedra_utils.polyhedra(material=n,v=v1,fixed=True) # you can set wire 
at 
b2 = polyhedra_utils.polyhedra(material=n,v=v2,fixed=True) 
b3 = polyhedra_utils.polyhedra(material=n,v=v3,fixed=True)
b4 = polyhedra_utils.polyhedra(material=n,v=v4,fixed=True)
wall = polyhedra_utils.polyhedra(material=n,v=v5,fixed=True)
b2.shape.wire=True
  
O.bodies.append((b1,b2,b3,b4,wall))

polyhedra_utils.fillBox((0.2,0.2,0.2),(2.8,2.8,20),n,seed=1)


O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Polyhedra_Aabb()]),
InteractionLoop(
[Ig2_Polyhedra_Polyhedra_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],  
[Law2_ScGeom_FrictPhys_CundallStrack()]  # contact law -- apply forces
),
# GravityEngine(gravity=(0,0,-9.81)),
NewtonIntegrator(damping=0.5, gravity=(0, 0, -9.81)),
PyRunner(command='checkUnbalanced()', realPeriod=3, label='checker')
]

O.dt=1e-5
 


-- 
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 #681119]: code of penetrationVolume in yade

2019-05-29 Thread lip
Question #681119 on Yade changed:
https://answers.launchpad.net/yade/+question/681119

Status: Answered => Solved

lip 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


[Yade-users] [Question #681119]: code of penetrationVolume in yade

2019-05-29 Thread lip
New question #681119 on Yade:
https://answers.launchpad.net/yade/+question/681119

hello
i am reading the source code of yade recent days, and i am quite interesting in 
how penetrationVolume is calculate in yade, but i can not find the source code 
which defined penetrationVolume and how penetrationVolume calculated, would you 
please tell me where is it?

-- 
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 #681043]: what does scene.cpp do?

2019-05-26 Thread lip
Question #681043 on Yade changed:
https://answers.launchpad.net/yade/+question/681043

Status: Solved => Open

lip is still having a problem:
hello,Bruno:
i have installed Kdevelop in my ubuntu, i import the whole trunk file in to 
Kdevelop through a button in the left part of the software desktop, i can only 
read one cpp file but can not navigate to the class defined in the other cpp 
files, would please tell me how can i acheieve the navigate function through 
this software?

-- 
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 #681043]: what does scene.cpp do?

2019-05-24 Thread lip
Question #681043 on Yade changed:
https://answers.launchpad.net/yade/+question/681043

Status: Answered => Solved

lip 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 #681043]: what does scene.cpp do?

2019-05-24 Thread lip
Question #681043 on Yade changed:
https://answers.launchpad.net/yade/+question/681043

Status: Answered => Open

lip is still having a problem:
thank you for your answer, but what i want to kow is what does class Scene do,  
look forward for you answer.
by the way, when i read polyhedra_ig2.cpp, i found a class named Se3r used in 
the code, but i can not found which file defined this class, so i do not know 
what this class meaning too, would you please tell me that where can i found 
the file?

-- 
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 #681043]: what does scene.cpp do?

2019-05-24 Thread lip
New question #681043 on Yade:
https://answers.launchpad.net/yade/+question/681043

hello
i am reading the souece code of yade, and a file named scene.cpp, what does 
this file do?
look forward for you answer

-- 
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 #681016]: how creat a new law between particle

2019-05-22 Thread lip
New question #681016 on Yade:
https://answers.launchpad.net/yade/+question/681016

hello
i am going to define a new contact geometry and a new contact law, the new 
geometry is serve for the new law. i want to know which file in yade is 
relavent to my work, is there any examples to guide me how todo that?
i woule appreciate if you can help me

-- 
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 #680895]: contact problem of different particle shape

2019-05-21 Thread lip
Question #680895 on Yade changed:
https://answers.launchpad.net/yade/+question/680895

Status: Needs information => Open

lip gave more information on the question:
>is this a question? a comment? something else???

this is a peoblem i do not know how to solve it, in yade, no law law
between between ScGeom and polyhedraMat  is defined.

-- 
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 #680941]: difference between ScGeom and PolyhedraGeom

2019-05-21 Thread lip
Question #680941 on Yade changed:
https://answers.launchpad.net/yade/+question/680941

Status: Answered => Open

lip is still having a problem:
thank you for your answer, it do helped me a lot.
but i do not think the problem is about stiffness, for the same possion ratio 
and young moudles, law2_PolyhedraGeom_polyhedraPhys_Volumetric can handle the 
simulation quite well, but when it comes to 
Law2_ScGeom_frictPhys_cundallstrack, the particle just get through the 
boundary, i was wondering if that law can not be applied in polyhedra contact?

-- 
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 #680941]: difference between ScGeom and PolyhedraGeom

2019-05-21 Thread lip
Question #680941 on Yade changed:
https://answers.launchpad.net/yade/+question/680941

lip posted a new comment:
thank you for your answer, it do helped me a lot.
but i do not think the problem is about stiffness, for the same possion ratio 
and young moudles, law2_PolyhedraGeom_polyhedraPhys_Volumetric can handle the 
simulation quite well, but when it comes to 
Law2_ScGeom_frictPhys_cundallstrack, the particle just get through the 
boundary, i was wondering if that law can not be applied in polyhedra contact?

-- 
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 #680941]: difference between ScGeom and PolyhedraGeom

2019-05-19 Thread lip
New question #680941 on Yade:
https://answers.launchpad.net/yade/+question/680941

hello
i have used law2_PolyhedraGeom_polyhedraPhys_Volumetric and 
Law2_ScGeom_frictPhys_cundallstrack to simulated packing of polyhedra, the 
contain is formed by polyhedra, when i used the first law,everything is all 
right, but when it comes to the second law, the particle get through the 
boundary, i want to know is there any difference between these two law? By the 
way, i have set correct relation between igeom, iphys and law

-- 
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 #680904]: simulation problem between sphere and polyhedra

2019-05-19 Thread lip
Question #680904 on Yade changed:
https://answers.launchpad.net/yade/+question/680904

Description changed to:
hello 
i was simulating the contact between sphere and polyhedra, but there is a 
problem:when the particle When particles come into contact with the boundary 
which formed by polyhedra with fixed position, it It bounces up and then fly 
away,moreover, the polyhedra paticle just get though the boundary, and finally 
only a few sphere left in the contain form by polyhedron boundary.
below is part of my code:
from yade import polyhedra_utils,pack,plot,utils
import random

n = FrictMat(young=1e9,poisson=.2)

O.materials.append(n)

#the boundary of particle flow
v1=((0,0,0),(0,3.2,0),(0,0,6),(0,3.2,6),(-0.1,0,0),(-0.1,3.2,0),(-0.1,0,6),(-0.1,3.2,6))
v2=((0,0,0),(0,0,6),(18,0,0),(18,0,6),(0,0.1,0),(0,0.1,6),(18,0.1,0),(18,0.1,6))
v3=((0,3.1,0),(0,3.1,6),(18,3.1,0),(18,3.1,6),(0,3.2,0),(0,3.2,6),(18,3.2,0),(18,3.2,6))
v4=((0,0,0),(0,3.2,0),(18,3.2,0),(18,0,0),(0,0,-0.1),(0,3.2,-0.1),(18,3.2,-0.1),(18,0,-0.1))
v5=((3,0.1,0),(3,3.1,0),(3,0.1,6),(3,3.1,6),(3.1,0.1,0),(3.1,3.1,0),(3.1,0.1,6),(3.1,3.1,6))
b1 = polyhedra_utils.polyhedra(material=n,v=v1,fixed=True) # you can set wire 
at 
b2 = polyhedra_utils.polyhedra(material=n,v=v2,fixed=True) 
b3 = polyhedra_utils.polyhedra(material=n,v=v3,fixed=True)
b4 = polyhedra_utils.polyhedra(material=n,v=v4,fixed=True)
wall = polyhedra_utils.polyhedra(material=n,v=v5,fixed=True)
b2.shape.wire=True
  
O.bodies.append((b1,b2,b3,b4,wall))

#polyhedra_utils.fillBox((0,0,0),(10,10,20),m,seed=1)

#sphere particles mixed with polyhedra
sp=pack.SpherePack()
sp.makeCloud((0,0,10),(3,3,30),psdSizes=[0.1,0.5,0.8],psdCumm=(0.5,0.8,1),seed=1)

for center,radius in sp:
if radius >= 0.3:
t = polyhedra_utils.polyhedra(n,(radius,radius,radius))
t.state.pos = center # sets polyhedron position according to sphere 
position
O.bodies.append(t)
else:
t = sphere(center,radius,material=n)
O.bodies.append(t)
#simulation
O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Polyhedra_Aabb(),Bo1_Sphere_Aabb()]),
InteractionLoop(
[Ig2_Polyhedra_Polyhedra_ScGeom(),
 Ig2_Sphere_Polyhedra_ScGeom(),
 Ig2_Sphere_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],  
[Law2_ScGeom_FrictPhys_CundallStrack()]  # contact law -- apply forces
),
# GravityEngine(gravity=(0,0,-9.81)),
NewtonIntegrator(damping=0.5, gravity=(0, 0, -9.81)),
PyRunner(command='checkUnbalanced()', realPeriod=3, label='checker')
]
O.dt=5e-5


i would appreciate if if you can help me

-- 
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 #680904]: simulation problem between sphere and polyhedra

2019-05-17 Thread lip
New question #680904 on Yade:
https://answers.launchpad.net/yade/+question/680904

hello 
i was simulating the contact between sphere and polyhedra, but there is a 
problem:when the particle When particles come into contact with the boundary 
which formed by polyhedra with fixed position, it It bounces up and then fly 
away,moreover, the polyhedra paticle just get though the boundary, and finally 
only a few sphere left in the contain form by polyhedron boundary.
below is my code:
from yade import polyhedra_utils,pack,plot,utils
import random

#m  = PolyhedraMat(young=1e10,poisson=.05)
n = FrictMat(young=1e9,poisson=.2)

O.materials.append(n)

#the boundary of particle flow
v1=((0,0,0),(0,3.2,0),(0,0,6),(0,3.2,6),(-0.1,0,0),(-0.1,3.2,0),(-0.1,0,6),(-0.1,3.2,6))
v2=((0,0,0),(0,0,6),(18,0,0),(18,0,6),(0,0.1,0),(0,0.1,6),(18,0.1,0),(18,0.1,6))
v3=((0,3.1,0),(0,3.1,6),(18,3.1,0),(18,3.1,6),(0,3.2,0),(0,3.2,6),(18,3.2,0),(18,3.2,6))
v4=((0,0,0),(0,3.2,0),(18,3.2,0),(18,0,0),(0,0,-0.1),(0,3.2,-0.1),(18,3.2,-0.1),(18,0,-0.1))
v5=((3,0.1,0),(3,3.1,0),(3,0.1,6),(3,3.1,6),(3.1,0.1,0),(3.1,3.1,0),(3.1,0.1,6),(3.1,3.1,6))
b1 = polyhedra_utils.polyhedra(material=n,v=v1,fixed=True) # you can set wire 
at 
b2 = polyhedra_utils.polyhedra(material=n,v=v2,fixed=True) 
b3 = polyhedra_utils.polyhedra(material=n,v=v3,fixed=True)
b4 = polyhedra_utils.polyhedra(material=n,v=v4,fixed=True)
wall = polyhedra_utils.polyhedra(material=n,v=v5,fixed=True)
b2.shape.wire=True
  
O.bodies.append((b1,b2,b3,b4,wall))




#polyhedra_utils.fillBox((0,0,0),(10,10,20),m,seed=1)

#sphere particles mixed with polyhedra
sp=pack.SpherePack()
sp.makeCloud((0,0,10),(3,3,30),psdSizes=[0.1,0.5,0.8],psdCumm=(0.5,0.8,1),seed=1)

for center,radius in sp:
if radius >= 0.3:
t = polyhedra_utils.polyhedra(n,(radius,radius,radius))
t.state.pos = center # sets polyhedron position according to sphere 
position
O.bodies.append(t)
else:
t = sphere(center,radius,material=n)
O.bodies.append(t)
#simulation
O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Polyhedra_Aabb(),Bo1_Sphere_Aabb()]),
InteractionLoop(
[Ig2_Polyhedra_Polyhedra_ScGeom(),
 Ig2_Sphere_Polyhedra_ScGeom(),
 Ig2_Sphere_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],  
[Law2_ScGeom_FrictPhys_CundallStrack()]  # contact law -- apply forces
),
# GravityEngine(gravity=(0,0,-9.81)),
NewtonIntegrator(damping=0.5, gravity=(0, 0, -9.81)),
PyRunner(command='checkUnbalanced()', realPeriod=3, label='checker')
]
O.dt=5e-5
 

O.trackEnergy=True

def checkUnbalanced():
   if unbalancedForce()<.05:
  O.pause()
 
def addPlotData():
   # each item is given a names, by which it can be the unsed in plot.plots
   # the **O.energy converts dictionary-like O.energy to plot.addData arguments
   plot.addData(i=O.iter,unbalanced=unbalancedForce(),**O.energy)

# define how to plot data: 'i' (step number) on the x-axis, unbalanced force
# on the left y-axis, all energies on the right y-axis
# (O.energy.keys is function which will be called to get all defined energies)
# None separates left and right y-axis
plot.plots={'i':('unbalanced',None,O.energy.keys)}

# show the plot on the screen, and update while the simulation runs
plot.plot()

O.saveTmp()

i would appreciate if if you can help me


-- 
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 #680895]: contact problem of different particle shape

2019-05-17 Thread lip
Question #680895 on Yade changed:
https://answers.launchpad.net/yade/+question/680895

Status: Answered => Open

lip is still having a problem:
thank for your advice, it do helped me in some way.
now that the polyhedraMats is a FricMat, then what should i do to define the 
law between between ScGeom and polyhedraMat

-- 
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 #680895]: contact problem of different particle shape

2019-05-17 Thread lip
New question #680895 on Yade:
https://answers.launchpad.net/yade/+question/680895

hello
i was dong a simulation, the contact involved sphere-sphere, sphere-facet, 
sphere-polyhedra, polyhedra-polyhedra, polyhedra-facet.But contact between 
polyhedra and facet can only form PolyhedraGeom, which require that the 
material of polyhedra particles must be PolyhedraMats, otherwise there is no 
matching law can be used to calculate the force, if that, the meterial of 
shhere must be polyhedramat too, then i can apply 
law2_polyhedraGeom_polyhedraPhys_Volumetric to calculate the force between 
sphere and polyhedra.But when it comes to the contact between facet and shpere, 
there is a problem,contact between polyhedra and facet can only form ScGeom, 
howerer, no law defined in yade between ScGeom and polyhedraMat.

by the way, facet is used to form the boundary, i haved considered use 
polyhedra to form the boundary, which can solve my problem, but i still want to 
know is there exsit other solution for my problem?

look forward for you advice


-- 
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 #680888]: how creat a tansparent polyhedra

2019-05-16 Thread lip
New question #680888 on Yade:
https://answers.launchpad.net/yade/+question/680888

hello 
i want to creat a transparent polyhedra, only the edge of the polyhedra will be 
visible, how can i do that?
i would appreciate if you can help me

-- 
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 #680876]: an error when i run my script

2019-05-16 Thread lip
New question #680876 on Yade:
https://answers.launchpad.net/yade/+question/680876

hello
i was simulating the interaction between sphere and polyhedra, and the boundary 
is consist of facet and wall, when i run the code, an error appear: 
 FATAL /usr/local/myYade/trunk/pkg/common/InteractionLoop.cpp:143 action: None 
of given Law2 functors can handle interaction #7+373, types 
geom:PolyhedraGeom=10 and phys:FrictPhys=3 (LawDispatcher::getFunctor2D 
returned empty functor)

below is my code:
from yade import polyhedra_utils,pack,plot,utils
import random

m  = PolyhedraMat(young=1e10,poisson=.05)
n = FrictMat(young=1e9,poisson=.2)

O.materials.append((m,n))

#the boundary of particle flow
v1=((0,0,0),(0,0,10),(100,0,10))
v2=((0,0,0),(100,0,0),(100,0,10))
v5=((100,10,0),(0,10,10),(100,10,10))
v6=((100,10,0),(0,10,10),(0,10,0))
v7=((0,0,0),(0,10,10),(0,0,10))
v8=((0,0,0),(0,10,10),(0,10,0))
v9=((0,0,0),(100,10,0),(0,10,0))
v10=((0,0,0),(100,10,0),(100,0,0))

O.bodies.append(utils.facet(v1,material=m))
O.bodies.append(utils.facet(v2,material=m))
O.bodies.append(utils.facet(v5,material=m))
O.bodies.append(utils.facet(v6,material=m))
O.bodies.append(utils.facet(v7,material=m))
O.bodies.append(utils.facet(v8,material=m))
O.bodies.append(utils.facet(v9,material=m))
O.bodies.append(utils.facet(v10,material=m))


O.bodies.append(utils.wall(10, axis=0, sense=-1, material=m))





#polyhedra_utils.fillBox((0,0,0),(10,10,20),m,seed=1)

#sphere particles mixed with polyhedra
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(10,10,70),psdSizes=[1,2,3],psdCumm=(0.5,0.8,1),seed=1)

for center,radius in sp:
if radius >= 1:
t = polyhedra_utils.polyhedra(m,(radius,radius,radius))
t.state.pos = center # sets polyhedron position according to sphere 
position
O.bodies.append(t)
else:
t = sphere(center,radius,material=m)
O.bodies.append(t)

O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Polyhedra_Aabb(),Bo1_Polyhedra_Aabb(), 
Bo1_Wall_Aabb(), Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Wall_Polyhedra_PolyhedraGeom(), Ig2_Polyhedra_Polyhedra_ScGeom(),
 
Ig2_Facet_Polyhedra_PolyhedraGeom(),Ig2_Sphere_Polyhedra_ScGeom(),Ig2_Wall_Sphere_ScGeom(),
 Ig2_Facet_Sphere_ScGeom(),Ig2_Sphere_Sphere_ScGeom()],

[Ip2_FrictMat_FrictMat_FrictPhys(),Ip2_FrictMat_PolyhedraMat_FrictPhys()],  

[Law2_PolyhedraGeom_PolyhedraPhys_Volumetric(),Law2_ScGeom_FrictPhys_CundallStrack()]
  # contact law -- apply forces
),
# GravityEngine(gravity=(0,0,-9.81)),
NewtonIntegrator(damping=0.5, gravity=(0, 0, -9.81)),
PyRunner(command='checkUnbalanced()', realPeriod=3, label='checker')
]
O.dt=1e-3

# enable energy tracking; any simulation parts supporting it
# can create and update arbitrary energy types, which can be
# accessed as O.energy['energyName'] subsequently
O.trackEnergy=True
# if the unbalanced forces goes below .05, the packing
# is considered stabilized, therefore we stop collected
# data history and stop
def checkUnbalanced():
   if unbalancedForce()<.05:
  O.pause()
  #plot.saveDataTxt('bbb.txt.bz2')
  # plot.saveGnuplot('bbb') is also possible

# collect history of data which will be plotted
def addPlotData():
   # each item is given a names, by which it can be the unsed in plot.plots
   # the **O.energy converts dictionary-like O.energy to plot.addData arguments
   plot.addData(i=O.iter,unbalanced=unbalancedForce(),**O.energy)

# define how to plot data: 'i' (step number) on the x-axis, unbalanced force
# on the left y-axis, all energies on the right y-axis
# (O.energy.keys is function which will be called to get all defined energies)
# None separates left and right y-axis
plot.plots={'i':('unbalanced',None,O.energy.keys)}

# show the plot on the screen, and update while the simulation runs
plot.plot()

O.saveTmp()


i would appreciate it if you can help me

-- 
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 #680857]: what does vector mean in polyhedraGeom

2019-05-16 Thread lip
New question #680857 on Yade:
https://answers.launchpad.net/yade/+question/680857

hello 
there is a object yade.wrapper.PolyhedraGeom in the yade documentation, the 
explain blow shows geometry of interaction between 2 vector, including 
volumetric characteristics. i do not exactly understand what does it mean, 
especially the word vector.
i would appreciate it if you can help me

-- 
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 #680661]: How to add cohesive force between contact particles

2019-05-06 Thread lip
New question #680661 on Yade:
https://answers.launchpad.net/yade/+question/680661

hello
i am going to use yade to simulate effect of particle shape on particle 
accumulation morphology, this requires different particle shapes to eventually 
have the same stacking patterne , but the shape of the particles affects the 
Angle of repose of the final accumulation.Is there a way for particles of 
different shapes to end up in the same heap. The method I came up with was to 
add cohesion between the contact particles and then subtract the final 
accumulation body to make the accumulation form the same shape. If you have a 
better method, i would be appreciate for your advice, if not , would please 
tell me how to add cohesive force between contact particles.
thank you

-- 
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 #680295]: how to set the shear and normal bond strength between sticky particles

2019-04-16 Thread lip
Question #680295 on Yade changed:
https://answers.launchpad.net/yade/+question/680295

lip gave more information on the question:
by the way, the particles contain rock and soil, the bond strengh are
diffrent between siol and rock, how can i define that?

-- 
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 #680295]: how to set the shear and normal bond strength between sticky particles

2019-04-16 Thread lip
New question #680295 on Yade:
https://answers.launchpad.net/yade/+question/680295

hello
i am going to do a experiment about cohesive soil, but i do not know how to set 
the mechannical parameters such as shear and normal bond strength between such 
kind of particles. 
i would appreciate if you can help me.

-- 
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 #680258]: how to replace particle

2019-04-14 Thread lip
New question #680258 on Yade:
https://answers.launchpad.net/yade/+question/680258

hello
i want to know how to replace particles by thier id. For example, i have 
created many sphere particles using makecloud function, but i want to replace 
some sphere particles with polyhedra particles.Is there any function can help 
me do that job?
i would appreciate it if you can help me
 

-- 
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 #679264]: polyhedra particles deposit without angle of repose

2019-03-16 Thread lip
Question #679264 on Yade changed:
https://answers.launchpad.net/yade/+question/679264

lip gave more information on the question:
hello 
there is something wrong in my code,the original code is
makeCloud((0,0,0),(10,10, 100),psdSizes=[2,2,2],psdCumm=(0.5,0.8,1),seed=1)

-- 
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 #679264]: polyhedra particles deposit without angle of repose

2019-03-16 Thread lip
New question #679264 on Yade:
https://answers.launchpad.net/yade/+question/679264

hello 
i have create many paticles and they deposit in a box by gravity, and one side 
of box is consist of wall, after the deposit finished, i delete the wall and 
run the script again to let the particle flow. i have define the 
fricAngle=0.6rad, but the particles finially lay out in a layer, but not 
deposit with a angle as i expected.Here is my code:

from yade import polyhedra_utils,pack,plot,utils
import random

m = PolyhedraMat()
m.density = 2600  # kg/m^3
m.young = 1E7  # Pa
m.poisson = 2 / 1E6
m.frictionAngle = 0.6  # rad\

v1=((0,0,0),(0,0,10),(100,0,10))
v2=((0,0,0),(100,0,0),(100,0,10))
v5=((100,10,0),(0,10,10),(100,10,10))
v6=((100,10,0),(0,10,10),(0,10,0))
v7=((0,0,0),(0,10,10),(0,0,10))
v8=((0,0,0),(0,10,10),(0,10,0))
v9=((0,0,0),(100,10,0),(0,10,0))
v10=((0,0,0),(100,10,0),(100,0,0))

O.bodies.append(utils.facet(v1,material=m))
O.bodies.append(utils.facet(v2,material=m))
O.bodies.append(utils.facet(v5,material=m))
O.bodies.append(utils.facet(v6,material=m))
O.bodies.append(utils.facet(v7,material=m))
O.bodies.append(utils.facet(v8,material=m))
O.bodies.append(utils.facet(v9,material=m))
O.bodies.append(utils.facet(v10,material=m))


O.bodies.append(utils.wall(10, axis=0, sense=-1, material=m))





#polyhedra_utils.fillBox((0,0,0),(10,10,20),m,seed=1)


sp=pack.SpherePack()
sp.makeCloud((0,0,0),(10,10, 0),psdSizes=[2,2,2],psdCumm=(0.5,0.8,1),seed=1)

for center,radius in sp:
# note: new polyhedron for each cycle
t = polyhedra_utils.polyhedra(m,(radius,radius,radius))
t.state.pos = center # sets polyhedron position according to sphere position
O.bodies.append(t)

O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Polyhedra_Aabb(), Bo1_Wall_Aabb(), 
Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Wall_Polyhedra_PolyhedraGeom(), 
Ig2_Polyhedra_Polyhedra_PolyhedraGeom(),
 Ig2_Facet_Polyhedra_PolyhedraGeom()],
[Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()],  # collision "physics"
[Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()]  # contact law -- apply 
forces
),
# GravityEngine(gravity=(0,0,-9.81)),
NewtonIntegrator(damping=0.5, gravity=(0, 0, -9.81)),
PyRunner(command='checkUnbalanced()', realPeriod=3, label='checker')
]
O.dt=1e-2

# enable energy tracking; any simulation parts supporting it
# can create and update arbitrary energy types, which can be
# accessed as O.energy['energyName'] subsequently
O.trackEnergy=True
# if the unbalanced forces goes below .05, the packing
# is considered stabilized, therefore we stop collected
# data history and stop
def checkUnbalanced():
   if unbalancedForce()<.05:
  O.pause()
  #plot.saveDataTxt('bbb.txt.bz2')
  # plot.saveGnuplot('bbb') is also possible

# collect history of data which will be plotted
def addPlotData():
   # each item is given a names, by which it can be the unsed in plot.plots
   # the **O.energy converts dictionary-like O.energy to plot.addData arguments
   plot.addData(i=O.iter,unbalanced=unbalancedForce(),**O.energy)

# define how to plot data: 'i' (step number) on the x-axis, unbalanced force
# on the left y-axis, all energies on the right y-axis
# (O.energy.keys is function which will be called to get all defined energies)
# None separates left and right y-axis
plot.plots={'i':('unbalanced',None,O.energy.keys)}

# show the plot on the screen, and update while the simulation runs
plot.plot()

O.saveTmp()

i would appreciate if you can help me



-- 
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 #679083]: apply viscous force

2019-03-09 Thread lip
New question #679083 on Yade:
https://answers.launchpad.net/yade/+question/679083

hello 
i want to know how can i apply viscous force on the polyhedra particles when i 
simulate the flow of the particles
i would appreciate if you can help me 

-- 
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 #678816]: particle get through the facet

2019-02-26 Thread lip
New question #678816 on Yade:
https://answers.launchpad.net/yade/+question/678816

hello
i have created a box by yade.utils.facet, but the particle always get through 
the boundary consist of facet and only a part of particle collision with the 
facet. i thought it maybe bacouse i set the value of timestep is too high, so i 
change it to a more low value, but it did not work. what confused me is that 
when i change the boundary to wall, everything is just fine. here is my code:

from yade import polyhedra_utils,pack,plot,utils
import random

m = PolyhedraMat()
m.density = 2600  # kg/m^3
m.young = 1E6  # Pa
m.poisson = 2 / 1E6
m.frictionAngle = 0.6  # rad\

v1=((0,0,0),(0,0,10),(20,0,10))
v2=((0,0,0),(20,0,0),(20,0,10))
v3=((20,0,0),(20,10,10),(20,10,0))
v4=((20,0,0),(20,10,10),(20,0,10))
v5=((20,10,0),(0,10,10),(20,10,10))
v6=((20,10,0),(0,10,10),(0,10,0))
v7=((0,0,0),(0,10,10),(0,0,10))
v8=((0,0,0),(0,10,10),(0,10,0))
v9=((0,0,0),(20,10,0),(0,10,0))
v10=((0,0,0),(20,10,0),(20,0,0))

O.bodies.append(utils.facet(v1,material=m))
O.bodies.append(utils.facet(v2,material=m))
O.bodies.append(utils.facet(v3,material=m))
O.bodies.append(utils.facet(v4,material=m))
O.bodies.append(utils.facet(v5,material=m))
O.bodies.append(utils.facet(v6,material=m))
O.bodies.append(utils.facet(v7,material=m))
O.bodies.append(utils.facet(v8,material=m))
O.bodies.append(utils.facet(v9,material=m))
O.bodies.append(utils.facet(v10,material=m))


O.bodies.append(utils.wall(10, axis=0, sense=1, material=m))




O.bodies.append(utils.wall(-2, axis=2, sense=1, material=m))
polyhedra_utils.fillBox((0,0,0),(10,10,40),m,seed=1)

O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Polyhedra_Aabb(), Bo1_Wall_Aabb(), 
Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Wall_Polyhedra_PolyhedraGeom(), 
Ig2_Polyhedra_Polyhedra_PolyhedraGeom(),
 Ig2_Facet_Polyhedra_PolyhedraGeom()],
[Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()],  # collision "physics"
[Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()]  # contact law -- apply 
forces
),
# GravityEngine(gravity=(0,0,-9.81)),
NewtonIntegrator(damping=0.5, gravity=(0, 0, -9.81)),
PyRunner(command='checkUnbalanced()', realPeriod=3, label='checker')
]
O.dt=1e-2

# enable energy tracking; any simulation parts supporting it
# can create and update arbitrary energy types, which can be
# accessed as O.energy['energyName'] subsequently
O.trackEnergy=True
# if the unbalanced forces goes below .05, the packing
# is considered stabilized, therefore we stop collected
# data history and stop
def checkUnbalanced():
   if unbalancedForce()<.05:
  O.pause()
  O.bodies.erase(1)
  O.run()
  #plot.saveDataTxt('bbb.txt.bz2')
  # plot.saveGnuplot('bbb') is also possible

# collect history of data which will be plotted
def addPlotData():
   # each item is given a names, by which it can be the unsed in plot.plots
   # the **O.energy converts dictionary-like O.energy to plot.addData arguments
   plot.addData(i=O.iter,unbalanced=unbalancedForce(),**O.energy)

# define how to plot data: 'i' (step number) on the x-axis, unbalanced force
# on the left y-axis, all energies on the right y-axis
# (O.energy.keys is function which will be called to get all defined energies)
# None separates left and right y-axis
plot.plots={'i':('unbalanced',None,O.energy.keys)}

# show the plot on the screen, and update while the simulation runs
plot.plot()

O.saveTmp()

i would appreciate if you can help me





-- 
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 #678807]: how to view the size of randomly generated padticles

2019-02-26 Thread lip
Question #678807 on Yade changed:
https://answers.launchpad.net/yade/+question/678807

Status: Needs information => Open

lip gave more information on the question:
i want to know the number

-- 
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 #678807]: how to view the size of randomly generated padticles

2019-02-26 Thread lip
New question #678807 on Yade:
https://answers.launchpad.net/yade/+question/678807

hello
i want to know how to view the size of randomly generated padticles, such as 
paticle created by function polyhedra_fillbox.
i would apprecite it if you can help me


-- 
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 #678732]: how improve the speed of generate particle

2019-02-22 Thread lip
New question #678732 on Yade:
https://answers.launchpad.net/yade/+question/678732

i want to create many polyhedra in a box, but when the size of the box raech to 
40, the time cost of particle generated  reach to about 20 hours. my computer 
have 64 core, the cpu is Xeon, i used -j64 to run my code, but i found that the 
usage of cpu is only about 1%. i do not know why this happend, is there any way 
to speed it up?
i would appreciate if you can help me.

-- 
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 #678654]: imprort terrain file

2019-02-19 Thread lip
New question #678654 on Yade:
https://answers.launchpad.net/yade/+question/678654

hello
i want to know whether yade can import terrain file as the boundary.
i would appreciate if you can help me

-- 
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 #678558]: principle of contact detection about polyhedra

2019-02-14 Thread lip
New question #678558 on Yade:
https://answers.launchpad.net/yade/+question/678558

hello
i create many polyhedra to make them collison with each ohter, but when the 
numble of particles reach to 2000, the simulation become very slow. my computer 
have 64 cores ,the cpu is Xeon, 2.4Hz,i want to know the principle of the  
contact detection  between polyhedra to find out how can i improve the 
performance. my code is as below:
from yade import polyhedra_utils,pack,plot
import random

m = PolyhedraMat()
m.density = 2600  # kg/m^3
m.young = 1E6  # Pa
m.poisson = 2 / 1E6
m.frictionAngle = 0.6  # rad

O.bodies.append(utils.wall(-1, axis=2, sense=1, material=m))
O.bodies.append(utils.wall(20, axis=0, sense=-1, material=m))
O.bodies.append(utils.wall(0, axis=0, sense=1, material=m))
O.bodies.append(utils.wall(20, axis=1, sense=-1, material=m))
O.bodies.append(utils.wall(0, axis=1, sense=1, material=m))
# generate randomly spheres with uniform radius distribution
polyhedra_utils.fillBox((0,0,0),(20,20,20),m,seed=1)

O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Polyhedra_Aabb(), Bo1_Wall_Aabb(), 
Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Wall_Polyhedra_PolyhedraGeom(), 
Ig2_Polyhedra_Polyhedra_PolyhedraGeom(),
 Ig2_Facet_Polyhedra_PolyhedraGeom()],
[Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()],  # collision "physics"
[Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()]  # contact law -- apply 
forces
),
# GravityEngine(gravity=(0,0,-9.81)),
NewtonIntegrator(damping=0.5, gravity=(0, 0, -9.81)),
PyRunner(command='checkUnbalanced()', realPeriod=3, label='checker')
]
O.dt=1e-2

# enable energy tracking; any simulation parts supporting it
# can create and update arbitrary energy types, which can be
# accessed as O.energy['energyName'] subsequently
O.trackEnergy=True
# if the unbalanced forces goes below .05, the packing
# is considered stabilized, therefore we stop collected
# data history and stop
def checkUnbalanced():
   if unbalancedForce()<.05:
  O.bodies.erase(1)
  O.run()
  #plot.saveDataTxt('bbb.txt.bz2')
  # plot.saveGnuplot('bbb') is also possible

# collect history of data which will be plotted
def addPlotData():
   # each item is given a names, by which it can be the unsed in plot.plots
   # the **O.energy converts dictionary-like O.energy to plot.addData arguments
   plot.addData(i=O.iter,unbalanced=unbalancedForce(),**O.energy)

# define how to plot data: 'i' (step number) on the x-axis, unbalanced force
# on the left y-axis, all energies on the right y-axis
# (O.energy.keys is function which will be called to get all defined energies)
# None separates left and right y-axis
plot.plots={'i':('unbalanced',None,O.energy.keys)}

# show the plot on the screen, and update while the simulation runs
plot.plot()

O.saveTmp()

i would appreciate it if you can help me

-- 
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 #678152]: how can i use gpu in the part of contact detection

2019-01-28 Thread lip
New question #678152 on Yade:
https://answers.launchpad.net/yade/+question/678152

hello 
i have created a simulation of landsilide using polyhedra, but the contact 
detection cost too much if i just use cpu, is there any way apply GPU in that 
part? the docmentation yade provided said that GPU can only use in PFV(pore 
finite volume), then what does PFV mean, why can PFV use GPU?

-- 
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 #678150]: how can i creat the boundary of any shape

2019-01-28 Thread lip
New question #678150 on Yade:
https://answers.launchpad.net/yade/+question/678150

hello
i notice that yade provide the facet and wall boundary, but what if i want to 
creat a boundary of any shape ,such as surface boundary?
i would appreciate it if you can help me!

-- 
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 #678126]: how can i creat the boundary of any shape

2019-01-27 Thread lip
New question #678126 on Yade:
https://answers.launchpad.net/yade/+question/678126

hello
i notice that yade provide the facet and wall boundary, but what if i want to 
creat a boundary of any shape ,such as surface boundary?
i would appreciate it if you can help me!

-- 
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 #678124]: silulation can not quit

2019-01-27 Thread lip
New question #678124 on Yade:
https://answers.launchpad.net/yade/+question/678124

hello 
i was going to do creat a boundary consist of many walls, the particles 
deposited by gravity within the boundary, and then i want to remove one of the 
wall to destabilize the accumulation and let the particles flow along a chute. 
But i put the code which remove the wall in the checkUnbalance function and 
make the simulation can not quit, i do not know where to put the code to let 
the simulation quit. Below is my code:

from yade import polyhedra_utils,pack,plot
import random

m = PolyhedraMat()
m.density = 2600  # kg/m^3
m.young = 1E6  # Pa
m.poisson = 2 / 1E6
m.frictionAngle = 0.6  # rad

O.bodies.append(utils.wall(-1, axis=2, sense=1, material=m))
O.bodies.append(utils.wall(10, axis=0, sense=-1, material=m))
O.bodies.append(utils.wall(0, axis=0, sense=1, material=m))
O.bodies.append(utils.wall(10, axis=1, sense=-1, material=m))
O.bodies.append(utils.wall(0, axis=1, sense=1, material=m))
# generate randomly spheres with uniform radius distribution
polyhedra_utils.fillBox((0,0,0),(10,10,10),m,seed=1)

O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Polyhedra_Aabb(), Bo1_Wall_Aabb(), 
Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Wall_Polyhedra_PolyhedraGeom(), 
Ig2_Polyhedra_Polyhedra_PolyhedraGeom(),
 Ig2_Facet_Polyhedra_PolyhedraGeom()],
[Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()],  # collision "physics"
[Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()]  # contact law -- apply 
forces
),
# GravityEngine(gravity=(0,0,-9.81)),
NewtonIntegrator(damping=0.5, gravity=(0, 0, -9.81)),
PyRunner(command='checkUnbalanced()', realPeriod=3, label='checker')
]
O.dt=1e-2

# enable energy tracking; any simulation parts supporting it
# can create and update arbitrary energy types, which can be
# accessed as O.energy['energyName'] subsequently
O.trackEnergy=True
# if the unbalanced forces goes below .05, the packing
# is considered stabilized, therefore we stop collected
# data history and stop

def checkUnbalanced():
   if unbalancedForce()<.05:
  O.pause()
  O.bodies.erase(1)
  O.run()
  #plot.saveDataTxt('bbb.txt.bz2')
  # plot.saveGnuplot('bbb') is also possible

# collect history of data which will be plotted
def addPlotData():
   # each item is given a names, by which it can be the unsed in plot.plots
   # the **O.energy converts dictionary-like O.energy to plot.addData arguments
   plot.addData(i=O.iter,unbalanced=unbalancedForce(),**O.energy)

# define how to plot data: 'i' (step number) on the x-axis, unbalanced force
# on the left y-axis, all energies on the right y-axis
# (O.energy.keys is function which will be called to get all defined energies)
# None separates left and right y-axis
plot.plots={'i':('unbalanced',None,O.energy.keys)}

# show the plot on the screen, and update while the simulation runs
plot.plot()

O.saveTmp()



i would appreciate it if you can help me

-- 
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 #678125]: silulation can not quit

2019-01-27 Thread lip
New question #678125 on Yade:
https://answers.launchpad.net/yade/+question/678125

hello 
i was going to do creat a boundary consist of many walls, the particles 
deposited by gravity within the boundary, and then i want to remove one of the 
wall to destabilize the accumulation and let the particles flow along a chute. 
But i put the code which remove the wall in the checkUnbalance function and 
make the simulation can not quit, i do not know where to put the code to let 
the simulation quit. Below is my code:

from yade import polyhedra_utils,pack,plot
import random

m = PolyhedraMat()
m.density = 2600  # kg/m^3
m.young = 1E6  # Pa
m.poisson = 2 / 1E6
m.frictionAngle = 0.6  # rad

O.bodies.append(utils.wall(-1, axis=2, sense=1, material=m))
O.bodies.append(utils.wall(10, axis=0, sense=-1, material=m))
O.bodies.append(utils.wall(0, axis=0, sense=1, material=m))
O.bodies.append(utils.wall(10, axis=1, sense=-1, material=m))
O.bodies.append(utils.wall(0, axis=1, sense=1, material=m))
# generate randomly spheres with uniform radius distribution
polyhedra_utils.fillBox((0,0,0),(10,10,10),m,seed=1)

O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Polyhedra_Aabb(), Bo1_Wall_Aabb(), 
Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Wall_Polyhedra_PolyhedraGeom(), 
Ig2_Polyhedra_Polyhedra_PolyhedraGeom(),
 Ig2_Facet_Polyhedra_PolyhedraGeom()],
[Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()],  # collision "physics"
[Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()]  # contact law -- apply 
forces
),
# GravityEngine(gravity=(0,0,-9.81)),
NewtonIntegrator(damping=0.5, gravity=(0, 0, -9.81)),
PyRunner(command='checkUnbalanced()', realPeriod=3, label='checker')
]
O.dt=1e-2

# enable energy tracking; any simulation parts supporting it
# can create and update arbitrary energy types, which can be
# accessed as O.energy['energyName'] subsequently
O.trackEnergy=True
# if the unbalanced forces goes below .05, the packing
# is considered stabilized, therefore we stop collected
# data history and stop

def checkUnbalanced():
   if unbalancedForce()<.05:
  O.pause()
  O.bodies.erase(1)
  O.run()
  #plot.saveDataTxt('bbb.txt.bz2')
  # plot.saveGnuplot('bbb') is also possible

# collect history of data which will be plotted
def addPlotData():
   # each item is given a names, by which it can be the unsed in plot.plots
   # the **O.energy converts dictionary-like O.energy to plot.addData arguments
   plot.addData(i=O.iter,unbalanced=unbalancedForce(),**O.energy)

# define how to plot data: 'i' (step number) on the x-axis, unbalanced force
# on the left y-axis, all energies on the right y-axis
# (O.energy.keys is function which will be called to get all defined energies)
# None separates left and right y-axis
plot.plots={'i':('unbalanced',None,O.energy.keys)}

# show the plot on the screen, and update while the simulation runs
plot.plot()

O.saveTmp()



i would appreciate it if you can help me

-- 
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 #678049]: how to remove a wall

2019-01-24 Thread lip
New question #678049 on Yade:
https://answers.launchpad.net/yade/+question/678049

hello
i was going to do creat a boundary consist of many walls,  the particles 
deposited by gravity within the boundary, and then i want to remove one of the 
wall to destabilize the accumulation and let the particles flow along a chute. 
My question is how can i remove the wall and how can i achieve that?

-- 
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 #677977]: facet-polyhedra collision din not work

2019-01-22 Thread lip
Question #677977 on Yade changed:
https://answers.launchpad.net/yade/+question/677977

Status: Answered => Open

lip is still having a problem:
thank you for your advice, it do solve my problem. but i still have a
problem. When translate the facetBox to wall, the polyhedra contact the
wall and then stoped, my code is as below:

from yade import polyhedra_utils,pack,plot
import random

m = PolyhedraMat()
m.density = 2600  # kg/m^3
m.young = 1E6  # Pa
m.poisson = 2 / 1E6
m.frictionAngle = 0.6  # rad

O.bodies.append(utils.wall(-1, axis=2, sense=0, material=m))
# generate randomly spheres with uniform radius distribution
polyhedra_utils.fillBox((0,0,0),(10,10,10),m,seed=1)

O.engines=[
   ForceResetter(),
   
InsertionSortCollider([Bo1_Polyhedra_Aabb(),Bo1_Wall_Aabb(),Bo1_Facet_Aabb()]),
   InteractionLoop(
  # handle sphere+sphere and facet+sphere collisions
  
[Ig2_Wall_Polyhedra_PolyhedraGeom(),Ig2_Polyhedra_Polyhedra_PolyhedraGeom(),Ig2_Facet_Polyhedra_PolyhedraGeom()],
  [Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()],
  [Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()]
   ),
   NewtonIntegrator(gravity=(0,0,-2.81),damping=0.4),
   # call the checkUnbalanced function (defined below) every 2 seconds
   PyRunner(command='checkUnbalanced()',realPeriod=2),
   # call the addPlotData function every 200 steps
   PyRunner(command='addPlotData()',iterPeriod=100)
]
O.dt=1e-3

# enable energy tracking; any simulation parts supporting it
# can create and update arbitrary energy types, which can be
# accessed as O.energy['energyName'] subsequently
O.trackEnergy=True

# if the unbalanced forces goes below .05, the packing
# is considered stabilized, therefore we stop collected
# data history and stop
def checkUnbalanced():
   if unbalancedForce()<.05:
  O.pause()
  plot.saveDataTxt('bbb.txt.bz2')
  # plot.saveGnuplot('bbb') is also possible

# collect history of data which will be plotted
def addPlotData():
   # each item is given a names, by which it can be the unsed in plot.plots
   # the **O.energy converts dictionary-like O.energy to plot.addData arguments
   plot.addData(i=O.iter,unbalanced=unbalancedForce(),**O.energy)

# define how to plot data: 'i' (step number) on the x-axis, unbalanced force
# on the left y-axis, all energies on the right y-axis
# (O.energy.keys is function which will be called to get all defined energies)
# None separates left and right y-axis
plot.plots={'i':('unbalanced',None,O.energy.keys)}

# show the plot on the screen, and update while the simulation runs
plot.plot()

O.saveTmp()
##end
i would appreciate it if you can help me.

-- 
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 #677977]: facet-polyhedra collision din not work

2019-01-21 Thread lip
New question #677977 on Yade:
https://answers.launchpad.net/yade/+question/677977

hello
i have creat a fecetBox with many polyhedra in it and expect them collide with 
each other, but when i click the "start" button, the polyhedra just go through 
the facetBox. my code is as below:

from yade import polyhedra_utils,pack,plot
import random

polyMat = 
PolyhedraMat(density=3000,young=1e10,poisson=.5,frictionAngle=atan(0.8))
O.materials.append(polyMat)

O.bodies.append(geom.facetBox((5,5,5),(5,5,5),wallMask=31))
polyhedra_utils.fillBox((0,0,0),(10,10,10),polyMat,seed=1)

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Polyhedra_Aabb(),Bo1_Facet_Aabb()]),
   InteractionLoop(
  
[Ig2_Polyhedra_Polyhedra_PolyhedraGeom(),Ig2_Facet_Polyhedra_PolyhedraGeom()],
  [Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()],
  [Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()]
   ),
   NewtonIntegrator(gravity=(0,0,-9.81),damping=0.4),
   # call the checkUnbalanced function (defined below) every 2 seconds
   PyRunner(command='checkUnbalanced()',realPeriod=2),
   # call the addPlotData function every 200 steps
   PyRunner(command='addPlotData()',iterPeriod=100)
]
O.dt=.5*PWaveTimeStep()

# enable energy tracking; any simulation parts supporting it
# can create and update arbitrary energy types, which can be
# accessed as O.energy['energyName'] subsequently
O.trackEnergy=True

# if the unbalanced forces goes below .05, the packing
# is considered stabilized, therefore we stop collected
# data history and stop
def checkUnbalanced():
   if unbalancedForce()<.05:
  O.pause()
  plot.saveDataTxt('bbb.txt.bz2')
  # plot.saveGnuplot('bbb') is also possible

# collect history of data which will be plotted
def addPlotData():
   # each item is given a names, by which it can be the unsed in plot.plots
   # the **O.energy converts dictionary-like O.energy to plot.addData arguments
   plot.addData(i=O.iter,unbalanced=unbalancedForce(),**O.energy)

# define how to plot data: 'i' (step number) on the x-axis, unbalanced force
# on the left y-axis, all energies on the right y-axis
# (O.energy.keys is function which will be called to get all defined energies)
# None separates left and right y-axis
plot.plots={'i':('unbalanced',None,O.energy.keys)}

# show the plot on the screen, and update while the simulation runs
plot.plot()

O.saveTmp()
##end

i have no idea why this situation happend because when i tried with sphere, 
everything is just fine. i would appreciate it if you can help me!


-- 
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 #677941]: polyhedra collison simulation did not work

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

hello
i was tried to simulation polyhedra collison by many polyhedra in a box, my 
code is as below:

from yade import pack, polyhedra_utils,plot

polyMat = PolyhedraMat()
O.materials.append(polyMat)

sp=pack.SpherePack()
nSpheres=sp.makeCloud((0,0,0),(2,2,2),rMean=.1,periodic=True)

#replace the sphere with polyhedra
for center,radius in sp:
# note: new polyhedron for each cycle
t = polyhedra_utils.polyhedra(polyMat,(radius,radius,radius))
t.state.pos = center # sets polyhedron position according to sphere position
O.bodies.append(t)

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Polyhedra_Aabb(),Bo1_Facet_Aabb()]),
   InteractionLoop(
  
[Ig2_Polyhedra_Polyhedra_PolyhedraGeom(),Ig2_Facet_Polyhedra_PolyhedraGeom()],
  [Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()],
  [Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()]
   ),
   NewtonIntegrator(gravity=(0,0,-9.81),damping=0.4),
   # call the checkUnbalanced function (defined below) every 2 seconds
   PyRunner(command='checkUnbalanced()',realPeriod=2),
   # call the addPlotData function every 200 steps
   PyRunner(command='addPlotData()',iterPeriod=100)
]
O.dt=.5*PWaveTimeStep()

# enable energy tracking; any simulation parts supporting it
# can create and update arbitrary energy types, which can be
# accessed as O.energy['energyName'] subsequently
O.trackEnergy=True

# if the unbalanced forces goes below .05, the packing
# is considered stabilized, therefore we stop collected
# data history and stop
def checkUnbalanced():
   if unbalancedForce()<.05:
  O.pause()
  plot.saveDataTxt('bbb.txt.bz2')

def addPlotData():
   plot.addData(i=O.iter,unbalanced=unbalancedForce(),**O.energy)

plot.plots={'i':('unbalanced',None,O.energy.keys)}

# show the plot on the screen, and update while the simulation runs
plot.plot()

O.saveTmp()
##end
but when i click the start button, everything dissappear and send me a warn: 
WARN /usr/local/myYade/trunk/pkg/common/InsertionSortCollider.cpp:242 action: 
verletDist is set to 0 because no spheres were found. It will result in 
suboptimal performances, consider setting a positive verletDist in your script.
i don't where is wrong in my code. i would appreciate it if you can help me

-- 
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 #677828]: creat many polyhedra in a box

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

Status: Answered => Open

lip is still having a problem:
hello
i was tried to simulation polyhedra collison by many polyhedra in a box, my 
code is as below:

from yade import pack, polyhedra_utils,plot

polyMat = PolyhedraMat()
O.materials.append(polyMat)

sp=pack.SpherePack()
nSpheres=sp.makeCloud((0,0,0),(2,2,2),rMean=.1,periodic=True)

#replace the sphere with polyhedra
for center,radius in sp:
# note: new polyhedron for each cycle
t = polyhedra_utils.polyhedra(polyMat,(radius,radius,radius))
t.state.pos = center # sets polyhedron position according to sphere position
O.bodies.append(t)

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Polyhedra_Aabb(),Bo1_Facet_Aabb()]),
   InteractionLoop(
  
[Ig2_Polyhedra_Polyhedra_PolyhedraGeom(),Ig2_Facet_Polyhedra_PolyhedraGeom()],
  [Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()],
  [Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()]
   ),
   NewtonIntegrator(gravity=(0,0,-9.81),damping=0.4),
   # call the checkUnbalanced function (defined below) every 2 seconds
   PyRunner(command='checkUnbalanced()',realPeriod=2),
   # call the addPlotData function every 200 steps
   PyRunner(command='addPlotData()',iterPeriod=100)
]
O.dt=.5*PWaveTimeStep()

# enable energy tracking; any simulation parts supporting it
# can create and update arbitrary energy types, which can be
# accessed as O.energy['energyName'] subsequently
O.trackEnergy=True

# if the unbalanced forces goes below .05, the packing
# is considered stabilized, therefore we stop collected
# data history and stop
def checkUnbalanced():
   if unbalancedForce()<.05:
  O.pause()
  plot.saveDataTxt('bbb.txt.bz2')
 
def addPlotData():
   plot.addData(i=O.iter,unbalanced=unbalancedForce(),**O.energy)

plot.plots={'i':('unbalanced',None,O.energy.keys)}

# show the plot on the screen, and update while the simulation runs
plot.plot()

O.saveTmp()
##end
but when i click the start button, everything dissappear and send me a warn: 
WARN  /usr/local/myYade/trunk/pkg/common/InsertionSortCollider.cpp:242 action: 
verletDist is set to 0 because no spheres were found. It will result in 
suboptimal performances, consider setting a positive verletDist in your script.
i don't where is wrong in my code. i would appreciate it if you can help me

-- 
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 #677828]: creat many polyhedra in a box

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

Status: Solved => Open

lip is still having a problem:
Dear Jan,
Thank you for your advice, it do solve my problem. But i still have some 
questions.
first, what does the param ratio refer to in function fillBox?It gives very 
little information in the doc.
seccond, if i want to creat many polyhedra of different shape and size with 
fixed proportion and distribution in a box,  for example, in the flow 
simulation of concrete, i want to fine aggregate accounts for 10% and evenly 
distributed, the rest is coarse aggregate, is there any function can help me 
solve this problem?
i would appreciate if you can help me.

-- 
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 #677828]: creat many polyhedra in a box

2019-01-16 Thread lip
Question #677828 on Yade changed:
https://answers.launchpad.net/yade/+question/677828

Status: Answered => Solved

lip 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 #677831]: compiled yade with GPU acceration

2019-01-16 Thread lip
Question #677831 on Yade changed:
https://answers.launchpad.net/yade/+question/677831

Status: Answered => Solved

lip confirmed that the question is solved:
Thank you very much,this solved my problem

-- 
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 #677831]: compiled yade with GPU acceration

2019-01-15 Thread lip
New question #677831 on Yade:
https://answers.launchpad.net/yade/+question/677831

hello 
i have compiled yade with GPU successfully according to the Yade Documentation 
chapter 7:Accelerating Yade’s PFV scheme
with GPU. But in section 7.7, it mentioned that the GPU accelerated solver can 
be activated within Yade by setting flow.useSolver=4 and flow.multithread=True. 
I don't know when and where to set there two parameters, i would appreciate it 
if you can help me 

-- 
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 #677787]: creat many polyhedra in a box

2019-01-15 Thread lip
Question #677787 on Yade changed:
https://answers.launchpad.net/yade/+question/677787

Status: Answered => Solved

lip confirmed that the question is solved:
that solved my problem, thank you

-- 
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 #677828]: creat many polyhedra in a box

2019-01-15 Thread lip
New question #677828 on Yade:
https://answers.launchpad.net/yade/+question/677828

hello

i want to creat many polyhedra in a box with same size and i tried the code 
below, to replace the sphere with polyhedra i created:

from yade import pack, qt
from yade import polyhedra_utils,pack
import random

#creat a polyhedra
polyMat = 
PolyhedraMat(density=3000,young=1e10,poisson=.5,frictionAngle=atan(0.8))
O.materials.append(polyMat)
t=polyhedra_utils.polyhedra(polyMat,(.6,.6,.6),v=[(0,0,0),(0,0,1),(0,1,0),(1,0,0)])

sp=pack.SpherePack()
list=sp.makeCloud((0,0,0),(2,2,2),rMean=.1,rRelFuzz=.6,periodic=True)

#replace the sphere with polyhedra
for s in list
O.bodies.append(t)


but it didn't work, the list turn out to be an int type, not a list, i would 
appreciate it if you can help me 

-- 
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 #677787]: creat many polyhedra in a box

2019-01-14 Thread lip
New question #677787 on Yade:
https://answers.launchpad.net/yade/+question/677787

sir,i want to creat many polyhedra in a box,is there any function like 
makeCloud can help me do that?I have tried to use the method that usr makeCloud 
function to creat sphere first,and then place the polyhedra in where sphere 
locate,but it didn't work. Look forward for your answer

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