yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #22399
Re: [Question #688993]: polyhedrals after collide to facet, throwing away strongly
Question #688993 on Yade changed:
https://answers.launchpad.net/yade/+question/688993
Description changed to:
Hi everyone
I run this code for some polyhedrals, they fall down with gravity, but when polyhedrals collide to facet in bottom, all of them move up with high speed and spread in space. While they should stay on the floor for a little while.
note: Most of polyhedrals have sharp angle, does this have effect on this problem?
I would appreciate if you can help me.
ubuntu : 18.04
yade 2018.02b
too many input data.
my codes:
from yade import export,polyhedra_utils
import os
from yade import plot
import math
from yade import utils
import pylab
import matplotlib; matplotlib.rc('axes',grid=True)
from matplotlib import pyplot
import numpy as np
from numpy import *
from yade import export as expt
# Input data:
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,) # add z vertex to coordinates
Cordn2=Cordn+(0.5,) # add z vertex to coordinates
if not Cordn1 in Ver:
Ver=Ver+(Cordn1,Cordn2)
ListVer.append(Ver)
# Materials type:
Dolomite = PolyhedraMat()
Dolomite.density = 2870 #kg/m^3
Dolomite.young = 24.36e9 #Pa
Dolomite.poisson = 0.2
Dolomite.frictionAngle = radians(55.12) #rad
Bound = PolyhedraMat()
Bound.density = 2870 #kg/m^3
Bound.young = 60e10 #Pa
Bound.poisson = 0.2
Bound.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)))
v1=((-2.4993,-0.01,2),(-2,-0.01,2),(-2.4993,-0.01,-2))
v2=((-2,-0.01,2),(-2,-0.01,-2),(-2.4993,-0.01,-2))
v3=((-1.99,-0.01,2),(-1.99,-0.01,-2),(-1,-0.01,2))
v4=((-1,-0.01,2),(-1,-0.01,-2),(-1.99,-0.01,-2))
v5=((-0.99,-0.01,2),(-0.99,-0.01,-2),(1,-0.01,2))
v6=((1,-0.01,2),(1,-0.01,-2),(-0.99,-0.01,-2))
v7=((1.01,-0.01,2),(1.01,-0.01,-2),(2,-0.01,2))
v8=((2,-0.01,2),(2,-0.01,-2),(1.01,-0.01,-2))
v9=((2.01,-0.01,2),(2.01,-0.01,-2),(3,-0.01,2))
v10=((3,-0.01,2),(3,-0.01,-2),(2.01,-0.01,-2))
v11=((3.01,-0.01,2),(3.01,-0.01,-2),(4.58,-0.01,2))
v12=((4.58,-0.01,2),(4.58,-0.01,-2),(3.01,-0.01,-2))
v13=((4.6162,0.0059,2),(5.25,0.93,2),(4.6162,0.0059,-2))
v14=((5.25,0.93,2),(5.25,0.93,-2),(4.6162,0.0059,-2))
v15=((5.25,0.94,2),(5.25,0.94,-2),(6.42,2.57,2))
v16=((6.42,2.57,2),(6.42,2.57,-2),(5.25,0.94,-2))
v17=((6.42,2.58,2),(6.42,2.58,-2),(6.7906,3.01,2))
v18=((6.7906,3.01,2),(6.7906,3.01,-2),(6.42,2.58,-2))
v19=((6.7906,3.0162,2),(6.7939,4,2),(6.7906,3.0162,-2))
v20=((6.7906,3.0162,-2),(6.7939,4,-2),(6.7939,4,2))
v21=((6.7953,4.0079,2),(7.02,5.6,2),(6.7953,4.0079,-2))
v22=((7.02,5.6,2),(7.02,5.6,-2),(6.7953,4.0079,-2))
v23=((7.02,5.61,2),(7.02,5.61,-2),(7.3,7.01,2))
v24=((7.3,7.01,2),(7.3,7.01,-2),(7.02,5.61,-2))
v25=((7.3,7.02,2),(7.3,7.02,-2),(7.54,8.51,2))
v26=((7.54,8.51,2),(7.54,8.51,-2),(7.3,7.02,-2))
v27=((7.54,8.52,2),(7.54,8.52,-2),(7.8,10,2))
v28=((7.8,10,2),(7.8,10,-2),(7.54,8.52,-2))
v29=((7.8,10.01,2),(7.8,10.01,-2),(8.14,12,2))
v30=((8.14,12,2),(8.14,12,-2),(7.8,10.01,-2))
v31=((8.14,12.01,2),(8.14,12.01,-2),(8.5,14,2))
v32=((8.5,14,2),(8.5,14,-2),(8.14,12,-2))
v33=((8.5,14.01,2),(8.5,14.01,-2),(8.75,15.5,2))
v34=((8.75,15.5,2),(8.75,15.5,-2),(8.5,14.01,-2))
v35=((8.75,15.51,2),(8.75,15.51,-2),(9.0615,16.9981,2))
v36=((9.0615,16.9981,2),(9.0615,16.9981,-2),(8.75,15.51,-2))
v37=((9.0621,17.0187,2),(9.09,19,2),(9.0621,17.087,-2))
v38=((9.09,19,2),(9.09,19,-2),(9.062,17.0187,-2))
v39=((9.09,19.01,2),(9.09,19.01,-2),(9.2006,20.9992,2))
v40=((9.2006,20.9992,2),(9.2006,20.9992,-2),(9.09,19.01,-2))
v41=((2.2009,21.0924,2),(2.2009,21.0924,-2),(2.22,19.01,2))
v42=((2.22,19.01,2),(2.22,19.01,-2),(2.2009,21.0924,-2))
v43=((2.22,19,2),(2.22,19,-2),(2.1538,17.043,2))
v44=((2.1538,17.043,2),(2.1538,17.043,-2),(2.22,19,-2))
v45=((2.0524,17.0104,2),(2.0524,17.0104,-2),(1.76,15.01,2))
v46=((1.76,15.01,2),(1.76,15.01,-2),(2.0524,17.0104,-2))
v47=((1.76,15,2),(1.76,15,-2),(1.42,13.01,2))
v48=((1.42,13.01,2),(1.42,13.01,-2),(1.76,15,-2))
O.bodies.append(utils.facet(v1,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v2,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v3,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v4,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v5,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v6,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v7,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v8,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v9,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v10,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v11,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v12,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v13,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v14,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v15,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v16,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v17,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v18,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v19,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v20,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v21,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v22,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v23,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v24,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v25,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v26,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v27,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v28,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v29,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v30,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v31,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v32,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v33,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v34,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v35,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v36,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v37,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v38,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v39,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v40,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v41,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v42,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v43,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v44,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v45,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v46,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v47,color=(1,0,1), material=Bound))
O.bodies.append(utils.facet(v48,color=(1,0,1), material=Bound))
# block z translation and block x, y, z rotations
for b in O.bodies:
if b.material is Dolomite:
b.state.blockedDOFs='zXY'
# function for calming particles
def calm():
for c in O.bodies:
c.state.vel=Vector3(0,0,0)
c.state.angVel=Vector3(0,0,0)
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Polyhedra_Aabb(),Bo1_Facet_Aabb()],verletDist=0.05), # 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(),Ig2_Facet_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),
]
utils.calm()
# 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-5
O.saveTmp()
O.run()
ii1=O.iter
if ii1>1000:
calmRunner.dead=True
--
You received this question notification because your team yade-users is
an answer contact for Yade.