Re: [Yade-users] [Question #692660]: Heterogeneous complex material shape

2020-08-29 Thread Jan Stránský
Question #692660 on Yade changed:
https://answers.launchpad.net/yade/+question/692660

Status: Open => Answered

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

as discussed in mentioned question/256038, you can use pack.inGtsSurface for 
this purpose:
###
import gts
from yade import pack
horseFile = 
"/home/honzik/programs/yade/trunk/examples/gts-horse/horse.coarse.gts"
with open(horseFile) as f:
   horse = gts.read(f)
horse.scale(100,100,100)
O.bodies.append(pack.gtsSurface2Facets(horse))
s1 = sphere((0,0,0),1)
s2 = sphere((2,0,0),1)
s3 = sphere((4,0,0),1)
sphs = (s1,s2,s3)
O.bodies.append(sphs)

pred = pack.inGtsSurface(horse)
for sph in sphs:
   center = sph.state.pos
   radius = sph.shape.radius
   # "call" the predicate to test if a sphere/point is inside
   print("sphere ({},{}) inside: {}".format(center,radius,pred(center,radius)))
   print("center {} inside: {}".format(center,pred(center,0)))
###
The "left" sphere is "almost" inside, but along -x axis it is outside, 
therefore the result False.

the testing horse.coarse.gts is part of yade project [1].
The inGtsSurface testing is not exact [2], it checks 6 points (center +- radius 
along 3 axes) to be inside the mesh. You can test more points "manually" if 
desired (line center in the above example)

the gts surface can be loaded from file or constructed programatically.

cheers
Jan

[1] 
https://gitlab.com/yade-dev/trunk/-/blob/master/examples/gts-horse/horse.coarse.gts
[2] 
https://yade-dem.org/doc/yade.pack.html#yade._packPredicates.inGtsSurface.__init__

-- 
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 #692660]: Heterogeneous complex material shape

2020-08-29 Thread Jan Stránský
Question #692660 on Yade changed:
https://answers.launchpad.net/yade/+question/692660

Jan Stránský posted a new comment:
> O.bodies.append(pack.gtsSurface2Facets(horse))

just a note, it is not needed to convert the surface to simulation, I
put it there just for illustration. The surface can be just the surface
for the point-inside-testing, no facets needed.

-- 
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 #692660]: Heterogeneous complex material shape

2020-08-29 Thread Christoph Tuitz
New question #692660 on Yade:
https://answers.launchpad.net/yade/+question/692660

Hi,

I know there are ways to use the plane equation to check if a DE is in the 
positive or negative halfspace (question/256038) to be able to delete it or 
assign properties. But what if I want to check if a DE is inside a complex 
shaped mesh, eg a surface that is created by  superposed folding like a egg 
container.

I read about another method in which rays are send out and depending on if the 
number of mesh intersections are even or odd the DE is outside or inside. It 
sounds pretty easy but the detection of intersections is not so straight 
forward. Anyway if it is necessary  I will do it.

Before I go that route is there something already in YADE that  I can use 
instead?

Thanks
Chris





-- 
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 #692609]: Triaxial test of cylindrical specimens

2020-08-29 Thread Jan Stránský
Question #692609 on Yade changed:
https://answers.launchpad.net/yade/+question/692609

Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,
one option is the "discretize" the cylindrical surface e.g. with boxes and 
apply forces the the boxes.
This can simulate confining pressure on cylindrical-shaped specimen.
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


[Yade-users] [Question #692650]: How to use the DFNFlowEngine

2020-08-29 Thread Huang peilun
New question #692650 on Yade:
https://answers.launchpad.net/yade/+question/692650

Hi,

I am trying to simulation a standard penetration test on saturated soil. I've 
been told that the FlowEngine is restricted to quasi-static regimes and may not 
be suitable for the penetration test. Therefore, I want to use DFNFlowEngine 
instead. 

However, I didn't find any instructions about DFNFlowEngine on Yade 
Documentation and don't have a clue how to use it. I'd be appreciate if 
somebody could show me some related articles or examples.

Thanks in advance.


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