Re: [Yade-users] [Question #274102]: MakeCloud and randomDensePack Documentation

2015-11-13 Thread Son Pham Thai
Question #274102 on Yade changed:
https://answers.launchpad.net/yade/+question/274102

Son Pham Thai proposed the following answer:
Hi,
I would like to recommend these:

https://yade-
dem.org/doc/yade.pack.html#yade._packSpheres.SpherePack.makeCloud

https://yade-dem.org/doc/yade.pack.html#yade.pack.randomDensePack

Regards,
Son.

-- 
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 #239596]: FlowEngine is not defined in yade-daily - On Ubuntu 13.10

2016-09-05 Thread Son Pham Thai
Question #239596 on Yade changed:
https://answers.launchpad.net/yade/+question/239596

Son Pham Thai posted a new comment:
Hi Jérôme,

Thank for your reply. Following your suggestion, I have uncommented
(deleted the //) line 16 of trunk/pkg/pfv/TwoPhaseFlowEngine.hpp (in my
"trunk" folder), BEFORE the compilation.

And now, it works fine :)

Thanks Jérôme Duriez,  my question has been solved.

Regards,
Son.

-- 
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 #668081]: Problem with matplotlib.pyplot

2018-04-19 Thread Son Pham Thai
Question #668081 on Yade changed:
https://answers.launchpad.net/yade/+question/668081

Son Pham Thai posted a new comment:
Hi Jan,

I followed this instruction:
https://yade-dem.org/doc/installation.html#compilation

I downloaded the zip file from :
https://github.com/yade/trunk

and then exact that zip file to my "trunk" folder.

By doing this, I got version id for my Yade as "Unknown"

-- 
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 #668081]: Problem with matplotlib.pyplot

2018-04-19 Thread Son Pham Thai
Question #668081 on Yade changed:
https://answers.launchpad.net/yade/+question/668081

Son Pham Thai posted a new comment:
Hi Jan,

1. What I have done:

sudo add-apt-repository ppa:yade-users/external
sudo apt-get update

sudo apt-get install cmake git freeglut3-dev libloki-dev \
libboost-all-dev fakeroot dpkg-dev build-essential g++ \
python-dev ipython python-matplotlib libsqlite3-dev python-numpy python-tk 
gnuplot \
libgts-dev python-pygraphviz libvtk6-dev python-numpy libeigen3-dev \
python-xlib python-pyqt5 pyqt5-dev-tools python-pyqt5.qtwebkit 
gtk2-engines-pixbuf python-argparse \
libqglviewer-dev python-imaging libjs-jquery python-sphinx python-git 
python-bibtex \
libxmu-dev libxi-dev libcgal-dev help2man libbz2-dev zlib1g-dev python-minieigen

(after this command, i got:
Note, selecting 'libpython2.7-stdlib' instead of 'python-argparse'
E: Unable to locate package python-pyqt5
E: Unable to locate package python-pyqt5.qtwebkit
E: Couldn't find any package by regex 'python-pyqt5.qtwebkit'

sudo apt-get install python-gts
sudo apt-get install libopenblas-dev libsuitesparse-metis-dev

sudo add-apt-repository ppa:yade-users/external
sudo apt-get update

My folder structure:
myYade/
trunk/ ## downloaded from https://github.com/yade/trunk
build/ ## 
install/ ## initially is a blank folder

 cd Desktop/myYade/build

cmake -DCMAKE_INSTALL_PREFIX=/home/son/Desktop/myYade/install
/home/son/Desktop/myYade/trunk -DUSE_QT5=OFF -DTWOPHASEFLOW=ON
-DDEBUG=ON

make -j4


make install

cd

cd Desktop/myYade/install/bin

./yade-Unknown


2. When I installed default Ubuntu yade by:
sudo apt-get install yade

Then I got no error with those plot commands:

 ->  [4]: []

-- 
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 #668081]: Problem with matplotlib.pyplot

2018-04-19 Thread Son Pham Thai
Question #668081 on Yade changed:
https://answers.launchpad.net/yade/+question/668081

Son Pham Thai posted a new comment:
Hi Jan,

When I  recompiled with -DUSE_QT5=ON, I got cmake error:

CMake Error at CMakeLists.txt:246 (FIND_PACKAGE):
  Could not find a package configuration file provided by "Qt5" with any of
  the following names:

Qt5Config.cmake
qt5-config.cmake

  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  to a directory containing one of the above files.  If "Qt5" provides a
  separate development package or SDK, be sure it has been installed.


-- Configuring incomplete, errors occurred!

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 #668081]: Problem with matplotlib.pyplot

2018-04-19 Thread Son Pham Thai
Question #668081 on Yade changed:
https://answers.launchpad.net/yade/+question/668081

Son Pham Thai posted a new comment:
Hi Jérôme,

Using ipython, I got no error:

Out[4]: []

-- 
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 #668081]: Problem with matplotlib.pyplot

2018-04-19 Thread Son Pham Thai
Question #668081 on Yade changed:
https://answers.launchpad.net/yade/+question/668081

Status: Solved => Open

Son Pham Thai is still having a problem:
Hi,

What a shame on me, I just realized that  I was in my Ubuntu 14 OS (not
Ubuntu 16), that's why I did not have the mentioned problem. The problem
in Ubuntu 16 is still there.

@Jan,
I did not run any code before, just fresh start Yade and run that code and got 
the above error.

-- 
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 #668081]: Problem with matplotlib.pyplot

2018-04-19 Thread Son Pham Thai
New question #668081 on Yade:
https://answers.launchpad.net/yade/+question/668081

Hi all, 

I am using Ubuntu 16.04 and Yade-daily package.

I got this problem when I run a simple "plot":

a=[1,2,3]
b=[2,3,4]
import matplotlib.pyplot as plt
plt.plot(a,b)

---
IndexErrorTraceback (most recent call last)
/home/son/Desktop/myYade/install/bin/yade in ()
  2 b=[2,3,4]
  3 import matplotlib.pyplot as plt
> 4 plt.plot(a,b)

/usr/lib/pymodules/python2.7/matplotlib/pyplot.pyc in plot(*args, **kwargs)
   2978 @_autogen_docstring(Axes.plot)
   2979 def plot(*args, **kwargs):
-> 2980 ax = gca()
   2981 # allow callers to override the hold state by passing 
hold=True|False
   2982 washold = ax.ishold()

/usr/lib/pymodules/python2.7/matplotlib/pyplot.pyc in gca(**kwargs)
801 """
802 
--> 803 ax =  gcf().gca(**kwargs)
804 return ax
805 

/usr/lib/pymodules/python2.7/matplotlib/pyplot.pyc in gcf()
448 return figManager.canvas.figure
449 else:
--> 450 return figure()
451 
452 fignum_exists = _pylab_helpers.Gcf.has_fignum

/usr/lib/pymodules/python2.7/matplotlib/pyplot.pyc in figure(num, figsize, dpi, 
facecolor, edgecolor, frameon, FigureClass, **kwargs)
421 frameon=frameon,
422 FigureClass=FigureClass,
--> 423 **kwargs)
424 
425 if figLabel:

/usr/lib/pymodules/python2.7/matplotlib/backends/backend_tkagg.pyc in 
new_figure_manager(num, *args, **kwargs)
 77 FigureClass = kwargs.pop('FigureClass', Figure)
 78 figure = FigureClass(*args, **kwargs)
---> 79 return new_figure_manager_given_figure(num, figure)
 80 
 81 

/usr/lib/pymodules/python2.7/matplotlib/backends/backend_tkagg.pyc in 
new_figure_manager_given_figure(num, figure)
 85 """
 86 _focus = windowing.FocusManager()
---> 87 window = Tk.Tk()
 88 window.withdraw()
 89 

/usr/lib/python2.7/lib-tk/Tkinter.pyc in __init__(self, screenName, baseName, 
className, useTk, sync, use)
   1760 if baseName is None:
   1761 import os
-> 1762 baseName = os.path.basename(sys.argv[0])
   1763 baseName, ext = os.path.splitext(baseName)
   1764 if ext not in ('.py', '.pyc', '.pyo'):

IndexError: list index out of range

Any help is greatly appreciate!
Thank you :)
Son.

-- 
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 #668081]: Problem with matplotlib.pyplot

2018-04-19 Thread Son Pham Thai
Question #668081 on Yade changed:
https://answers.launchpad.net/yade/+question/668081

Status: Needs information => Solved

Son Pham Thai confirmed that the question is solved:
Hi Jan,

I used Ubuntu 14.04 and there was no problem. When I install Ubuntu 16
and install Yade, I got this problem. I have tried again and I think the
problem could somehow relate to this (part of instruction for
installation in [1]):

sudo apt-get install cmake git freeglut3-dev libloki-dev \
libboost-all-dev fakeroot dpkg-dev build-essential g++ \
python-dev ipython python-matplotlib libsqlite3-dev python-numpy python-tk 
gnuplot \
libgts-dev python-pygraphviz libvtk6-dev python-numpy libeigen3-dev \
python-xlib python-pyqt5 pyqt5-dev-tools python-pyqt5.qtwebkit 
gtk2-engines-pixbuf python-argparse \
libqglviewer-dev python-imaging libjs-jquery python-sphinx python-git 
python-bibtex \
libxmu-dev libxi-dev libcgal-dev help2man libbz2-dev zlib1g-dev python-minieigen

I try re-running this command again with separated  line (not using \
anymore) and the problem with plot function is gone.


[1]. https://yade-dem.org/doc/installation.html

My problem has been solved.

Thank you ;)
Son

-- 
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 #668081]: Problem with matplotlib.pyplot

2018-04-19 Thread Son Pham Thai
Question #668081 on Yade changed:
https://answers.launchpad.net/yade/+question/668081

Status: Answered => Open

Son Pham Thai is still having a problem:
Hi Jérôme,

Thank you for the YADE installation clarification and I am sorry for my
wrong description regarding "yade-daily package".

Considering the YADE version I have now:
$ ./yade-Unknown
Welcome to Yade Unknown 

DEBUG /home/son/Desktop/myYade/trunk/core/Omega.hpp:106 Omega:
Constructing Omega.

DEBUG /home/son/Desktop/myYade/trunk/core/Omega.cpp:209 loadPlugins:
Loading plugin /home/son/Desktop/myYade/install/lib/x86_64-linux-gnu
/yade-Unknown/libyade.so

DEBUG /home/son/Desktop/myYade/trunk/core/Omega.cpp:134
buildDynlibDatabase: called with 299 plugins.

...

DEBUG /home/son/Desktop/myYade/trunk/pkg/dem/FlatGridCollider.cpp:44 
initIndices: sphereIdx=1
DEBUG /home/son/Desktop/myYade/trunk/pkg/dem/FlatGridCollider.cpp:44 
initIndices: sphereIdx=1

TCP python prompt on localhost:9000, auth cookie `eyuscd'
XMLRPC info provider on http://localhost:21000
[[ ^L clears screen, ^U kills line. F8 plot. ]]

And by the way, when I press F8, I got this error:

Yade [1]: import yade.plot; yade.plot.plot();
---
IndexErrorTraceback (most recent call last)
/home/son/Desktop/myYade/install/bin/yade-Unknown in ()
> 1 import yade.plot; yade.plot.plot();

/home/son/Desktop/myYade/install/lib/x86_64-linux-gnu/yade-Unknown/py/yade/plot.pyc
 in plot(noShow, subPlots)
595 global currLineRefs
596 figs=set([l.line.axes.get_figure() for l in currLineRefs])
--> 597 if not hasattr(list(figs)[0],'show') and not noShow:
598 import warnings
599 warnings.warn('plot.plot not showing figure (matplotlib 
using headless backend?)')

IndexError: list index out of range

My initial desire is how to fix the error of this "plot" function.

-- 
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 #668081]: Problem with matplotlib.pyplot

2018-04-19 Thread Son Pham Thai
Question #668081 on Yade changed:
https://answers.launchpad.net/yade/+question/668081

Son Pham Thai posted a new comment:
Hi,

Sorry for the late reply, I just had a meeting.

I have also tried installing Yade in another PC (with Ubuntu 14.04) and
I got the same error.

I just want to know what my mistake is.

Thank you all for your time and advise!
Cheers, 
Son

-- 
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 #676609]: problem with createInteraction() command

2018-12-05 Thread Son Pham Thai
New question #676609 on Yade:
https://answers.launchpad.net/yade/+question/676609

Hi all, 

When I used createInteraction() command to manually create intrs between 2 
spheres, I got an error:

RuntimeError: Interaction #39+#18 already exists.

I have then check these 2 spheres #39 and #18:

Sphere #39 has no intrs, len(O.bodies[39].intrs()) = 0, while sphere #18 has 7 
intrs but #39 is not in the neighboring list of sphere #18. 

Please see the MWE (Minimal Working Example™) generating this error down below. 
Please let me know why I have this RuntimeError error?

Best regards, 
Thai-Son

PS: I have also tried aabbEnlargeFactor and interactionDetectionFactor but I 
could not obtain what I want, that's why I have to try doing this 
createInteraction manually.  To be more specified, what I want is that all 
spheres in the packing has at least 1 intrs. 

#-- MWE   
--#
# encoding: utf-8
# 
-- #

###
### INPUT PARAMETERs   ###
###

seed0=1 # = 1 -> same packing everytime
distributeMass0=False # True -> Mass fraction, False -> PARTICLE COUNT fraction

num_spheres0=200
mx=Vector3(.4e-2,.6e-2,.4e-2) # size of aggregate
mn=Vector3(0,0,0)
porosity0=0.4
rRelFuzz0=0.7 # for the case of polydisperse

compFricDegree = 15.0 # initial contact friction during the confining phase 
(will be decreased during the REFD compaction process)
confiningS=-1e5
surfaceTension=0.07274 # [N/m]
young0= 50e9 # 50 GPa
poisson0= 0.2 
density0 = 2530 # 2.53 g/cm3 = 2530 kg/m3
tensileStrength = 3.3e9 # 3.3 GPa
shearStrength = 3.3e9 # 3.3 GPa


##   GENERATING PARTICLE PACKING ###

from yade import pack
import pylab

O.materials.append(CohFrictMat(young=young0,poisson=poisson0,density=density0,frictionAngle=radians(compFricDegree),
 normalCohesion=tensileStrength, shearCohesion=shearStrength, 
momentRotationLaw=True,etaRoll=0.1,label='spheres'))
O.materials.append(FrictMat(young=young0,poisson=poisson0,frictionAngle=0,density=0,label='frictionlessWalls'))

walls=aabbWalls((mn,mx),thickness=0,material='frictionlessWalls')
wallIds=O.bodies.append(walls)

### Aggregate generation ###

num_spheres1D=int(round(num_spheres0**(1./3))) # for calculation of rMean0
sp=pack.SpherePack()
rMean0=(1-rRelFuzz0) * ((mx[0]/num_spheres1D)/2) # Irregular case, in order to 
obtain: num_spheres_real not less than num_spheres
sp.makeCloud(minCorner=mn,maxCorner=mx,rMean=rMean0,rRelFuzz=rRelFuzz0,porosity=porosity0,num=num_spheres0,distributeMass=distributeMass0,seed=seed0)

O.bodies.append([utils.sphere(center,rad,material='spheres') for center,rad in 
sp])

### mechanical loading  To confer a solid-like nature to the packing

triax=TriaxialStressController(
internalCompaction=True,
goal1=confiningS,
goal2=confiningS,
goal3=confiningS,
max_vel=10,
label="triax"
)

newton=NewtonIntegrator(damping=0.4)

unsat=UnsaturatedEngine(dead=1,label="unsat")

# ---
O.engines=[
ForceResetter(),
### Collsion detector 
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),

### Interaction handling
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom()], 

[Ip2_FrictMat_FrictMat_FrictPhys(),Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(label="cohesiveIp")],


[Law2_ScGeom_FrictPhys_CundallStrack(),Law2_ScGeom6D_CohFrictPhys_CohesionMoment(
useIncrementalForm=True, #useIncrementalForm is turned 
on as we want plasticity on the contact moments
always_use_moment_law=False,  #if we want "rolling" 
friction even if the contact is not cohesive (or cohesion is broken), we will 
have to turn this true somewhere
label='cohesiveLaw')]
),

GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=1,timestepSafetyCoefficient=0.5),
triax,
newton
]

# ---
numDEMiter1stDEMloop=3000
numDEMiter2ndDEMloop=2000
numDEMiter3rdDEMloop=500
numDEMiterPerDryIter=250

while 1:
O.run(numDEMiter1stDEMloop,True) 
unb=unbalancedForce()
if unb<0.01 and 
abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.001:
break
##   REACH NEW EQU. STATE ###
finalFricDegree = 30 # contact friction during the deviatoric loading

# We move to deviatoric loading, let us turn internal compaction off to keep 
particles sizes constant
triax.internalCompaction=False
# Change contact friction (remember that decreasing it would generate 
instantaneous instabilities)
setContactFriction(radians(finalFricDegree))


Re: [Yade-users] [Question #676609]: problem with createInteraction() command

2018-12-05 Thread Son Pham Thai
Question #676609 on Yade changed:
https://answers.launchpad.net/yade/+question/676609

Son Pham Thai 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 #676609]: problem with createInteraction() command

2018-12-05 Thread Son Pham Thai
Question #676609 on Yade changed:
https://answers.launchpad.net/yade/+question/676609

Status: Answered => Solved

Son Pham Thai confirmed that the question is solved:
Hi Jérôme,

Thank you for your response.

O.interactions[39,18] returns this:

I am reading about this real and not-real-yet interaction in Yade
documentation now.

Cheers, 
Thai-Son

-- 
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 #676609]: problem with createInteraction() command

2018-12-06 Thread Son Pham Thai
Question #676609 on Yade changed:
https://answers.launchpad.net/yade/+question/676609

Son Pham Thai posted a new comment:
Hi Bruno,

Thank you very much for the new commit ;)

Cheers, 
Son.

-- 
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 #679445]: YADE Crash - SIGSEGV/SIGABRT handler called

2019-03-26 Thread Son Pham Thai
Question #679445 on Yade changed:
https://answers.launchpad.net/yade/+question/679445

Status: Needs information => Open

Son Pham Thai gave more information on the question:
Hi Janek,

In general, what I need:

1. Generating a packing with inputs: packing's dimension, porosity, particle 
size distribution. 
Target: a packing have the number of No-Interaction spheres as small as 
possible.

2. Saving this generated packing for later usage (since the packing
generation costs lot of time)

3. Reloading the saved packing

4. Working around with the material and interaction.
Since in the packing generation stage, the material of the sphere is 
FrictMat. What I need now is Cohesive bond between sphere. Thus, I change the 
material of sphere to CohFrictMat. This is my purpose of using: 

O.interactions.clear()
for id1,id2 in pairs: utils.createInteraction(id1,id2)

Regards, 
Son Pham

-- 
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 #679445]: YADE Crash - SIGSEGV/SIGABRT handler called

2019-03-24 Thread Son Pham Thai
Question #679445 on Yade changed:
https://answers.launchpad.net/yade/+question/679445

Status: Needs information => Open

Son Pham Thai gave more information on the question:
Hi,

thanks for the response!

The new crash log I got is:

python: /usr/include/boost/smart_ptr/shared_ptr.hpp:646: typename
boost::detail::sp_dereference::type boost::shared_ptr::operator*()
const [with T = BodyContainer; typename
boost::detail::sp_dereference::type = BodyContainer&]: Assertion `px
!= 0' failed.

SIGSEGV/SIGABRT handler called; gdb batch file is `/tmp/yade-
FSueZ2/tmp-0'

GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.3) 7.7.1


Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
/tmp/yade-FSueZ2/tmp-0:1: Error in sourced command file:
ptrace: Operation not permitted.
(gdb) 


To reproduce the above crash, pls try run these 2 following scripts (in
2 different terminals)

##
### --- Mini working scripts 1:   --- ###
##

# encoding: utf-8
### INPUT for Material ###
young0= 30e9
poisson0= 0.2
density0 = 2530
compFricDegree=15

### PARAMETERs of particle packing ###
mn=Vector3(0.,0.,0.)
mx=Vector3(.4e-2,.6e-2,.4e-2)
rMean0=4e-4
rRelFuzz0=5./100
porosity0=0.4
distributeMass0=True
seed0=1

### INPUT for mechanical loading ###
maxVel0=5e-7
confiningS= -2.725e5

### defining MATERIALs ###
O.materials.append(FrictMat(young=young0,poisson=poisson0,frictionAngle=radians(compFricDegree),
 density=density0, label='spheres'))
O.materials.append(FrictMat(young=young0,poisson=poisson0,frictionAngle=0,density=0,label='frictionlessWalls'))

### creating the boundary walls ###
walls=aabbWalls((mn,mx),thickness=0,material='frictionlessWalls')
wallIds=O.bodies.append(walls)

### generating spheres ###
sp=pack.SpherePack()
sp.makeCloud(minCorner=mn,maxCorner=mx,rMean=rMean0,rRelFuzz=rRelFuzz0,porosity=porosity0,distributeMass=distributeMass0,seed=seed0)
 # POLY
O.bodies.append([utils.sphere(center,rad,material='spheres') for center,rad in 
sp])

### mechanical loading  To confer a solid-like nature to the packing

triax=TriaxialStressController(
 internalCompaction=True,
 goal1=confiningS,
 goal2=confiningS,
 goal3=confiningS,
 max_vel=maxVel0,
 label="triax"
)

triax.maxMultiplier=1.+5e-6
triax.finalMaxMultiplier=1.+1e-7

newton=NewtonIntegrator(damping=.4, gravity=(0.0,-9.81,0.0))

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(label='aabb'),Bo1_Box_Aabb()]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom6D(label='Ig2ssGeom'),Ig2_Box_Sphere_ScGeom()],
  
[Ip2_FrictMat_FrictMat_FrictPhys(),Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=True,
 label="cohesiveIp")],
  
[Law2_ScGeom_FrictPhys_CundallStrack(),Law2_ScGeom6D_CohFrictPhys_CohesionMoment(
   useIncrementalForm=True, always_use_moment_law=False, label='cohesiveLaw')]
 ),
 
GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.5),
 triax,
 newton
]

### --- 1st stage, particle growing while boundary walls are fixed --
###

NumDEMRun1=10
while 1:

 O.run(NumDEMRun1,True)
 unb=unbalancedForce()

 if unb<0.01 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.001:
  break

### --- 2nd stage, particle sizes are fixed while boundary walls move
very slowly -- ###

finalFricDegree = 30 # contact friction during the deviatoric loading
triax.internalCompaction=False
setContactFriction(radians(finalFricDegree))

NumDEMRun2=5

while 1:

 O.run(NumDEMRun2 ,True)
 unb=unbalancedForce()

 if unb<0.001 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.001:
  break

import os.path
initStateFilename="savedPacking" +".yade.gz"
savedState = os.path.exists(initStateFilename)
O.save(initStateFilename)

##
### --- Mini working scripts 2:   --- ###
##

# encoding: utf-8

import os.path
initStateFilename='savedPacking.yade.gz' 
O.load(initStateFilename)

compFricDegree = 1 
young0= 30e9
poisson0= 0.2
dens

[Yade-users] [Question #679445]: YADE Crash - SIGSEGV/SIGABRT handler called

2019-03-23 Thread Son Pham Thai
New question #679445 on Yade:
https://answers.launchpad.net/yade/+question/679445

Hi YADE community,

I have a problem as the question's title said. 

The procedure that  I have done:

1.  Packing generation
2.  Save the result by using O.save()
3.  Reload the saved yade.gz file by using O.load()
4. Working around with the material and interaction and got the crash

Mini working scripts:
--- [Step 1] ---


### INPUT for Material  ###
young0= 30e9 
poisson0= 0.2
density0 = 2530
compFricDegree=15

### PARAMETERs of particle packing  ###
mn=Vector3(0.,0.,0.)
mx=Vector3(.4e-2,.6e-2,.4e-2) 
rMean0=4e-4 
rRelFuzz0=5./100 
porosity0=0.4
distributeMass0=True
seed0=1

### INPUT for mechanical loading ###
maxVel0=5e-7
confiningS= -2.725e5 

### defining MATERIALs ###
O.materials.append(FrictMat(young=young0,poisson=poisson0,frictionAngle=radians(compFricDegree),
 density=density0, label='spheres'))
O.materials.append(FrictMat(young=young0,poisson=poisson0,frictionAngle=0,density=0,label='frictionlessWalls'))

### creating the boundary walls ###
walls=aabbWalls((mn,mx),thickness=0,material='frictionlessWalls')
wallIds=O.bodies.append(walls)

### generating spheres ###
sp=pack.SpherePack()
sp.makeCloud(minCorner=mn,maxCorner=mx,rMean=rMean0,rRelFuzz=rRelFuzz0,porosity=porosity0,distributeMass=distributeMass0,seed=seed0)
 # POLY
O.bodies.append([utils.sphere(center,rad,material='spheres') for center,rad in 
sp])

### mechanical loading  To confer a solid-like nature to the packing

triax=TriaxialStressController(
internalCompaction=True,
goal1=confiningS,
goal2=confiningS,
goal3=confiningS,
max_vel=maxVel0, 
label="triax"
)

triax.maxMultiplier=1.+5e-6
triax.finalMaxMultiplier=1.+1e-7 

newton=NewtonIntegrator(damping=.4, gravity=(0.0,-9.81,0.0))

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(label='aabb'),Bo1_Box_Aabb()]),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom6D(label='Ig2ssGeom'),Ig2_Box_Sphere_ScGeom()],

[Ip2_FrictMat_FrictMat_FrictPhys(),Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=True,
 label="cohesiveIp")],

[Law2_ScGeom_FrictPhys_CundallStrack(),Law2_ScGeom6D_CohFrictPhys_CohesionMoment(
useIncrementalForm=True, always_use_moment_law=False,  
label='cohesiveLaw')]
),

GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.5),
triax,
newton
]   

### --- 1st stage, particle growing while boundary walls are fixed -- ###

NumDEMRun1=10
while 1:

O.run(NumDEMRun1,True) 
unb=unbalancedForce() 

if unb<0.01 and 
abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.001:
break

### --- 2nd stage, particle sizes are fixed while boundary walls move very 
slowly -- ###

finalFricDegree = 30 # contact friction during the deviatoric loading
triax.internalCompaction=False
setContactFriction(radians(finalFricDegree))

NumDEMRun2=5

while 1:

O.run(NumDEMRun2 ,True) 
unb=unbalancedForce()

if unb<0.001 and 
abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.001:
break  

*
--- [Step 4] ---

compFricDegree = 1 # Scholtes
young0= 30e9 
poisson0= 0.2
density0 = 2530
tensileStrength = 40e5  
shearStrength = 40e6 

### setup the material properties, first, Cohesion material 
O.materials.append(CohFrictMat(young=young0,poisson=poisson0,density=density0,frictionAngle=radians(compFricDegree),
 normalCohesion=tensileStrength, shearCohesion=shearStrength, 
momentRotationLaw=True,label='CohFrictspheres')) 

### --- change material of the spheres to create cohesive bond between 
particles  --- ###

pairs = [(i.id1,i.id2) for i in O.interactions]
for b in O.bodies: 
if not isinstance(b.shape,Box): 
b.mat = O.materials[2]  
### [0] is Friction spheres, [1] is frictionlessWalls, [2] is 
the newly added CohFrict sphere

O.interactions.clear()
for id1,id2 in pairs: utils.createInteraction(id1,id2)  ### The crash occurs 
here

*

Any help or suggestion is highly appreciate!
Son Pham





-- 
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 #679445]: YADE Crash - SIGSEGV/SIGABRT handler called

2019-03-23 Thread Son Pham Thai
Question #679445 on Yade changed:
https://answers.launchpad.net/yade/+question/679445

Son Pham Thai gave more information on the question:
PS: the full crash log is:

SIGSEGV/SIGABRT handler called; gdb batch file is `/tmp/yade-RXasLj/tmp-0'
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.3) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
/tmp/yade-RXasLj/tmp-0:1: Error in sourced command file:
ptrace: Operation not permitted.
(gdb)

-- 
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 #681336]: core dumped - Eigen - Triangulation

2019-06-11 Thread Son Pham Thai
New question #681336 on Yade:
https://answers.launchpad.net/yade/+question/681336

Hi YADE community, 

I want to generate a pore network by using regular triangulation method 
implemented in YADE. 

The following properties are given:

1. Radius and center coordinate of solid particle
2. Cylindrical wall (facet)
3. The material properties of the solid particle and cylindrical wall

When I run initialization(), I got the error:

python: /usr/include/eigen3/Eigen/src/Core/DenseCoeffsBase.h:408: 
Eigen::DenseCoeffsBase::Scalar& Eigen::DenseCoeffsBase::operator[](Eigen::Index) [with Derived = Eigen::Matrix; 
Eigen::DenseCoeffsBase::Scalar = double; Eigen::Index = long int]: 
Assertion `index >= 0 && index < size()' failed.
SIGSEGV/SIGABRT handler called; gdb batch file is `/tmp/yade-sQh1QT/tmp-0'
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.3) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
/tmp/yade-sQh1QT/tmp-0:1: Error in sourced command file:
ptrace: Operation not permitted.
(gdb) quit
Aborted (core dumped)


#  #
A mini script to reproduce the above error:
#  #


# encoding: utf-8
finalFricDegree = 30
damping0=0.4 
young0= 30e9 
poisson0= 0.2
density0 = 2530 
tensileStrength = 40e5 
shearStrength = 40e6 
compFricDegree = 1 
youngDrying= 30e9
poissonDrying= 0.2
densityDrying = 2530*1e3
surfaceTension= 0.07274

#
### setup the material properties ###
#

O.materials.append(CohFrictMat(young=young0,poisson=poisson0,density=density0,frictionAngle=radians(compFricDegree),
 normalCohesion=tensileStrength, shearCohesion=shearStrength, 
momentRotationLaw=True,label='CohSpheres')) 

O.materials.append(FrictMat(young=young0,poisson=poisson0,frictionAngle=0,density=0,label='frictionlessWalls'))

O.materials.append(FrictMat(young=youngDrying,poisson=poissonDrying,frictionAngle=radians(finalFricDegree),density=densityDrying,label='frictionSphere'))


##
### --- reloading the sphere and wall data --- ###
##
import numpy as np

#---#
### the spheres ### of main network # 
#---#
particleInMainNetworkRad= [ 0.000859884 ,
0.000861149 ,
0.000842029 ,
0.00085647  ]

particleInMainNetworkPos=[( 0.00317429  ,   0.00550978  ,   
0.004819),
(   0.00531241  ,   0.00159537  ,   0.000953932 ),
(   0.00144734  ,   0.00667752  ,   0.00547688  ),
(   0.00521373  ,   0.00203944  ,   0.00291114  )]

for i in range(len(particleInMainNetworkRad)):

O.bodies.append([utils.sphere(center=particleInMainNetworkPos[i],radius=particleInMainNetworkRad[i],material='CohSpheres')])

#--#
### the walls ### cylinder facet ###
#--#

### --- generate the cylindrical wall --- ### 
centerCylinder=(0.004095328, 0.0041199985, 0.0023)
radiusCylinder=0.00418
heightCylinder=0.0085
segmentsNumberCylinder=5 # number of edges on the cylinder surface (>=5) 
oriCylinder=Quaternion((1,0,0),0)
wallMaskCylinder=5
kwMeshes={'color':[1,0,0],'wire':True,'dynamic':False,'material':"frictionlessWalls"}
 # COLOR = red
O.bodies.append(geom.facetCylinder(centerCylinder, radius=radiusCylinder, 
height=heightCylinder, orientation=oriCylinder, 
segmentsNumber=segmentsNumberCylinder, wallMask=wallMaskCylinder, **kwMeshes))

#-#
### Engine setup ###  #
#-#


gravityVector = (0.0,0,-9.81) 
damping0=0.4
newton=NewtonIntegrator(damping=damping0, gravity=gravityVector)

unsat=UnsaturatedEngine(dead=1,label="unsat")
globals()['unsat'] = unsat

O.engines=[
ForceResetter(),


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

InteractionLoop(


Re: [Yade-users] [Question #681336]: core dumped - Eigen - Triangulation

2019-06-11 Thread Son Pham Thai
Question #681336 on Yade changed:
https://answers.launchpad.net/yade/+question/681336

Son Pham Thai posted a new comment:
Hi Bruno,

Thank you for the response!

I have tried running triangulation without appending the cylinder facet,
but the error is still the same.

I have also tried replacing the cylinder facet with the boxes and still
got the same error.

The error  log:

negative volume for an ordinary pore (temp warning, should still be
safe)

python: /usr/include/eigen3/Eigen/src/Core/DenseCoeffsBase.h:408:
Eigen::DenseCoeffsBase::Scalar&
Eigen::DenseCoeffsBase::operator[](Eigen::Index) [with
Derived = Eigen::Matrix; Eigen::DenseCoeffsBase::Scalar = double; Eigen::Index = long int]: Assertion `index >= 0 &&
index < size()' failed.

Best regards, 
Son Pham

-- 
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 #681336]: core dumped - Eigen - Triangulation

2019-06-20 Thread Son Pham Thai
Question #681336 on Yade changed:
https://answers.launchpad.net/yade/+question/681336

Son Pham Thai posted a new comment:
Thank you Robert for the suggested script. My old working scripts also
have the appearance order of the bodies like this script.

Cheers, 
Thai Son

-- 
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 #681336]: core dumped - Eigen - Triangulation

2019-06-20 Thread Son Pham Thai
Question #681336 on Yade changed:
https://answers.launchpad.net/yade/+question/681336

Status: Answered => Solved

Son Pham Thai confirmed that the question is solved:
Hi Bruno,

Sorry for the late reply, it took me a while to compare the scripts.

1. Regarding the triangulation step, my scripts use initialization()
while the suggested script uses updateTriangulation=True

2. The appearance order of the bodies: 
- My scripts: the spheres are generated before the walls
-  The suggested script has the walls generated before the spheres

I have generated the spheres, then the walls, then I save these data.
Then I reload the wall before the sphere, and  initialization() works
fine for me now.

Cheers, 
Thai-Son

-- 
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 #683653]: Disable a cell in YADE?

2019-09-05 Thread Son Pham Thai
Question #683653 on Yade changed:
https://answers.launchpad.net/yade/+question/683653

Status: Needs information => Open

Son Pham Thai gave more information on the question:
Hi Robert,

Thanks for your response!  I did not post the MWE because there is no
error with the script. What I am asking is: Is there any way at this
moment in YADE, one can disable / eliminate a cell ? For example, some
function like: set the  conductivity of the cell as 0, or more simple,
just delete the cell from the system, etc.

In case that you still insist on why I did not use the cylindrical
container, instead of cubic container that I am using now, please see
this question [1]. I could not  find the way to do the triangulation for
the case of cylindrical boundary.

Regards, 
Thai-Son

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

-- 
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 #683653]: Disable a cell in YADE?

2019-09-05 Thread Son Pham Thai
Question #683653 on Yade changed:
https://answers.launchpad.net/yade/+question/683653

Status: Answered => Solved

Son Pham Thai confirmed that the question is solved:
Wow, this FlowEngine.blockCell is exactly what I am looking for. You
save my day man!

Thank you very much!

-- 
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 #683653]: Disable a cell in YADE?

2019-09-05 Thread Son Pham Thai
Question #683653 on Yade changed:
https://answers.launchpad.net/yade/+question/683653

Son Pham Thai 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


[Yade-users] [Question #683653]: Disable a cell in YADE?

2019-09-05 Thread Son Pham Thai
New question #683653 on Yade:
https://answers.launchpad.net/yade/+question/683653

Hi YADE community, 

like the title said, is there any way at this moment in YADE, one can disable / 
eliminate a cell ?

If you are curious about why I come up with this question, let me tell you my 
problem. I have a cylindrical packing of particle (data from experiment). I 
want to create a cylindrical  container for this packing and also need the 
triangulation of this configuration. The problem is that I cannot run the 
triangulation based on this . Instead, I have to create a cubic container. This 
cubic container results in 4 long channel of void space at the 4 corners, which 
is not a real thing in the original experiment. That why I need to find the way 
to disable the cells within these 4 corner regions. 

Looking forward to your help, 
Cheers, 
Thai-Son. 

-- 
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 #690973]: running on a server is slower than on a PC

2020-05-26 Thread Son Pham Thai
Question #690973 on Yade changed:
https://answers.launchpad.net/yade/+question/690973

Son Pham Thai proposed the following answer:
Hi,

i have also used remote desktop PC to run yade.  You should be very
clear on which one you think that it is slow: (1). YADE simulation
(running in the command window, i.e. the terminal) or (2). 3D
visualization in YADE GUI ?  I guess it is (2) since (2) depends on the
connection between you and the remote controlled computer, not the
hardware of your PC or the remote controlled computer.

Hope that help,

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