Question #673023 on Yade changed:
https://answers.launchpad.net/yade/+question/673023
Status: Answered => Open
jacopo is still having a problem:
Hi jan, thanks for your help. I modified the script as you suggest me
and it is working (when the box hits the soil, it decelerates and
breaks). As you said i need to clump it, but i'm facing this error:
python: /build/yade-2_s9R0/yade-1.20.0/core/Clump.cpp:211: static void
Clump::updateProperties(const boost::shared_ptr<Body>&, unsigned int):
asserzione "M>0" non riuscita.
Annullato (core dump creato)
i provide a minimal script:
#####################################
########### BOX 1 ###################
#####################################
facets=geom.facetBox((4,0,0),(1.2,1.2,1.2),wallMask=63)
clumpID = O.bodies.appendClumped(facets)
clump = O.bodies[clumpID]
for b in O.bodies:
b.dynamic=True
b.state.mass=1
b.state.inertia=(0.1,0.5,0.4)
b.fixed=True
################
##box material##
################
idCA=FrictMat(density=2227,frictionAngle=radians(0.5),label='CA',young=30e9,poisson=0.15)
O.materials.append(idCA)
############################
####### BOX 2 ##############
############################
O.bodies.append(geom.facetBox((0,0,0),(2,2,2),wallMask=29))
#################
##soil material##
#################
idSoil=FrictMat(density=1500,frictionAngle=radians(29),label='soil',young=11277647.5,poisson=0.21)
O.materials.append(idSoil)
############################
pred=pack.inAlignedBox((-2,-2,-2),(2,2,2))
spheres=pack.regularHexa(pred,radius=0.1,gap=0)
O.bodies.append(spheres)
###################
###################
###################
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
#TranslationEngine(translationAxis=(-1,0,0),velocity=18,ids=lista,label='trans'),
NewtonIntegrator(gravity=(0,0,-9.81),damping=0),
PyRunner(command='inizio()',iterPeriod=1),
]
################
####funzioni####
################
def inizio():
if O.iter < 2:
for i in range(0,12) :
O.bodies[i].state.vel=(-18,0,0)
O.dt=0.8*PWaveTimeStep()
O.saveTmp()
########################################
########################################
->NOTE:
changing the first part of the script "BOX 1" with the following script you
could see what i'm trying to do:
#####################################
########### BOX 1 ###################
#####################################
O.bodies.append(geom.facetBox((4,0,0),(1.2,1.2,1.2),wallMask=63))
for b in O.bodies:
b.dynamic=True
b.state.mass=10
b.state.inertia=(0.1,0.5,0.4)
b.fixed=True
In particular, in my project, i have a much more complicated shape then a box.
If i use the same identical logic of the provided script i can observe that my
object is still moving at the same velocity . I try to explain better: while
the first part of my object hits the soil and starts to decelerate and break
itself, the not in contact parts continue their movement with the same
starting velocity. My question is :
-> clumping all my object facets, will they start to decelerate even if they
aren't directly in contact with the soil?
I'm sorry for the last questions, i read the guidelines, i hope to not
make any other mistakes.
--
You received this question notification because your team yade-users is
an answer contact for Yade.
_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help : https://help.launchpad.net/ListHelp