yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #21007
[Question #685203]: problem in moving particles and existence of weight force on each particle
New question #685203 on Yade:
https://answers.launchpad.net/yade/+question/685203
Hello everyone
I have modeled some polyhedrons in space that have to move downwards due to gravity and then hit the floor and stop and place like a pile on ground.
I have some problem:
1- When the polyhedrons are coming down, no force is applied on them! why? Must be weight force on all the particles.
2- All the particles move down same as a block, non of them act lonely, even those particles that are on the sides and are completely free to fall down.
3- Particles move down very very very slow! Why? For saving time, when the particles are moving down, I increase the gravity to 100000 (with simulation inspect window) for fast movement and when they are near the ground, I set real gravity. But when the lower particles reach the ground the whole particles stop moving and nothing happens! they have to place in form of a pile.
Thanks for your patient
Best regards,
Mahdeyeh
'ring.txt' is in first comment.
Here is the codes:
import numpy as np
from numpy import *
RawVer=np.genfromtxt('ring.txt',names=True,dtype=None)
# ListVer is list of all the vertices of ring`s polygons
Ver=()
ListVer=[]
for b in RawVer:
if b[0]=='*LWPOLYLINE':
ListVer.append(Ver)
Ver=()
continue
Cordn=b[0]
Cordn=np.fromstring(Cordn, sep=',')
Cordn=tuple(Cordn.tolist())
Cordn1=Cordn+(0.1,) # add z vertex to coordinates
Cordn2=Cordn+(0.2,) # add z vertex to coordinates
if not Cordn1 in Ver:
Ver=Ver+(Cordn1,Cordn2)
ListVer.append(Ver)
RawVer1=np.genfromtxt('boundary.txt',names=True,dtype=None)
# ListVer is list of all the vertices of boundary`s polygons
Ver1=()
ListVer1=[]
for b in RawVer1:
if b[0]=='*LWPOLYLINE':
ListVer1.append(Ver1)
Ver1=()
continue
Cordn=b[0]
Cordn=np.fromstring(Cordn, sep=',')
Cordn=tuple(Cordn.tolist())
Cordn1=Cordn+(-2,) # add z vertex to coordinates
Cordn2=Cordn+(2,) # add z vertex to coordinates
if not Cordn1 in Ver1:
Ver1=Ver1+(Cordn1,Cordn2)
ListVer1.append(Ver1)
from yade import plot, polyhedra_utils
Dolomite = PolyhedraMat()
Dolomite.density = 2870 #kg/m^3
Dolomite.young = 24.36e9 #Pa
Dolomite.poisson = 0.2
Dolomite.frictionAngle = radians(55.12) #rad
for ii in ListVer:
O.bodies.append(polyhedra_utils.polyhedra(Dolomite,v=ii,fixed=False, color=(0.1,0.5,0.2), mask=3))
for iii in ListVer1:
O.bodies.append(polyhedra_utils.polyhedra(Dolomite,v=iii,fixed=True, color=(1,1,1), mask=4))
O.bodies.erase(341) # delete wall under ring: id: 341
# returns a value that can be useful for evaluating the stability of the packing. It is defined as (mean force on particles)/(mean contact force), so that it tends to 0 in a stable packing.
def checkUnbalancedI():
print "iter %d , unbalanced forces %f"%(O.iter, utils.unbalancedForce()) # %[(keyname)][flags][width][.precision]typecode : String Formatting
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Polyhedra_Aabb(),]), # We can set collider's verletDist to a fraction of the polyhedra minimum size, since it determines how much is each body enlarged to avoid collision detection at every step.
InteractionLoop(
[Ig2_Polyhedra_Polyhedra_PolyhedraGeom(),],
[Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()], # collision "physics"
[Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()] # contact law -- apply forces
),
NewtonIntegrator(gravity=(0,-9.81,0),damping=0.2),
PyRunner(command='checkUnbalancedI()',iterPeriod=1000,realPeriod=3600,label='checker') # call our function defined above every 3600 second or 500 cycles
]
# the model has to calm, because there are some overlaps in particles.
O.engines=O.engines+[PyRunner(iterPeriod=20,command='calm()',label="calmRunner")] # because we need to calm only on the first few steps in our model.
O.dt=10e-6
iii=0
while iii<50:
O.run(1000,True)
for b in O.bodies:
x,y,z=b.state.pos[0],b.state.pos[1],b.state.pos[2]
print x,y,z
iii+=1
here is the boundary.txt:
*LWPOLYLINE
4.08255289437355,10.09276250439400
4.08255289437355,10.09267857306840
1.10586584671010,10.07329237103019
1.10586584671010,10.09157421969086
4.08255289437355,10.09276250439400
*LWPOLYLINE
2.99998810347806,4.00000313063418
2.99999580536406,4.00000313063418
4.08257892143658,10.09266327552933
4.08255971098529,10.09266327552933
2.99998810347806,4.00000313063418
*LWPOLYLINE
2.99999775296742,4.00000184118644
2.99999775296742,3.99999621450540
0.00001072960445,3.99999621450540
0.00001072960445,4.00000143090761
2.99999775296742,4.00000184118644
*LWPOLYLINE
0.00001072960445,-0.00101851609184
0.00001072960445,-0.00102332221523
6.73102849650382,-0.00102332221523
6.73102672595532,-0.00101804720175
0.00001072960445,-0.00101851609184
*LWPOLYLINE
6.73102610626334,-0.00101628886392
6.73103044410717,-0.00101628886392
6.74417862583885,3.99999123254822
6.74373784778834,3.99999123254822
6.73102610626334,-0.00101628886392
*LWPOLYLINE
6.74054678821628,3.01646737237143
6.74054678821628,3.01622648008920
4.57127199826347,-0.00101605441888
4.57126509312429,-0.00101605441888
6.74054678821628,3.01646737237143
*LWPOLYLINE
6.74394420521669,4.00000471313822
6.74397262252020,4.00000471313822
9.00000729919090,17.00000025330731
9.00000375809388,17.00000025330731
6.74394420521669,4.00000471313822
*LWPOLYLINE
9.00199854656797,17.00025743952006
9.00307114485281,17.00025743952006
9.15994103424950,20.99918197533170
9.15058935115142,20.99918197533170
9.00199854656797,17.00025743952006
*LWPOLYLINE
2.99999978909820,4.00000201702022
2.99999978909820,3.99999592144909
4.40711072453751,3.99999592144909
4.40711072453751,4.00000365813553
2.99999978909820,4.00000201702022
*LWPOLYLINE
0.93992738492143,10.08756919501224
0.93233447618162,10.08756919501224
2.09931423935388,17.01043053746017
2.11236344742409,17.01043053746017
0.93992738492143,10.08756919501224
*LWPOLYLINE
2.21380206652951,17.01191891181903
2.20071718190691,17.01191891181903
2.23533459218311,21.09244556170691
2.25092002246048,21.09244556170691
2.21380206652951,17.01191891181903
--
You received this question notification because your team yade-users is
an answer contact for Yade.