Re: [Yade-users] [Question #675879]: Polyhedron interaction with sphere

2018-11-08 Thread Nishant
Question #675879 on Yade changed:
https://answers.launchpad.net/yade/+question/675879

Nishant posted a new comment:
@Jan: "there is no interaction at all during the simulation. This definitely 
would be a problem."
--> When the simulation continues, there is an interaction, but without a 
dictionary. This was an issue for me. I just created the example with O.step() 
to show the problem.

@ Robert: I also confirm that the problem is gone on 18.04 with latest
trunk version, and O.interaction has a dictionary at the first time
step. :)

Any suggestions how to make the example working on other os? Do I need
to update some libraries?

Thank you

-- 
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 #675879]: Polyhedron interaction with sphere

2018-11-06 Thread Nishant
Question #675879 on Yade changed:
https://answers.launchpad.net/yade/+question/675879

Nishant posted a new comment:
@Jan: following your advice, I installed the newest trunk version
(2018-11-05) - not the almost-newest version.

eps_pos = 0.0 does not show interaction on Ubuntu 16.04. 
Maybe going 18.04 is the way to go?

-- 
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 #675246]: inertia calculation facetbox

2018-11-02 Thread Nishant
Question #675246 on Yade changed:
https://answers.launchpad.net/yade/+question/675246

Status: Answered => Solved

Nishant confirmed that the question is solved:
Thanks Bruno Chareyre, 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


[Yade-users] [Question #675879]: Polyhedron interaction with sphere

2018-11-02 Thread Nishant
New question #675879 on Yade:
https://answers.launchpad.net/yade/+question/675879

Hello,

I was understanding how polyhedron interacts with sphere in yade and 
encountered a problem with the dictionary of the interaction.

I created a system with one sphere and a box (made by polyhedron). The box 
touches the sphere from the bottom and has a velocity. I look at the 
interaction between the box and sphere after a time step. Below is the MWE:

#

from yade import pack,polyhedra_utils
import shutil, sys, imp
import numpy as np

#--- System definition --
rad_p = 0.1
Xl = 0.
Yl = 0.
Xr = 1.
Yr = 1.
Zl = rad_p
Zr = 1.
eps_pos = 1e-5
#--
O.bodies.append([sphere((0.5*(Xl+Xr)+eps_pos,0.5*(Yl+Yr),0.0),rad_p, fixed = 
True) ]) # Sphere object

O.bodies.append(polyhedron([(Xl,Yl,Zl),(Xr,Yl,Zl),(Xl,Yr,Zl),(Xr,Yr,Zl),(Xl,Yl,Zr),(Xr,Yl,Zr),(Xl,Yr,Zr),(Xr,Yr,Zr)],wire=False,dynamic=True))
 # polyhedron which compresses the sphere
#

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(), Bo1_Box_Aabb(), 
Bo1_Wall_Aabb(), Bo1_Polyhedra_Aabb()],allowBiggerThanPeriod=True),
 InteractionLoop(
 [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom(), 
Ig2_Wall_Sphere_ScGeom(), Ig2_Sphere_Polyhedra_ScGeom()],
 [Ip2_FrictMat_FrictMat_MindlinPhys()],
 [Law2_ScGeom_MindlinPhys_Mindlin()]
 ),
 PyRunner(command = 'load()', iterPeriod = 1, label = "checker"),
 NewtonIntegrator(gravity=(0,0,0.0),damping = 0.0)
]

def load():
 O.bodies[1].state.vel = Vector3(0,0,-1e-5)

 if ( O.iter > 3):
  O.pause()

#---
O.dt=.5e-0*PWaveTimeStep()
O.stopAtIter= int(1e6)
O.step()

#---
Case I: If the sphere is positioned not at the center of box bottom face 
(non-zero eps_pos in the code above), O.interactions[0,1].phys.dict() gives 
correct interaction parameters.

Case II: When the sphere is located just at the center of the box (eps_pos = 
0), there is an interaction between the two objects, but without any dictionary.

#Yade [1]: O.interactions[0,1].phys.dict()
#---
#AttributeError Traceback (most recent call last)
#/home/nishantkumar/Desktop/Yade201802b/build/bins/yade-2018.02b in ()
#> 1 O.interactions[0,1].phys.dict()

#AttributeError: 'NoneType' object has no attribute 'dict'

Any reason for this?

-- 
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 #675246]: inertia calculation facetbox

2018-11-01 Thread Nishant
Question #675246 on Yade changed:
https://answers.launchpad.net/yade/+question/675246

Status: Solved => Open

Nishant is still having a problem:
Hello,

I was understanding how polyhedron interacts with sphere in yade and
encountered a problem with the dictionary of the interaction.

I created a system with one sphere and a box (made by polyhedron). The
box touches the sphere from the bottom and has a velocity. I look at the
interaction between the box and sphere after a time step. Below is the
MWE:

#

from yade import pack,polyhedra_utils
import shutil, sys, imp
import numpy as np

#--- System definition  --
rad_p = 0.1 
Xl = 0.
Yl = 0.
Xr = 1.
Yr = 1.
Zl = rad_p
Zr = 1.
eps_pos = 1e-5
#--
O.bodies.append([sphere((0.5*(Xl+Xr)+eps_pos,0.5*(Yl+Yr),0.0),rad_p, fixed = 
True) ]) # Sphere object

O.bodies.append(polyhedron([(Xl,Yl,Zl),(Xr,Yl,Zl),(Xl,Yr,Zl),(Xr,Yr,Zl),(Xl,Yl,Zr),(Xr,Yl,Zr),(Xl,Yr,Zr),(Xr,Yr,Zr)],wire=False,dynamic=True))
 # polyhedron which compresses the sphere
#

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(), 
Bo1_Box_Aabb(), Bo1_Wall_Aabb(), 
Bo1_Polyhedra_Aabb()],allowBiggerThanPeriod=True),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom(), 
Ig2_Wall_Sphere_ScGeom(), Ig2_Sphere_Polyhedra_ScGeom()],
[Ip2_FrictMat_FrictMat_MindlinPhys()],
[Law2_ScGeom_MindlinPhys_Mindlin()]
),
PyRunner(command = 'load()', iterPeriod = 1, label = "checker"),
NewtonIntegrator(gravity=(0,0,0.0),damping = 0.0)
]

def load():
O.bodies[1].state.vel = Vector3(0,0,-1e-5)

if ( O.iter > 3):  
O.pause()

#---
O.dt=.5e-0*PWaveTimeStep()
O.stopAtIter= int(1e6)
O.step()

#---
Case I: If the sphere is positioned not at the center of box bottom face 
(non-zero eps_pos in the code above), O.interactions[0,1].phys.dict() gives 
correct interaction parameters.

Case II: When the sphere is located just at the center of the box
(eps_pos = 0), there is an interaction between the two objects, but
without any dictionary.

#Yade [1]: O.interactions[0,1].phys.dict()
#---
#AttributeErrorTraceback (most recent call last)
#/home/nishantkumar/Desktop/Yade201802b/build/bins/yade-2018.02b in ()
#> 1 O.interactions[0,1].phys.dict()

#AttributeError: 'NoneType' object has no attribute 'dict'


Any reason for this?

-- 
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 #675246]: inertia calculation facetbox

2018-10-25 Thread Nishant
Question #675246 on Yade changed:
https://answers.launchpad.net/yade/+question/675246

Status: Answered => Solved

Nishant confirmed that the question is solved:
Thanks Bruno Chareyre, 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 #675246]: inertia calculation facetbox

2018-10-25 Thread Nishant
Question #675246 on Yade changed:
https://answers.launchpad.net/yade/+question/675246

Nishant posted a new comment:
Yes,  facetbox is not a polyhedron (in yade sense).

I was looking for an object that interact with the particle bed and is dynamic 
in nature.  
Polyhedron, so far working well.

Thank Bruno!

-- 
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 #675246]: inertia calculation facetbox

2018-10-24 Thread Nishant
Question #675246 on Yade changed:
https://answers.launchpad.net/yade/+question/675246

Status: Answered => Open

Nishant is still having a problem:
@Robert: Running the simulation for a longer time did not solve the
problem.

@ Bruno: Thanks for the suggestion. I used Polyhedra, following some
examples from the trunk, and is working well. Did not try Pfacets
though.

Just to know: the Polyhedra in yade are dynamic in nature and are non-
deformable bodies?

-- 
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 #675246]: inertia calculation facetbox

2018-10-16 Thread Nishant
New question #675246 on Yade:
https://answers.launchpad.net/yade/+question/675246



Hi,

I am performing compression test with a facetbox with mass. I assign masses to 
the 12 facets in the facetbox. Then I perform Updateclumpproperties step, and 
get mass and intertia of the facetbox.

Below is an example with a cube.
The mass of the box from yade is correct. I expect the interia tensor with 
identical components values in the three rotation axes for a cube. This is not 
the case though. Any idea?
-
from yade import pack
import shutil, sys, imp
import numpy as np

density_box = 3000.0
Mat_box=O.materials.append(FrictMat(young=1e8,density=density_box,poisson=0.2,frictionAngle=np.arctan(0.0)))

L = 1.0;
M_total = density_box*L*L*L
box_id = []
box_id.append(O.bodies.append(geom.facetBox(center=(L/2.0,L/2.0,L/2.0),extents 
= (L/2.0,L/2.0,L/2.0), material = Mat_box, wallMask=63)))
box_id=sum(box_id,[])
O.bodies.clump(box_id)

for ijk in box_id:
if isinstance(O.bodies[ijk].shape,Facet):
O.bodies[ijk].state.mass = M_total/12.0
O.bodies[ijk].state.inertia = 
(1/12.0)*(M_total/12.0)*Vector3(2.0*L*L,2.0*L*L,2.0*L*L)

O.bodies.updateClumpProperties(discretization=100)
print O.bodies[-1].state.mass
print O.bodies[-1].state.inertia

-- 
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 #668496]: Using PFacet/facetBox

2018-05-05 Thread Nishant
Question #668496 on Yade changed:
https://answers.launchpad.net/yade/+question/668496

Status: Answered => Open

Nishant is still having a problem:
Thank you Bruno for your reply.

Actually, I had over-simplified the question in the post.

I am working on cyclic compression of railway ballast bed by concrete
Sleeper using yade. The Sleeper has a height and covers ONLY a part of
the bed. Therefore, I decided to use the facetbox to model Sleeper -
suggested here as well[1].

There are possibilities of contacts at the edges and corners of the
Sleeper. These contacts are stiff with Facetbox due to multiple contact
points.

This is the problem I am hoping to resolve. Any suggestion in this
matter on Sleeper modeling would be very helpful.

Regards,


[1]: https://answers.launchpad.net/yade/+question/230299

-- 
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 #668496]: Using PFacet/facetBox

2018-05-02 Thread Nishant
New question #668496 on Yade:
https://answers.launchpad.net/yade/+question/668496

In my simulations, sphere falls under gravity on a plate. The plate is modeled 
using facetbox. The sphere falls at the center of bottom. When the sphere 
touches the plate, I expect one interaction.

Here is a MWE:
#--

from yade import pack, qt, export
import numpy as np

#-
##Defining Box
O.periodic=False

# No side boundaries, just a plane!
O.bodies.append(geom.facetBox(center=(0.5,0.5,0.5),extents = (0.5,0.5,0.5), 
wallMask= 16)) 

#-
O.bodies.append([sphere((0.5,0.5,0.2001),radius=0.2)]) # add a sphere

#-
##Engine Definition

O.engines=[
 ForceResetter(),
 
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()],allowBiggerThanPeriod=True),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
   ),
 PyRunner(command = 'output()', iterPeriod = 1, label = "checker"),
 NewtonIntegrator(gravity=(0,0,-9.81),damping=0.0)
]

#-

def output():
 if (O.iter < 20):
  count_intrs = 0.0
  for i in O.interactions:
   if i.isReal:
count_intrs += 1.0
  print "time:", O.time, "Sphere position", (O.bodies[-1].state.pos[2]), 
"contacts", count_intrs, "force", O.forces.f(O.bodies[-1].id)[2]
 else:
  print "done"
  O.pause()

#-

O.dt = 5e-1*PWaveTimeStep()
O.run()

#--
#--


Using facetbox, I see two interactions and a stiffer contact. How to resolve 
this? Maybe Pfacet, as suggested to me here [1]? Anyone solved a similar 
problem?

Thanks

[1]: https://answers.launchpad.net/yade/+question/665675

-- 
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 #665675]: Facet mesh

2018-03-28 Thread Nishant
Question #665675 on Yade changed:
https://answers.launchpad.net/yade/+question/665675

Status: Answered => Solved

Nishant 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 #665675]: Facet mesh

2018-03-15 Thread Nishant
Question #665675 on Yade changed:
https://answers.launchpad.net/yade/+question/665675

Status: Answered => Open

Nishant is still having a problem:
Dear Jérôme,

Thank you for the reply.

I understand your point on number of contacts -- this can be resolved in the 
post-processing stage if sphere interacts with ANY member of the facetbox, 
count just one interaction. My issue is the force acting on the sphere.
But about the force acting on the sphere is the problem.

Consider this example:

#--

from yade import pack, qt, export
import numpy as np

#-
##Defining Box
O.periodic=False

# No side boundaries this time, just a plane!
O.bodies.append(geom.facetBox(center=(0.5,0.5,0.5),extents = (0.5,0.5,0.5), 
wallMask= 16)) # Facetbox except the base

#-
O.bodies.append([sphere((0.7,0.5,0.2001),radius=0.2)]) # add a sphere # Other 
case
#O.bodies.append([sphere((0.5,0.5,0.2001),radius=0.2)]) # add a sphere

#-
##Engine Definition

O.engines=[
 ForceResetter(),
 
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()],allowBiggerThanPeriod=True),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
   ),
 PyRunner(command = 'output()', iterPeriod = 1, label = "checker"),
 NewtonIntegrator(gravity=(0,0,-9.81),damping=0.0)
]

#-

def output():
 if (O.iter < 20):
  count_intrs = 0.0
  for i in O.interactions:
   if i.isReal:
count_intrs += 1.0
  print "time:", O.time, "Sphere position", (O.bodies[-1].state.pos[2]), 
"contacts", count_intrs, "force", O.forces.f(O.bodies[-1].id)[2]
 else:
  print "done"
  O.pause()

#-

O.dt = 5e-1*PWaveTimeStep()
O.run()

#--
#--

When sphere is at (0.7,0.5,0.2001), it interacts with just one facet and this 
one spring (equivalent to sphere-plane interaction) - consistent with what we 
expect.
When it is at (0.5,0.5,0.2001), there are two springs from two facets.

So what you say is correct: different springs acting on sphere and thus
different forces and different time of contact!

Do you have idea how can we resolve this issue, so that the force on
sphere with time is same for the two cases?

Thanks

PS: I expect this is more complicated when a sphere just falls at the
base joint made of two different materials

-- 
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 #665675]: Facet mesh

2018-03-15 Thread Nishant
Question #665675 on Yade changed:
https://answers.launchpad.net/yade/+question/665675

Description changed to:
Dear All,

I am trying to understand the interaction between a facetbox and sphere.

A sphere falls under gravity in a box. The base of the box can be made
of finer facetmesh. When the sphere interacts in the box, I expect one
real interaction.

The script: 
#--
#--

from yade import pack, qt, export
import numpy as np

#-
##Defining Box 
O.periodic=False

O.bodies.append(geom.facetBox(center=(0.5,0.5,0.5),extents =
(0.5,0.5,0.5), wallMask=1+2+4+8+32 )) # Facetbox except the base

N_mesh = 1 # Change this to 2,3,.. to refine mesh at the bottom
for iX in range(N_mesh):
for iY in range(N_mesh):
O.bodies.append(geom.facetBox(center=( 
1.0/float(N_mesh)*(iX+0.5), 1.0/float(N_mesh)*(iY+0.5), 0.5),extents = ( 
0.5/float(N_mesh), 0.5/float(N_mesh), 0.5), wallMask=16) )

#-
O.bodies.append([sphere((0.5,0.5,0.2001),radius=0.2)]) # add a sphere

#-
##Engine Definition

O.engines=[
ForceResetter(),

InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()],allowBiggerThanPeriod=True),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],   
[Ip2_FrictMat_FrictMat_FrictPhys()], 
[Law2_ScGeom_FrictPhys_CundallStrack()]   
   ),
PyRunner(command = 'output()', iterPeriod = 1, label = "checker"),
NewtonIntegrator(gravity=(0,0,-9.81),damping=0.0)
]
   
#-

def output():
if (O.iter < 20):
count_intrs = 0.0
for i in O.interactions:
if i.isReal:
count_intrs += 1.0
print "time:", O.time, "Sphere position", 
(O.bodies[-1].state.pos[2]), "contacts", count_intrs, "force", 
O.forces.f(O.bodies[-1].id)[2]
else:
print "done"
O.pause()
  
#-

O.dt = 5e-1*PWaveTimeStep()
O.run()

#--
#--

When N_mesh = 1 (corresponding to facetbox with 6 sides), I get two
interactions of sphere with the bottom. For N_mesh>1 (say N_mesh = 2) I
get 6 interactions.

* I expect just one 'real' interaction in all cases. How can I achieve
this in output?

* The force on the sphere is different for different mesh. The position
in time is also slightly different for the two cases. What I am doing
wrong here?

* I read sometime ago on this launchpad that facetmesh should be fine at
the edges and corners for a better result - I can not find it anymore.
Someone has an idea about how fine I should make a facet surface?

Look forward to your input.
Thank you
Nishant

-- 
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 #665675]: Facet mesh

2018-03-15 Thread Nishant
New question #665675 on Yade:
https://answers.launchpad.net/yade/+question/665675

Dear All,

I am trying to understand the interaction between a facetbox and sphere. 

A sphere falls under gravity in a box. The base of the box can be made of finer 
facetmesh. When the sphere interacts in the box, I expect one real interaction.

The script: 
#--
#--

from yade import pack, qt, export
import numpy as np

#-
##Defining Box 
O.periodic=False

O.bodies.append(geom.facetBox(center=(0.5,0.5,0.5),extents = (0.5,0.5,0.5), 
wallMask=1+2+4+8+32 )) # Facetbox except the base

N_mesh = 1 # Change this to 2,3,.. to refine mesh at the bottom
for iX in range(N_mesh):
for iY in range(N_mesh):
O.bodies.append(geom.facetBox(center=( 
1.0/float(N_mesh)*(iX+0.5), 1.0/float(N_mesh)*(iY+0.5), 0.5),extents = ( 
0.5/float(N_mesh), 0.5/float(N_mesh), 0.5), wallMask=16) )

#-
O.bodies.append([sphere((0.5,0.5,0.2001),radius=0.2)]) # add a sphere

#-
##Engine Definition

O.engines=[
ForceResetter(),

InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()],allowBiggerThanPeriod=True),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],   
[Ip2_FrictMat_FrictMat_FrictPhys()], 
[Law2_ScGeom_FrictPhys_CundallStrack()]   
   ),
PyRunner(command = 'output()', iterPeriod = 1, label = "checker"),
NewtonIntegrator(gravity=(0,0,-9.81),damping=0.0)
]
   
#-

def output():
if (O.iter < 20):
count_intrs = 0.0
for i in O.interactions:
if i.isReal:
count_intrs += 1.0
print "time:", O.time, "Sphere position", 
(O.bodies[-1].state.pos[2]), "contacts", count_intrs, "force", 
O.forces.f(O.bodies[-1].id)[2]
else:
print "done"
O.pause()
  
#-

O.dt = 5e-1*PWaveTimeStep()
O.run()

#--
#--

When N_mesh = 1 (corresponding to facetbox with 6 sides), I get two 
interactions of sphere with the bottom. For N_mesh>1 I get 6 interactions. 

* I expect just one 'real' interaction in all cases. How can I achieve this in 
output?

* The force on the sphere is different for different mesh. What I am doing 
wrong here?

* I read sometime ago on this launchpad that facetmesh should be fine at the 
edges and corners for a better result - I can not find it anymore. Someone has 
an idea about how fine I should make a facet surface?

Look forward to your input.
Thank you
Nishant

-- 
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 #432837]: how to get stress values with VTKExporter

2018-02-19 Thread Nishant
Question #432837 on Yade changed:
https://answers.launchpad.net/yade/+question/432837

Nishant posted a new comment:
Thank you Jan, it helped! 
:)

-- 
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 #432837]: how to get stress values with VTKExporter

2018-02-16 Thread Nishant
Question #432837 on Yade changed:
https://answers.launchpad.net/yade/+question/432837

Nishant posted a new comment:
Hi Gary,

Did you solve this issue with exporting bodyStress?

I have the same problem: If it a fresh simulations, bodyStresses can be 
exported to vtkExporter.
But if we save and load the configuration, it gives error:
Below is my MWE:

#-

from yade import pack, export

Len = 1.0
wallIds=O.bodies.append(geom.facetBox(center=(Len/2,Len/2,Len/2),extents = 
(Len/2,Len/2,Len/2), wallMask=63, color=(1,0,0)))

sp=pack.SpherePack()

sp.makeCloud((0,0,0),(Len,Len,Len),rMean=.1, num =10)
sp.toSimulation()
#-

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(gravity=(0,0,-9.81),damping = 0.2,label='newton')
]

O.dt = 0.5*PWaveTimeStep()
O.run(int(1e4),True)

O.save('Trial.yade.gz')

#--
#O.load('Trial.yade.gz')
#O.step()
#--

stresses = bodyStressTensors()
for b in O.bodies:
b.mystress = stresses[b.id]

vtkExporter = export.VTKExporter('Check')
vtkExporter.exportSpheres(what=[('velocity', 
'b.state.vel.norm()'),('stress','b.mystress')])
vtkExporter.exportFacets(what=[('pos','b.state.pos')])

#-
Above works!. But if I uncomment: 
O.load('Trial.yade.gz')
O.step()

I get error:
test = eval(command) # ... eval one example to see what type (float, 
Vector3, Matrix3) the result is ...
  File "", line 1, in 
AttributeError: 'Body' object has no attribute 'mystress'

-- 
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 #661754]: Force on a clump member

2017-12-14 Thread Nishant
New question #661754 on Yade:
https://answers.launchpad.net/yade/+question/661754

Hi,

I am interested in understanding when a force is applied ONLY to a member of 
the clump, how it is transferred to the clump.

Bottom line is clump is/move always together, right?

Here is the code:


O.materials.append(FrictMat(density=2e3,young=30e9,poisson=.3,frictionAngle=.5236))
 # Material Used

# Defining Clump
O.bodies.appendClumped([sphere([5,5,5],1),sphere([7,5,5],1) ])
O.bodies.updateClumpProperties(discretization=100)
###

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack(sphericalBodies=False)]
),
PyRunner(command = 'applied_force()', iterPeriod = 1, label = 
"checker"),
NewtonIntegrator(gravity=(0,0,0),damping = 0)
]

###
def applied_force():
O.forces.setPermF(0, Vector3(0,1.0,0))

O.dt = 5e-1*PWaveTimeStep()
O.stopAtIter= int(1e8)
O.run()


The code works fine, shows the expected rotation and clump member stay 
together. 

O.forces.f(1) is Vector3(0,0,0) and O.bodies[1].state.vel is non-zero and 
changing.

So how/step the applied force to a member via setPermF is transferred to the 
clumped body to make it move as a single entity?

Can you please direct me to the right scripts?

Thanks.
Nishant


-- 
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 #660861]: Length of O.bodies after erasing a body

2017-11-21 Thread Nishant
Question #660861 on Yade changed:
https://answers.launchpad.net/yade/+question/660861

Status: Open => Solved

Nishant confirmed that the question is solved:
Dear Jan and Jérôme,

Your solution and clarification solve my problem.

Thanks,
Nishant

-- 
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 #660861]: Length of O.bodies after erasing a body

2017-11-17 Thread Nishant
Question #660861 on Yade changed:
https://answers.launchpad.net/yade/+question/660861

Nishant gave more information on the question:
Hi Jérôme,

Thanks for the reply.

I agree with your workaround solution - for b in O.bodies - would solve
the problem.

Is there a particular reason that the simulation continues with empty
body fields?

Deleting the body (particles or walls), erasing the interactions (Yade does 
these two) as well as deleting the empty body field 
would make easier to simulate/track chain of processes.

For example - initial uniaxial compression with a wall, then erasing the
wall (body and interactions) and performing a cone penetration etc.

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 #660861]: Length of O.bodies after erasing a body

2017-11-17 Thread Nishant
New question #660861 on Yade:
https://answers.launchpad.net/yade/+question/660861

Hi,

I am learning Yade and I have an issue with erase function. This erases the 
body and the corresponding interactions, as discussed here 
https://answers.launchpad.net/yade/+question/216109 

However, the length of bodies remain the same. Sample example below:

O.bodies.append([sphere((0.0,0,0.0),1)])
O.bodies.append([sphere((0.0,0,2.0),1)])
len(O.bodies)

This gives 2 as answer.

But next I want to erase one of them: 

O.bodies.erase(1)
len(O.bodies)

This again gives two and counts the  non-existent bodies, but should give 1, 
no? 

A way to solve this was described here: 
https://answers.launchpad.net/yade/+question/258987
But, I am interested in applying a constant strain field to some bodies and 
looping over len(O.bodies) would create problems. 

Would be nice if experts shed some light.
Thanks,

Nishant





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