Re: [Yade-users] [Question #688280]: How to generate tiny particles in pore space

2020-01-30 Thread Leonard
Question #688280 on Yade changed:
https://answers.launchpad.net/yade/+question/688280

Status: Answered => Solved

Leonard confirmed that the question is solved:
Hi Jan,

> I tested the approach you suggested, it works very well, thanks.

> rRelFuzz is a relative value.
Thanks for your kind notification.

Cheers
Leonard

-- 
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 #688367]: Yade 2019.01a uses python2 or python3

2020-01-30 Thread Leonard
Question #688367 on Yade changed:
https://answers.launchpad.net/yade/+question/688367

Status: Answered => Solved

Leonard 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 #688370]: Two concentric cylinders but subtracting out the inner cylinder

2020-01-30 Thread Jan Stránský
Question #688370 on Yade changed:
https://answers.launchpad.net/yade/+question/688370

Status: Open => Answered

Jan Stránský proposed the following answer:
pack.randomDensePack has predicate as a parameter.
You are using makeCloud, which is only initiated in a "box". You need to filter 
the packing to "crop" particles you don't want:
###
sp=pack.SpherePack()
sp.makeCloud(...)
predicate = pack.inCylinder(paramsOuter) - pack.inCylinder(paramsInner)
sp = pack.filterSpherePack(predicate,sp,returnSpherePack=True) # [1]
sp.toSimulation()
###

cheers
Jan

[1] https://yade-dem.org/doc/yade.pack.html#yade.pack.filterSpherePack

-- 
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 #688367]: Yade 2019.01a uses python2 or python3

2020-01-30 Thread Jan Stránský
Question #688367 on Yade changed:
https://answers.launchpad.net/yade/+question/688367

Status: Open => Answered

Jan Stránský proposed the following answer:
Hi,
start Yade and execute:
import sys; print(sys.version)
it will tell you the python version used
cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #688370]: Two concentric cylinders but subtracting out the inner cylinder

2020-01-30 Thread Kevin
New question #688370 on Yade:
https://answers.launchpad.net/yade/+question/688370

I am still having trouble filling in the outer cylinder while leaving inner 
cylinder empty. I searched the Yade book for usage in predicates but I do not 
understand how to implement this in my code (specifically Pages 50 and 51 using 
Boolean algebra to deduct the inner volume from the outer volume leaving an 
image similar to Image 4.4 but instead of a cylinder-shaped void in a box, I 
want to have a cylinder -shaped void inside a larger cylinder. I am pretty 
basic at this and any direction would be greatly appreciated!

Here is the code they gave in the Yade manual...

pred=pack.inAlignedBox((-2,-2,-2),(2,2,2))-pack.inCylinder((0,-2,0),(0,2,0),1)
spheres=pack.randomDensePack(pred,spheresInCell=2000,radius=.1,rRelFuzz=.4)

Now the problem I have is how to correctly format my Cylinder_In and 
Cylinder_Out to allow for the above code to work?

from yade import pack, qt, export

cylinder_outer=O.bodies.append(geom.facetCylinder(center=(0,0,125),radius=70,height=200,segmentsNumber=20,wallMask=7,closeGap=True))

cylinder_inner=O.bodies.append(geom.facetCylinder(center=(0,0,125),radius=30,height=200,segmentsNumber=20,wallMask=7,closeGap=True))

sp=pack.SpherePack()

#These are taken from another code so I commented them out for now...

#diameter=[3.600,3.640,3.680,3.720,3.760,3.800,3.840,3.880,3.920,3.960,4.000,4.040,4.080,4.120,4.160,4.200,4.240,4.280,4.320,
  
#4.360,4.400,4.440,4.480,4.520,4.560,4.600,4.640,4.680,4.720,4.760,4.800,4.840,4.880,4.920,4.960,5.000,5.040,5.080,
  #5.120,5.160,5.200,5.240,5.280,5.320,5.360,5.400]

#cum=[0.001,0.002,0.003,0.005,0.007,0.010,0.014,0.019,0.027,0.036,0.048,0.063,0.081,0.103,0.129,0.159,0.193,0.232,0.274,
 
#0.320,0.369,0.421,0.473,0.527,0.579,0.631,0.680,0.726,0.768,0.807,0.841,0.871,0.897,0.919,0.937,0.952,0.964,0.973,
 #0.981,0.986,0.990,0.993,0.995,0.997,0.998,1.000]

sp.makeCloud((-10,-10,155),(10,10,195),rMean=2.5,rRelFuzz=2,distributeMass=False)

sp.toSimulation()

yade.qt.Controller()
yade.qt.View()

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()]
 ),
#HarmonicMotionEngine(A=[0,1.5,0],f=[0,0.3,0],ids=cylinder_inner),
 NewtonIntegrator(gravity=(0,0,-9.81),damping=0.5),
 PyRunner(command='iterations()',realPeriod=2)
]
O.dt=.5*PWaveTimeStep()

#I commented out the Harmonic Motion Engine at the moment

def iterations():
   O.stopAtIter=8
   export.text('pack.txt')

Thank you in advance!

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688366]: Error to get the final value of minimum and maximum radius

2020-01-30 Thread ehsan benabbas
Question #688366 on Yade changed:
https://answers.launchpad.net/yade/+question/688366

Status: Open => Solved

ehsan benabbas confirmed that the question is solved:
I solved my problem.

-- 
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 #688367]: Yade 2019.01a uses python2 or python3

2020-01-30 Thread Leonard
New question #688367 on Yade:
https://answers.launchpad.net/yade/+question/688367

Hi,
Just a quick question.
I moved to Ubuntu19.04, and installed Yade 2019.01a.
I wonder which python version Yade 2019.01a uses, so that I will install 
anaconda 2 or 3 correspondingly.
Thanks,
Leonard

-- 
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 #688366]: Error to get the final value of minimum and maximum radius

2020-01-30 Thread ehsan benabbas
New question #688366 on Yade:
https://answers.launchpad.net/yade/+question/688366

Hello,

I am using Ubuntu 18.04, and Yade 2019-08-08.git-775ae74

I have my code done based on [1] and somewhere at the middle of code I want to 
get the values of maximum and minimum radius of the packing. I used the 
following commands based on the YADE documentation:

RRmax=max([b.shape.rMax for b in O.bodies])
RRmin=min([b.shape.rMin for b in O.bodies])
print('Maximum Radius',RRmax)
print('Minimum Radius',RRmin)

And got the following error:

## Target porosity is reached and compacted state saved 
successfully ##
Number of elements: 1006
Box Volume engine: 1.0
Box Volume calculated: 1.0
*** Volume calculation is Correct. ***
Total volume of particles (Vs): 0.6002612317262881
Total volume of voids Calculated (Vv): 0.3997387682737119
porosity: 0.3997387682737119
porosity Calculated (n): 0.3997387682737119
Porosity calculation is Correct.
Void ratio Calculated (e): 0.6659413387802929
step that starts the deviatoric loading  70.0
Traceback (most recent call last):
  File "/home/ehsan/yade/install/bin/yade-2019-08-08.git-775ae74", line 336, in 
runScript
execfile(script,globals())
  File "/usr/lib/python3/dist-packages/past/builtins/misc.py", line 82, in 
execfile
exec_(code, myglobals, mylocals)
  File "Q.py", line 224, in 
+(['"\e[24~": "\C-Uyade.qt.Controller();\C-M"','"\e[23~": 
"\C-Uyade.qt.View();\C-M"','"\e[21~": "\C-Uyade.qt.Controller(), 
yade.qt.View();\C-M"','"\e[20~": "\C-Uyade.qt.Generator();\C-M"'] if 
(gui!='none') else []) #F12,F11,F10,F9
  File "Q.py", line 224, in 
+(['"\e[24~": "\C-Uyade.qt.Controller();\C-M"','"\e[23~": 
"\C-Uyade.qt.View();\C-M"','"\e[21~": "\C-Uyade.qt.Controller(), 
yade.qt.View();\C-M"','"\e[20~": "\C-Uyade.qt.Generator();\C-M"'] if 
(gui!='none') else []) #F12,F11,F10,F9
AttributeError: 'Box' object has no attribute 'rMax'
[[ ^L clears screen, ^U kills line. F12 controller, F11 3D view (press "h" in 
3D view for help), F10 both, F9 generator, F8 plot. ]]

In [1]:  

P.S: I developed my code based on [1]
[1] 
https://gitlab.com/yade-dev/trunk/blob/master/examples/triax-tutorial/script-session1.py




How can I get the value of maximum and minimum radius of the packing?

Regards,
Ehsan

-- 
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 #688343]: Slow calculation speed with a large number of facets imported from stl mesh

2020-01-30 Thread gaoxuesong
Question #688343 on Yade changed:
https://answers.launchpad.net/yade/+question/688343

Status: Answered => Solved

gaoxuesong confirmed that the question is solved:
Thanks, Jan. I cut off some parts of the mesh and get a total number of
93,011. The calculation speed is 60 iter/s. i think this can be
acceptable.

-- 
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 #688342]: how to use plt.plot in Yade?

2020-01-30 Thread ehsan benabbas
Question #688342 on Yade changed:
https://answers.launchpad.net/yade/+question/688342

Status: Answered => Solved

ehsan benabbas confirmed that the question is solved:
Thank you Jan. You're awesome. That solved my problem and my code is
kind of finalized now. I tried to make it nicer and make README file to
publish it in Github for others. Thanks again.

-- 
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 #688345]: Precrack

2020-01-30 Thread Robert Caulk
Question #688345 on Yade changed:
https://answers.launchpad.net/yade/+question/688345

Robert Caulk proposed the following answer:
Also, if you are thinking about using smooth joint logic, then you would
use [1].

[1]https://yade-
dem.org/doc/yade.wrapper.html#yade.wrapper.JCFpmPhys.isOnJoint

-- 
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 #688345]: Precrack

2020-01-30 Thread Robert Caulk
Question #688345 on Yade changed:
https://answers.launchpad.net/yade/+question/688345

Status: Open => Answered

Robert Caulk proposed the following answer:
i.phys.isCohesive = False [1]

Where i is the interaction between two particles of interest (e.g. 11
and 16).

[1]https://yade-
dem.org/doc/yade.wrapper.html#yade.wrapper.JCFpmPhys.isCohesive

-- 
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 #688343]: Slow calculation speed with a large number of facets imported from stl mesh

2020-01-30 Thread Jan Stránský
Question #688343 on Yade changed:
https://answers.launchpad.net/yade/+question/688343

Status: Open => Answered

Jan Stránský proposed the following answer:
> spherical particles is 6,000 and the number of the facets from stl mesh is 
> 447,262.
> i am wondering how to deal with a large number of facets to increase 
> calculation speed?

decrease the number of facets :-)
Is it possible/reasonable to use a coarser mesh? E.g. removing or merging 
facets significantly smaller than spheres?

In principal, I think it could be possible to make if faster adjusting
the source code (like storing and evaluating strictly fixed bodies
differently than dynamic bodies), but definitely it will not be "out of
the box".

cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688340]: Problem about running yade in parallel

2020-01-30 Thread Jan Stránský
Question #688340 on Yade changed:
https://answers.launchpad.net/yade/+question/688340

Jan Stránský posted a new comment:
I am using Ubuntu 18.04 LTS.
I have tried with yade 2018-02b without any problem
Then I used relatively new source version (2020-01-06.git-f6677ba) and got 
segmentation fault :-D
Please open a bug (referencing this question).
cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #688342]: how to use plt.plot in Yade?

2020-01-30 Thread Jan Stránský
Question #688342 on Yade changed:
https://answers.launchpad.net/yade/+question/688342

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

> how to use plt.plot in Yade?

the same way as in any other python script

> My main problem with plot.plot is I cannot make multiple figures for
multiple plots (not subplots).

see [1]. a MWE:
###
from yade import plot
plot.addData(a=1,b=2,c=3)
plot.addData(a=2,b=3,c=1)
plot.plots = {
   "a":"b",
   "b": ("a","c"),
   "a ": ("b",None,"c"),
}
plot.plot()
###

> File "test.py", line 295, in 

next time please post complete script, here we have no idea why e22 is
not defined or what could be wrong

> as these variables are defined in a function(addplot history
function).

if you mean something like
plot.addData(e22=something)
then please note that e22 is NOT a variable nor variable name, merely parameter 
name for addData function.

However, what is passed to plot.addData is stored in plot.data dictionary, so 
you can access it as
e22 = plot.data["e22"]

cheers
Jan

[1] https://yade-dev.gitlab.io/trunk/user.html#multiple-figures

-- 
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 #688342]: how to use plt.plot in Yade?

2020-01-30 Thread Robert Caulk
Question #688342 on Yade changed:
https://answers.launchpad.net/yade/+question/688342

Status: Open => Answered

Robert Caulk proposed the following answer:
>> I give error as these variables are defined in a function(addplot history 
>> function). 
>>NameError: name 'e22' is not defined

addplot is a yade function, not a matplotlib function. Matplotlib does
not know e22 exists in a different function in a different library.
Hence: 'e22' is not defined. Try defining e22 :-)

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