Re: [Yade-users] [Question #665540]: particles partially in the wall

2018-03-14 Thread JOHN
Question #665540 on Yade changed:
https://answers.launchpad.net/yade/+question/665540

JOHN 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 #665540]: particles partially in the wall

2018-03-14 Thread JOHN
Question #665540 on Yade changed:
https://answers.launchpad.net/yade/+question/665540

Status: Answered => Solved

JOHN confirmed that the question is solved:
Thanks for that, wall stiffness helped considerable
regards 
John

-- 
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 #665540]: particles partially in the wall

2018-03-13 Thread Jan Stránský
Question #665540 on Yade changed:
https://answers.launchpad.net/yade/+question/665540

Status: Open => Answered

Jan Stránský proposed the following answer:
Hi John,

please really try to make the example be working, i.e. try to run it
yourself. There are too many undefined variables (e.g. restart could be
tested True or False, but loc2glob is missing completely..)

To prevent particles go through walls, you can try:
- increase stiffness of walls or both walls and particles
- decrease time step (if your problem is not in stable regime)

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 #665540]: particles partially in the wall

2018-03-13 Thread JOHN
Question #665540 on Yade changed:
https://answers.launchpad.net/yade/+question/665540

Status: Needs information => Open

JOHN gave more information on the question:
boundaries =  [-75.0, 75.4, -75.013, 75.387, 0.0, 15.201]

Yadesimulation.run("maze1.stl",boundaries2,0,100)


So the problem is, this will propably not show the error.  The thing that 
causes it ironically i dont have the right to give. 
I was hoping more on a general method on how to extract particles from the wall 
the fastest with the least amount of unphysical behaviour possible for a 
general case


I appreciate the difficulty of the question and i really appreciate your help 
so far

-- 
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 #665540]: particles partially in the wall

2018-03-13 Thread Jan Stránský
Question #665540 on Yade changed:
https://answers.launchpad.net/yade/+question/665540

Status: Open => Needs information

Jan Stránský requested more information:
thanks for the file. Now please make the example working :-D i.e. with what 
arguments do you call run(...)?
thx
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 #665540]: particles partially in the wall

2018-03-13 Thread JOHN
Question #665540 on Yade changed:
https://answers.launchpad.net/yade/+question/665540

Status: Needs information => Open

JOHN gave more information on the question:
http://dropmefiles.com/zwMDt


But the issue appears almost randomly after some rotations.

-- 
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 #665540]: particles partially in the wall

2018-03-13 Thread Jan Stránský
Question #665540 on Yade changed:
https://answers.launchpad.net/yade/+question/665540

Status: Open => Needs information

Jan Stránský requested more information:
Please also provide the stl file
thanks
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 #665540]: particles partially in the wall

2018-03-13 Thread JOHN
Question #665540 on Yade changed:
https://answers.launchpad.net/yade/+question/665540

Status: Needs information => Open

JOHN gave more information on the question:
Hello,
the used timestep is 
O.dt=.8*PWaveTimeStep()
and the initialization deletes all the particles that are initially partly or 
fully inside the walls

-- 
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 #665540]: particles partially in the wall

2018-03-13 Thread JOHN
Question #665540 on Yade changed:
https://answers.launchpad.net/yade/+question/665540

Status: Solved => Open

JOHN is still having a problem:
minimal working example follows


def run(name,boundaries,r,gap,numStepsPerIteration):


facets = ymport.stl(name)

rod1 = O.bodies.append(facets)



# converts facets to gts (see the other question)

s = gts.Surface()

for facet in facets:

   vs = [facet.state.pos + facet.state.ori*v for v in
facet.shape.vertices]

   vs = [gts.Vertex(v[0],v[1],v[2]) for v in vs]

   es = [gts.Edge(vs[i],vs[j]) for i,j in
((0,1),(1,2),(2,0))]

   f = gts.Face(es[0],es[1],es[2])

   s.add(f)

print s.is_closed()

threshold = 1e-3

s.cleanup(threshold)

print s.is_closed()

assert s.is_closed()

# use gts to filter spheres

pred = inGtsSurface(s)







sp=pack.regularHexa(pack.inAlignedBox((boundaries[0],boundaries[2],boundaries[4]),(boundaries[1],boundaries[3],boundaries[5])),radius=r,gap=gap)



# remove spheres completely inside walls

for b in sp:

   if pred(b.state.pos,0):

  continue

   O.bodies.append(b)


# remove spheres partially inside walls

O.dt = 0

O.step() # interactions are created afterwards

toErase = set()

for i in O.interactions:

   b1,b2 = [O.bodies[i] for i in (i.id1,i.id2)]

   if any(isinstance(b.shape,Facet) for b in (b1,b2)): #
if facet is involved, delete

  toErase.add(b1)

  toErase.add(b2)

toErase = [b for b in toErase if
isinstance(b.shape,Sphere)] # delete just spheres


if not restart:

for b in toErase: # delete the spheres

   O.bodies.erase(b.id)


#generate the initial global index list

for b in O.bodies:

if isinstance(b.shape,Sphere):

loc2glob.append(b.id)




O.engines=[



   ForceResetter(),

InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),

   InteractionLoop(

# handle sphere+sphere and facet+sphere collisions

[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],

  [Ip2_FrictMat_FrictMat_FrictPhys()],

  [Law2_ScGeom_FrictPhys_CundallStrack()]

   ),

   NewtonIntegrator(gravity=(0,-9.81,0),damping=0.4,
label='newtonInt'),







]

O.dt=.8*PWaveTimeStep()

O.step()

-- 
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 #665540]: particles partially in the wall

2018-03-13 Thread JOHN
Question #665540 on Yade changed:
https://answers.launchpad.net/yade/+question/665540

Status: Open => Solved

JOHN confirmed that the question is solved:
minimal working example follows


def run(name,boundaries,r,gap,numStepsPerIteration):


facets = ymport.stl(name)

rod1 = O.bodies.append(facets)



# converts facets to gts (see the other question)

s = gts.Surface()

for facet in facets:

   vs = [facet.state.pos + facet.state.ori*v for v in
facet.shape.vertices]

   vs = [gts.Vertex(v[0],v[1],v[2]) for v in vs]

   es = [gts.Edge(vs[i],vs[j]) for i,j in
((0,1),(1,2),(2,0))]

   f = gts.Face(es[0],es[1],es[2])

   s.add(f)

print s.is_closed()

threshold = 1e-3

s.cleanup(threshold)

print s.is_closed()

assert s.is_closed()

# use gts to filter spheres

pred = inGtsSurface(s)







sp=pack.regularHexa(pack.inAlignedBox((boundaries[0],boundaries[2],boundaries[4]),(boundaries[1],boundaries[3],boundaries[5])),radius=r,gap=gap)



# remove spheres completely inside walls

for b in sp:

   if pred(b.state.pos,0):

  continue

   O.bodies.append(b)


# remove spheres partially inside walls

O.dt = 0

O.step() # interactions are created afterwards

toErase = set()

for i in O.interactions:

   b1,b2 = [O.bodies[i] for i in (i.id1,i.id2)]

   if any(isinstance(b.shape,Facet) for b in (b1,b2)): #
if facet is involved, delete

  toErase.add(b1)

  toErase.add(b2)

toErase = [b for b in toErase if
isinstance(b.shape,Sphere)] # delete just spheres


if not restart:

for b in toErase: # delete the spheres

   O.bodies.erase(b.id)


#generate the initial global index list

for b in O.bodies:

if isinstance(b.shape,Sphere):

loc2glob.append(b.id)




O.engines=[



   ForceResetter(),

InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),

   InteractionLoop(

# handle sphere+sphere and facet+sphere collisions

[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],

  [Ip2_FrictMat_FrictMat_FrictPhys()],

  [Law2_ScGeom_FrictPhys_CundallStrack()]

   ),

   NewtonIntegrator(gravity=(0,-9.81,0),damping=0.4,
label='newtonInt'),







]

O.dt=.8*PWaveTimeStep()

O.step()

-- 
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 #665540]: particles partially in the wall

2018-03-13 Thread Jan Stránský
Question #665540 on Yade changed:
https://answers.launchpad.net/yade/+question/665540

Status: Open => Needs information

Jan Stránský requested more information:
Hi John,
please provide a MWE. E.g., the used time step could affect this
thanks
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 #665540]: particles partially in the wall

2018-03-13 Thread JOHN
Question #665540 on Yade changed:
https://answers.launchpad.net/yade/+question/665540

Description changed to:
Good evening,
I run a very simple simulation with default material. As it turns out,  some of 
the particles find themselves partially inside the walls after some iterations. 
This is to be expected of a DEM method, but they can exit on their own. Is 
there a way to fix this?
I would expect the forces produced by the wall sphere interaction to be strong 
enough to take every particle out by the time the system rests.


Thank you very much for any help.
Best Regards
John


PS the simulation is really simple, just an exit taken from the example
and a function to calculate a new gravity vector when the system rests.

-- 
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 #665540]: particles partially in the wall

2018-03-13 Thread JOHN
Question #665540 on Yade changed:
https://answers.launchpad.net/yade/+question/665540

Description changed to:
Good evening,
I run a very simple simulation with default material. As it turns out,  some of 
the particles find themselves partially inside the walls after some iterations. 
This is to be expected of a DEM method, but they can exit on their own. Is 
there a way to fix this?
I would expect the forces produced by the wall sphere interaction to be strong 
enough to take every particle out by the time the system rests.


Thank you very much for any help.
Best Regards
John

-- 
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 #665540]: particles partially in the wall

2018-03-13 Thread JOHN
New question #665540 on Yade:
https://answers.launchpad.net/yade/+question/665540

Good evening,
I run a very simple simulation with default material. As it turns out,  some of 
the particles find themselves partially inside the walls after some iterations. 
This is to be expected of a DEM method, but they can exit on their own. Is 
there a way to fix this?
I would expect the forces produced by the wall sphere interaction to be strong 
enough to take every particle out by the time the system rests.
Thank you very much for any help.
Best Regards
Ioannis

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