Discussion:
[deprecated list] Box or facet
Anton Gladky
2009-06-24 08:27:42 UTC
Permalink
I would like to know what is the main difference between Box and Facet
geometry? And what is better and more reliable?
What is better interaction model Box-Sphere or Facet-Sphere?
I appreciate any comments.

Thank you.
______________________________
[ENG] Best Regards
[GER] Mit freundlichen GrÌßen
[RUS] С МаОлучшОЌО пПжелаМОяЌО
[UKR] З МайкращОЌО пПбажаММяЌО

Anton Gladkyy
Václav Šmilauer
2009-06-24 22:13:11 UTC
Permalink
Post by Anton Gladky
I would like to know what is the main difference between Box and Facet
geometry? And what is better and more reliable?
What is better interaction model Box-Sphere or Facet-Sphere?
I appreciate any comments.
Boxes suck, sphere-box interaction is modeled as contact with fictive
sphere. For anything that is beyond simple elasticity, use Facets. You
can also make arbitrary triangulated surfaces with facets (especially
with GTS which I am integrating right now), which is not possible with
boxes.

OTOH, Facets have no mass, therefore cannot be dynamic (they can move,
but not as a result of impacts etc).

Vaclav



_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to : yade-***@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help : https://help.launchpad.net/ListHelp
Anton Gladky
2009-06-25 09:24:29 UTC
Permalink
Works perfect!
String with utils.alignedFacetBox drops off a lot of my code and that's
good.

But there is also a problem with "segmentation fault" in come cases.
______________________________
[ENG] Best Regards
[GER] Mit freundlichen GrÌßen
[RUS] С МаОлучшОЌО пПжелаМОяЌО
[UKR] З МайкращОЌО пПбажаММяЌО

Anton Gladkyy
Post by Václav Šmilauer
Post by Anton Gladky
I would like to know what is the main difference between Box and Facet
geometry? And what is better and more reliable?
What is better interaction model Box-Sphere or Facet-Sphere?
I appreciate any comments.
Boxes suck, sphere-box interaction is modeled as contact with fictive
sphere. For anything that is beyond simple elasticity, use Facets. You
can also make arbitrary triangulated surfaces with facets (especially
with GTS which I am integrating right now), which is not possible with
boxes.
OTOH, Facets have no mass, therefore cannot be dynamic (they can move,
but not as a result of impacts etc).
Vaclav
_______________________________________________
Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
More help : https://help.launchpad.net/ListHelp
Václav Šmilauer
2009-06-25 09:28:19 UTC
Permalink
Post by Anton Gladky
But there is also a problem with "segmentation fault" in come cases.
What cases? The vertical one? I will have a look at the in the train
now. Segfaults are grave errors that shouldn't never happen under normal
circumstances. (Except when closing yade, there is some issue with
python/log4cxx finalization). I will add check for coincident edges in
Facet's constructor.

Vaclav


_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users-oU9gvf+***@public.gmane.org
Unsubscribe : https://launchpad.net/~yade-users
More help : https://help.launchpad.net/ListHelp
Anton Gladky
2009-06-26 12:22:42 UTC
Permalink
Post by Václav Šmilauer
OTOH, Facets have no mass, therefore cannot be dynamic (they can move,
but not as a result of impacts etc).
How can I make facets move? I was trying to add to utils.py

pp={'se3':[center[0],center[1],center[2],1,0,0,0],'refSe3':[center[0],center[1],center[2],1,0,0,0],'young':young,'poisson':poisson,'frictionAngle':frictionAngle,'inertia':[0,0,0],
'velocity':[velocity[0],velocity[1],velocity[2]]}

But it did not help
Post by Václav Šmilauer
_______________________________________________
Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
More help : https://help.launchpad.net/ListHelp
______________________________
[ENG] Best Regards
[GER] Mit freundlichen GrÌßen
[RUS] С МаОлучшОЌО пПжелаМОяЌО
[UKR] З МайкращОЌО пПбажаММяЌО

Anton Gladkyy
Václav Šmilauer
2009-06-26 12:39:01 UTC
Permalink
Post by Anton Gladky
pp={'se3':[center[0],center[1],center[2],1,0,0,0],'refSe3':[center[0],center[1],center[2],1,0,0,0],'young':young,'poisson':poisson,'frictionAngle':frictionAngle,'inertia':[0,0,0],
'velocity':[velocity[0],velocity[1],velocity[2]]}
You have to use TranslationEngine and subscribe facets to it. That's
what I do. See e.g. scripts/test/Dem3DofGeom.py for an example. The
sphere is moved that way. Facet ids are returned by O.bodies.append.

ids=O.bodies.append([utils.facet(...),utils.facet(...)])

print ids ## [0,1,2,3,4]
O.engines=[...,TranslationEngine(subscribedBodies=ids,translationAxis=[0,0,1],velocity=1),...]

HTH, Vaclav


_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users-oU9gvf+***@public.gmane.org
Unsubscribe : https://launchpad.net/~yade-users
More help : https://help.launchpad.net/ListHelp
Anton Gladky
2009-06-26 12:50:14 UTC
Permalink
Amazing, but it works!
Thank you!
______________________________
[ENG] Best Regards
[GER] Mit freundlichen GrÌßen
[RUS] С МаОлучшОЌО пПжелаМОяЌО
[UKR] З МайкращОЌО пПбажаММяЌО

Anton Gladkyy
Post by Anton Gladky
pp={'se3':[center[0],center[1],center[2],1,0,0,0],'refSe3':[center[0],center[1],center[2],1,0,0,0],'young':young,'poisson':poisson,'frictionAngle':frictionAngle,'inertia':[0,0,0],
Post by Anton Gladky
'velocity':[velocity[0],velocity[1],velocity[2]]}
You have to use TranslationEngine and subscribe facets to it. That's what I
do. See e.g. scripts/test/Dem3DofGeom.py for an example. The sphere is moved
that way. Facet ids are returned by O.bodies.append.
ids=O.bodies.append([utils.facet(...),utils.facet(...)])
print ids ## [0,1,2,3,4]
O.engines=[...,TranslationEngine(subscribedBodies=ids,translationAxis=[0,0,1],velocity=1),...]
HTH, Vaclav
_______________________________________________
Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
More help : https://help.launchpad.net/ListHelp
Anton Gladky
2009-06-26 14:50:39 UTC
Permalink
How can I get forces affected on 1 facet from spheres: I need it for plot?

Thank you

PS I promise, that I will place all answers to instructions or FAQ.
______________________________
[ENG] Best Regards
[GER] Mit freundlichen GrÌßen
[RUS] С МаОлучшОЌО пПжелаМОяЌО
[UKR] З МайкращОЌО пПбажаММяЌО

Anton Gladkyy
Post by Anton Gladky
Amazing, but it works!
Thank you!
______________________________
[ENG] Best Regards
[GER] Mit freundlichen GrÌßen
[RUS] С МаОлучшОЌО пПжелаМОяЌО
[UKR] З МайкращОЌО пПбажаММяЌО
Anton Gladkyy
Post by Anton Gladky
pp={'se3':[center[0],center[1],center[2],1,0,0,0],'refSe3':[center[0],center[1],center[2],1,0,0,0],'young':young,'poisson':poisson,'frictionAngle':frictionAngle,'inertia':[0,0,0],
Post by Anton Gladky
'velocity':[velocity[0],velocity[1],velocity[2]]}
You have to use TranslationEngine and subscribe facets to it. That's what
I do. See e.g. scripts/test/Dem3DofGeom.py for an example. The sphere is
moved that way. Facet ids are returned by O.bodies.append.
ids=O.bodies.append([utils.facet(...),utils.facet(...)])
print ids ## [0,1,2,3,4]
O.engines=[...,TranslationEngine(subscribedBodies=ids,translationAxis=[0,0,1],velocity=1),...]
HTH, Vaclav
_______________________________________________
Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
More help : https://help.launchpad.net/ListHelp
Jerome Duriez
2009-06-26 15:21:12 UTC
Permalink
Unfortunately I know very very few python, so I do not know how to do
this in this framework. With C++ instructions, (inside the code) it is
like that

dynamic_cast<Force*>(*Metabody-*>physicalActions->find(*id_facet*,actionForce->getClassIndex())
. get() )->force;
(I see clearly what can be the advantages of python by writing this...)

An intermediate mean for you is (until someone can answer you more
precisely) to add an Engine "ForceRecorder" (source in
pkg/dem/Engine/StandAloneEngine/), defined with the id of the facet, to
o.engines. This will store the force you want in an output file you can
later analyse with the software you want.

Jerome
Post by Anton Gladky
How can I get forces affected on 1 facet from spheres: I need it for plot?
Thank you
PS I promise, that I will place all answers to instructions or FAQ.
______________________________
[ENG] Best Regards
[GER] Mit freundlichen GrÌßen
[RUS] С МаОлучшОЌО пПжелаМОяЌО
[UKR] З МайкращОЌО пПбажаММяЌО
Anton Gladkyy
Amazing, but it works!
Thank you!
______________________________
[ENG] Best Regards
[GER] Mit freundlichen GrÌßen
[RUS] С МаОлучшОЌО пПжелаМОяЌО
[UKR] З МайкращОЌО пПбажаММяЌО
Anton Gladkyy
pp={'se3':[center[0],center[1],center[2],1,0,0,0],'refSe3':[center[0],center[1],center[2],1,0,0,0],'young':young,'poisson':poisson,'frictionAngle':frictionAngle,'inertia':[0,0,0],
'velocity':[velocity[0],velocity[1],velocity[2]]}
You have to use TranslationEngine and subscribe facets to it.
That's what I do. See e.g. scripts/test/Dem3DofGeom.py for an
example. The sphere is moved that way. Facet ids are returned
by O.bodies.append.
ids=O.bodies.append([utils.facet(...),utils.facet(...)])
print ids ## [0,1,2,3,4]
O.engines=[...,TranslationEngine(subscribedBodies=ids,translationAxis=[0,0,1],velocity=1),...]
HTH, Vaclav
_______________________________________________
Mailing list: https://launchpad.net/~yade-users
<https://launchpad.net/%7Eyade-users>
Unsubscribe : https://launchpad.net/~yade-users
<https://launchpad.net/%7Eyade-users>
More help : https://help.launchpad.net/ListHelp
------------------------------------------------------------------------
_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Unsubscribe : https://launchpad.net/~yade-users
More help : https://help.launchpad.net/ListHelp
Anton Gladky
2009-06-26 16:04:02 UTC
Permalink
Thank you, Jerome! Will try your supposed way.
______________________________
[ENG] Best Regards
[GER] Mit freundlichen GrÌßen
[RUS] С МаОлучшОЌО пПжелаМОяЌО
[UKR] З МайкращОЌО пПбажаММяЌО

Anton Gladkyy
Post by Jerome Duriez
Unfortunately I know very very few python, so I do not know how to do
this in this framework. With C++ instructions, (inside the code) it is like
that
dynamic_cast<Force*>(*Metabody-*>physicalActions->find(*id_facet*,actionForce->getClassIndex())
. get() )->force;
(I see clearly what can be the advantages of python by writing this...)
An intermediate mean for you is (until someone can answer you more
precisely) to add an Engine "ForceRecorder" (source in
pkg/dem/Engine/StandAloneEngine/), defined with the id of the facet, to
o.engines. This will store the force you want in an output file you can
later analyse with the software you want.
Jerome
How can I get forces affected on 1 facet from spheres: I need it for plot?
Thank you
PS I promise, that I will place all answers to instructions or FAQ.
______________________________
[ENG] Best Regards
[GER] Mit freundlichen GrÌßen
[RUS] С МаОлучшОЌО пПжелаМОяЌО
[UKR] З МайкращОЌО пПбажаММяЌО
Anton Gladkyy
Post by Anton Gladky
Amazing, but it works!
Thank you!
______________________________
[ENG] Best Regards
[GER] Mit freundlichen GrÌßen
[RUS] С МаОлучшОЌО пПжелаМОяЌО
[UKR] З МайкращОЌО пПбажаММяЌО
Anton Gladkyy
Post by Anton Gladky
pp={'se3':[center[0],center[1],center[2],1,0,0,0],'refSe3':[center[0],center[1],center[2],1,0,0,0],'young':young,'poisson':poisson,'frictionAngle':frictionAngle,'inertia':[0,0,0],
Post by Anton Gladky
'velocity':[velocity[0],velocity[1],velocity[2]]}
You have to use TranslationEngine and subscribe facets to it. That's
what I do. See e.g. scripts/test/Dem3DofGeom.py for an example. The sphere
is moved that way. Facet ids are returned by O.bodies.append.
ids=O.bodies.append([utils.facet(...),utils.facet(...)])
print ids ## [0,1,2,3,4]
O.engines=[...,TranslationEngine(subscribedBodies=ids,translationAxis=[0,0,1],velocity=1),...]
HTH, Vaclav
_______________________________________________
Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
More help : https://help.launchpad.net/ListHelp
------------------------------
_______________________________________________
Mailing list: https://launchpad.net/~yade-users <https://launchpad.net/%7Eyade-users>
Unsubscribe : https://launchpad.net/~yade-users <https://launchpad.net/%7Eyade-users>
More help : https://help.launchpad.net/ListHelp
_______________________________________________
Mailing list: https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
Unsubscribe : https://launchpad.net/~yade-users<https://launchpad.net/%7Eyade-users>
More help : https://help.launchpad.net/ListHelp
eudoxos
2009-06-27 09:14:05 UTC
Permalink
Have a look at scripts/simple-scene-graph.py (it uses the old syntax for
instantiating yade classes, but you will figure that out. There is bunch of
comments there) There is something at
http://yade.wikia.com/wiki/PythonPlotting, but it is a little out-of-date.
I will write something more elaborate beginning next week. Regards,

Vaclav
_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users-oU9gvf+***@public.gmane.org
Unsubscribe : https://launchpad.net/~yade-users
More help : https://help.launchpad.net/ListHelp
eudoxos
2009-06-27 09:22:46 UTC
Permalink
Oh, BTW, to get the force acting on body #1, use O.bex.f(1), for torque,
use O.bex.t(1) and so forth.
Post by eudoxos
Have a look at scripts/simple-scene-graph.py (it uses the old syntax for
instantiating yade classes, but you will figure that out. There is bunch of
comments there) There is something at
http://yade.wikia.com/wiki/PythonPlotting, but it is a little
out-of-date.
Post by eudoxos
I will write something more elaborate beginning next week. Regards,
Vaclav
_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Unsubscribe : https://launchpad.net/~yade-users
More help : https://help.launchpad.net/ListHelp
_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users-oU9gvf+***@public.gmane.org
Unsubscribe : https://launchpad.net/~yade-users
More help : https://help.launchpad.net/ListHelp

Loading...