Re: [Yade-users] [Question #703081]: Incorrect porosity after predicate filtering

2022-09-08 Thread Bettina Suhr
Question #703081 on Yade changed:
https://answers.launchpad.net/yade/+question/703081

Status: Open => Answered

Bettina Suhr proposed the following answer:
Hi Lukas,

When I worked with filterSpherePack function, I made some observations,
which might be helpful.

> Since in [1] the particle cloud was compressed isotropically, I
assumed that the porosity is equally distributed over the entire volume

I would expect that the packing’s porosity is lowest in the center of
the packing. At the boundaries there will be empty spaces, which
increase the porosity close to the packing’s boundary.

> and the cropped part accordingly also has the same porosity as the
entire sphere packing volume.

When you crop the packing, spheres which are partially inside and
outside of the predicate will be deleted. This will cause an increase in
empty space and thus increase porosity. How much porosity will increase
due to this effect, will depend on your packing (sphere sizes) and
predicate.

> How do I manage to get the same porosity in my predicate as it is in
the old volume (imported pack)?

Good question. One option would be to add a facet cylinder and to grow
particles until you meet the target porosity.

Hope it helps. Regards,
Bettina

-- 
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 #697142]: Writing new Ip2 functor / order of contact partners

2021-05-20 Thread Bettina Suhr
Question #697142 on Yade changed:
https://answers.launchpad.net/yade/+question/697142

Bettina Suhr 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 #697142]: Writing new Ip2 functor / order of contact partners

2021-05-20 Thread Bettina Suhr
Question #697142 on Yade changed:
https://answers.launchpad.net/yade/+question/697142

Status: Answered => Solved

Bettina Suhr confirmed that the question is solved:
Thank you, Jan! The dynamic cast works really fine. 
The std::swap caused a compilation error, but it was easy to avoid the swap 
command, after knowing which pointer is which one.

Best regards,
Bettina

-- 
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 #697142]: Writing new Ip2 functor / order of contact partners

2021-05-20 Thread Bettina Suhr
Question #697142 on Yade changed:
https://answers.launchpad.net/yade/+question/697142

Status: Answered => Open

Bettina Suhr is still having a problem:
Hi Vasileios,

Thank you for the explanation, now I understand better why I have this
problem.

Your suggestion to use the DEFINE_FUNCTOR_ORDER_2D sounded like an
elegant solution, unfortunately it doesn’t work. The behaviour remains
unchanged, even when I put the
DEFINE_FUNCTOR_ORDER_2D(FrictMat,myMaterial) command.

Any other Idea how I could solve this problem?

Can I check to which class b1, b2 are pointing?

Best regards,
Bettina

-- 
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 #697142]: Writing new Ip2 functor / order of contact partners

2021-05-19 Thread Bettina Suhr
New question #697142 on Yade:
https://answers.launchpad.net/yade/+question/697142

Dear all,

Currently, I try to write a new Ip2 functor and after some trouble I have a 
general question on the order of two contacting particles in the interaction 
class. 

Say I have:
spheres with myMaterial
pfacets with FrictMat
facets with FrictMat

In my engine I have the following:
InteractionLoop(
[Ig2_Sphere_PFacet_ScGridCoGeom(),
Ig2_Facet_Sphere_ScGeom(),],
[Ip2_FrictMat_myMaterial_myPhysics()],
[Law2_ ScGridCoGeom _myPhysics_someLaw(),
Law2_ ScGeom _myPhysics_someOtherLaw()]
)

In this example, I have only one Ip2 functor, which should handle contacts 
between spheres/pfacets and facets/spheres. 
The Ip2_FrictMat_myMaterial_myPhysics functor is passed two pointers b1, b2 to 
the material of the two contact partners. In my case, these materials are 
different. 

Is the order of the contact partners determined by the Ig2 functor?  

With some debugging, it seems that for sphere/pfacet contacts, b1 points to 
myMaterial and b2 to FrictMat. In contrast, for facet/sphere contacts, b1 
points to FrictMat and b2 to myMaterial. 

As the materials have different types of parameters, this is a problem for me.
Do you have any suggestions how I can solve this? Can I check the class to 
which b1, b2 are pointing?
I tried coding additionally an Ip2_myMaterial_FrictMat_myPhysics functor, but 
this isn’t chosen for sphere/pfacet contacts, instead the old 
Ip2_FrictMat_myMaterial_myPhysics functor is used.

Any help would be appreciated.

Best regards,
Bettina


-- 
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 #692608]: histogram for distribution of interaction directions

2020-08-28 Thread Bettina Suhr
Question #692608 on Yade changed:
https://answers.launchpad.net/yade/+question/692608

Status: Open => Answered

Bettina Suhr proposed the following answer:
Hi,

I think it is correct that the interaction direction is returning values
between 0 and 179.

Imagine two spheres in contact. The direction of the contact normal
vector will change depending if you calculate it from sphere 1 to sphere
2 or the other way around. If the contact normal vector is e.g. parallel
to the x-axis, how will you decide if the contact has 0 degree or 180
degree?

You can use the plotDirections() function as it is.

Hope that helps,
Bettina

-- 
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 #683488]: saving data

2019-08-29 Thread Bettina Suhr
Question #683488 on Yade changed:
https://answers.launchpad.net/yade/+question/683488

Status: Open => Answered

Bettina Suhr proposed the following answer:
Hi Jinni Kim,

There are different ways to save data for different purposes.

Have a look at the tutorial -> oedometric script. Here information like
path, normal force, unbalanced force and iteration number are saved to a
txt file using the commands plot.addData and plot.saveDataTxt. These
commands also can be used for simulations run in background/ batch mode,
as you can see in the tutorial.

In the users manual -> postprocessing section, you can learn how write more 
outputs and visualize them.
Hope this helps.

Best regards,
Bettina

-- 
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 #683405]: Yade 2019.01a vs. gitlab version

2019-08-29 Thread Bettina Suhr
Question #683405 on Yade changed:
https://answers.launchpad.net/yade/+question/683405

Status: Answered => Open

Bettina Suhr is still having a problem:
Dear all,

I tried to do the checks, which Bruno suggested, but I didn’t succeed.
After checking out the commit 900c7616, running cmake and make clean,  I get an 
error in compilation:

/home/bettinasuhr/yade-gitlab/trunk/pkg/common/InsertionSortCollider.cpp:526:22:
 error: invalid use of member function ‘size_t 
InsertionSortCollider::VecBounds::size() const’ (did you forget the ‘()’ ?)
for(long i=0; i.1: return 
# add plate at the position on the top of the packing
# the maximum finds the z-coordinate of the top of the topmost particle
print ('add plate at position: ',  max([b.state.pos[2]+b.shape.radius 
for b in O.bodies if isinstance(b.shape,Sphere)]) ,'at iteration: ', O.iter)
O.bodies.append(wall(max([b.state.pos[2]+b.shape.radius for b in 
O.bodies if isinstance(b.shape,Sphere)]),axis=2,sense=-1))
global plate# without this line, the plate variable would only 
exist inside this function
plate=O.bodies[-1]  # the last particles is the plate
# Wall objects are "fixed" by default, i.e. not subject to forces
# prescribing a velocity will therefore make it move at constant 
velocity (downwards)
plate.state.vel=(0,0,-.1)
# start plotting the data now, it was not interesting before
O.engines=O.engines+[PyRunner(command='addPlotData()',iterPeriod=200)]
# next time, do not call this function anymore, but the next one 
(unloadPlate) instead
checker.command='unloadPlate()'

def unloadPlate():
# if the force on plate exceeds maximum load, start unloading
if abs(O.forces.f(plate.id)[2])>maxLoad:
plate.state.vel*=-1
# next time, do not call this function anymore, but the next 
one (stopUnloading) instead
checker.command='stopUnloading()'

def stopUnloading():
if abs(O.forces.f(plate.id)[2])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 #683405]: Yade 2019.01a vs. gitlab version

2019-08-28 Thread Bettina Suhr
Question #683405 on Yade changed:
https://answers.launchpad.net/yade/+question/683405

Bettina Suhr posted a new comment:
Dear Bruno,

Thanks a lot for your answer and your suggestions.

The time steps are the same as well as the initial positions of the
spheres.

Due to some technical difficulties it may take some days until I can
compare the two commits, which you mentioned. I will post the results
then.

Best regards,
Bettina

-- 
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 #683405]: Yade 2019.01a vs. gitlab version

2019-08-27 Thread Bettina Suhr
New question #683405 on Yade:
https://answers.launchpad.net/yade/+question/683405

Dear all,

until now, I used Yade 2019.01a for my computations. Recently, I also 
downloaded and installed the current version from gitlab. When I compare the 
results obtained from both versions, I see (small) differences. I’m a bit 
worried, because I do not see such differences between Yade 2018.02b and Yade 
2019.01a. 

An example for the obtained differences can be seen in the 
03-oedometric-test.py script. I added “seed=1” in the makeCloud command and 
obtain identical initial positions for the spheres (wrt. yade version). The 
particles settle under gravity. When the  unbalanced force is below 0.1,  a 
plate is inserted for compression.  The position of the plate is above the 
highest sphere in the packing and already here there are differences  (note: I 
changed the PyRunner iterPeriod for a better comparison: 
PyRunner(command='checkUnbalanced()',iterPeriod=100,label='checker') )

#add plate at position:  0.549239607153 at iteration:  10300 # Yade 2018.02b
#add plate at position:  0.549239607153 at iteration:  10300 # Yade 2019.01a
#add plate at position:  0.575951497648 at iteration:  9800# yade gitlab 
compiled with Python 2
#add plate at position:  0.5759514976482029 at iteration:  9800# yade gitlab 
compiled with Python 3

For backward compatibility, I think it’s worth investigating, what causes these 
changes. Do you agree? 
Do you have any suggestion, how I can track these changes down?

Thanks and best regards,
Bettina


-- 
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 #683176]: how to use clump to make a desired shape

2019-08-26 Thread Bettina Suhr
Question #683176 on Yade changed:
https://answers.launchpad.net/yade/+question/683176

Status: Open => Answered

Bettina Suhr proposed the following answer:
Dear lip,

You might want to check the “trunk/examples/clumps” folder , for
examples how clumps are defined.

Regarding your question 2: read the replaceByClumps-example.py example.
Here, makeCloud() is used to generate spheres, which are than replaced
by clumps.

Regards,
Bettina

-- 
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 #681609]: hyper-threading and yade

2019-06-27 Thread Bettina Suhr
Question #681609 on Yade changed:
https://answers.launchpad.net/yade/+question/681609

Status: Answered => Solved

Bettina Suhr confirmed that the question is solved:
Dear Robert, Jerome and Bruno,

Thank you very much for your answers. With this information at hand, we
will think about a strategy to test, if hyperthreading should be active
or not.

Thanks, and regards,
Bettina

-- 
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 #681609]: hyper-threading and yade

2019-06-26 Thread Bettina Suhr
New question #681609 on Yade:
https://answers.launchpad.net/yade/+question/681609

Dear all,

we just bought a new computer for DEM simulations. After a first performance 
test with yade, I saw that the IT turned on hyper-threading. Is there a general 
advice to use or not to use hyper-threading with yade? Or do we have to test 
ourselves to see what is  better for us?

Thank you for your help,
Bettina


-- 
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 #680203]: Centos cluster running

2019-04-12 Thread Bettina Suhr
Question #680203 on Yade changed:
https://answers.launchpad.net/yade/+question/680203

Status: Open => Answered

Bettina Suhr proposed the following answer:
Hi,

it seems to me your problem is not related to the usage of a cluster.

Reading your error message, the problem is caused by the filterSpherePack() 
function.
In the docs of this function it says: “The packing will be recentered to match 
the predicate and warning is given if the predicate is larger than the 
packing.”  
Your predicate is not larger than your  packing, but has exactly the same 
dimensions (x,y,z coordinate), which might cause the trouble. 
The error message is: 
if dimP[0]>dimS[0] or dimP[1]>dimS[1] or dimP[2]>dimS[2]: 
warnings.warn("Packing's dimension (%s) doesn't fully contain dimension of the 
predicate (%s)."%(dimS,dimP))

Therefore, I would think that you can solve your problem in increasing
the size of your sphere pack in all three dimensions.

Hope it helps,
Bettina

-- 
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 #680139]: rigid (gts)Pfacets?

2019-04-11 Thread Bettina Suhr
Question #680139 on Yade changed:
https://answers.launchpad.net/yade/+question/680139

Bettina Suhr 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 #680139]: rigid (gts)Pfacets?

2019-04-11 Thread Bettina Suhr
Question #680139 on Yade changed:
https://answers.launchpad.net/yade/+question/680139

Status: Answered => Solved

Bettina Suhr confirmed that the question is solved:
Thank you, Bruno!! This command makes life much easier.

For the record, the MWE below is working (This reads
trunk/examples/pfacet/box.gts, copy to working directory.)

from yade import qt
from yade.gridpfacet import *
import gts, os.path, locale

locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')   # Note: gts is locale-
dependent. If, for example, german locale is used, gts.read()-function
does not import floats normally

'''
if you get "Error: unsupported locale setting"
-> type as root: "dpkg-reconfigure locales"
-> choose "en_US.UTF-8" (press space to choose)
'''

#-


### ENGINES  ###


O.engines=[
ForceResetter(),
InsertionSortCollider([
Bo1_Wall_Aabb(),
Bo1_PFacet_Aabb(),
],sortThenCollide=True),
InteractionLoop(
[
Ig2_GridNode_GridNode_GridNodeGeom6D(),
Ig2_Wall_PFacet_ScGeom(),Ig2_Wall_Sphere_ScGeom()
],
[

Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=True),
Ip2_FrictMat_FrictMat_FrictPhys()],
[
Law2_ScGeom6D_CohFrictPhys_CohesionMoment(),
Law2_ScGeom_FrictPhys_CundallStrack(),
Law2_ScGridCoGeom_FrictPhys_CundallStrack(),
Law2_GridCoGridCoGeom_FrictPhys_CundallStrack()
]),
#GlobalStiffnessTimeStepper(timestepSafetyCoefficient=0.5,label='ts'), 
NewtonIntegrator(gravity=(0,-9.81,0),damping=0.1,label='newton')
]

#disabled GlobalStiffnessTimeStepper due to problems, adapt dt if necessary!
O.dt=1e-6

#
### MATERIAL  ###
#

O.materials.append(CohFrictMat(young=1e8,poisson=0.3,density=2650,frictionAngle=radians(20),normalCohesion=1e100,shearCohesion=1e100,momentRotationLaw=True,label='gridNodeMat'))
O.materials.append(FrictMat(young=1e8,poisson=0.3,density=2650,frictionAngle=radians(20),label='pFacetMat'))

###
### IMPORT MESH ###
###
radius=0.25
wire=False
fixed=False

z=-1.6
color=[0,0,1]

#--- original gtsPFacet construction --- WORKING
nodesIds0,cylIds0,pfIds0 =  
gtsPFacet('box.gts',shift=(0.,0.,0.),scale=2.,radius=radius,wire=wire,fixed=fixed,materialNodes='gridNodeMat',material='pFacetMat',color=color)

#--- make a clump out of it
O.bodies.clump(nodesIds0+cylIds0+pfIds0)


#
#   Wall  ###
#

O.bodies.append(utils.wall(position=z,sense=0,
axis=1,color=Vector3(1,0,0),material='pFacetMat'))

##
## VIEW ##
##

qt.Controller()
qtv = qt.View()
qtr = qt.Renderer()
qtr.light2=True
qtr.lightPos=Vector3(1200,1500,500)
qtr.bgColor=[1,1,1]
qtv.ortho=True


O.saveTmp()

-- 
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 #680139]: rigid (gts)Pfacets?

2019-04-10 Thread Bettina Suhr
Question #680139 on Yade changed:
https://answers.launchpad.net/yade/+question/680139

Status: Answered => Open

Bettina Suhr is still having a problem:
Dear Bruno,

thank you very much for your advice. It’s a good idea to add
nodes+edges+pfacets to the clump.

In my script, I tried to do this but faced the following problem. Normally, the 
gtsPFacet() function calls a couple of subfunctions, which create the 
gridNodes, gridConnections and pfacets and directly append them to the scene 
with O.bodies.append(). Objects which are already registered to the scene 
cannot be part of a  clump (at least that is how I understand the error message 
of O.bodies.appendClumped(): IndexError: Body already has id 1538 set; 
appending such body (for the second time) is not allowed.)
 
Therefore,  I copied all functions called by  gtsPFacet() in my MWE and tried 
to adapt them with the aim: create all needed gridNodes, gridConnections and 
pfacets and at the very last line use  O.bodies.appendClumped() to add them all 
to the scene. 
The problem is that in my adapted function gridConnection an interaction should 
be created and parameters of i.phys and i.geom are set. My script crushes, 
because the createInteraction() function expects the the partners of the 
interaction to be already part of the scene (which is what I try to avoid). I 
don’t know how to proceed. At the end, the clump should be rigid (i.e. ignoring 
internal interactions). But this interaction is also needed for the contacts 
between the gridConnetion and other bodies(spheres or other clumped of 
gtsPfacets)?
 Is this the right way at all?  

Below is my script, any help would be appreciated.

Thanks and best regards,
Bettina


from yade import qt
from yade.gridpfacet import *
import gts, os.path, locale

locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')   # Note: gts is locale-
dependent. If, for example, german locale is used, gts.read()-function
does not import floats normally

'''
if you get "Error: unsupported locale setting"
-> type as root: "dpkg-reconfigure locales"
-> choose "en_US.UTF-8" (press space to choose)
'''

#-
# adapted functions from trunk/py/gridpfacet.py to make clump of pfacets
#-

def ClumpedGtsPFacet(meshfile,shift=Vector3.Zero,scale=1.0,

radius=1,wire=True,fixed=True,materialNodes=-1,material=-1,color=None):
"""doc deleted
"""
import gts,yade.pack
surf=gts.read(open(meshfile))
surf.scale(scale,scale,scale)
surf.translate(shift[0],shift[1],shift[2]) 
nodesList=[]
connList=[]
pfList=[]

for face in surf.faces():
a=face.vertices()[0].coords()
b=face.vertices()[1].coords()
c=face.vertices()[2].coords()

ClumpedPfacetCreator1([a,b,c],radius=radius,nodesList=nodesList,connList=connList,pfList=pfList,wire=wire,fixed=fixed,materialNodes=materialNodes,material=material,color=color)
#print a,b,c
pfIds=O.bodies.appendClumped(pfList+connList+nodesList)
#return nodesIds,cylIds,pfIds


def 
ClumpedPfacetCreator1(vertices,radius,nodesList=[],connList=[],pfList=[],wire=False,
 fixed=True,materialNodes=-1,material=-1,color=None):
"""doc deleted
"""
n=len(nodesList)
k=[0,0,0]
f=[0,0,0]
u=0
nod=0
for i in vertices:
u=0
for (j,b) in enumerate(nodesList):
if(i==nodesList[j].state.pos):
f[nod]=j
k[nod]=1
u+=1
nod+=1
test=True
#if(u==0):
for (GN,b) in enumerate(nodesList):
if(i==nodesList[GN].state.pos):
  u=1
if(u==0):
#nodesIds.append( 
O.bodies.append(gridNode(i,radius,wire=wire,fixed=fixed,material=materialNodes,color=color))
 )
nodesList.append( 
gridNode(i,radius,wire=wire,fixed=fixed,material=materialNodes,color=color)) 

if(k==[0,0,0]):
pfObj=ClumpedPfacetCreator3(n,n+1,n+2,nodesList, 
connList=connList, 
pfList=pfList,wire=wire,material=material,color=color,fixed=fixed )
if(k==[1,0,0]):
pfObj=ClumpedPfacetCreator3(f[0],n,n+1,nodesList, 
connList=connList, 
pfList=pfList,wire=wire,material=material,color=color,fixed=fixed )
if(k==[0,1,0]):
pfObj=ClumpedPfacetCreator3(n,f[1],n+1, nodesList, 
connList=connList, 
pfList=pfList,wire=wire,material=material,color=color,fixed=fixed )
 

[Yade-users] [Question #680139]: rigid (gts)Pfacets?

2019-04-09 Thread Bettina Suhr
New question #680139 on Yade:
https://answers.launchpad.net/yade/+question/680139

Dear all,

recently I saw the pfacet element implemented in yade and had a look at 
[Effeindzourou2016].

The pfacets seem to be constructed to model deformable objects, like membranes. 
I was wondering if it is possible to use them for shape modelling of rigid 
particles (either a single pfacet object or a gtsPfacet consisting of several 
pfacets). 

Probably this was not done before, but I would appreciate your opinion if you 
expect minor or major changes in the code necessary. 

What I tried so far:

In  660289: how to simulate a rigid body when use gtsPfacet and CohFrictMat  it 
was advised to clumps several pfacets together with O.bodies.appendClumped(). 

My MWE is stated below. It’s a simplification from the 
trunk/examples/pfacet/gts-pfacet.py. At the beginning, I copied modified code  
from trunk/py/gridpfacet.py  to create a clumped gtsPfacet. In my code, the 
gridNodes and gridConnections are added to the scene with O.bodies.append(). A 
list of pfacets is then added with O.bodies.appendClumped().

The clump of pfacets is created, but in the Viewer the pfacets disappear after 
the first time step. Then, the particle falls through the wall. I guess this is 
caused, because the pfacet elements are missing. Remaining are gridNodes and 
gridConnections and for them no interactions are defined with the wall. Any 
idea how to construct the clump correctly?

Thanks for your help and best regards,
Bettina

MWE: This reads trunk/examples/pfacet/box.gts, copy to working directory.
#-
from yade import qt
from yade.gridpfacet import *
import gts, os.path, locale

locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')   # Note: gts is 
locale-dependent. If, for example, german locale is used, gts.read()-function 
does not import floats normally

'''
if you get "Error: unsupported locale setting"
-> type as root: "dpkg-reconfigure locales"
-> choose "en_US.UTF-8" (press space to choose)
'''

#-
# adapted functions from trunk/py/gridpfacet.py to make clump of pfacets
#-

def ClumpedGtsPFacet(meshfile,shift=Vector3.Zero,scale=1.0,

radius=1,wire=True,fixed=True,materialNodes=-1,material=-1,color=None):
"""
Imports mesh geometry from .gts file and automatically creates 
connected :yref:`PFacet3` elements. For an example see 
:ysrc:`examples/pfacet/gts-pfacet.py`.

:param string filename: .gts file to read.
:param [float,float,float] shift: [X,Y,Z] parameter shifts the mesh.
:param float scale: factor scales the mesh.
:param float radius: radius used to create the :yref:`PFacets`.
:param materialNodes: specify :yref:`Body.material` of 
:yref:`GridNodes`. This material is used to make the internal 
connections.
:param material: specify :yref:`Body.material` of 
:yref:`PFacets`. This material is used for interactions with external 
bodies.

See documentation of :yref:`yade.utils.sphere` for meaning of other 
parameters.

:returns: lists of :yref:`GridNode` ids `nodesIds`, 
:yref:`GridConnection` ids `cylIds`, and :yref:`PFacet` 
ids `pfIds`
"""
import gts,yade.pack
surf=gts.read(open(meshfile))
surf.scale(scale,scale,scale)
surf.translate(shift[0],shift[1],shift[2]) 
nodesIds=[]; cylIds=[]; pfIds=[]
pfacetList=[]
for face in surf.faces():
a=face.vertices()[0].coords()
b=face.vertices()[1].coords()
c=face.vertices()[2].coords()

pfacetList.append(ClumpedPfacetCreator1([a,b,c],radius=radius,nodesIds=nodesIds,cylIds=cylIds,pfIds=pfIds,wire=wire,fixed=fixed,materialNodes=materialNodes,material=material,color=color))
#print a,b,c
pfIds=O.bodies.appendClumped(pfacetList)
return nodesIds,cylIds,pfIds



def 
ClumpedPfacetCreator1(vertices,radius,nodesIds=[],cylIds=[],pfIds=[],wire=False,
 fixed=True,materialNodes=-1,material=-1,color=None):
"""
Create a :yref:`PFacet` element from 3 vertices and 
automatically append to simulation. The function uses the vertices to create 
:yref:`GridNodes` and automatically checks for existing nodes.

:param [Vector3,Vector3,Vector3] vertices: coordinates of vertices in 
the global coordinate system.
:param float radius: radius used to create the :yref:`PFacets`.
:param list nodesIds: list with ids of already existing 
:yref:`GridNodes`. New ids will be added.
:param list cylIds: list with ids of already existing 
:yref:`GridConnections`. New ids will be added.
:param list pfIds: 

Re: [Yade-users] [Question #679419]: Potential Particles

2019-03-26 Thread Bettina Suhr
Question #679419 on Yade changed:
https://answers.launchpad.net/yade/+question/679419

Status: Answered => Solved

Bettina Suhr confirmed that the question is solved:
Dear Janek and Vaseileios,

thank you very much for your answers! This information helps a lot. 
I will try to compile the 2019.01a version or the git clone and see if it works.

Best regards,
Bettina

-- 
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 #404466]: Shaped particles sample

2016-12-01 Thread Bettina Suhr
Question #404466 on Yade changed:
https://answers.launchpad.net/yade/+question/404466

Bettina Suhr proposed the following answer:
Hi Abimael,

when I want to generate samples made of clumps I use „makeClumpCloud“.
You can find an example script at
trunk/examples/test/clumpPack.py
This avoids problems with overlapping particles. Maybe it fits to what you are 
looking for.

Best regards,
Bettina

-- 
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 #404363]: porosity calculation for clumps

2016-11-24 Thread Bettina Suhr
Question #404363 on Yade changed:
https://answers.launchpad.net/yade/+question/404363

Status: Answered => Solved

Bettina Suhr 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 #404363]: porosity calculation for clumps

2016-11-24 Thread Bettina Suhr
New question #404363 on Yade:
https://answers.launchpad.net/yade/+question/404363

Dear all,

in simulations using clumps of overlapping spheres, I was wondering if the 
porosity is calculated correctly. 
Using the following example, I obtain the same results with yade-1.20.0 and 
yade-2016.06a:

import numpy as np

#create a clump of two overlapping spheres:
ra=0.5
clump1=O.bodies.appendClumped([ sphere([0,0,0],ra), sphere([ra,0,0],ra) ])
O.bodies.updateClumpProperties(discretization=100)

#define a total volume for porosity calculation
Vtotal=(3*ra)*ra*2

#thanks to Wolfram alpha, the analytic solution should be
print "analytic solution: ",  (Vtotal - (2*4.0/3.0 - 
5.0/12.0)*np.pi*ra**3)/Vtotal

print "porosity calculated by yade: ", utils.porosity(Vtotal)

# a correct porosity could be calculated like this (?)
def myClumpPorosity(VolTot, density):
  mass=sum([ b.state.mass for b in O.bodies if b.isClump])
  return (VolTot -mass/density)/VolTot

print  "my porosity: ", myClumpPorosity(Vtotal, O.materials[0].density)


Is there a bug in the porosity calculation or did I understand something wrong?
Thanks for your help.
Regards,
Bettina


-- 
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 #403744]: Cohesive and viscous-elastic contact law

2016-11-04 Thread Bettina Suhr
Question #403744 on Yade changed:
https://answers.launchpad.net/yade/+question/403744

Bettina Suhr proposed the following answer:
Hi Luis,
did you check the includeAdhesion option in the Hertz-Mindlin law? The 
description is not very detailed, but you can check the code to see, if that is 
what you want.
Regards,
Bettina

-- 
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 #290950]: Particles crossing the wall

2016-04-26 Thread Bettina Suhr
Question #290950 on Yade changed:
https://answers.launchpad.net/yade/+question/290950

Bettina Suhr posted a new comment:
Hi Varun,

your last MWE script worked for me, using yade-1.20.0. No spheres
crossed the boxes and nothing dissapeared. If you continue to face
problems, you could try to change to a newer version of yade.

Reagrds,
Bettina

-- 
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 #290950]: Particles crossing the wall

2016-04-15 Thread Bettina Suhr
Question #290950 on Yade changed:
https://answers.launchpad.net/yade/+question/290950

Bettina Suhr posted a new comment:
Hi Varun,

maybe I have the same problem as you have. Yesterday, I posted a
question (290933). There is a minimal working example (with a typo,
please change the definition of the facet box with the line given in my
answer to Anton). Is the problem similar to yours?

Jerome posted a link to another question, where also a bug is linked. It
is not clear, but maybe there is a problem in InsertionSortCollider
regarding contact detection in periodic cases with facets/walls …

Regards,
Bettina

-- 
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 #290933]: Particles fall through facets in periodic simulation

2016-04-15 Thread Bettina Suhr
Question #290933 on Yade changed:
https://answers.launchpad.net/yade/+question/290933

Bettina Suhr posted a new comment:
Hi Jerome and Anton,

thank you very much for your answers.

@Anton: I’m sorry, there’s a typo in the wallMask in the definition of the 
facet box (at the moment there are facets at the front and back. In this case 
everything is fine.) If you replace the definition of the box with:
O.bodies.append(geom.facetBox(center=(Wid/2.,Len/2.+0.5e+0,H/2.+0.5e+0),extents 
= ( Wid/2.,Len/2.,H/2.), wallMask=4+8+16+32, color=(1,0,0)))
you should see the problem. I also use yade_1.20.0

@Jerome: Thank you for posting the link to the other question, I didn’t
see it before. There might be a problem with InsertionSortCollider then
for periodic cases. It would be nice, if it could be solved at some
moment. Probably not an easy task, though …

Regards,
Bettina

-- 
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 #290933]: Particles fall through facets in periodic simulation

2016-04-14 Thread Bettina Suhr
New question #290933 on Yade:
https://answers.launchpad.net/yade/+question/290933

Dear all,

I would like to generate a packing of clumps inside a box, where at front and 
back of the box periodic boundary conditions are applied. At first, I defined 
the periodic cell and then added a facet box (without the front and back side) 
inside the cell. The problem is that when the clumps fall down due to gravity, 
some clumps go through the bottom of my facet box. I think that this problem is 
not related to the young modulus of the material or the time step size: When I 
define my box with facets at front and back, the problem does not occur. Can 
anybody explain me, what is the problem? Below you find my minimal working 
example.

Thanks a lot,
Bettina


from yade import pack

O.materials.append(FrictMat(young=1e10, poisson=0.28, frictionAngle=0.2, 
density=2600.))
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Wall_Aabb(), 
Bo1_Facet_Aabb()],allowBiggerThanPeriod=True),
InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom(), 
Ig2_Wall_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator( gravity=(0,0,-9.81),label='newtonEng')# NO DAMPING 
]

Len=700e-3
Wid=120e-3
H=450e-3+100e-3
O.periodic=True
O.cell.setBox(Wid,Len+1e+0,H+1e+0)

#add box
#wall mask: -x (1), +x (2), -y (4), +y (8), -z (16), +z (32).
O.bodies.append(geom.facetBox(center=(Wid/2.,Len/2.+0.5e+0,H/2.+0.5e+0),extents 
= ( Wid/2.,Len/2.,H/2.), wallMask=3+4+8+16+32, color=(1,0,0)))

#create pack of clumps in box 
sp=pack.SpherePack()
Num=100
c1=pack.SpherePack([ ((0.,0.,0.),37.6e-3/2.), ((37.6e-3/2.,0.,0.),25e-3/2.) ])# 
overlap (!) between both spheres
sp.makeClumpCloud( (0,0+0.5e+0,0+0.5e+0), ( Wid,Len+0.5,H+0.5), 
[c1],num=Num,seed=1)
ballastID=sp.toSimulation()
O.bodies.updateClumpProperties(discretization=10)# correct mass, volume, 
inertia!!


O.dt=0.5*PWaveTimeStep() 



-- 
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 #289663]: Total elastic shear energy in Hertz-Mindlin model

2016-04-07 Thread Bettina Suhr
Question #289663 on Yade changed:
https://answers.launchpad.net/yade/+question/289663

Bettina Suhr posted a new comment:
Hi Jiangtao,

sorry, but it is still not clear to me, what exactly is your question. Would 
you like to calculate the change in shear energy between two moments in time? 
You write that you set calcEnergy=False in the beginning, changing it to True 
at some later time. Wouldn’t it be easier to set it True from the beginning? 
Maybe you could write a minimal example with only two spheres, or so, and post 
the code. Then, you can describe, what is calculated in shearEnergy and what 
you would like to calculate. 

Best regards,
Bettina

-- 
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 #289663]: Total elastic shear energy in Hertz-Mindlin model

2016-04-05 Thread Bettina Suhr
Question #289663 on Yade changed:
https://answers.launchpad.net/yade/+question/289663

Bettina Suhr posted a new comment:
Hi Jiangtao,
I used the Hertz-Mindlin model for some time, but I never looked at the 
energies.
As I read the source code, in shearEnergy not only the current increment is 
saved, but the sum of all increments (see below). What exactly would you like 
to compute?  
Regards,
Bettina

Yade-1.20.0, HertzMindlin.cpp, Lines 423 - 430
//
/* SHEAR ELASTIC ENERGY */
//
// NOTE: shear elastic energy calculation must come after the MC criterion, 
otherwise displacements and forces are not updated
if (calcEnergy) {
shearEnergy += 
(us_elastic-prevUs_el).dot((shearElastic+prev_FsElastic)/2.); // NOTE: no 
additional energy if we perform sliding since us_elastic and prevUs_el will 
hold the same value (in fact us_elastic is only keeping the elastic part). We 
work out the area of the trapezium.
}

-- 
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 #284985]: Segfault: loading simulation with clumps

2016-02-10 Thread Bettina Suhr
New question #284985 on Yade:
https://answers.launchpad.net/yade/+question/284985

Dear all,

I do simulations using clumps of spheres with regular saves using O.save(). 
While the simulation finishes normally, I get segfaults when I load the saved 
states. 

The example test/clumpPack.py shows the same problem for me. If I save the 
initial state with O.save() and load it afterwards, a segfault occurs whenever 
O.run() or O.step() is used.

I compiled yade from source (1.14.0) and added some modified contact law. 
Is the problem a bug, or could it be related to my changes of yade? 

Thanks for your help,
Bettina


-- 
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 #275459]: Damping in Hertz-Mindlin contact law

2015-12-01 Thread Bettina Suhr
Question #275459 on Yade changed:
https://answers.launchpad.net/yade/+question/275459

Status: Answered => Solved

Bettina Suhr confirmed that the question is solved:
Thank you, Li Chang-Sheng and Bruno.
Your answers made the whole topic much clearer for me.

-- 
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 #275459]: Damping in Hertz-Mindlin contact law

2015-11-27 Thread Bettina Suhr
Question #275459 on Yade changed:
https://answers.launchpad.net/yade/+question/275459

Bettina Suhr gave more information on the question:
Hi lichangsheng,

thanks for you answer. I had a look at (cundall, 1979). There it says
“The viscous damping in shear direction is not applied when sliding
occurs”. Would you agree that in (tsuji, 1992) it is described
differently? As I understand it, here shear force is calculated as sum
of constitutive law and damping, and then the Mohr-Coulomb criterion is
checked. Is the approach in the cundall paper better/more correct? Is it
really intended that there exist cases, where Mohr-Coulomb criterion is
violated (as I described above)?

Thanks,
Bettina

-- 
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 #275459]: Damping in Hertz-Mindlin contact law

2015-11-25 Thread Bettina Suhr
New question #275459 on Yade:
https://answers.launchpad.net/yade/+question/275459

Dear all,

I simulate direct shear tests using the Hertz-Mindling contact law with damping 
(given coefficient of restitution). By chance I saw that there exist contacts 
where F_t > mu F_n, which violates the Mohr-Coulomb criterion. 
When I looked at the source code (HertzMindlin.cpp lines 407-420) I found the 
reason: The tangential force is calculated according to Mindlin’s law. Then the 
Coulomb criterion is checked. If the contact is sliding, F_t=mu F_n is set. If 
the contact is not sliding, the damping term is added. So it can happen that a 
contact which was not sliding before damping force is added, violates F_t <= mu 
F_n after the damping part is added. 
Is this intention or is it a bug? From my understanding of the paper of (Tsuji 
et at., 1992), first the damping force should be added and then the check for 
Mohr-Coloumb criterion should be applied.

Thanks,
Bettina



-- 
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 #269739]: Validation of the Hertz-Mindlin model

2015-08-04 Thread Bettina Suhr
Question #269739 on Yade changed:
https://answers.launchpad.net/yade/+question/269739

Status: Answered = Solved

Bettina Suhr confirmed that the question is solved:
Dear Bruno,

thank you for you help. You are right, starting from the analytical solution 
for the contact of two spheres, 
the analytical solution for sphere-wall contact is obtained when one radius 
goes to infinity.
What I found in the Yade source code is:

sphere-facet (Ig2_Facet_Sphere_ScGeom):
scm-radius1 = 2*sphereRadius;
scm-radius2 = sphereRadius;

sphere-wall contact (Ig2_Wall_Sphere_ScGeom):
ws-radius1=ws-radius2=radius; // do the same as for facet-sphere: wall's 
radius is the same as the sphere's radius

I changed in both function the radius of the wall to be big (1e8*radius
of the sphere).

After eliminating another error in my script (my wall had the same material 
parameters as the sphere, where the wall was supposed to be rigid), 
now I obtain the correct result for this test case.

Is the choice of the radius of a facet/wall meaningful for other contact
laws? Or should it be changed?

Thanks again,
Bettina

-- 
You received this question notification because you are a member of
yade-users, which 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 #269739]: Validation of the Hertz-Mindlin model

2015-07-29 Thread Bettina Suhr
Question #269739 on Yade changed:
https://answers.launchpad.net/yade/+question/269739

Status: Answered = Open

Bettina Suhr is still having a problem:
Hi Bruno and Anton,

thanks for your comments. 
@Bruno: You are right: the contact stiffness of the wall-sphere contact is 
equal to the case of symmetric spheres. 
It is too low compared to the analytic solution. Can you explain me, what I 
need to change? 
I was looking at Ig2_Wall_Sphere_ScGeom() and 
Ip2_FrictMat_FrictMat_MindlinPhys(), but I can't see any problem here. Or are 
there other functions which need to be changed?

Thanks,
Bettina

-- 
You received this question notification because you are a member of
yade-users, which 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 #269739]: Validation of the Hertz-Mindlin model

2015-07-28 Thread Bettina Suhr
New question #269739 on Yade:
https://answers.launchpad.net/yade/+question/269739

Dear all,

I found a nice publication for the verification of the Hertz-Mindlin contact 
model:
Chung, Y.  Ooi, J. Benchmark tests for verifying discrete element modelling 
codes at particle impact level Granular Matter, Springer-Verlag, 2011, 13, 
643-656

There are 8 simple test defined for verification. For the first test  (normal 
contact of two identical spheres) my result produced with Yade agrees with the 
analytical solution. 
The next test is about normal contact between a sphere and a plane and here I 
get differences to the analytical solution. 
I use the following script:

from yade import plot
import math
import sys
import numpy as np

O.materials.append(FrictMat(young=7.0e10, poisson=0.3, 
frictionAngle=np.arctan(0.0),density=2699.,label=alu))
O.bodies.append([
  sphere(center=(0,0,0.11),radius=0.1, material='alu')
])
O.bodies.append(utils.wall(0, axis=2, sense=1))

#asign initial velocity
O.bodies[0].state.vel=(0,0,-0.2)

O.engines=[
  ForceResetter(),
  #use aabb for approx. contact detection
  InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Wall_Aabb(), Bo1_Facet_Aabb()]),
  InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom(), 
Ig2_Wall_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_MindlinPhys()],#ELASTIC = No Damping 
  [Law2_ScGeom_MindlinPhys_Mindlin()]
  ),
  NewtonIntegrator(damping=0.0, gravity=(0,0,0)),#NO DAMPING IN INTEGRATOR
  PyRunner(command='myMonitor()',iterPeriod=1)
]
O.dt=0.1*utils.PWaveTimeStep() # extra save value
print 'time step used: ', O.dt, ' critical time step size ', 
utils.PWaveTimeStep()
O.trackEnergy=True

t_start_contact=0

def myMonitor():
  global t_start_contact
  if len(O.interactions)0 and O.interactions[0,1].geom:
if np.abs(t_start_contact)1e-10:
  t_start_contact=O.time
for i in O.interactions:
   plot.addData(d=i.geom.penetrationDepth,Fn=np.abs(i.phys.normalForce[2]), 
t=O.time-t_start_contact)

plot.plots={'d':('Fn'), 't':('Fn')}

# show the plot on the screen, and update while the simulation runs
plot.plot()



Do I do something wrong? Is this an error in Yade or is this a difference by 
intention?
Thanks for your help,
Bettina 



-- 
You received this question notification because you are a member of
yade-users, which 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 #268970]: problem with parallel computation

2015-07-09 Thread Bettina Suhr
Question #268970 on Yade changed:
https://answers.launchpad.net/yade/+question/268970

Status: Open = Solved

Bettina Suhr confirmed that the question is solved:
We changed back from Debian to Ubuntu and everything is ok now. 
Regards,
Bettina

-- 
You received this question notification because you are a member of
yade-users, which 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 #268970]: problem with parallel computation

2015-07-07 Thread Bettina Suhr
New question #268970 on Yade:
https://answers.launchpad.net/yade/+question/268970

Dear all,

I downloaded and installed yade trunk version 1.14.0 on a computer running with 
Debian. 
When I started the performance test using only one kernel, everything was ok. 
As soon as more kernels are involved (yade-1.14.0 -j2 --performance), I get a 
Segmentation Fault.
The exact system data is:
Debian GNU/Linux 7
Linux insv01543 3.2.0-4-686-pae #1 SMP Debian 3.2.68-1+deb7u2 i686 GNU/Linux

Before, I used yade (version 1.12.0) on a workstation running with Ubuntu and 
had no such problems. 
An installation of version 1.12.0 on the Debian machine showed the same 
behaviour with the SegFault.

Does anyone have an idea what the problem could be?

Thanks,
Bettina

-- 
You received this question notification because you are a member of
yade-users, which 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 #263553]: compilation of a new model

2015-03-13 Thread Bettina Suhr
Question #263553 on Yade changed:
https://answers.launchpad.net/yade/+question/263553

Status: Answered = Solved

Bettina Suhr confirmed that the question is solved:
Thanks Bruno Chareyre, that solved my question.

-- 
You received this question notification because you are a member of
yade-users, which 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 #263553]: compilation of a new model

2015-03-12 Thread Bettina Suhr
New question #263553 on Yade:
https://answers.launchpad.net/yade/+question/263553

Dear all,

after using yade for a while, this is the first time that I try to do coding. I 
 created a new class in the pkg/dem folder and have some questions regarding 
the compilation.

1. After calling cmake,  'make' attempts to recompile the whole yade 
distribution. Is this really necessary or are there any shortcuts?
2. After modification of a single .cpp file (for instance in pkg/dem), 
compilation via make still needs several minutes. Is there any possibility to 
speed up the build process?

Thanks,
Bettina

-- 
You received this question notification because you are a member of
yade-users, which 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