[Yade-users] [Question #665440]: how can make a path for yade to load python files

2018-03-09 Thread Alireza Sadeghi
New question #665440 on Yade:
https://answers.launchpad.net/yade/+question/665440

Hello,

I am new user of YADE. I can't load any python files in the yade. when I write 
the file (for example: yade Hello.py) it shows me an error like this:

Welcome to Yade 2016-05-04.git-040f642 
TCP python prompt on localhost:9000, auth cookie `uaydks'
XMLRPC info provider on http://localhost:21000
Running script Hello.py
Traceback (most recent call last):
  File "/usr/bin/yade", line 182, in runScript
execfile(script,globals())
IOError: [Errno 2] No such file or directory: 'Hello.py'
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use h-key for 
showing help), F10 both, F9 generator, F8 plot. ]]

Could you please help me?I don't know what should I do :(

Thanks a lot

-- 
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 #665387]: Compile error JointedCohesiveFrictionalPM

2018-03-09 Thread Robert Caulk
Question #665387 on Yade changed:
https://answers.launchpad.net/yade/+question/665387

Status: Open => Answered

Robert Caulk proposed the following answer:
Hello William,

Which linux distribution are you running? Which compiler are you using
(gcc --version)?

As Bruno mentions on yade-dev, your most recent build passes the
buildbot [1] - so it may be a local problem. (I think Bruno's message
[2] was not posted here as intended. He suggests you join yade-dev list
serv [3] and send compiler questions there).

Although it seems unlikely - is it possible this has something to do
with this unusual merge of master with itself [4]? Is that a merge into
your local repository? Perhaps you are you working off a read-only
clone? Do you have duplicated commits on your local machine? I can't
quite figure out what is going on there, the "merge" seems to simply add
commits that are already committed to the repository.

Cheers,

Robert

[1]https://yade-dem.org/buildbot/builders/yade-full/builds/4507
[2]https://lists.launchpad.net/yade-dev/msg13755.html
[3]https://launchpad.net/~yade-dev
[4]https://github.com/yade/trunk/commit/921bb17079fea51385fe620526f9bc48c055918e

-- 
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 #665379]: penetrationDepth calculation

2018-03-09 Thread Andrea Puglisi
Question #665379 on Yade changed:
https://answers.launchpad.net/yade/+question/665379

Status: Open => Solved

Andrea Puglisi confirmed that the question is solved:
A, I've understood my error! The overlap contained in
penetrationDepth is the one computed for the force, which corresponds to
positions at the previous step! Sorry to make you lose your precious
time and thanks for help anyway!

-- 
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 #665405]: Parallelism inconsistency

2018-03-09 Thread Bruno Chareyre
Question #665405 on Yade changed:
https://answers.launchpad.net/yade/+question/665405

Bruno Chareyre posted a new comment:
Hi,
I would say this is not a misfeature that one wants to avoid. Instead it is an 
opportunity to assess indeterminism, which is in most cases inherent to the 
underlying physics.
Re-ordering the bodies (i.e renumbering) while keeping everything else the same 
would give similar fluctuations in single thread yet I don't think anyone would 
claim that one numbering is better than another.
The single thread result is like selecting one numbering and sticking to it, 
while parallel runs are like renumbering randomly each time.
If the fluctuations are about 100% it is an interesting indication that the 
physical problem could be somehow ill-posed. Like asking in which direction a 
sphere will fall if you put it right on the top of a needle.
Regards
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 #665379]: penetrationDepth calculation

2018-03-09 Thread Andrea Puglisi
Question #665379 on Yade changed:
https://answers.launchpad.net/yade/+question/665379

Status: Answered => Open

Andrea Puglisi is still having a problem:
Thanks Jan and Bruno. From Jan'answer I understand that the variable
shift2 should not be a problem in my example (I have no periodicity, it
is just a collision between two spheres). From Bruno's answer I learn
that there is something wrong in my script where I measure both the
quantity overlap=2*r-(x2-x1)  (I have x2>x1) and the quantity
interaction.geom.penetrationDepth and they do not coincide.

My script is the following. The graph of the two quantity  penetrationDepth vs. 
overlap can be found at this shared link
https://drive.google.com/file/d/1r6YWwbg56jIN3EGB4RzoBRGHgHyHAhir/view?usp=sharing

#!/usr/bin/python
# -*- coding: utf-8 -*-

from yade import pack,ymport,export,geom,bodiesHandling,qt,plot
import math

rad = 0.00774

f=open("forces.dat" , "w")
def forces():
x1 = O.bodies[0].state.pos[0]
v1 = O.bodies[0].state.vel[0]
v2 = O.bodies[1].state.vel[0]
x2 = O.bodies[1].state.pos[0]
ov = 2*rad-(x2-x1)
intrs = O.bodies[0].intrs()
if (len(intrs)):
nfx = intrs[0].phys.normalForce[0]
nfy = intrs[0].phys.normalForce[1]
nfz = intrs[0].phys.normalForce[2]
sfx = intrs[0].phys.shearForce[0]
sfy = intrs[0].phys.shearForce[1]
sfz = intrs[0].phys.normalForce[2]
dep = intrs[0].geom.penetrationDepth

else:
nfx = nfy = nfz = sfx = sfy = sfz = dep = 0
f.write ("%6d %12.8f %12.8f %12.8f %12.8f %9.6f %9.6f %9.6f %9.6f %9.6f 
%9.6f %12.8f\n" %   (O.iter,O.time,ov,v1,v2,nfx,nfy,nfz,sfx,sfy,sfz,dep))
f.flush()

O.materials.append(FrictMat(young=0.1e9,poisson=.22,frictionAngle=0,density=2300,label='glass'))
Sph_1 = O.bodies.append([sphere([0,0,0], radius=rad, material = "glass")])
Sph_2 = O.bodies.append([sphere([0.1,0,0], radius=rad, material = "glass")])
O.bodies[1].state.vel = Vector3(-0.3,0,0)
O.bodies[0].state.vel = Vector3(0.3,0,0)

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),  
],label='collider'),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_MindlinPhys()],  
[Law2_ScGeom_MindlinPhys_Mindlin()],
),
NewtonIntegrator(damping=0.0,exactAsphericalRot=True,gravity=(0,0,0)),
PyRunner(command='forces()', iterPeriod=1),
]


O.dt=PWaveTimeStep()  
try:
from yade import qt
qt.Controller()
qt.View()
except ImportError: pass
O.saveTmp()
O.timingEnabled=True

-- 
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 #665385]: Clumping the big number of grains

2018-03-09 Thread Bruno Chareyre
Question #665385 on Yade changed:
https://answers.launchpad.net/yade/+question/665385

Status: Open => Answered

Bruno Chareyre proposed the following answer:
Hi,
O.bodies.appendClumped() takes a list of bodies as input regardless of the 
number of bodies in the list.
What is the problem with large clumps?
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 #665379]: penetrationDepth calculation

2018-03-09 Thread Bruno Chareyre
Question #665379 on Yade changed:
https://answers.launchpad.net/yade/+question/665379

Bruno Chareyre proposed the following answer:
Hi, 
It does correspond to x1-x2-2*r.
Cheers
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 #665361]: Cylindrical Specimens for Triaxial modelling

2018-03-09 Thread Bruno Chareyre
Question #665361 on Yade changed:
https://answers.launchpad.net/yade/+question/665361

Status: Open => Answered

Bruno Chareyre proposed the following answer:
Hi, there is still no easy method to simulate a cylindrical boundary presently.
Simulate a different specimen shape is inconsequential in most cases 
fortunately, besides the fact that it does not "look like" the lab specimens.
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 #665293]: Issues with implementation of Law2_ScGeom_CapillaryPhys_Capillarity

2018-03-09 Thread Bruno Chareyre
Question #665293 on Yade changed:
https://answers.launchpad.net/yade/+question/665293

Status: Open => Answered

Bruno Chareyre proposed the following answer:
The normalized capillary pressure Pc*D/σ (D: particle size, σ surface tension) 
is approximately 10 at air entry [1]. It suggests a lower bound which you can 
use as a reference value to scale pressure wrt. particle size and surface 
tension.
Not sure this is what you are asking though.
Bruno

[1] https://www.sciencedirect.com/science/article/pii/S0045782516307216

-- 
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 #665405]: Parallelism inconsistency

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

JOHN gave more information on the question:
And now my new simulation is ~100% different. Reading the source i got
the feeling that such large fluctuations are not normal

-- 
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 #665379]: penetrationDepth calculation

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

Status: Open => Answered

Jan Stránský proposed the following answer:
Hello Andrea,
shift2 is used for periodic contact detection, have a look at [1]. See [2] for 
the meaning of Interaction::cellDist.
cheers
Jan

[1] 
https://github.com/yade/trunk/blob/master/pkg/common/InteractionLoop.cpp#L113
[2] 
https://yade-dem.org/doc/formulation.html#collision-detection-in-periodic-cell

-- 
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 #665405]: Parallelism inconsistency

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

Status: Open => Needs information

Jan Stránský requested more information:
Hi John,
in general it depends very much on the problem and how you measure fluctuation. 
I am afraid there is no way to decrease the effect with current implementation..
Can you please post your example (ideally in the minimal form)?
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 #662529]: References for randomDensePack

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

Jan Stránský posted a new comment:
Thanks guys for tips
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 #662529]: References for randomDensePack

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

Status: Answered => Solved

Jan Stránský confirmed that the question is solved:
Thanks Robert Caulk, 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 #665405]: Parallelism inconsistency

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

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 #665405]: Parallelism inconsistency

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

Status: Needs information => Solved

JOHN confirmed that the question is solved:
Hi, 
thanks again. My example is unfortunately not easily given in minimal form. 
The simulation itself just creates a hexagonal packing, imports an stl, 
substracts spheres that are in or partially in the walls and runs with the 
following engine
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'),


the tricky part is an outside function that calculates rotations which is not 
easily given in minimal form

-- 
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 #665405]: Parallelism inconsistency

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

Status: Answered => Open

JOHN is still having a problem:
Hi Jan,
thanks for the info!
That makes sense. Though it seems like there is no way around it, is it 
possible to decrease that effect? I am now seeing up to ~15% difference in some 
simulations
Thanks again
cheers
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 #665341]: iterations in c++

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

Status: Open => Solved

JOHN confirmed that the question is solved:
nevermind, i compiled the yade trunk myself and i was able to link with
the correct hpp files

-- 
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 #665405]: Parallelism inconsistency

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

Status: Open => Answered

Jan Stránský proposed the following answer:
Hi John,
yes, this is a known issue, see [1]
cheers
Jan

[1] https://yade-dem.org/doc/formulation.html#result-indeterminism

-- 
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 #665405]: Parallelism inconsistency

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

Good evening,
I recently tried yade in parallel.  To test it, i created a scene and then 
loaded it  with various thread numbers.
With 1 thread the data was consistently the same (positions times till the end 
etc)
with more, there were differences.
The particles werent that many at the beginning (1330) but the message  saying
WARN  /build/yade-KKgSmd/yade-1.20.0/pkg/common/InsertionSortCollider.cpp:80 
insertionSortParallel: Parallel insertion: only 2 thread(s) used. The number of 
bodies is probably too small for allowing more threads, or the geometry is 
flat. The contact detection should succeed but not all available threads are 
used.

didnt appear for 2 threads(oviously), which also produced differences

One thing is that the number of particles decreases with the simulation time.
I cant think however why the results would vary for 2 threads anyway (openmp is 
safer than mpi)

Is this a known issue? Any suggestions?
Thank you very much in advance

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