Re: [Yade-users] [Question #680325]: Issues in using psd to create a cloud of spheres
Question #680325 on Yade changed: https://answers.launchpad.net/yade/+question/680325 Summary changed to: Issues in using psd to create a cloud of spheres -- 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 #680325]: issues in using psd to create a cloud of spheres
New question #680325 on Yade: https://answers.launchpad.net/yade/+question/680325 Hi all, I have a code that generate a cloud of spheres and compress the cloud to a certain porosity. It works well when I make the cloud with specific radius and rRelFuzz. However, when I try to make the cloud with specific size distribution using psdSizes and psdCumm, the code run but the spheres will freeze and not compact. Can you please help and let me know what went wrong? My code is below. Thank you, Othman -- from yade import pack targetp = .3 ##specify the targeted porosity ##specimen geometry radiuscyl=.05 heightcyl=0.3 # material parameters O.materials.append(FrictMat(young = 5e10, poisson = 0.15,frictionAngle = atan(.2), density=1920)) spheres # sp=pack.SpherePack() psdSizes=[0,.00238,.00475,.00952,.0127] psdCumm=[0,0.0173,.0289,.9469,1] sp.makeCloud((0,0,0),(.3,.3,1.5),psdSizes=psdSizes,psdCumm=psdCumm) #sp.makeCloud((0,0,0),(.3,.3,1.5),rMean=.00475) #if I uncomment this line and comment the above 3 lines, the spheres will not move cylinder extraction pred=pack.inCylinder((.2,.2,0),(.2,.2,heightcyl),radiuscyl) spFilter=filterSpherePack(pred,sp,Material=Material, returnSpherePack=True) spFilter.toSimulation() facets # facets=geom.facetCylinder((.2,.2,heightcyl/2),radiuscyl,heightcyl,segmentsNumber=50,wallMask=4) cylinder=O.bodies.append(facets) yade.qt.View() ##creating disks d1=geom.facetCylinder((.2,.2,heightcyl),radiuscyl-.002,0,segmentsNumber=50,wallMask=1) d2=geom.facetCylinder((.2,.2,0),radiuscyl-.002,0,segmentsNumber=50,wallMask=1) disk1IDs= O.bodies.append(d1) disk2IDs= O.bodies.append(d2) for i in disk1IDs: body= O.bodies[i] body.state.vel = (0,0,-10) for n in disk2IDs: body= O.bodies[n] body.state.vel = (0,0,10) compaction # O.dt=.5*utils.PWaveTimeStep() enlargeFactor=1.5 O.engines=[ ForceResetter(), InsertionSortCollider([ Bo1_Sphere_Aabb(aabbEnlargeFactor=enlargeFactor,label='bo1s'), Bo1_Facet_Aabb() ]), InteractionLoop( [ Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=enlargeFactor,label='ss2d3dg'), Ig2_Facet_Sphere_ScGeom(), ], [ Ip2_FrictMat_FrictMat_FrictPhys(), Ip2_FrictMat_FrictMat_FrictPhys(), ], [ Law2_ScGeom_FrictPhys_CundallStrack(), ], ), NewtonIntegrator(damping=.3), PyRunner(iterPeriod=500,command='stop()'), ] O.run() # reset interaction detection enlargement bo1s.aabbEnlargeFactor=ss2d3dg.interactionDetectionFactor=1.0 def stop(): if utils.porosity()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 #680317]: different result after scenetostring
Question #680317 on Yade changed: https://answers.launchpad.net/yade/+question/680317 Status: Answered => Solved zhou qian 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 #680317]: different result after scenetostring
Question #680317 on Yade changed: https://answers.launchpad.net/yade/+question/680317 Status: Open => Answered Jan Stránský proposed the following answer: Hi Joe, nice finding. The reason is that O.sceneToString only saves "python" variables, defined in YADE_CLASS_...macros. CpmPhys has some read-only variables defined outside this macro [1] that are not saved and are reset by O.stringToScene. You can try: ### print max(i.phys.epsT.norm() for i in O.interactions) print max(i.phys.sigmaT.norm() for i in O.interactions) scene = O.sceneToString() ! O.stringToScene(scene) ! print max(i.phys.epsT.norm() for i in O.interactions) print max(i.phys.sigmaT.norm() for i in O.interactions) v2 = (trsf2-O.cell.trsf)/(500*O.dt) O.cell.velGrad = v2 O.run(500,True) print(O.cell.trsf) print(utils.getStress()) print max(i.phys.shearForce.norm() for i in O.interactions) #! ### if O.sceneToString() and O.stringToScene(scene) is used or not, the shear strain and shear forces and therefore stress are different. A solution would be to change the source code and put all these variables to YADE_BASE... To preserve the read-onlyness, probably Attr::readonly flag (similar to e.g. [2]) should be used. So basically replacing Real omega = 0 ... .def_readonly("omega",::omega,"...") to ((Real,omega,0,Attr::readonly,"...")) cheers Jan [1] https://gitlab.com/yade-dev/trunk/blob/master/pkg/dem/ConcretePM.hpp#L145 [2] https://gitlab.com/yade-dev/trunk/blob/master/core/Scene.hpp#L78 -- 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 #680317]: different result after scenetostring
New question #680317 on Yade: https://answers.launchpad.net/yade/+question/680317 Hi: I noticed that the results of my simulation is different if I use 'scenetostring' and 'stringtoscene' (I also tested save and load). I generated a periotric cell and change to strain from (0,0,0,0,0,0,0,0,0) to (0,0,0,0,0,0,0,0,-0.2) to (0,0,0,0,0,0,0,0,-0.1). Here are my codes: from libyade import yade from yade import* from yade import pack, Vector3, Vector3, utils from minieigen import Vector3, Matrix3, Matrix6 def randomPeriPack(radius,initSize,seed): O.switchScene(); O.resetThisScene() sp=pack.SpherePack() O.periodic=True O.cell.setBox(initSize) sp.makeCloud(Vector3().Zero,O.cell.refSize,radius,0.,-1,True,seed=seed) O.engines=[ForceResetter(),InsertionSortCollider([Bo1_Sphere_Aabb()],verletDist=.05*radius),InteractionLoop([Ig2_Sphere_Sphere_ScGeom()],[Ip2_FrictMat_FrictMat_FrictPhys()],[Law2_ScGeom_FrictPhys_CundallStrack()]),PeriIsoCompressor(charLen=2*radius,stresses=[-100e9,-1e8],maxUnbalanced=1e-2,doneHook='O.pause();',globalUpdateInt=20,keepProportions=True),NewtonIntegrator(damping=.8)] O.materials.append(FrictMat(young=30e9,frictionAngle=.1,poisson=.3,density=1e3)) for s in sp: O.bodies.append(utils.sphere(s[0],s[1])) O.dt=utils.PWaveTimeStep() O.timingEnabled=True O.run(); O.wait() for b in O.bodies: b.state.pos = O.cell.wrap(b.state.pos) ret=pack.SpherePack() ret.fromSimulation() O.switchScene() return ret young = 4e6 O.materials.append(CpmMat(young=young,poisson=.2,epsCrackOnset=1e100,sigmaT=1e100,relDuctility=2)) sp = randomPeriPack(.01,.1*Vector3.Ones,10) sp.toSimulation() O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.5,label='is2aabb')],allowBiggerThanPeriod=True), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=1.5,label='ss2d3dg')], [Ip2_CpmMat_CpmMat_CpmPhys()], [Law2_ScGeom_CpmPhys_Cpm()]), NewtonIntegrator(damping=.1), ] O.dt = 0. O.step() O.dt = 0.0002 is2aabb.aabbEnlargeFactor = 1. ss2d3dg.interactionDetectionFactor = 1. Strain1 = Matrix3(0,0,0,0,0,0,0,0,-0.2) Strain2 = Matrix3(0,0,0,0,0,0,0,0,-0.1) I = Matrix3.Identity trsf1 = Strain1+I trsf2 = Strain2+I v1 = (trsf1-O.cell.trsf)/(500*O.dt) O.cell.velGrad = v1 O.run(500,True) print(O.cell.trsf) scene = O.sceneToString() ! O.stringToScene(scene) ! v2 = (trsf2-O.cell.trsf)/(500*O.dt) O.cell.velGrad = v2 O.run(500,True) print(O.cell.trsf) print(utils.getStress()) If you run the script, I think the result of stress[8] should be -567126, and if you delete the scenetostring and stringtoscene, the result is -733878. My yade version is 2017.01a. Maybe my yade version is relatively old?? Yours, Joe -- 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 #680316]: wrong path autogens for two include hpp
New question #680316 on Yade: https://answers.launchpad.net/yade/+question/680316 hello, when I try to compile the latest yade trunk (15-04-2019) I got two worng generated path : here the rror Building CXX object gui/CMakeFiles/_GLViewer.dir/_GLViewer_autogen/mocs_compilation.cpp.o cd /home/oger/Yade/build_april-qt5/gui && /usr/bin/c++ -DBOOST_MATH_DISABLE_FLOAT128=1 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -DSUITESPARSE_VERSION_4 -DYADE_ODEINT -D_GLViewer_EXPORTS -I/home/oger/Yade/build_april-qt5/gui/_GLViewer_autogen/include -I/home/oger/Yade/trunk -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -I/usr/include/eigen3 -I/usr/include/vtk-8.1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/suitesparse -I/home/oger/Yade/build_april-qt5 -I/usr/local/include/QGLViewer -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtOpenGL -fPIC -O2 --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -std=c++11 -DYADE_VTK -DYADE_OPENMP -fopenmp -DYADE_GTS -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include -DQGLVIEWER_FOUND -DYADE_OPENGL -DYADE_QT5 -DYADE_CGAL -DLINSOLV -DFLOW_ENGINE -DYADE_GL2PS -g -fPIC -ftrack-macro-expansion=0 -save-temps -fstack-protector-strong -DYADE_DEBUG -g -DEIGEN_DONT_VECTORIZE -DEIGEN_DONT_ALIGN -DEIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT -DCGAL_DISABLE_ROUNDING_MATH_CHECK -frounding-math -fPIC -std=gnu++11 -o CMakeFiles/_GLViewer.dir/_GLViewer_autogen/mocs_compilation.cpp.o -c /home/oger/Yade/build_april-qt5/gui/_GLViewer_autogen/mocs_compilation.cpp In file included from /home/oger/Yade/build_april-qt5/gui/_GLViewer_autogen/mocs_compilation.cpp:2:0: /home/oger/Yade/build_april-qt5/gui/_GLViewer_autogen/OXRBQHTNNB/moc_GLViewer.cpp:9:10: fatal error: ../../../../../../Yade/trunk/gui/qt5/GLViewer.hpp: Aucun fichier ou dossier de ce type #include "../../../../../../Yade/trunk/gui/qt5/GLViewer.hpp" ^~~ compilation terminated. clearly for the moc_GLViewer.cpp and moc_OpenGLManager.cpp we have the path errors: more gui/_GLViewer_autogen/OXRBQHTNNB/moc_GLViewer.cpp |grep hpp ** Meta object code from reading C++ file 'GLViewer.hpp' #include "../../../../../../Yade/trunk/gui/qt5/GLViewer.hpp" more gui/_GLViewer_autogen/OXRBQHTNNB/moc_OpenGLManager.cpp|grep hpp ** Meta object code from reading C++ file 'OpenGLManager.hpp' #include "../../../../../../Yade/trunk/gui/qt5/OpenGLManager.hpp" instead of something like: more gui/_GLViewer_autogen/OXRBQHTNNB/moc_OpenGLManager.cpp|grep hpp ** Meta object code from reading C++ file 'OpenGLManager.hpp' #include "../../../../../Yade/trunk/gui/qt5/OpenGLManager.hpp" one less '../" will be good I have corrected insside the two files and I can compile but I guess that he solution is to correct during the make process! but where?? Luc -- 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 #680307]: How can I applied PeriTriaxController on a box of polyhedras?
Question #680307 on Yade changed: https://answers.launchpad.net/yade/+question/680307 Status: Open => Answered Jérôme Duriez proposed the following answer: Hello, You first need to update your YADE version. 1-20.0 is quite (very) old now (end of 2015, [*]). Since, this error you get about verletDist was turned into just a warning [**]. As the message says, the simulation with (non-spherical bodies and) verletDist = 0 should run, just being slower. But what do you actually mean with "I cannot run PeriTriaxController on them" ? Are you concerned with this error/warning, or is there something else ? The simulation is running, no ? [*] https://launchpad.net/yade/+announcements?memo=5=5 [**] https://gitlab.com/yade-dev/trunk/commit/949a2d9bd628898f7a3dabf84781e31667487ea8 -- 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