Re: [Yade-users] [Question #681356]: How to get the informations of interaction between polyhedras?

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

Status: Answered => Solved

De zhang 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 #681356]: How to get the informations of interaction between polyhedras?

2019-06-12 Thread Jan Stránský
Question #681356 on Yade changed:
https://answers.launchpad.net/yade/+question/681356

Status: Open => Answered

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

> PolyhedraGeom().contactPoint" ... and
"PolyhedraGeom().penetrationVolume

PolyhedraGeom() creates new instance, with no relation to any existing 
interactions. Do something like:
###
for i in O.interactions:
   pv = i.geom.penetrationVolume
   cp = i.geom.contactPoint
###
or
###
i = O.interactions[id1,id2]
i.geom.whatever
###

cheers
Jan

-- 
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 #681356]: How to get the informations of interaction between polyhedras?

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

De zhang gave more information on the question:
When I pause the process of simulation, I tried "PolyhedraGeom().contactPoint" 
it return the Vector3(0,0,0) and "PolyhedraGeom().penetrationVolume" was also 
tried with the result of "Nan", so how to get above informations?
Thanks

-- 
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 #681356]: How to get the informations of interaction between polyhedras?

2019-06-12 Thread De zhang
New question #681356 on Yade:
https://answers.launchpad.net/yade/+question/681356

Hi,
During the simulation of the interactions between two polyhedrons or one 
polyhedron and wall, I want to detect the equivalent CrossSection, penetration 
Volume and depth, contact point between them. I tried wrapper of 
PolyhedraGeom() such as contactPoint, equivalentCrossSection, penetrationVolume 
and something else, but it returned nothing for that.  Please tell me how to 
get these informations during the simulation. 

Following are the simple example   for two polyhedrons contact:

from yade import pack,export
from yade import polyhedra_utils
from yade import geom,utils,ymport
from yade import qt
from yade import *

matP = PolyhedraMat()
matP.density = 2500 #kg/m^3 
matP.young = 3e8
matP.poisson = 0.21 # real 0.21
matP.frictionAngle = 0.65

O.materials.append(matP)

matW = PolyhedraMat()
matW.density = 1950 #kg/m^3 
matW.young = 6e7
matW.poisson = 0.33 # real 0.21
matW.frictionAngle = 0.23

O.materials.append(matW)

b1 = polyhedra_utils.polyhedra(matP,size=(0.046,0.046,0.046),seed=4)
b1.state.pos=(0.2,0.2,0.46)
O.bodies.append(b1)

b2=polyhedra_utils.polyhedra(matW,v=((0,0,0.35),(0.4,0,0.35),(0.4,0.4,0.35),(0,0.4,0.35),(0,0,0.4),(0.4,0,0.4),(0.4,0.4,0.4),(0,0.4,0.4)),fixed=True,
 color=(0.75,0.65,0.65))
O.bodies.append(b2)
O.bodies[1].state.blockedDOFs='xyzXYZ'

O.forces.setPermF(O.bodies[0].id,(0,0,-100))

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(),Ig2_Sphere_Sphere_ScGeom()],

[Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys(),Ip2_FrictMat_PolyhedraMat_FrictPhys(),Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()],
),
NewtonIntegrator(damping=0.7,gravity=(0,0,-9.81),label='newton'),
#PyRunner(command='IniBalance()',iterPeriod=1,label='step')
]

O.dt = 0.01

O.pause()

qt.Controller()
V = qt.View()
V.screenSize = (550,450)
V.sceneRadius = 1
V.eyePosition = (0.7,0.5,0.1)
V.upVector = (0,0,1)
V.lookAt = (0.15,0.15,0.1)

#

Thanks a lot
best regard!
Dez


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