[Yade-users] [Question #295592]: Problems for allowBiggerThanPeriod
New question #295592 on Yade: https://answers.launchpad.net/yade/+question/295592 hi, everyone. allowBiggerThanPeriod can be used for large deformation. However, i found that if the shear strain is largger than a specific value (e.g. 2.8 in the following script), the contact stress would decrease to zero. Initially, i thought shear dilation cause this phenomenon. So i checked the volume fraction, which kept constant in the shear process since the spheres were frictionless. So, how to explain this. Here is my script. // O.periodic=True O.cell.refSize=(2,2,2) from yade import pack,plot,qt O.bodies.append(pack.regularHexa(pack.inAlignedBox((0,0,0),(2,2,2)),radius=.1,gap=0,color=(0,0,1))) O.materials[0].frictionAngle=0 O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb()],allowBiggerThanPeriod=True,verletDist=0.01), InteractionLoop( [Ig2_Sphere_Sphere_L3Geom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_L3Geom_FrictPhys_ElPerfPl()] ), NewtonIntegrator(damping=.4), PyRunner(command='checkStress()',realPeriod=1,label='checker'), PyRunner(command='addData()',iterPeriod=100) ] O.dt=.2*PWaveTimeStep() O.cell.velGrad=Matrix3(-.1,0,0, 0,-.1,0, 0,0,-.1) limitMeanStress=-5e5 def checkStress(): stress=sum(normalShearStressTensors(),Matrix3.Zero) print 'mean stress',stress.trace()/3. if abs(stress.trace()/3.) > abs(limitMeanStress): O.cell.velGrad=Matrix3(0,0,.1, 0,0,0, 0,0,0) checker.command='checkDistorsion()' O.materials[0].frictionAngle=.5 # radians for i in O.interactions: i.phys.tangensOfFrictionAngle=tan(.5) def checkDistorsion(): if abs(O.cell.trsf[0,2])> 3.0: plot.saveDataTxt(O.tags['id']+'.txt') O.pause() def addData(): stress=sum(normalShearStressTensors(),Matrix3.Zero) plot.addData(exz=O.cell.trsf[0,2],szz=stress[2,2],sxz=stress[0,2],tanPhi=stress[0,2]/stress[2,2],i=O.iter,vf=1-utils.porosity(),z=utils.avgNumInteractions()) plot.plots={'i':('exz'),'exz':('szz','sxz'),'i ':('tanPhi'), 'i':('z')} Gl1_Sphere.stripes=True plot.plot() 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 #295587]: Box Free Oscillation
Question #295587 on Yade changed: https://answers.launchpad.net/yade/+question/295587 Status: Open => Answered Klaus Thoeni proposed the following answer: Hi, Facets are non-dynamic in Yade, i.e., they will not move if forces are applied but act as a rigid boundary. Nevertheless, you can program their movement if you'd like a specific behaviour like vibration or rotation (an example can be find in examples/packs/packs.py [1]). If you need fully dynamic facets you should look into pFacets [2]. Note that these are also deformable. HTH Klaus [1] https://github.com/yade/trunk/blob/master/examples/packs/packs.py [2] https://yade-dem.org/doc/yade.gridpfacet.html -- 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 #295587]: Box Free Oscillation
New question #295587 on Yade: https://answers.launchpad.net/yade/+question/295587 Hello everyone, Consider a box (made using facetbox, facet, .stl...). The box is created between 2 fixed spheres (one in each side) outside the box. The box is free to move horizontally (limited by the spheres). A step of force is given to the box, which starts to oscillate between the 2 spheres. That is the system I'm trying to analyse, but when I use facet (fixed=False) the box simply disappears. Does anybody have some idea? Follows the code: #!/usr/bin/python # -*- coding: utf-8 -*- # Spheres O.materials.append(CohFrictMat(young=15e8,poisson=0.3,density=1000,frictionAngle=radians(30),label='spheres')) O.bodies.append([ utils.sphere(center=(0.5,0.5,0.5),radius=0.1,material='spheres',fixed=False), utils.sphere(center=(0.5,0.2,0.2),radius=0.1,material='spheres',fixed=False), utils.sphere(center=(0.5,-0.5,0.5),radius=0.3,material='spheres',fixed=True), utils.sphere(center=(0.5,1.5,0.5),radius=0.3,material='spheres',fixed=True) ]) O.bodies.append([ facet([[0,0,0],[1,0,0],[0,1,0]],fixed=False,color=[1,0,0]), facet([[1,0,0],[1,1,0],[0,1,0]],fixed=False), facet([[0,0,0],[0,0,1],[0,1,0]],fixed=False), facet([[0,0,1],[0,1,0],[0,1,1]],fixed=False), facet([[0,0,1],[1,0,1],[0,1,1]],fixed=False), facet([[1,1,1],[1,0,1],[0,1,1]],fixed=False), facet([[1,1,1],[1,0,1],[1,0,0]],fixed=False), facet([[1,1,1],[1,1,0],[1,0,0]],fixed=False), facet([[0,0,0],[1,0,0],[0,0,1]],fixed=False), facet([[0,0,1],[1,0,0],[1,0,1]],fixed=False), facet([[0,1,0],[1,1,0],[0,1,1]],fixed=False), facet([[0,1,1],[1,1,0],[1,1,1]],fixed=False) ]) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(damping=0.1,gravity=[0,0,-9.81]), ] O.dt=1e-3*utils.PWaveTimeStep() from yade import qt qt.View() qt.Controller() Thanks, Luis -- 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 #295586]: Axis-aligned bounding box parameters (meaning)
Question #295586 on Yade changed: https://answers.launchpad.net/yade/+question/295586 Status: Open => Answered Jérôme Duriez proposed the following answer: Hello, Indeed the doc of the corresponding function does not really help here [1]... There is more information in the corresponding source code, namely in a comment appearing l. 11-13 of [2] (I do not blame you you did not find it..). It turns out this aabb() function is pretty much like aabbExtrema() function which is better documented [3] In the end your aabb is a "tuple" ie (roughly) a list of 2 elements, each of them being a vector: - aabb[0] (1st element of the tuple) is a vector describing the lowest corner of the predicate (xMin,yMin,zMin) for all (x,y,z) in the predicate - aabb[1] (2d element of the tuple) is another vector describing the upper corner of the predicate (xMax, yMax,zMax) for all (x,y,z) in the predicate Such that aabb[1][2]-aabb[0][2] is equal to zMax - zMin : the last coordinate of a vector between the 2 corners. Jerome [1] https://yade-dem.org/doc/yade.pack.html?highlight=aabb#yade._packPredicates.inGtsSurface.aabb [2] https://github.com/yade/trunk/blob/68092b127a9cc6a00be3ba7f4fc5dfb60530f0a7/py/pack/_packPredicates.cpp [3] https://yade-dem.org/doc/yade.utils.html?highlight=aabbextrema#yade._utils.aabbExtrema -- 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 #295586]: Axis-aligned bounding box parameters (meaning)
New question #295586 on Yade: https://answers.launchpad.net/yade/+question/295586 Hello, I wonder which means the parameters '0', '1', '2' (script excerpt: 'aabb[1][2]-aabb[0][2]') in the horse surface script (https://github.com/yade/trunk/blob/master/examples/gts-horse/gts-horse.py). I am trying to understand how translate surfaces. 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 #295531]: Cohesion/Moment only work with TriaxialCompressionEngine?
Question #295531 on Yade changed: https://answers.launchpad.net/yade/+question/295531 Status: Needs information => Open Gary Pekmezi gave more information on the question: Thanks for the reply Jerome, I was in fact speaking of Ip2_CohFrictMat_CohFrictMat_CohFrictPhys and Law2_ScGeom6D_CohFrictPhys_CohesionMoment. My current problem however was with the HM law with rolling moment. I have spent the last day or so digging further into the apparent issue, and I have finally found where the problem surfaced. As expected, it was in my input. I was missing the "6D" in Ig2_Sphere_Sphere_ScGeom6D(), once I added it in my current simulation worked and so did my old one with the CohFrictMat. The one thing that still puzzles me, is that TriaxialCompressionEngine() apparently accounts for rolling moments even when one uses Ig2_Sphere_Sphere_ScGeom() instead of Ig2_Sphere_Sphere_ScGeom6D(). Thanks, Gary -- 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@lists.launchpad.net
Question #295563 on Yade changed: https://answers.launchpad.net/yade/+question/295563 Status: Open => Answered Anton Gladky proposed the following answer: Hi, that is not Yade issue [1]. What is the reason of compile such an old 1.14.0 Yade version? [1] http://www.mail-archive.com/yade- d...@lists.launchpad.net/msg12014.html Anton 2016-06-22 15:22 GMT+02:00 liukeqi : > New question #295563 on Yade: > https://answers.launchpad.net/yade/+question/295563 > > Hi, everyone > I used kdevelop to compile the yade-1.14.0.tar.gz, but I suffered an error. > The information is following. Can you give me some suggestions? Thank you. > > > *** > /home/liu/projects/trunk-1.14.0/build> make -j2 install > [ 1%] Generating qt4/moc_OpenGLManager.cxx > Scanning dependencies of target WeightedAverage2d > [ 1%] Building CXX object > py/CMakeFiles/WeightedAverage2d.dir/WeightedAverage2d.cpp.o > [ 2%] Generating qt4/moc_GLViewer.cxx > Scanning dependencies of target _GLViewer > [ 2%] Building CXX object gui/CMakeFiles/_GLViewer.dir/qt4/GLViewer.cpp.o > Linking CXX shared library lib/x86_64-linux-gnu/WeightedAverage2d.so > [ 2%] Built target WeightedAverage2d > Scanning dependencies of target _packObb > [ 3%] Building CXX object py/CMakeFiles/_packObb.dir/pack/_packObb.cpp.o > Linking CXX shared library lib/x86_64-linux-gnu/_packObb.so > [ 3%] Built target _packObb > Scanning dependencies of target _polyhedra_utils > [ 3%] Building CXX object > py/CMakeFiles/_polyhedra_utils.dir/_polyhedra_utils.cpp.o > In file included from > /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0, > from > /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:17, > from > /home/liu/projects/trunk-1.14.0/py/_polyhedra_utils.cpp:15: > /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: > warning: #warning "Using deprecated NumPy API, disable it by " "#defining > NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] > #warning "Using deprecated NumPy API, disable it by " \ > ^ > [ 4%] Building CXX object gui/CMakeFiles/_GLViewer.dir/qt4/_GLViewer.cpp.o > Linking CXX shared library lib/x86_64-linux-gnu/_polyhedra_utils.so > [ 4%] Built target _polyhedra_utils > [ 5%] Building CXX object > gui/CMakeFiles/_GLViewer.dir/qt4/OpenGLManager.cpp.o > [ 6%] Building CXX object > gui/CMakeFiles/_GLViewer.dir/qt4/GLViewerDisplay.cpp.o > [ 6%] Building CXX object > gui/CMakeFiles/_GLViewer.dir/qt4/GLViewerMouse.cpp.o > [ 7%] Building CXX object gui/CMakeFiles/_GLViewer.dir/qt4/moc_GLViewer.cxx.o > [ 8%] Building CXX object > gui/CMakeFiles/_GLViewer.dir/qt4/moc_OpenGLManager.cxx.o > Linking CXX shared library lib/x86_64-linux-gnu/_GLViewer.so > [ 8%] Built target _GLViewer > Scanning dependencies of target yade > [ 10%] [ 10%] Building CXX object > CMakeFiles/yade.dir/core/SimulationFlow.cpp.o > Building CXX object CMakeFiles/yade.dir/core/Cell.cpp.o > [ 11%] Building CXX object CMakeFiles/yade.dir/core/Body.cpp.o > [ 11%] Building CXX object CMakeFiles/yade.dir/core/Interaction.cpp.o > [ 12%] Building CXX object CMakeFiles/yade.dir/core/ThreadRunner.cpp.o > [ 13%] Building CXX object CMakeFiles/yade.dir/core/Omega.cpp.o > [ 13%] Building CXX object CMakeFiles/yade.dir/core/BodyContainer.cpp.o > [ 14%] Building CXX object CMakeFiles/yade.dir/core/ThreadWorker.cpp.o > [ 15%] Building CXX object CMakeFiles/yade.dir/core/State.cpp.o > [ 16%] Building CXX object CMakeFiles/yade.dir/core/corePlugins.cpp.o > [ 16%] Building CXX object CMakeFiles/yade.dir/core/Clump.cpp.o > [ 17%] Building CXX object CMakeFiles/yade.dir/core/Material.cpp.o > [ 18%] Building CXX object CMakeFiles/yade.dir/core/Scene.cpp.o > [ 19%] Building CXX object CMakeFiles/yade.dir/core/InteractionContainer.cpp.o > [ 19%] Building CXX object CMakeFiles/yade.dir/core/FileGenerator.cpp.o > [ 20%] Building CXX object CMakeFiles/yade.dir/pkg/lbm/LBMnode.cpp.o > [ 21%] Building CXX object > CMakeFiles/yade.dir/pkg/lbm/HydrodynamicsLawLBM.cpp.o > [ 21%] Building CXX object CMakeFiles/yade.dir/pkg/dem/L3Geom.cpp.o > [ 22%] Building CXX object CMakeFiles/yade.dir/pkg/dem/Tetra.cpp.o > [ 23%] Building CXX object CMakeFiles/yade.dir/pkg/dem/DomainLimiter.cpp.o > [ 24%] Building CXX object CMakeFiles/yade.dir/pkg/dem/LudingPM.cpp.o > [ 24%] Building CXX object CMakeFiles/yade.dir/pkg/dem/STLImporter.cpp.o > In file included from > /home/liu/projects/trunk-1.14.0/pkg/dem/STLImporter.cpp:10:0: > /home/liu/projects/trunk-1.14.0/lib/import/STLReader.hpp: In member function > ‘bool STLReader::open_ascii(const char*, OutV, OutE, OutF, OutN) [with OutV = > std::back_insert_iterator >; OutE = > std::back_insert_iterator >; OutF = > std::back_insert_iterator >; OutN = > std::back_insert_iterator >]’: > /home/liu/projects/trunk-1.14.0/lib/import/STLReader.hpp:118:2: warning: > ignoring return valu
Re: [Yade-users] [Question #295527]: CohFrictMat model
Question #295527 on Yade changed: https://answers.launchpad.net/yade/+question/295527 Status: Answered => Solved paula confirmed that the question is solved: Thanks a lot Jérôme. Your answer was really helpful. -- 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@lists.launchpad.net
New question #295563 on Yade: https://answers.launchpad.net/yade/+question/295563 Hi, everyone I used kdevelop to compile the yade-1.14.0.tar.gz, but I suffered an error. The information is following. Can you give me some suggestions? Thank you. *** /home/liu/projects/trunk-1.14.0/build> make -j2 install [ 1%] Generating qt4/moc_OpenGLManager.cxx Scanning dependencies of target WeightedAverage2d [ 1%] Building CXX object py/CMakeFiles/WeightedAverage2d.dir/WeightedAverage2d.cpp.o [ 2%] Generating qt4/moc_GLViewer.cxx Scanning dependencies of target _GLViewer [ 2%] Building CXX object gui/CMakeFiles/_GLViewer.dir/qt4/GLViewer.cpp.o Linking CXX shared library lib/x86_64-linux-gnu/WeightedAverage2d.so [ 2%] Built target WeightedAverage2d Scanning dependencies of target _packObb [ 3%] Building CXX object py/CMakeFiles/_packObb.dir/pack/_packObb.cpp.o Linking CXX shared library lib/x86_64-linux-gnu/_packObb.so [ 3%] Built target _packObb Scanning dependencies of target _polyhedra_utils [ 3%] Building CXX object py/CMakeFiles/_polyhedra_utils.dir/_polyhedra_utils.cpp.o In file included from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0, from /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarrayobject.h:17, from /home/liu/projects/trunk-1.14.0/py/_polyhedra_utils.cpp:15: /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] #warning "Using deprecated NumPy API, disable it by " \ ^ [ 4%] Building CXX object gui/CMakeFiles/_GLViewer.dir/qt4/_GLViewer.cpp.o Linking CXX shared library lib/x86_64-linux-gnu/_polyhedra_utils.so [ 4%] Built target _polyhedra_utils [ 5%] Building CXX object gui/CMakeFiles/_GLViewer.dir/qt4/OpenGLManager.cpp.o [ 6%] Building CXX object gui/CMakeFiles/_GLViewer.dir/qt4/GLViewerDisplay.cpp.o [ 6%] Building CXX object gui/CMakeFiles/_GLViewer.dir/qt4/GLViewerMouse.cpp.o [ 7%] Building CXX object gui/CMakeFiles/_GLViewer.dir/qt4/moc_GLViewer.cxx.o [ 8%] Building CXX object gui/CMakeFiles/_GLViewer.dir/qt4/moc_OpenGLManager.cxx.o Linking CXX shared library lib/x86_64-linux-gnu/_GLViewer.so [ 8%] Built target _GLViewer Scanning dependencies of target yade [ 10%] [ 10%] Building CXX object CMakeFiles/yade.dir/core/SimulationFlow.cpp.o Building CXX object CMakeFiles/yade.dir/core/Cell.cpp.o [ 11%] Building CXX object CMakeFiles/yade.dir/core/Body.cpp.o [ 11%] Building CXX object CMakeFiles/yade.dir/core/Interaction.cpp.o [ 12%] Building CXX object CMakeFiles/yade.dir/core/ThreadRunner.cpp.o [ 13%] Building CXX object CMakeFiles/yade.dir/core/Omega.cpp.o [ 13%] Building CXX object CMakeFiles/yade.dir/core/BodyContainer.cpp.o [ 14%] Building CXX object CMakeFiles/yade.dir/core/ThreadWorker.cpp.o [ 15%] Building CXX object CMakeFiles/yade.dir/core/State.cpp.o [ 16%] Building CXX object CMakeFiles/yade.dir/core/corePlugins.cpp.o [ 16%] Building CXX object CMakeFiles/yade.dir/core/Clump.cpp.o [ 17%] Building CXX object CMakeFiles/yade.dir/core/Material.cpp.o [ 18%] Building CXX object CMakeFiles/yade.dir/core/Scene.cpp.o [ 19%] Building CXX object CMakeFiles/yade.dir/core/InteractionContainer.cpp.o [ 19%] Building CXX object CMakeFiles/yade.dir/core/FileGenerator.cpp.o [ 20%] Building CXX object CMakeFiles/yade.dir/pkg/lbm/LBMnode.cpp.o [ 21%] Building CXX object CMakeFiles/yade.dir/pkg/lbm/HydrodynamicsLawLBM.cpp.o [ 21%] Building CXX object CMakeFiles/yade.dir/pkg/dem/L3Geom.cpp.o [ 22%] Building CXX object CMakeFiles/yade.dir/pkg/dem/Tetra.cpp.o [ 23%] Building CXX object CMakeFiles/yade.dir/pkg/dem/DomainLimiter.cpp.o [ 24%] Building CXX object CMakeFiles/yade.dir/pkg/dem/LudingPM.cpp.o [ 24%] Building CXX object CMakeFiles/yade.dir/pkg/dem/STLImporter.cpp.o In file included from /home/liu/projects/trunk-1.14.0/pkg/dem/STLImporter.cpp:10:0: /home/liu/projects/trunk-1.14.0/lib/import/STLReader.hpp: In member function ‘bool STLReader::open_ascii(const char*, OutV, OutE, OutF, OutN) [with OutV = std::back_insert_iterator >; OutE = std::back_insert_iterator >; OutF = std::back_insert_iterator >; OutN = std::back_insert_iterator >]’: /home/liu/projects/trunk-1.14.0/lib/import/STLReader.hpp:118:2: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(fp, "%*s %*s %f %f %f\n", &n[0], &n[1], &n[2]); ^ /home/liu/projects/trunk-1.14.0/lib/import/STLReader.hpp:119:2: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(fp, "%*s %*s"); ^ /home/liu/projects/trunk-1.14.0/lib/import/STLReader.hpp:120:2: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attr
Re: [Yade-users] [Question #295554]: ubuntu 14.04 can not use apt to install python-pyqt5
Question #295554 on Yade changed: https://answers.launchpad.net/yade/+question/295554 Status: Answered => Solved liukeqi confirmed that the question is solved: Thanks Klaus. It 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 #295521]: contact-normal in Yade
Question #295521 on Yade changed: https://answers.launchpad.net/yade/+question/295521 Status: Open => Answered Jan Stránský proposed the following answer: Hello, there really must be something wrong in your calculations. first of all, as I understand it, plotting normal is meaningful only for values (0,pi), the other half may be mirrored if needed. From contact direction point of view, vectors (1,0,0) and (-1,0,0) are identical.. with your script, I got perfect results.. either with quadrant_X_num, quadrant_1_num+quadrant_3_num is almost exactly equal to quadrant_2_num+quadrant_4_num (see above why there is the sum :-) Also putting the directions into more "bins", I got e.g. ## def contactDirs(nBins=12): normals = [] for i in O.interactions: # use only sphere-sphere contacts if not isinstance(O.bodies[i.id1].shape,Sphere): continue if not isinstance(O.bodies[i.id2].shape,Sphere): continue normals.append(i.geom.normal) # until now could be done in one line, but would look ugly in email bins = [0 for i in range(nBins)] for n in normals: angle = atan2(n[1],n[0]) # atan2 returns value in range (-pi,pi) if angle<0: angle += pi i = int(angle/pi * nBins) bins[i] += 1 return bins ## Yade [1]: contactDirs(6) -> [1]: [475, 483, 484, 533, 486, 518] Yade [2]: contactDirs(12) -> [2]: [268, 207, 264, 219, 249, 235, 262, 271, 255, 231, 235, 283] which seems to be reasonable cheers Jan 2016-06-22 10:13 GMT+02:00 Fu zuoguang : > Question #295521 on Yade changed: > https://answers.launchpad.net/yade/+question/295521 > > Fu zuoguang gave more information on the question: > # encoding: utf-8 > # the script demonstrates a simple case of triaxial simulation using > TriaxialCompressionEngine. More elaborated examples can be found in the > triax-tutorial folder > from yade import pack > > sp=pack.SpherePack() > ## corners of the initial packing > mn,mx=Vector3(0,0,0.5),Vector3(1,1,0.5) > > ## box between mn and mx, avg radius ± ½(20%), 2k spheres > sp.makeCloud(minCorner=mn,maxCorner=mx,rRelFuzz=.2,num=2000) > > ## create material #0, which will be used as default > > O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=radians(30),density=2600,label='spheres')) > > O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=0,density=0,label='frictionless')) > > ## copy spheres from the packing into the scene > ## use default material, don't care about that for now > O.bodies.append([sphere(center,rad,material='spheres') for center,rad in > sp]) > > ## create walls around the packing > walls=aabbWalls(thickness=1e-10,material='frictionless') > wallIds=O.bodies.append(walls) > > # block the dof in z-direction. > for b in O.bodies: > if isinstance(b.shape, Sphere):b.state.blockedDOFs = 'zXY' > > # define the engine. > triax=TriaxialStressController( > > wall_bottom_id=wallIds[2],wall_top_id=wallIds[3],wall_left_id=wallIds[0], > > wall_right_id=wallIds[1],wall_back_id=wallIds[4],wall_front_id=wallIds[5], > > # keep all the walls from moving except the back and front walls. > wall_back_activated = 0, wall_front_activated = 0, > thickness = 1e-9, internalCompaction = 0, > > # stress controlling condition. > stressMask = 7, > goal1 = -10,goal2 = -10,goal3 = -0.0, > > label="triax", ) > > O.engines=[ > ForceResetter(), > InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), > InteractionLoop( > [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], > [Ip2_FrictMat_FrictMat_FrictPhys()], > [Law2_ScGeom_FrictPhys_CundallStrack()] > ), > > GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), > triax, > # you can add TriaxialStateRecorder and such here… > NewtonIntegrator(damping=.4) > ] > > # run this simulation. > O.run(20, True) > ## running simulation process is over! > > # record all the contact normals in the final state. > contact_normal_list=[[i.geom.normal[0],i.geom.normal[1]] for i in > O.interactions] > > # divide the whole Cartesian system into 4 quadrants as: (1)x>0 and y>0; > (2)x<0 and y>0 ... > # then summarize respectively the number of contact normals located in > each area with > # ignoring cursoryly the sphere-wall contacts. > > quadrant_1_num, quadrant_2_num, quadrant_3_num, quadrant_4_num, =0, 0, > 0, 0 > > for i in xrange(len(contact_normal_list)): > if (contact_normal_list[i][0]>0 and contact_normal_list[i][1]>0): > quadrant_1_num=quadrant_1_num+1 > if (contact_normal_list[i][0]<0 and contact_normal_list[i][1]>0): > quadrant_2_num=quadrant_2_num+1 > if (contact_normal_list[i][0]<0 and contact_normal_list[i][1]<0): > quadrant_3_num=quadrant_3_num+1 > if (contact_normal_list[i][0]>0 and contact_normal_list[i][1]<0): > quadrant_4_num=quadrant_4_n
Re: [Yade-users] [Question #295554]: ubuntu 14.04 can not use apt to install python-pyqt5
Question #295554 on Yade changed: https://answers.launchpad.net/yade/+question/295554 Status: Open => Answered Klaus Thoeni proposed the following answer: Hi, on 14.04 you need compile with qt4 and install related packages: python-qt4 pyqt4-dev-tools When compiling you have to set -DUSE_QT5=0. HTH Klaus -- 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 #295520]: Exception occured: std::bad_alloc
Question #295520 on Yade changed: https://answers.launchpad.net/yade/+question/295520 Status: Answered => Solved Yor1 confirmed that the question is solved: Dear Bruno and Anton, The origin of the problem is that the boxes are contituted many times in the recorder servoController(). So i moved the lines in which the boxes is contituted out of the recorder and i works. That solve my problem. Best regards. Jabrane. -- 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 #295521]: contact-normal in Yade
Question #295521 on Yade changed: https://answers.launchpad.net/yade/+question/295521 Fu zuoguang gave more information on the question: # encoding: utf-8 # the script demonstrates a simple case of triaxial simulation using TriaxialCompressionEngine. More elaborated examples can be found in the triax-tutorial folder from yade import pack sp=pack.SpherePack() ## corners of the initial packing mn,mx=Vector3(0,0,0.5),Vector3(1,1,0.5) ## box between mn and mx, avg radius ± ½(20%), 2k spheres sp.makeCloud(minCorner=mn,maxCorner=mx,rRelFuzz=.2,num=2000) ## create material #0, which will be used as default O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=radians(30),density=2600,label='spheres')) O.materials.append(FrictMat(young=15e7,poisson=.4,frictionAngle=0,density=0,label='frictionless')) ## copy spheres from the packing into the scene ## use default material, don't care about that for now O.bodies.append([sphere(center,rad,material='spheres') for center,rad in sp]) ## create walls around the packing walls=aabbWalls(thickness=1e-10,material='frictionless') wallIds=O.bodies.append(walls) # block the dof in z-direction. for b in O.bodies: if isinstance(b.shape, Sphere):b.state.blockedDOFs = 'zXY' # define the engine. triax=TriaxialStressController( wall_bottom_id=wallIds[2],wall_top_id=wallIds[3],wall_left_id=wallIds[0], wall_right_id=wallIds[1],wall_back_id=wallIds[4],wall_front_id=wallIds[5], # keep all the walls from moving except the back and front walls. wall_back_activated = 0, wall_front_activated = 0, thickness = 1e-9, internalCompaction = 0, # stress controlling condition. stressMask = 7, goal1 = -10,goal2 = -10,goal3 = -0.0, label="triax", ) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), triax, # you can add TriaxialStateRecorder and such here… NewtonIntegrator(damping=.4) ] # run this simulation. O.run(20, True) ## running simulation process is over! # record all the contact normals in the final state. contact_normal_list=[[i.geom.normal[0],i.geom.normal[1]] for i in O.interactions] # divide the whole Cartesian system into 4 quadrants as: (1)x>0 and y>0; (2)x<0 and y>0 ... # then summarize respectively the number of contact normals located in each area with # ignoring cursoryly the sphere-wall contacts. quadrant_1_num, quadrant_2_num, quadrant_3_num, quadrant_4_num, =0, 0, 0, 0 for i in xrange(len(contact_normal_list)): if (contact_normal_list[i][0]>0 and contact_normal_list[i][1]>0): quadrant_1_num=quadrant_1_num+1 if (contact_normal_list[i][0]<0 and contact_normal_list[i][1]>0): quadrant_2_num=quadrant_2_num+1 if (contact_normal_list[i][0]<0 and contact_normal_list[i][1]<0): quadrant_3_num=quadrant_3_num+1 if (contact_normal_list[i][0]>0 and contact_normal_list[i][1]<0): quadrant_4_num=quadrant_4_num+1 else:pass print 'the total number of contacts is: ', len(contact_normal_list) print 'the number of sphere-sphere contacts is: ',(quadrant_1_num+quadrant_2_num+quadrant_3_num+quadrant_4_num) print 'the number of contacts in 1 quadrant is: ', quadrant_1_num print 'the number of contacts in 2 quadrant is: ', quadrant_2_num print 'the number of contacts in 3 quadrant is: ', quadrant_3_num print 'the number of contacts in 4 quadrant is: ', quadrant_4_num -- 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 #295521]: contact-normal in Yade
Question #295521 on Yade changed: https://answers.launchpad.net/yade/+question/295521 Status: Answered => Open Fu zuoguang is still having a problem: Dear Prof. Chareyre, Follow your suggestion, I made a simple procedure (3th floor) with no strict controlling in its running for testing my problems again. In this test, after the simulation process over, I did the following things: (1) I listed all the contact normal data in O.interactions; (2) I divided the total Cartesian system into 4 quadrants and then recorded respectively the number of contact normal located in each area with ignoring all the sphere-wall contacts. >From the final report, it is for sure that the unexpected results still exist now, maybe (1) I exactly got a wrong output of contact normal data from Yade; (2) The statistical pattern I used is already inappropriate; (3) There is something incorrect in my understanding of contact normal and the concept of this analysis pattern isoriginally wrong. Seeking your 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
[Yade-users] [Question #295554]: ubuntu 14.04 can not use apt to install python-pyqt5
New question #295554 on Yade: https://answers.launchpad.net/yade/+question/295554 Hi, everyone I want to use the ubuntu 14.04 to compile the yade source code and I successfully complie it a half years ago. But when I followed the step on the website of yade to complie it recently and execute "sudo apt-get install python-pyqt5", I found the following question that "unable to locate package python-pyqt5". If I skipped this step, I will suffer the error when I use kdevelop to compile it. I searched the solution on the Internet, and found someone said that the "python-pyqt5" did not exist in the ubuntu repository any more and gave an complex solution.Due to I am a newer to ubuntu system. Is there any simple solutions. Can you give me some suggestions. Thank you. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #295520]: Exception occured: std::bad_alloc
Question #295520 on Yade changed: https://answers.launchpad.net/yade/+question/295520 Chareyre proposed the following answer: Bingo! :) On 21 June 2016 at 22:13, Anton Gladky wrote: > Question #295520 on Yade changed: > https://answers.launchpad.net/yade/+question/295520 > > Anton Gladky proposed the following answer: > You are adding bodies at each call of servoController()? > Could you please check the number of bodies during the > simulation? > > Anton > > > 2016-06-21 18:37 GMT+02:00 Yor1 : > > Question #295520 on Yade changed: > > https://answers.launchpad.net/yade/+question/295520 > > > > Yor1 posted a new comment: > > Hi Bruno, > > > > We have the indentation before "O" because this line is included > > in the recorder servoController(). > > > > Best regards. > > Jabrane. > > > > -- > > 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 > > -- > 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 > > -- 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