← Back to team overview

yade-users team mailing list archive

Re: [Question #235259]: How to count number of interactions

 

Question #235259 on Yade changed:
https://answers.launchpad.net/yade/+question/235259

Jan Stránský proposed the following answer:
Hello Reza,

how do you (what command do you use) to get the number of interactions? and
how often dou you use it? the interaction between the sphere and floor
would ocure in only a few time steps in total I would guess..
cheers
Jan

PS: btw, from where did you get the engines? L3Geom is not maintained
AFAIK, ScGeom is more standard.. anyway should not be related to your
problem


2013/9/6 Reza Housseini <question235259@xxxxxxxxxxxxxxxxxxxxx>

> New question #235259 on Yade:
> https://answers.launchpad.net/yade/+question/235259
>
> I want to count the number of collisions between some spheres and a facet.
> I thought this could be achieved by using the InteractionContainer
> O.interactions. But for my simple baby example there are no countable
> interactions.
>
>   tc = 0.001
>   en = 0.8
>   es = 0.2
>   params = utils.getViscoelasticFromSpheresInteraction(tc, en, es)
>   frictMatId =
> O.materials.append(NormalInelasticMat(density=300.0,poisson=0.5,young=1e9))
>
>   ballId=O.bodies.append([
>     utils.sphere(center=(0.5,0.5,0.5),radius=.05,material=frictMatId)
>   ])
>
>   floor = pack.sweptPolylines2gtsSurface(
>     [[
>       Vector3(0.0,0.0,0.0),
>       Vector3(1.0,0.0,0.0),
>       Vector3(1.0,1.0,0.0),
>       Vector3(0.0,1.0,0.0),
>     ]],
>     capStart=True,capEnd=True
>   )
>   floorIds = O.bodies.append(pack.gtsSurface2Facets(floor))
>
>   O.engines=[
>      ForceResetter(),
>      InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
>      InteractionLoop(
>         [Ig2_Facet_Sphere_L3Geom(),Ig2_Sphere_Sphere_L3Geom()],        #
> collision geometry
>         [Ip2_FrictMat_FrictMat_FrictPhys()], # collision "physics"
>         [Law2_L3Geom_FrictPhys_ElPerfPl()]   # contact law -- apply forces
>      ),
>
> HarmonicMotionEngine(A=(0.0,0.0,5.25e-3),f=(0.0,0.0,1000/60.0),ids=floorIds),
>     NewtonIntegrator(damping=0.2,gravity=(0,0,-9.81))
>   ]
>
>   O.dt=0.01*tc
>   O.run(2000000,True)
>
> What is the cause of this? Do I interpret the InteractionContainer wrong?
>
> Thanks for any advice
>
> Cheers Reza
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.