Re: [Yade-users] [Question #697927]: merge request on gitlab
Question #697927 on Yade changed: https://answers.launchpad.net/yade/+question/697927 Status: Answered => Solved Raphaël Maurin confirmed that the question is solved: Thank you both for your answers, I will send an email to Bruno and then process as Robert suggested. Best, Raphaël -- 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 #697927]: merge request on gitlab
New question #697927 on Yade: https://answers.launchpad.net/yade/+question/697927 Hi all, I have not been doing any commit since we moved to gitlab and I am not completely sure I understand how to do it properly. I followed the tutorial on yade website (https://yade-dem.org/doc/gitrepo.html#yade-gitrepo-label) but then I do not understand how I should do once I made a commit. Should I "push on yade-dev" or "Push to personnal repository" ? Or should I ask a merge request ? As a member of Yade-dev or as a new developper ? I am sure my questions are rather basic but I prefer to have your opinion before instead of making a mistake directly ! Thanks in advance for you advices ! Raphaël -- 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 #696906]: 3D view black
Question #696906 on Yade changed: https://answers.launchpad.net/yade/+question/696906 Status: Answered => Solved Raphaël Maurin confirmed that the question is solved: I made all the updates on the graphic card driver, restart the computer (this was not possible for a long time, simulations running...) and it works ! Thank you Bruno for the answer and sorry for the inconvenience. Raphaël -- 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 #696906]: 3D view black
Question #696906 on Yade changed: https://answers.launchpad.net/yade/+question/696906 Raphaël Maurin 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 #696906]: 3D view black
Question #696906 on Yade changed: https://answers.launchpad.net/yade/+question/696906 Status: Answered => Open Raphaël Maurin is still having a problem: Hi Bruno, Thank you for your answer, you seem right, when I execute glxgears, nothing appears on the computer, there is not even a window created (on my other PC, I can see a window opening with some animation). Should I have a look to the driver of the graphic card ? Raphaël -- 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 #696906]: 3D view black
New question #696906 on Yade: https://answers.launchpad.net/yade/+question/696906 Hi all, I am having troubles with the 3D view on my computer: whatever the script I run, with whatever the version of yade (from source, from package, yadedaily), the 3D view opens but it just shows a black square without any particles/objects. There are clearly particles inside the simulation and the simulation runs, it is just the 3D view that seems not to work (without any error message). In order to give you a precise error script, I get (for example) the problem when running the bouncing sphere example (https://gitlab.com/yade-dev/trunk/blob/master/doc/sphinx/tutorial/01-bouncing-sphere.py) with yadedaily 20210429-5295~8412db8~bionic1. I am on Ubuntu 18.04. Do you have an idea of what it could be due to ? Do not hesitate if you need further information. Thanks in advance, Raphaël -- 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 #675297]: Problem in GlobalStiffnessTimeStepper
New question #675297 on Yade: https://answers.launchpad.net/yade/+question/675297 Hi all, I just updated the code from source, and a problem just appeared in GlobalStiffnessTimeStepper, which was working fine before. When considering the example script trunk/examples/HydroForceEngine/twoWayCoupling/sedimentTransportExample_1DRANSCoupling.py, I get a time step of the order of 10^{-310} (!). This is the case when considering the option viscEl = True, while everything is fine if viscEl = False. This seems to come from a recent commit by Bruno (2 days ago), but I am not able to find from where the change come from. Can anyone (Bruno ? ) help me to identify the problem ? Thanks ! Raphael -- 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 #674139]: Problem after updating to Ubuntu 18.04
Question #674139 on Yade changed: https://answers.launchpad.net/yade/+question/674139 Status: Open => Answered Raphaël Maurin proposed the following answer: Hi Rémi, I just re-installed Yade with ubuntu 18.04 yesterday and I got the same problem with libqglviewer library. It does not have the same name on the new version of Ubuntu if I understood well, it is now called libqglviewer-dev-qt5 (or at least that is what I installed and it worked). Regarding the question of python-imaging, it read on a question (I am not able to it again) that it is not necessary (and I succeeded to compile the code without). Hope it will work for you, Raphael -- 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 #674057]: Compilation from source crash at flowEngine
Question #674057 on Yade changed: https://answers.launchpad.net/yade/+question/674057 Raphaël Maurin confirmed that the question is solved: Thanks Robert Caulk, that solved my question. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #674057]: Compilation from source crash at flowEngine
Question #674057 on Yade changed: https://answers.launchpad.net/yade/+question/674057 Status: Answered => Solved Raphaël Maurin confirmed that the question is solved: Hi Robert and Bruno, Indeed, I didn't install libopenblas-dev. Actually, it is not written that this is mandatory on the installation webpage, so I just copied and paste the five lines of mandatory libraries. Probably we should actualize the installation webpage, can I change it myself in the source code ? (if yes, where ? ) Thank you for the precision Bruno, indeed I don't need the flow engine so I should probably have disabled it. After installing libopenblas, everything works fine, thank you Robert ! Cheers, Raphael -- 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 #674057]: Compilation from source crash at flowEngine
Question #674057 on Yade changed: https://answers.launchpad.net/yade/+question/674057 Status: Answered => Open Raphaël Maurin is still having a problem: Hi Robert, Thank you for your answer. Here is the output of the cmake command: raphael@raphaelPerso:~/work/software/Yade/build$ cmake -DCMAKE_INSTALL_PREFIX=../compiled ../trunk -- Found OpenMP_C: -fopenmp -- Found OpenMP_CXX: -fopenmp -- Found OpenMP: TRUE qmake: could not find a Qt installation of '' -- Found unsuitable Qt version "" from NOTFOUND -- Version is set to 2018-09-13.git-2c71b2a -- GTS using gts-config /usr/bin/gts-config -- Using GTS from /usr -- GCC Version >= 4.8. Adding -ftrack-macro-expansion=0 -- GCC Version >= 4.8. Adding -save-temps -- GCC Version >= 4.9. Adding -fstack-protector-strong -- Boost version: 1.65.1 -- Found the following Boost libraries: -- python -- thread -- filesystem -- iostreams -- regex -- serialization -- system -- date_time -- chrono -- atomic -- Boost_VERSION: 106501 -- Boost_LIB_VERSION: 1_65_1 -- Boost_INCLUDE_DIRS: /usr/include -- Boost_LIBRARIES: /usr/lib/x86_64-linux-gnu/libboost_python.so/usr/lib/x86_64-linux-gnu/libboost_thread.so/usr/lib/x86_64-linux-gnu/libboost_filesystem.so/usr/lib/x86_64-linux-gnu/libboost_iostreams.so/usr/lib/x86_64-linux-gnu/libboost_regex.so/usr/lib/x86_64-linux-gnu/libboost_serialization.so/usr/lib/x86_64-linux-gnu/libboost_system.so/usr/lib/x86_64-linux-gnu/libboost_date_time.so/usr/lib/x86_64-linux-gnu/libboost_chrono.so/usr/lib/x86_64-linux-gnu/libboost_atomic.so/usr/lib/x86_64-linux-gnu/libpthread.so -- Found Eigen3, version: 3.3.4 -- Disable vectorization -- The imported target "vtkRenderingPythonTkWidgets" references the file "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and contained "/usr/lib/cmake/vtk-6.3/VTKTargets.cmake" but not all the files it references. -- The imported target "vtk" references the file "/usr/bin/vtk" but this file does not exist. Possible reasons include: * The file was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and contained "/usr/lib/cmake/vtk-6.3/VTKTargets.cmake" but not all the files it references. -- Found VTK -- Found OpenMP_C: -fopenmp -- Found OpenMP_CXX: -fopenmp -- Found OpenMP -- GTS using gts-config /usr/bin/gts-config -- Using GTS from /usr -- Found GTS -- USE QT5 -- Found GUI-Qt5-LIBS -- GMP libs: /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/x86_64-linux-gnu/libgmpxx.so -- GMP libs: /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/x86_64-linux-gnu/libgmpxx.so -- Found CGAL -- Could NOT find Cholmod (missing: CHOLMOD_LIBRARIES CHOLMOD_INCLUDE_DIR AMD_LIBRARY CAMD_LIBRARY COLAMD_LIBRARY CCOLAMD_LIBRARY) -- Could NOT find Metis (missing: METIS_INCLUDE_DIR METIS_LIBRARY) -- Missing dependency for LINSOLV, disabled -- Found GL2PS LBMFLOW is still experimental, building and running LBM engine are at your own risk! Yade will be installed to /home/raphael/work/software/Yade/compiled -- Suffix is set to -2018-09-13.git-2c71b2a -- LIBRARY_OUTPUT_PATH is set to lib/x86_64-linux-gnu -- runtimePREFIX is set to /home/raphael/work/software/Yade/compiled -- Could NOT find gts (missing: PY_gts) -- Use embedded version of gts. Please, consider installing the corresponding package -- VTK version >5 is found -- === -- Yade configured with following features: Odeint VTK OpenMP GTS GUI-Qt5 CGAL PFVFLOW TWOPHASEFLOW GL2PS LBMFLOW -- Disabled features: LINSOLV SPH DEFORM LIQMIGRATION MASK_ARBITRARY PROFILING PotentialParticles PotentialBlocks -- Optimized build -- === -- Configuring done -- Generating done -- Build files have been written to: /home/raphael/work/software/Yade/build It is indeed not using LINSOLV as you guessed. I didn't do that on purpose, I just followed the step of the installation from source written on Yade website. I installed libsuiteparse and libmetis as you said and everything is compiling. But when I launch yade, I obtain an error: raphael@raphaelPerso:~/work/software/Yade/compiled/bin$ ./yade-2018-09-13.git-2c71b2a Welcome to Yade 2018-09-13.git-2c71b2a Traceback (most recent call last): File "./yade-2018-09-13.git-2c71b2a", line 129, in import yade File "/home/raphael/work/software/Yade/compiled/lib/x86_64-linux-gnu/yade-2018-09-13.git-2c71b2a/py/yade/__init__.py", line 65, in import boot ImportError: /home/raphael/work/software/Yade/compiled/lib/x86_64-linux-gnu/yade-2018-09-13.g
[Yade-users] [Question #674057]: Compilation from source crash at flowEngine
New question #674057 on Yade: https://answers.launchpad.net/yade/+question/674057 Hi, I re-installed xubuntu (18.04) and I am unable to compile Yade from the actual source file. After downloading all the libraries necessary for Yade, I compiled the code and it stopped at 81% with the following error: [ 81%] Building CXX object CMakeFiles/yade.dir/pkg/pfv/FlowEngine.cpp.o In file included from /home/raphael/work/software/Yade/build/pkg/pfv/FlowEngine_FlowEngineT.hpp:481:0, from /home/raphael/work/software/Yade/trunk/pkg/pfv/FlowEngine.cpp:11: /home/raphael/work/software/Yade/build/pkg/pfv/FlowEngine_FlowEngineT.ipp: In instantiation of ‘void TemplateFlowEngine_FlowEngineT<_CellInfo, _VertexInfo, _Tesselation, solverT>::updateLinearSystem(TemplateFlowEngine_FlowEngineT<_CellInfo, _VertexInfo, _Tesselation, solverT>::Solver&) [with _CellInfo = FlowCellInfo_FlowEngineT; _VertexInfo = FlowVertexInfo_FlowEngineT; _Tesselation = CGT::_Tesselation >; solverT = CGT::FlowBoundingSphere > >; TemplateFlowEngine_FlowEngineT<_CellInfo, _VertexInfo, _Tesselation, solverT>::Solver = CGT::FlowBoundingSphere > >]’: /home/raphael/work/software/Yade/build/pkg/pfv/FlowEngine_FlowEngineT.ipp:91:90: required from ‘void TemplateFlowEngine_FlowEngineT<_CellInfo, _VertexInfo, _Tesselation, solverT>::action() [with _CellInfo = FlowCellInfo_FlowEngineT; _VertexInfo = FlowVertexInfo_FlowEngineT; _Tesselation = CGT::_Tesselation >; solverT = CGT::FlowBoundingSphere > >]’ /home/raphael/work/software/Yade/trunk/pkg/pfv/FlowEngine.cpp:34:754: required from here /home/raphael/work/software/Yade/build/pkg/pfv/FlowEngine_FlowEngineT.ipp:810:14: error: ‘TemplateFlowEngine_FlowEngineT::Solver {aka class CGT::FlowBoundingSphere > >}’ has no member named ‘isLinearSystemSet’; did you mean ‘resetLinearSystem’? flow.isLinearSystemSet = false; ~^ resetLinearSystem /home/raphael/work/software/Yade/build/pkg/pfv/FlowEngine_FlowEngineT.ipp:811:7: error: ‘TemplateFlowEngine_FlowEngineT::Solver {aka class CGT::FlowBoundingSphere > >}’ has no member named ‘factorizedEigenSolver’; did you mean ‘factorizeOnly’? flow.factorizedEigenSolver = false; ~^ factorizeOnly CMakeFiles/yade.dir/build.make:3422: recipe for target 'CMakeFiles/yade.dir/pkg/pfv/FlowEngine.cpp.o' failed make[2]: *** [CMakeFiles/yade.dir/pkg/pfv/FlowEngine.cpp.o] Error 1 make[2]: *** Attente des tâches non terminées CMakeFiles/Makefile2:139: recipe for target 'CMakeFiles/yade.dir/all' failed make[1]: *** [CMakeFiles/yade.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2 Any idea of what it could be due to ? Is there a problem in the source code or am I missing something ? Thank you in advance, Raphael -- 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 #669519]: Drag force
Question #669519 on Yade changed: https://answers.launchpad.net/yade/+question/669519 Status: Open => Answered Raphaël Maurin proposed the following answer: If the question is to apply a constant fluid velocity in a given direction, then HydroForceEngine is able to do what you want. You should then mainly prescribe the reference position of the zero, zRef, the number of cell you want to divide the domain into, nCell, the width of the cells, deltaZ, and the fluid properties. As I told you in the previous message, you can start from the example script sedimentTransportExample.py, in the folder examples/HydroForceEngine/oneWayCoupling, for which the fluid velocity profile imposed depends on the depth. If you make the fluid velocity profile constant, this should do what you want. Regarding your question on the increasing computational cost, I don't know exactly because I am usually using this engine with the averaging functions and the 1D fluid resolution. But I don't think it increases much the computational cost. Best, Raphael -- 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 #669519]: Drag force
Question #669519 on Yade changed: https://answers.launchpad.net/yade/+question/669519 Status: Open => Answered Raphaël Maurin proposed the following answer: Dear Francesco, As you noticed, dragEngine only applies a drag force to the particles considering the fluid at rest. There exists another engine which can apply drag forces to the particles considering a 1D vertical fluid velocity profile, which is called HydroForceEngine (see the manual https://yade- dem.org/doc/yade.wrapper.html?highlight=hydroforceengine#yade.wrapper.HydroForceEngine and an example script trunk/examples/HydroForceEngine/oneWayCoupling/sedimentTransportExample.py). However, if you want to apply a drag force due to a 3D velocity field, you will need to implement something else. Don't hesitate to ask further questions on HydroForceEngine if you want to use it. Best, Raphael -- 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 #665244]: yade.utils.getStressProfile_contact() - did not match C++ signature
Question #665244 on Yade changed: https://answers.launchpad.net/yade/+question/665244 Status: Open => Answered Raphaël Maurin proposed the following answer: Dear Agastya, getStressProfile_contact is a function to evaluate the stress tensor on a vertical grid (along z) of spacing dz and starting from zRef. Therefore, it returns a vector of stress tensor. This means that there will be a problem in the line plot.addData(i=O.iter,CN=utils.getStressProfile_contact(volume=1,ncell=10,dz=1.00,zRef=0.00))(2) As you are trying to plot a vector of 3x3 matrix, which does not have any meaning. Second, I believe that the error you are pointing out comes from the fact that you wrote "ncell" instead of "nCell" in the abovementionned line. Raphael -- 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 #429604]: Cylinder and periodic boundary conditions
Question #429604 on Yade changed: https://answers.launchpad.net/yade/+question/429604 Status: Answered => Open Raphaël Maurin is still having a problem: Hi Bruno, Thanks for your answer, there are still some points that are unclear to me, I probably didn't understand everything: - How do you get the normal component of the relative velocity only from the shear one ? I would need to evaluate the relative velocity for that and if I want to account for the ratcheting effect correction, it seems to me that I need to call again getIncidentVel, maybe I missed something. >I'm not following you fully. 1/ I don't see a trick/approximation, to me it is just ordinary code. So when you ask "why" I tend to just think "why not?". 2/ why do you think it is irrelevant to include the 0.5*un term in the branch between e.g. sphere and box or spheres of different sizes? How would you like it? Did you realize that the same 0.5 is also used between facets and spheres whatever the law functor? >From what I understand the contact point is then always considered to be at >half the penetration depth. Two things. 1/Why not from a modeling point of >view as you say, but from a physical point of view I believe that the question >of the contact point is not that simple and is fundamental. If you consider an >interaction between two objects that have a different curvature, the >definition of the contact point is not straightforward and you should consider >the position of the contact point which gives you the right physical behavior >for the normal and tangential contact force. Defining it as half the >penetration depth is a choice (which I do not know if it is well reproducing >the "physical"/expected behavior). 2/ If you say that the contact point is >always considered as half the penetration depth, then I do not understand why >that: const State& de1 = *static_cast<State*>(bodies[id1]->state.get()); const State& de2 = *static_cast<State*>(bodies[id2]->state.get()); const Vector3r shift2 = scene->isPeriodic ? scene->cell->intrShiftPos(I->cellDist): Vector3r::Zero(); const Vector3r c1x = (geom.contactPoint - de1.pos); const Vector3r c2x = (geom.contactPoint - de2.pos - shift2); gives different results from that: const Vector3r c1x = geom->radius1-0.5*geom->penetrationDepth*geom->normal; const Vector3r c2x = -geom->radius2-0.5*geom->penetrationDepth*geom->normal; ? > However, guess why ViscElPhys_Basic has a bug that CundallStrack does not have? Because they are two different functors instead of one, i.e. more lines of code with less eyes/fingers for each of them. Hence if someone wants to do something very useful for the years to come he could merge some of the existing functors. That was my point. I am ok with that, but this would mean keeping all the compatibility with the existing ViscElPhys_Basic law (prescription possible of (young, poisson) or (kn, ks) with (en, et) or (cn, cs)) in the new one and suppressing the ViscElPhys_Basic contact law. Is this possible ? In which file(s) should it be included ? Raphael -- 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 #429604]: Cylinder and periodic boundary conditions
Question #429604 on Yade changed: https://answers.launchpad.net/yade/+question/429604 Status: Answered => Open Raphaël Maurin is still having a problem: Hi Bruno, Not sure I completely agree with you on all what you are saying. - Regarding getIncidentVel, I thought at using shearInc but this gives me only the shear component and I also want the normal one so it does not work. I need to use getIncidentVel - Regarding the periodicity, it is implemented in Law2_ScGeom_ViscElPhys_Basic. Indeed, the shift which is necessary to evaluate the geometry of the contact between two particles (scene->cell->intrShiftPos(cellDist), usually called shift2 in the code) and that you are describing, is implemented in it. However, the problem does not seem to rely on the periodicity, at least for spheres, but on the periodicity for interaction between spheres and other objects. This can be very well identified by comparing the contact law with Law2_ScGeom_FrictPhys_CundallStrack. In the latter case, a "trick"/an approximation is used when considering periodic boundary conditions. It is the one I reported: if (!scene->isPeriodic && !sphericalBodies) { State* de1 = Body::byId(id1,scene)->state.get(); State* de2 = Body::byId(id2,scene)->state.get(); applyForceAtContactPoint(-phys->normalForce-shearForce, geom->contactPoint, id1, de1->se3.position, id2, de2->se3.position);} else {//we need to use correct branches in the periodic case, the following apply for spheres only Vector3r force = -phys->normalForce-shearForce; scene->forces.addForce(id1,force); scene->forces.addForce(id2,-force); scene->forces.addTorque(id1,(geom->radius1-0.5*geom->penetrationDepth)* geom->normal.cross(force)); scene->forces.addTorque(id2,(geom->radius2-0.5*geom->penetrationDepth)* geom->normal.cross(force)); } Where we can see that in the case where the conditions are periodic the first condition is never fulfilled, and the part following the else is used. In that case, what is applied is that the contact point is always considered to be situated at the middle of the penetration depth. While this is ok for particles of the same size, this to my opinion does not apply when considering the interaction of a particle with a wall. My question was (and still is): why is it necessary to use this trick/approximation to avoid the bug ? - For the fact to implement a potential correction (which I will probably do) in CundallStrack, I am not sure it is relevant, especially considering that to my knowledge a non-negligible number of people use this contact law and I believe it is not a good idea to leave this contact law with a mistake. I could simply adjust the formulation to make it similar to CundallStrack, in order to have a coherence and correct the mistake (if there is any real one). Cheers Raphael -- 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 #429604]: Cylinder and periodic boundary conditions
New question #429604 on Yade: https://answers.launchpad.net/yade/+question/429604 Hi all, I am having a problem when I use a cylinder with periodic boundary condition. I made a simple script to reproduce the problem. The script is a column of grain falling inside a box under gravity, with a cylinder fixed on the lower (infinite) plane of the box. When I do that, everything works fine (option periodic = 0 and cylinderBottom = 1 in the script below). If now, I remove the sides of the box and replace it with periodic boundary condition (periodic = 1 and cylinderBottom = 1 in script below), some particles literally goes inside the cylinder. And this whatever the stiffness of the interaction, the time step used, the contact law used (Law2_ScGeom_ViscElPhys_Basic or Law2_ScGeom_FrictPhys_CundallStrack) and the length of the cylinder (which I made much larger than the periodic cell). This does not happen if I consider instead of the cylinder a row of fixed spheres (periodic = 1 and cylinderBottom = 0 in the script below). There is also a strange behavior when defining the cylinder position and extents, which might be linked to the present problem: - It is not possible to define a cylinder which extents corresponds to an integer of the periodic cell extent, e.g. cylinder(begin = (L/2.,-100*L,ground+dp/2.),end =(L/2.,100*L,ground+dp/2.), It considers that the length is zero at this moment, probably applying However, if you interchange begin and end, it works, i.e. cylinder(begin = (L/2.,100*L,ground+dp/2.),end =(L/2.,-100*L,ground+dp/2.), - The 3D view shows very strange position of the cylinder, which do not correspond to its actual position, when you consider the position of the cylinder nodes. Do you have any idea what the problem could be linked to ? Raphael Script: from yade import pack from yade.gridpfacet import * dp= 6e-3 periodic = 1 cylinderBottom = 1 ground = 0.2*dp H = 300*dp L = 20*dp O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb(),Bo1_GridConnection_Aabb()],allowBiggerThanPeriod = True), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom(),Ig2_Sphere_GridConnection_ScGridCoGeom()], [Ip2_ViscElMat_ViscElMat_ViscElPhys()], [Law2_ScGeom_ViscElPhys_Basic()] #[Ip2_FrictMat_FrictMat_FrictPhys()], #[Law2_ScGeom_FrictPhys_CundallStrack()] ), PyRunner(command = 'check()', virtPeriod = 0.1), NewtonIntegrator(damping=0., gravity = (0,0,-9.81)) ] #Material creation O.materials.append(ViscElMat(en=0.5, et=1., young=5e6, poisson=0.5, density=2500., frictionAngle=0.4, label='Mat')) #O.materials.append(FrictMat(young = 5e6, poisson = 0.5, density=2500,frictionAngle=0.4, label='Mat')) #Periodic Cell or containing box if periodic: O.periodic = True O.cell.setBox(L,L,H) O.bodies.append(box(center= (L/2.,L/2.,ground),extents=(100,100,0),fixed=True,color = (0.,1.,0.),wire = True,material = 'Mat')) else: O.bodies.append(box(center= (L/2.,L/2.,ground),extents=(100,100,0),wire = True,fixed=True,color = (0.,1.,0.),material = 'Mat'))#Made invisible to see below O.bodies.append(box(center= (0,L/2.,H/2.),extents=(0,L/2.,H/2.),wire = True,fixed=True,color = (0.,1.,0.),material = 'Mat'))#Made invisible to see O.bodies.append(box(center= (L,L/2.,H/2.),extents=(0,L/2.,H/2.),fixed=True,color = (0.,1.,0.),material = 'Mat')) O.bodies.append(box(center= (L/2.,0,H/2.),extents=(L/2.,0,H/2.),wire = True,fixed=True,color = (0.,1.,0.),material = 'Mat'))#Made invisible to see O.bodies.append(box(center= (L/2.,L,H/2.),extents=(L/2.,0,H/2.),fixed=True,color = (0.,1.,0.),material = 'Mat')) #Bottom fixed cylinder or fixed particles if cylinderBottom: n = len(O.bodies) cylinder(begin = (L/2.,100*L,ground+dp/2.),end =(L/2.,-100*L,ground+dp/2.),radius = dp/2.,fixed = True,color = (0,0,1),intMaterial = 'Mat',extMaterial = 'Mat')#Made invisible to see inside else: for n in range(0,int(L/dp)+1): O.bodies.append(sphere(center = (L/2.,n*dp,ground+dp/2.),radius = dp/2.,fixed = True,color = (0,0,1),wire = True,material = 'Mat'))#Made invisible to see inside #Particle cloud for gravity deposition partCloud = pack.SpherePack() partCloud.makeCloud(minCorner=(4*L/10.,4*L/10.,ground+dp),maxCorner=(6*L/10.,6*L/10.,H),rRelFuzz=0., rMean=dp/2., num = 2000) partCloud.toSimulation(material='Mat') O.saveTmp() O.dt = 1e-5 #Function to check if the center of a particle is contained inside the cylinder or pseudo cylinder def check(): for b in O.bodies: if b.dynamic and b.state.pos[2]
Re: [Yade-users] [Question #429604]: Cylinder and periodic boundary conditions
Question #429604 on Yade changed: https://answers.launchpad.net/yade/+question/429604 Raphaël Maurin gave more information on the question: I forgot to precise: this happens independently when using yadedaily (2016.06a-24-0557faf~xenial) and the latest yade version from source code (git-54c46f3) -- 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 #406523]: Cylinders and law2_ScGeom_ViscElPhys_Basic
Question #406523 on Yade changed: https://answers.launchpad.net/yade/+question/406523 Status: Answered => Solved Raphaël Maurin confirmed that the question is solved: Hi Bruno, Thank you for the explanation. Then it should in principle work as the cylinder I am using is always fixed (so all DOFs blocked, from the very beginning). I checked, and it is rather surprising but for the first interaction computed at the creation of the cylinder (so between the element of the cylinder), the mass of the two interacting cylinder components are both zero. This is why there is this warning at the beginning. There is however no link with the following. I found out that if I use smaller particles (d = 6mm), everything is working fine. The origin of this dependence in size lies in the stability of the resolution of the equation to infer the value of cn from the value of en (find_cn_from_en in ViscoelasticPM.cpp). There was an initial perturbation of the solution which was rather small, and leading to a division by zero when considering bigger particles. I placed a limitor to avoid the division by zero, and continue the loop. This leads to more iteration, and when it does not work, it ends up with the warning message. I also tuned the value of the initial perturbation for it to work on a larger range of cases. The range of resolution depends on the mass of the particles, kn and en, and for the case with kn in the rigid grain limit, and en = 0.5, it works over a range from d = 1e-6 to d = 10 for two particles colliding. At en = 0.9, it works on the range 1e-5 to 10, and at en = 0.1, it works on the range 1e-6 to 1. This should cover most of the applications, and in case it does not work there will be the warning message. I just made a commit with all that included. Thanks for the help ! Raphael -- 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 #406523]: Cylinders and law2_ScGeom_ViscElPhys_Basic
Question #406523 on Yade changed: https://answers.launchpad.net/yade/+question/406523 Status: Solved => Open Raphaël Maurin is still having a problem: Hi Bruno, Maybe I did not really understand how the cylinder is made. For me the cylinder is made from two spheres joined by a surface that is basically like a wall or a facet. Therefore I thought that the latter one does not have any radius, explaining why the way I am using the contact law is not working. From what you say, it seems not to be the case. Can you explain me more precisely how it is made ? If as you say the cylinder is made of spheres which does not have a mass, then that is indeed the reason for which this set of parameters does not work, as the evaluation of cn and cs from en and es, use the reduced mass of the two particle. When considering box-sphere interactions I never had any problem, as I always consider planes, i.e. box without extents in one direction, for which the mass is null. In this case, there is a condition in the contact law that put the mass equal to the particle one. For interaction with a wall or a facet, I guess the mass are null also so you should get the same result. But if the two masses are null then there is a problem, and I guess that is why it does not work when computing the interaction between the spheres composing the cylinder. But then something is bothering me as in the case of an interaction between the cylinder and a sphere, there is no reason for which the equivalent parameters would not be computed correctly, no ? Raphael -- 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 #406523]: Cylinders and law2_ScGeom_ViscElPhys_Basic
Question #406523 on Yade changed: https://answers.launchpad.net/yade/+question/406523 Raphaël Maurin 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 #406523]: Cylinders and law2_ScGeom_ViscElPhys_Basic
Question #406523 on Yade changed: https://answers.launchpad.net/yade/+question/406523 Status: Answered => Solved Raphaël Maurin confirmed that the question is solved: Hi Bruno, Sorry for the late answer, I didn't see your message. Thanks for your answer, I start to understand what is happening and that is getting better. When I use your script, it indeed try to create a cylinder with material viscElMat as asked. However, it prints an error message saying that it didn't succeed to compute the interactions coefficient. This is rather normal as the ip2 contains a function to evaluate the kn, ks, cn and cs from the young, poisson, en and es which has been made for spheres only, and does not work for the cylinder. Therefore, it is possible to make it work by assigning directly the values of kn, ks, cn and cs to define the material. Then, we can observe the viscous dissipation as expected. Here is the script that works: from yade.gridpfacet import * #O.materials.append(ViscElMat(en=0.5, et=0., young=1e7, poisson=0.5, density=2500, frictionAngle=0.4, label='Mat')) O.materials.append(ViscElMat(kn=1e7, ks = 5e6, cn = 1e5,cs = 0., density=2500, frictionAngle=0.4, label='Mat')) O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_GridConnection_Aabb(),]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Sphere_GridConnection_ScGridCoGeom()], [Ip2_ViscElMat_ViscElMat_ViscElPhys()], [Law2_ScGeom_ViscElPhys_Basic()], ), NewtonIntegrator(damping=0., gravity = (0,0,-9.81)) ] O.bodies.append(sphere(center = (0,5,5),radius = 1,material = 'Mat')) cylinder(begin = (0,0,0),end =(0,10,0),radius = 1,fixed = True,color = (0,0,1),intMaterial = 'Mat',extMaterial = 'Mat') O.dt = 1e-6 I will use it like that, as it is not a major problem for me. Thanks for everything ! Raphael -- 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 #406523]: Cylinders and law2_ScGeom_ViscElPhys_Basic
Question #406523 on Yade changed: https://answers.launchpad.net/yade/+question/406523 Status: Needs information => Open Raphaël Maurin gave more information on the question: I checked the interaction between the cylinder and the particle and it is of type ViscElPhys so that there is apparently no reason for which the error on the first message occurs. I also found that it is possible to keep only the Law2_ScGeom_FrictPhys_CundallStrack() and remove the Ip2_FrictMat_FrictMat_FrictPhys() , without leading to the crash...but then, no idea why all that. If I use the ViscElMat with kn, ks and cn, cs, and add the Law2_ScGeom_FrictPhys_CundallStrack(), the results I obtain is the one looking like the ViscElBasic contact law, as I indeed have a damping of the rebound. for that, use O.materials.append(ViscElMat(kn=1e7, ks = 5e6, cn = 1e5,cs = 0., density=2500, frictionAngle=0.4, label='Mat')) instead of the other definition. Weirdly the rebound behave like if it was elastic when considering the other way of defining the material, i.e. prescribing young, poisson and restitution coefficient, which is supposed to be equivalent. In that case, the contact is still ViscElPhys, but the damping cn is zero even though it should be finite due to the restitution coefficient value. This weird behavior is not only associated with the cylindrical shape as if you add two particles bouncing on each other next to the cylinder, you observe no dissipation as well. That is getting worse -- 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 #406523]: Cylinders and law2_ScGeom_ViscElPhys_Basic
Question #406523 on Yade changed: https://answers.launchpad.net/yade/+question/406523 Status: Answered => Open Raphaël Maurin is still having a problem: Hi, Taking all that together, I built a minimal script of a particle rebounding on a fixed cylinder but I still have some troubles. Even when applying viscElMat to the cylinder, it seems that it can be only FrictMat. Indeed, the following script crash with the error message: "FATAL /build/yadedaily-2016.06a-24-0557faf~xenial/pkg/common/InteractionLoop.cpp:143 action: None of given Law2 functors can handle interaction #0+1, types geom:ScGeom=1 and phys:FrictPhys=3 (LawDispatcher::getFunctor2D returned empty functor) QObject::~QObject: Timers cannot be stopped from another thread Erreur de segmentation (core dumped)" from yade.gridpfacet import * O.materials.append(ViscElMat(en=0.5, et=0., young=1e7, poisson=0.5, density=2500, frictionAngle=0.4, label='Mat')) cylinder(begin = (0,0,0),end =(0,10,0),radius = 1,fixed = True,color = (0,0,1),intMaterial = 'Mat',extMaterial = 'Mat') O.bodies.append(sphere(center = (0,5,5),radius = 1,material = 'Mat')) O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_GridConnection_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Sphere_GridConnection_ScGridCoGeom(),Ig2_GridNode_GridNode_GridNodeGeom6D()], [Ip2_ViscElMat_ViscElMat_ViscElPhys()], [Law2_ScGeom_ViscElPhys_Basic()], ), NewtonIntegrator(damping=0., gravity = (0,0,-9.81)) ] O.saveTmp() O.run() O.dt = 1e-6 To take that into account, I add the Ip2_FrictMat_FrictMat_FrictPhys() and Law2_ScGeom_FrictPhys_CundallStrack(), and the simulation do not crash anymore. However, it does not take into account the ViscElMat, neither for the interaction between the particle and the cylinder, nor for the interactions between particles. (This can be well seen by adding the following two lines to the beginning of the code: O.bodies.append(sphere(center = (5,5,5),radius = 1,material = 'Mat')) O.bodies.append(sphere(center = (5,5,0),radius = 1,material = 'Mat',fixed = True)) I think that either it is necessary to modify the generation of the cylinder to allow for the cylinder to be ViscElMat, or it is necessary to make a Ip2_ViscElMat_FrictMat_ViscElPhys(), to solve the problem. Is that right ? Any other ideas if this could be fixed another way ? How complicated are the two solutions ? Thanks in advance, Raphael -- 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 #293576]: yade from source on Ubuntu 16.04
Question #293576 on Yade changed: https://answers.launchpad.net/yade/+question/293576 Status: Answered => Solved Raphaël Maurin confirmed that the question is solved: Hi Anton, Sorry I was not clear, I didn't recompile libqglviewer, I just installed it. For the installation of Yade, you were right, the problem was standing in the fact I didn't have the package pyqt5-dev-tools. I recompiled Yade and everything is fine, it is running. Thanks ! Raphael -- 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 #293576]: yade from source on Ubuntu 16.04
Question #293576 on Yade changed: https://answers.launchpad.net/yade/+question/293576 Status: Answered => Open Raphaël Maurin is still having a problem: Hi Anton, Thank you for the explanation. I tried to re-compile from scratch after downloading the library you talked about, and compiling with the option -DUSE_QT5=1, I have a problem at the end of the compilation when I do 'make install', there is an error finishing by: " ... -- Installing: /home/raphaelmaurin/testYade/install/lib/x86_64-linux-gnu/yade-2016-05-04.git-040f642/py/yade/qt/SerializableEditor.py CMake Error at gui/cmake_install.cmake:88 (file): file INSTALL cannot find "/home/raphaelmaurin/testYade/compiled/img_rc.py". Call Stack (most recent call first): cmake_install.cmake:198 (include) Makefile:61 : la recette pour la cible « install » a échouée make: *** [install] Erreur 1 " I don't understand what it can be due to... Can you help me ? Raphael 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 #293576]: yade from source on Ubuntu 16.04
New question #293576 on Yade: https://answers.launchpad.net/yade/+question/293576 Hi everyone, After installing yadedaily (which works) on my new computer running with Ubuntu 16.04 (with xfce interface), I am trying to install Yade from the source code. I suceeded to install all the necessary packages except the "python-scientific" one, which give the error (in french sorry): "sudo apt-get install python-scientific Lecture des listes de paquets... Fait Construction de l'arbre des dépendances Lecture des informations d'état... Fait Aucune version du paquet python-scientific n'est disponible, mais il existe dans la base de données. Cela signifie en général que le paquet est manquant, qu'il est devenu obsolète ou qu'il n'est disponible que sur une autre source E: Le paquet « python-scientific » n'a pas de version susceptible d'être installée" meaning that the package is missing or out of date or available only on another source. I tried to continue the installation without this package, it is compiling and create the executable of yade (after cmake, make and make install), but when I run it I get a long error: "*** Error in `/usr/bin/python': realloc(): invalid pointer: 0x7fbab345a820 *** === Backtrace: = /lib/x86_64-linux-gnu/libc.so.6(+0x77725)[0x7fbabc43c725] /lib/x86_64-linux-gnu/libc.so.6(realloc+0x348)[0x7fbabc448f88] /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN9QListData7reallocEi+0x1f)[0x7fbaa3f34a5f] /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN9QListData6appendEi+0x81)[0x7fbaa3f34b31] /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x1d7018)[0x7fbaa4001018] ..." ending with: " 7fba9d434000-7fba9d435000 r--p c000 08:01 5514583 /usr/lib/x86_64-linux-gnu/libgsm.so.1.0.12 7fba9d435000-7fba9d436000 rw-p d000 08:01 5514583 /usr/lib/x86_64-linux-gnu/libgsm.so.1.0.12 7fba9d436000-7fba9d47b000 r-xp 08:01 5514811 /usr/lib/x86_64-linux-gnu/libmp3lame.so.0.0.0Abandon (core dumped)" First, can you confirm that it is due to the absence of the package python-scientific ? If it is the case, is there a way to install it on Ubuntu 16.04 ? If it is not the case and the problem is more complex, do you believe it is better for me to come back to Ubuntu 14.04, or would yade from source be compatible soon with Ubuntu16.04? Thanks, Raphael -- 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 #275284]: bug with periodic cell of the order of the particles diameter
Question #275284 on Yade changed: https://answers.launchpad.net/yade/+question/275284 Status: Needs information => Open Raphaël Maurin gave more information on the question: Hi Jerome ! Thank you for your tests ! On the picture you sent me by email, you can see very few particles at the bottom of the sample (one or two layers at most, which makes ~20 particles), but actually you introduced 120 particles ! And if you look carefully, some particles are completely overlapping... So it seems you are able to reproduce the bug. In my case, when I put the flag lateralWalls to 1 (line 11 of the script), it is completely different: you can see a deposit of about 5 layers of particles as expected, and no weird overlapping. I saw the bug you mentioned and I believe that it is linked. Do you think the new version of the insertion collider you proposed would fix the problem ? Raphael -- 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 #275284]: bug with periodic cell of the order of the particles diameter
Question #275284 on Yade changed: https://answers.launchpad.net/yade/+question/275284 Raphaël Maurin gave more information on the question: Hi Jerome, I will try to be more explicit on the way to reproduce the bug, and try to put a script that works directly ! =) Taking the script below, which is a simple gravity deposition with bi-periodic boundary condition + a possibility to break the periodicity with lateral walls when putting the flag lateralWalls equal to 1. - You run the script exactly as it is. Open the 3D viewer. Put run. After the gravity deposition, it pauses. If you press run again, it will make a simulation increment of 0.2s. When you do it, you will see (at least I see!) that the particles takes less and less space at the bottom of the sample. They actually completely overlap each other for no reason. - You can redo exactly the same with the flag lateralWalls to 1, and you will see that the problem is gone. - You can play with the script, and vary the width or the length of the system. It happens only if the width or the length of the periodic cell is of the order of 2 or lower. I hope it is more clear ! Can you first tell me if you can reproduce the bug ? Thanks ! Raphael new script: from yade import pack, plot import math diameterPart = 6e-3 #Diameter of the particles, in meter length = 10*diameterPart#length of the stream width = 2*diameterPart #width of the stream Nlayer = 5 #nb of layers of particle, in diameter #Option to put lateral walls and break the biperiodicity lateralWalls = 0 height = 10*Nlayer*diameterPart #heigth of the periodic cell groundPosition = height/4.0 O.materials.append(ViscElMat(en=0.5, et=0., young=5e6, poisson=0.5, density=2500, frictionAngle=0.4, label='Mat')) #O.materials.append(FrictMat(young=5e6, poisson=0.5, density=2500, frictionAngle=0.4, label='Mat')) #Definition of the semi-periodic cell O.periodic = True O.cell.setBox(length,width,height) #To be compatible with lateral walls leftLimitY = 0.0 rightLimitY = width centerLimitY = width/2.0 #If lateralWalls, add the walls and increase the cell size to avoid particle touching the walls to appear on the other side if lateralWalls: #Warn the user print '\nlateralWalls option activated: mono-periodic boundary condition only !\n' #Increase the cell size O.cell.setBox(length,width+2*diameterPart,height) #Modify accordingly the position of the center of the cell and the wall right and left position leftLimitY = diameterPart rightLimitY = width+diameterPart centerLimitY = diameterPart + width/2.0 #Define the wall and add to the simulation sidePlaneL = box(center= (length/2.0,leftLimitY,height/2.0),extents=(2000,0,height*10),fixed=True,wire = True,color = (1,0,0), material = 'Mat') sidePlaneR = box(center= (length/2.0,rightLimitY,height/2.0),extents=(2000,0,height*10.0),fixed=True,wire=True, material = 'Mat',color = (0,0,1)) O.bodies.append([sidePlaneR,sidePlaneL]) # Ground reference and Wall on the side lowPlane = box(center= (length/2.0,centerLimitY,groundPosition),extents=(200,200,0),fixed=True,wire=False,color = (0.,1.,0.),material = 'Mat') #Build a plane to have a reference for the eyes O.bodies.append(lowPlane) #add to simulation #Create a loose cloud of particle inside the cell partCloud = pack.SpherePack() partVolume = pi/6.*pow(diameterPart,3.) partNumber = int(Nlayer*0.6*diameterPart*length*width/partVolume) #Volume of beads #Define the deposition height considering that the packing realised by make cloud is 0.2 depositionHeight = Nlayer*0.6/0.1*diameterPart #Consider that the packing realised by make cloud is 0.2 partCloud.makeCloud(minCorner=(0,leftLimitY,groundPosition+diameterPart+1e-4),maxCorner=(length,rightLimitY,groundPosition+depositionHeight),rRelFuzz=0., rMean=diameterPart/2.0, num = partNumber) partCloud.toSimulation(material='Mat') # SIMULATION LOOP# # O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Wall_Aabb(),Bo1_Facet_Aabb(),Bo1_Box_Aabb()],label='contactDetection',allowBiggerThanPeriod = True), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(), Ig2_Box_Sphere_ScGeom()], [Ip2_ViscElMat_ViscElMat_ViscElPhys()], [Law2_ScGeom_ViscElPhys_Basic()] # [Ig2_Sphere_Sphere_ScGeom(), Ig2_Box_Sphere_ScGeom()], #[Ip2_FrictMat_FrictMat_FrictPhys()], #[Law2_ScGeom_FrictPhys_CundallStrack()] ,label = 'interactionLoop'), PyRunner(command='gravityDeposition()',virtPeriod = 0.05,label = 'packing'), GlobalStiffnessTimeStepper(defaultDt = 1e-4, viscEl = True,timestepSafetyCoefficient = 0.7, label = 'GSTS'), NewtonIntegrator(damping=0.2, gravity= Vector3(0.,0.0,-9.81), label='newton') ] #save the initial
[Yade-users] [Question #275284]: bug with periodic cell of the order of the particles diameter
New question #275284 on Yade: https://answers.launchpad.net/yade/+question/275284 Hi all, There seems to be a bug in yade when simulating problems with a periodic cell length of the order of the diameter (typically ~2d): some particles are completely overlapping each other, and behave as a unique particle. >From what I tested, the bug is independent from: - the particles material properties (stiffness, viscous damping, friction angle, density), - the contact law (can be also pbserved with Law2_ScGeom_FrictPhys_CundallStrack with a time step ~10^{-6}) - the time step - the diameter of the particles - the number of particle layers I tested on yadedaily 1.10.0-72-d9ab58c~precise, yade from source git-3e1e44a, on two different computer running with Ubuntu 14.04.2 LTS. Below the message, you will find a simplified script that reproduce the problem. It is just a gravity deposition with or without lateral walls (lateralWalls = 1 or 0), prescribing the width and length of the periodic cell, and the number of particle layers that you want to obtain. The bug arises when the length or width of the periodic cell is inferior to about 2.2d. Adding lateral walls (lateralWalls = 1 in the script) solves the problem. For periodic cell length/width of 5d or upper, I never had any problems. Are you able to reproduce the bug ? If yes, do you have any idea of why that is happening ? Thanks in advance ! Raphael from yade import pack, plot import math ## ## Main parameters of the simulation ## diameterPart = 6e-3 #Diameter of the particles, in meter densPart = 2500 #Density of the particles, kg/m3 lengthCell = 2 #Streamwise length of the periodic cell, in diameter widthCell = 10. #Spanwise length of the periodic cell, in diameter Nlayer = 5 #nb of layers of particle, in diameter #Option to put lateral walls and break the biperiodicity lateralWalls = 0 ### ## PARAMETERS DECLARATION## ### #Geometrical configuration, define useful quantities height = 10*Nlayer*diameterPart #heigth of the periodic cell length = lengthCell*diameterPart#length of the stream width = widthCell*diameterPart #width of the stream gravityVector = Vector3(0.,0.0,-9.81) groundPosition = height/4.0 #Particles contact law parameters maxPressure = densPart*0.6*Nlayer*diameterPart*abs(gravityVector[2]) #Estimated max particle pressure ("hydrostatic") normalStiffness = maxPressure*diameterPart*1e4 #Evaluate the minimal normal stiffness to be in the rigid particle limit (cf Roux and Combe 2002) youngMod = normalStiffness/diameterPart #Young modulus of the particles from the stiffness wanted. #Material #O.materials.append(ViscElMat(en=0.5, et=0., young=youngMod, poisson=0.5, density=densPart, frictionAngle=0.4, label='Mat')) O.materials.append(FrictMat(young=youngMod, poisson=0.5, density=densPart, frictionAngle=0.4, label='Mat')) #Definition of the semi-periodic cell O.periodic = True O.cell.setBox(length,width,height) #To be compatible with lateral walls leftLimitY = 0.0 rightLimitY = width centerLimitY = width/2.0 #If lateralWalls, add the walls and increase the cell size to avoid particle touching the walls to appear on the other side if lateralWalls: #Warn the user print '\nlateralWalls option activated: mono-periodic boundary condition only !\n' #Increase the cell size O.cell.setBox(length,width+2*diameterPart,height) #Modify accordingly the position of the center of the cell and the wall right and left position leftLimitY = diameterPart rightLimitY = width+diameterPart centerLimitY = diameterPart + width/2.0 #Define the wall and add to the simulation sidePlaneL = box(center= (length/2.0,leftLimitY,height/2.0),extents=(2000,0,height*10),fixed=True,wire = True,color = (1,0,0), material = 'Mat') sidePlaneR = box(center= (length/2.0,rightLimitY,height/2.0),extents=(2000,0,height*10.0),fixed=True,wire=True, material = 'Mat',color = (0,0,1)) O.bodies.append([sidePlaneR,sidePlaneL]) # Ground reference and Wall on the side lowPlane = box(center= (length/2.0,centerLimitY,groundPosition),extents=(200,200,0),fixed=True,wire=False,color = (0.,1.,0.),material = 'Mat') #Build a plane to have a reference for the eyes O.bodies.append(lowPlane) #add to simulation #Create a loose cloud of particle inside the cell partCloud = pack.SpherePack() partVolume = pi/6.*pow(diameterPart,3.) partNumber = int(Nlayer*0.6*diameterPart*length*width/partVolume) #Volume of beads #Define the deposition height considering that the packing realised by make cloud is 0.2 depositionHeight = Nlayer*0.6/0.1*diameterPart #Consider that the packing realised by make cloud is 0.2 #Create a cloud of partNumber particles PHF change to 0.1
Re: [Yade-users] [Question #269831]: HydroForceEngine not defined?
Question #269831 on Yade changed: https://answers.launchpad.net/yade/+question/269831 Status: Open = Answered Raphaël Maurin proposed the following answer: Hi, Funny script, I like it =) The problem is in the order of the engine. HydroForceEngine should be before NewtonIntegrator, otherwise the buoyancy force is not taken into account in the DEM resolution at the time step considered, and ForceResetter() will erase the force before beginning the resolution of the next time step so that the force added is never taken into account. It should work if you try a loop like that: O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()],label='collider'), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()], ), #HydroForceEngine(densFluid=rau_wat,ids=spids,lift=True), HydroForceEngine(densFluid = 1024,viscoDyn = 1e-3,zRef = -D_wat,deltaZ = 0.1,nCell = 20,vxFluid=numpy.zeros(20),phiPart = numpy.zeros(20),vFluctX = np.zeros(len(spids)),vFluctZ = np.zeros(len(spids)),ids = spids ), NewtonIntegrator(damping=.1,exactAsphericalRot=True,gravity=(0,0,-9.81)), TranslationEngine(translationAxis=[1,0,0],velocity=5.0,ids=[id.id for id in strut]) ] I don't know what is exactly doing TranslationEngine but it is also maybe better to put it before NewtonIntegrator. It seems that there is also a problem in the way you collect the particles's ID as not all the particles are submitted to buoyancy. Some comments on your script: - The young modulus you impose leads to very high contact stiffness for DEM simulation. This impact directly the computational time. It is usually possible to soften artificially the stiffness (so the young modulus) without modifying the results if you stay in the rigid grain limit. The rigid grain limit corresponds to the limit for which the deformation/overlap of the spheres stay negligible with respect to the particle diameters. For dense granular media, it has been related to the maximum pressure undergone by the particles [1][2], and can be evaluated before computation. For any other situation, the game is to see if a reduction of the stiffness modify the results or not. This will allow you to gain a lot of computational time. - You are using PWaveTimeStep() for the time step determination, consider using GlobalStiffnessTimeStepper(), itcan make you gain computational time. - You are considering a dynamical situation with a contact law more adapted to quasi static ones. If you want a more realistic dynamical behavior with dissipation at contact characterized by a restitution coefficient, have a look at the Law2_ScGeom_ViscElPhys_Basic. - Walls made of facets might have some unwanted behavior if the particles are hitting the joint between two facets, I prefere using box to build walls and avoid these problems. - When you define a material, it is safer to label it with a name, e.g. O.materials.append(FrictMat(young=10e9,poisson=.25,frictionAngle=0.5,density=980., label='Mat1')), and specify the material when you are creating the bodies, with e.g. sp.toSimulation(material = 'Mat1'). (I don't know how to do with facet box but this should be similar. ) This allows you to define different materials and make you sure you are using the material you want for this specific body. Regards Raphaël [1] section 4, p.4 of: N Roux and G. Combe. Quasistatic rheology and the origins of strain. Comptes Rendus Physique, 3(2):131 – 140, 2002 [2] section IV, p.4-5 of: F. da Cruz, S. Emam, M. Prochnow, J-N. Roux, and F. Chevoir. Rheophysics of dense granular materials: Discrete simulation of plane shear flows. Phys.Rev. E, 72:021309, 2005. -- You received this question notification because you are a member of yade-users, which 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 #269831]: HydroForceEngine not defined?
Question #269831 on Yade changed: https://answers.launchpad.net/yade/+question/269831 Status: Open = Answered Raphaël Maurin proposed the following answer: Hi, The fact it is negative should not be a problem if zRef is set to its correct value. Can you provide a small example script of what you are simulating ? Raphaël -- You received this question notification because you are a member of yade-users, which 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 #269831]: HydroForceEngine not defined?
Question #269831 on Yade changed: https://answers.launchpad.net/yade/+question/269831 Status: Open = Answered Raphaël Maurin proposed the following answer: Hi, 1. When I am talking about fluid mesh, it is a regular wall-normal fluid mesh defined by the number of cell nCell, and the width of the cell deltaZ. A typical definition of HydroForceEngine to apply only buoyancy would be : HydroForceEngine(densFluid = 1000,viscoDyn = 1e-3,zRef = 0.0,deltaZ = 0.1,nCell = 10,vxFluid=numpy.zeros(nCell),phiPart = numpy.zeros(nCell),vFluctX = np.zeros(len(O.bodies)),vFluctZ = np.zeros(len(O.bodies)),ids = idApplyForce ) This will apply buoyancy to the particles contained in the idApplyForce list, and of z component between zRef= 0. and nCell*deltaZ = 1 m. I entered the density and viscosity of water, but it can be modified obviously (viscosity will not influence the buoyancy, it is defined for drag) 2. Yes 3. Ok, I agree with you, and then it is maybe better (faster) to create an engine applying the buoyancy only directly, or to make the drag application optional. 4. No Raphaël -- You received this question notification because you are a member of yade-users, which 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 #269831]: HydroForceEngine not defined?
Question #269831 on Yade changed: https://answers.launchpad.net/yade/+question/269831 Status: Open = Answered Raphaël Maurin proposed the following answer: Hi It obviously is not included in the current release of Yade, is it strange? I am actually not using at all the stable versions so I don't know if it is strange, but I commited that engine months ago. well, i'm actually want to simulate the buoyancy of the sphere. however, it seems that all the spheres drop to the bottom anyway due to gravity It should be possible to simulate the buoyancy with hydroforce engine by putting the vxFluid to a vector full of zeros, and the mesh properties in order to fill the whole space. If you want the particle to have buoyancy applied only if it is under the water surface, just precise the fluid mesh from the ground to the water free surface wall normal position: h =nCell*dz. This will apply the buoyancy only if the center of the particle is inside the water. However it will not take into be modified if a part of the particle is outside the water. You can modify that in the C++ code if necessary. Depending on the number of particles that you are simulating, it might be easier for you to write a simple function in python using O.forces.addF(O.bodies[0].id,fb) which will apply the force fb (that you can evaluate easily) to the particle O.bodies[0] for example. . By introducing the hydroforce engine, should the sphere be kind of floating on the water surface if the density is lower than the water density? If you have a buoyancy force, this should be the case say if the sphere is only partly submerged, then the buoyancy should be only calculated from the submerged volume, isn't it? This should be the case but is not evaluated like that inside the HydroForceEngine. Hope it helps Raphael -- You received this question notification because you are a member of yade-users, which 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 #269831]: HydroForceEngine not defined?
Question #269831 on Yade changed: https://answers.launchpad.net/yade/+question/269831 Status: Open = Answered Raphaël Maurin proposed the following answer: Hi, I think HydroforceEngine should be defined for your Yade version. If you want to be sure it is defined, try to type help(HydroForceEngine) in Yade. If it prints something it is defined. Otherwise use the latest yadedaily and it will be ok. However, I don't know what you want to simulate, but with your formulation it will not work. You need to precise all the different arguments of the engine (see the documentation https://yade- dem.org/doc/yade.wrapper.html?highlight=hydroforceengine#yade.wrapper.HydroForceEngine ). I designed this function to couple Yade with a 1D fluid resolution (v_x^f(z)) so that it mights look a bit particular at some points. It therefore requires to precise the fluid profile (vxFluid) and the position (zref) of the regular fluid mesh described by deltaZ and nCell. There is also a Discrete Random Walk fluctuation model included to account for the fluid velocity fluctuations, which is based on the Reynolds stress tensor (which comes from the fluid resolution). You can get rid of the fluctuation model by writing HydroForceEngine(vFluctX = numpy.zeros(len(O.bodies)), vFluctZ = numpy.zeros(len(O.bodies))) when declaring the engine. Don't hesitate if you have more questions. Raphaël -- You received this question notification because you are a member of yade-users, which 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 #267724]: Call a ForceEngine attribute in Shop
Question #267724 on Yade changed: https://answers.launchpad.net/yade/+question/267724 Raphaël Maurin posted a new comment: Hi all, No one has an idea of how I can do that ? Is the question not clear ? Raphaël -- You received this question notification because you are a member of yade-users, which 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 #267724]: Call a ForceEngine attribute in Shop
Question #267724 on Yade changed: https://answers.launchpad.net/yade/+question/267724 Raphaël Maurin confirmed that the question is solved: Thanks Kneib François, that solved my question. -- You received this question notification because you are a member of yade-users, which 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 #267724]: Call a ForceEngine attribute in Shop
Question #267724 on Yade changed: https://answers.launchpad.net/yade/+question/267724 Status: Answered = Solved Raphaël Maurin confirmed that the question is solved: Great, it works ! Thank you François ! Raphaël -- You received this question notification because you are a member of yade-users, which 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 #267566]: linear spring dashpot law?
Question #267566 on Yade changed: https://answers.launchpad.net/yade/+question/267566 Status: Open = Answered Raphaël Maurin proposed the following answer: Look at the documentation, this is now possible with the latest version (from source code), I submitted it two days ago. This imply however that the tangential restitution coefficient is 1 (no tangential viscous damping). Raphaël -- You received this question notification because you are a member of yade-users, which 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 #267566]: linear spring dashpot law?
Question #267566 on Yade changed: https://answers.launchpad.net/yade/+question/267566 Status: Open = Answered Raphaël Maurin proposed the following answer: No idea of that, maybe someone else can answer ? Raphaël -- You received this question notification because you are a member of yade-users, which 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 #267566]: linear spring dashpot law?
Question #267566 on Yade changed: https://answers.launchpad.net/yade/+question/267566 Status: Open = Needs information Raphaël Maurin requested more information: Hi Frankie, I do not understand completely your last question: what are the original mechanical parameters of your material? Isn't it given in term of restitution coefficient ? What do you want to model ? The documentation of the law have been published now (https://yade-dem.org/doc/yade.wrapper.html?highlight=law2_scgeom_viscelphys_basic#yade.wrapper.Law2_ScGeom_ViscElPhys_Basic), but I am not sure it will help you. Raphaël -- You received this question notification because you are a member of yade-users, which 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 #267673]: make install crash
Question #267673 on Yade changed: https://answers.launchpad.net/yade/+question/267673 Raphaël Maurin posted a new comment: Hi, I also did a fresh install of 14.04 LTS and yade was compiling fine, but I am currently having problems compiling yade on a system under 14.04 LTS just upgraded from 12.04 LTS: the problem might be in the upgrading. I am installing the LTS version because I do not want to upgrade too often. Raphaël -- You received this question notification because you are a member of yade-users, which 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 #267566]: linear spring dashpot law?
Question #267566 on Yade changed: https://answers.launchpad.net/yade/+question/267566 Status: Open = Answered Raphaël Maurin proposed the following answer: This probably means that you don't have the latest version of yade compiled from source. This is very recent change (2 days ago), so that it is for now only published in the source code. If you want to use it, you should either compile yade from the current source code, or wait some time (1 week?) for it to be published in yade daily. Raphaël -- You received this question notification because you are a member of yade-users, which 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 #267724]: Call a ForceEngine attribute in Shop
New question #267724 on Yade: https://answers.launchpad.net/yade/+question/267724 Hi all, I created a force engine to apply an hydrodynamic force to particles depending on a fluid velocity profile and a fluid velocity fluctuation associated to each particle. This last can be big when there is a lot of particles, so that to avoid to transmit it from python to C++ (which induces memory leakage), it is directly calculated in the C++ code of HydroForceEngine. Now, I want to create a function in C++, using this velocity fluctuation vector, and which can be executed from python. For that, I am then creating it in Shop. My question is: is there a way to access this vector, which is an attribute of HydroForceEngine, directly in Shop ? Thanks Raphaël -- You received this question notification because you are a member of yade-users, which 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 #267673]: make install
New question #267673 on Yade: https://answers.launchpad.net/yade/+question/267673 Hi all, I am on my usual computer (Ubuntu 12.04) where yade is already running. -- You received this question notification because you are a member of yade-users, which 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 #267673]: make install crash
Question #267673 on Yade changed: https://answers.launchpad.net/yade/+question/267673 Summary changed to: make install crash Description changed to: Hi all, Sorry for the wrong manipulation. I am on my usual computer (Ubuntu 12.04), where a version of yade compiled from source (2014-12-12.git-ec93711) is working. I tried to update and compile the actual version of the trunk but unfortunately it does not work. The cmake step is ok (see output below), but when doing make install I get an error starting by : raphael@GRP3723:~/these/code/Yade/TEST/testBis/compiled$ make install [ 1%] Generating qt4/moc_OpenGLManager.cxx [ 2%] Generating qt4/moc_GLViewer.cxx Scanning dependencies of target _GLViewer [ 3%] Building CXX object gui/CMakeFiles/_GLViewer.dir/qt4/GLViewer.cpp.o In file included from /home/raphael/these/code/Yade/TEST/testBis/core/Omega.hpp:20:0, from /home/raphael/these/code/Yade/TEST/testBis/gui/qt4/GLViewer.hpp:6, from /home/raphael/these/code/Yade/TEST/testBis/gui/qt4/GLViewer.cpp:11: /home/raphael/these/code/Yade/TEST/testBis/lib/base/Math.hpp:8:8: erreur: expected nested-name-specifier before ‘Real’ /home/raphael/these/code/Yade/TEST/testBis/lib/base/Math.hpp:8:8: erreur: ‘Real’ has not been declared /home/raphael/these/code/Yade/TEST/testBis/lib/base/Math.hpp:8:13: erreur: expected ‘;’ before ‘=’ token /home/raphael/these/code/Yade/TEST/testBis/lib/base/Math.hpp:8:13: erreur: expected unqualified-id before ‘=’ token In file included from /home/raphael/these/code/Yade/TEST/testBis/core/Omega.hpp:20:0, from /home/raphael/these/code/Yade/TEST/testBis/gui/qt4/GLViewer.hpp:6, from /home/raphael/these/code/Yade/TEST/testBis/gui/qt4/GLViewer.cpp:11: /home/raphael/these/code/Yade/TEST/testBis/lib/base/Math.hpp:106:27: erreur: expected unqualified-id before ‘using’ /home/raphael/these/code/Yade/TEST/testBis/lib/base/Math.hpp:107:7: erreur: expected nested-name-specifier before ‘Vector2i’ /home/raphael/these/code/Yade/TEST/testBis/lib/base/Math.hpp:107:7: erreur: ‘Vector2i’ has not been declared /home/raphael/these/code/Yade/TEST/testBis/lib/base/Math.hpp:107:16: erreur: expected ‘;’ before ‘=’ token /home/raphael/these/code/Yade/TEST/testBis/lib/base/Math.hpp:107:16: erreur: expected unqualified-id before ‘=’ token /home/raphael/these/code/Yade/TEST/testBis/lib/base/Math.hpp:108:7: erreur: expected nested-name-specifier before ‘Vector2r’ /home/raphael/these/code/Yade/TEST/testBis/lib/base/Math.hpp:108:7: erreur: ‘Vector2r’ has not been declared . Which is very long and end by : make[2]: *** [gui/CMakeFiles/_GLViewer.dir/qt4/GLViewer.cpp.o] Erreur 1 make[1]: *** [gui/CMakeFiles/_GLViewer.dir/all] Erreur 2 make: *** [all] Erreur 2 as cmake command works, I am wondering if this due to the code which is on the trunk or to my computer ? Raphaël cmake -DCMAKE_INSTALL_PREFIX=./ ../ -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Found PythonInterp: /usr/bin/python (found version 2.7.3) -- Try OpenMP C flag = [-fopenmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Success -- Try OpenMP CXX flag = [-fopenmp] -- Performing Test OpenMP_FLAG_DETECTED -- Performing Test OpenMP_FLAG_DETECTED - Success -- Found OpenMP: -fopenmp -- Looking for Q_WS_X11 -- Looking for Q_WS_X11 - found -- Looking for Q_WS_WIN -- Looking for Q_WS_WIN - not found. -- Looking for Q_WS_QWS -- Looking for Q_WS_QWS - not found. -- Looking for Q_WS_MAC -- Looking for Q_WS_MAC - not found. -- Found Qt4: /usr/bin/qmake (found version 4.8.1) -- Version is set to 2015-06-02.git-f6c50e6 -- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so -- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found -- Looking for gethostbyname -- Looking for gethostbyname - found -- Looking for connect -- Looking for connect - found -- Looking for remove -- Looking for remove - found -- Looking for shmat -- Looking for shmat - found -- Looking for IceConnectionNumber in ICE -- Looking for IceConnectionNumber in ICE - found -- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so -- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so -- GTS using gts-config /usr/bin/gts-config -- Using GTS from /usr -- Found GL2PS: /usr/lib/libgl2ps.so -- Found CGAL: /usr/include/CGAL, /usr/lib/libCGAL.so -- Found NumPy: version 1.6.1 /usr/lib/python2.7/dist-packages/numpy/core/include -- Found Loki: /usr/include -- Boost version: 1.46.1 -- Found the
Re: [Yade-users] [Question #267673]: make install crash
Question #267673 on Yade changed: https://answers.launchpad.net/yade/+question/267673 Status: Answered = Solved Raphaël Maurin confirmed that the question is solved: Thank you for all the answers, it seems I will have to go to Ubuntu 14.04. I tried to update gcc manually and succeeded to have g++-4.7, but the compilation still does not work...Upgrading seems the easiest. Thanks again Raphaël -- You received this question notification because you are a member of yade-users, which 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 #267566]: linear spring dashpot law?
Question #267566 on Yade changed: https://answers.launchpad.net/yade/+question/267566 Status: Open = Answered Raphaël Maurin proposed the following answer: Hi, The law recognizes directly the input depending on the material precisions. For example, if you want to use it with young modulus, Poisson's ratio, and damping parameters, you define your material: O.material.append(ViscElMat(young = a1, poisson = a2, cn = a3, cs = a4,density = a5,frictionAngle = a6, label = 'Mat')), with ax the parameters of your problem, and associate this material with the spheres you are creating. The law will directly recognize that you use these parameters and will compute the equivalent stiffnesses and damping constant accordingly. If you are trying to precise two parameters which does not use the law the same way, e.g. en, tc, young and poisson, it will throw an error. Raphaël PS : I am making the documentation for the law right now, so maybe it will be more clear with it. I will be commiting it soon. -- You received this question notification because you are a member of yade-users, which 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 #264371]: problem with 3D view and libqglviewer-qt4-dev
New question #264371 on Yade: https://answers.launchpad.net/yade/+question/264371 Hi all, I am having problems with the use of the 3D view in a freshly installed yade on a new computer. When I open the 3D view, if there is a body in the simulation, this lead to a segementation fault. The computer works with ubuntu 14.04.2 LTS, and I have this problem both with yadedaily and yade installed from source. In the installation instructions, it is written that for ubuntu version older than 12.10 it is necessary to install the package libqglviewer-qt4-dev. However I do not succeed to install it. When I try, the Ubuntu Software Center tells me : dependency is not satisfiable : libqglviewer-qt4-2(=2.3.4-2) I tried to install libqglviewer-qt4-2 but it seems there is no version for ubuntu 14.04, and it tells me to install libqglviewer2 instead (which is already installed on the computer). Do you have any idea of what it could be due to, and what I can do to solve the problem ? I hope the question is clear, if it is not the case, don't hesitate to ask more details. Thanks ! Raphaël -- You received this question notification because you are a member of yade-users, which 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 #254693]: Materials for spheres generated via makeCloud
Question #254693 on Yade changed: https://answers.launchpad.net/yade/+question/254693 Status: Open = Answered Raphaël Maurin proposed the following answer: Hi Christopher, I am using makecloud and specifying a material, for that I do : #Define the material O.materials.append(ViscElMat(cn=cnPart, cs=csPart, kn=knPart, ks=ksPart, density=densPart, frictionAngle=partFrictAngle, label='sphereMat')) partCloud = pack.SpherePack() #Specify the property of the particle cloud wanted partCloud.makeCloud(minCorner=(0,widthCell/2.0,groundPosition+radius*4),maxCorner=(length,widthCell/2.0,heightCell),rRelFuzz=0,rMean=radius, num = 1000) #send to simulation assigning the material partCloud.toSimulation(material='sphereMat') And for your second question, I would say (but I am not sure) that it is indeed the most recently created material that is assigned if you don't specify anything. You can check that easily by yourself, by trying it. Raphael -- You received this question notification because you are a member of yade-users, which 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 #253045]: Law2_ScGeom_ViscElPhys_Basic [Pournin2001]
Question #253045 on Yade changed: https://answers.launchpad.net/yade/+question/253045 Raphaël Maurin proposed the following answer: Hi Anton, I do not remember that we discussed this point, I think we discussed the choice of kn in function of kn1 and kn2, but not the mass. For the way I am using the law (defining kn, ks, cn, cs), the mass does not appear. If I understood well what Dominik is talking about, this does not affect my use of the contact law. So feel free to modify it, this should not be a problem for me and the other using this law the way I am using it. Raphaël -- You received this question notification because you are a member of yade-users, which 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 #253399]: bug when a sphere cross 10 times the periodic cell
Question #253399 on Yade changed: https://answers.launchpad.net/yade/+question/253399 Status: Answered = Solved Raphaël Maurin confirmed that the question is solved: Thanks Jérôme Duriez, that solved my question. -- You received this question notification because you are a member of yade-users, which 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 #253399]: bug when a sphere cross 10 times the periodic cell
New question #253399 on Yade: https://answers.launchpad.net/yade/+question/253399 Hi all, I am simulating flows of particles due to an external fluid force. Then, the phenomenon is dynamic, I use periodic boundary condition in the streamwise direction and I have particles with velocity as high as 0.5m/s. I noticed a problem of stability when considering small periodic cell. After some times to isolate the problem, I found out that the problem arises when a particle travel for more than 10 times the size of the periodic cell. This does not seem to depend on the contact law, neither on the time step or the velocity of the particle, but only on the number of time the particle is crossing the periodic cell. I am not sure but I think this problem was not present some times ago. Have you already heard about such a bug ? What can I do to fix that ? It is a real problem for me as I would be interested to study the effect of the reduction of the size of the periodic cell and reduce it if possible. Raphaël I am using Ubuntu 12.04 and yade daily 1.10.0-72-d9ab58c~precise Here is a simple script to reproduce the bug : O.dt = 1e-7 lengthCell = 10 #Streamwise length of the periodic cell in diameter slope = 0.5 #Angle of the slope in radian #Particles parameters diameterPart = 6e-3 #Diameter of the particles, in meter, 6mm here. densPart = 2500 #density of the particles, in kg/m3 #Contact law cnPart = 0.0#Normal viscous damping coefficient. knPart = 1e4#Normal stiffness of the particle partFrictAngle = 0.0 #28 *pi/180 #friction angle of the particles, in radian csPart = 0 #tangential viscous damping coefficient (=0) ksPart = 0.5*knPart #tangential stiffness of the contact ##Definition of the materials O.materials.append(ViscElMat(cn=cnPart, cs=csPart, kn=knPart, ks=ksPart, density=densPart, frictionAngle=partFrictAngle, label='sphereMat')) # #Geometrical configuration # length = lengthCell*diameterPart width = length/2.0 height = length/3.0 g = Vector3(9.81*sin(slope),0,-9.81*cos(slope)) groundPosition = height/3.0 #Definition of the semi-periodic cell O.periodic = True O.cell.setBox(length,width,height) # build the ground lowPlane = box(center= (length/2.0,width/2.0,groundPosition),extents=(length*10,width*10,0),fixed=True,wire=False,color = (0.8,0.8,0.8),material = 'sphereMat') #Send the ground box and the particle to simulation O.bodies.append(lowPlane) O.bodies.append(sphere((length/2.0,width/2.0,groundPosition+diameterPart),radius = diameterPart*0.5, material = 'sphereMat')) # SIMULATION LOOP# # O.engines = [ # Reset the forces ForceResetter(), # Detect the potential contacts InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Wall_Aabb(),Bo1_Facet_Aabb(),Bo1_Box_Aabb()],label='contactDetection',allowBiggerThanPeriod = True), # Calculate the different interactions InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(), Ig2_Box_Sphere_ScGeom()], [Ip2_ViscElMat_ViscElMat_ViscElPhys()], [Law2_ScGeom_ViscElPhys_Basic()] ), # Integrate the equation and calculate the new position/velocities... NewtonIntegrator(damping=0.0, gravity=g, label='newton') ] O.saveTmp() -- You received this question notification because you are a member of yade-users, which 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 #253399]: bug when a sphere cross 10 times the periodic cell
Question #253399 on Yade changed: https://answers.launchpad.net/yade/+question/253399 Status: Answered = Open Raphaël Maurin is still having a problem: Hi Jan, Surprising, I tried also with a version compiled from source and I still have the same problem... Any idea what it can be due to ? Otherwise I can try to update Ubuntu. Raphaël -- You received this question notification because you are a member of yade-users, which 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 #253399]: bug when a sphere cross 10 times the periodic cell
Question #253399 on Yade changed: https://answers.launchpad.net/yade/+question/253399 Status: Answered = Open Raphaël Maurin is still having a problem: Ok, I see your point, I didn't think at the problem this way. Thank you for the answer ! So if I understood well, it is not a bug and I 'just' need to put a huge length of the box, no ? Is there a limit of length I can put and will this affect the computational time ? Raphaël -- You received this question notification because you are a member of yade-users, which 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 #253257]: generate a random number in the C++ code
Question #253257 on Yade changed: https://answers.launchpad.net/yade/+question/253257 Raphaël Maurin posted a new comment: Thank you for your replies. I just had a quick look at a review about random number generator in the chapter 7 of [1]. It is very interesting, and well detailed. They underline the fact that some usual generator proposed can be pretty bad, because the parametrization of the generators can be very important for the randomness. In my case, the random number generation is important but not crucial so I am not looking for something perfect but good enough. It seems that the linear congruential generators, as the one you use Klaus are adapted to my use. The parametrization the generators minstd_rand0 proposed in boost library (variation of the one you are using : minstd_rand) is based on the parametrization proposed by Park and Miller, which is cited as an efficient parametrization by [1]. It is described as a a good minimal standard random number generator. For people interested in more efficient generator, I think it is worth having a look at [1]. One last question Klaus, how did you test the random number generator exactly ? Thank you all for the help ! Raphaël [1] p.274 Numerical Recipes in C: The Art of Scientific Computing, Second Edition, William H. Press, Brian P. Flannery, Saul A. Teukolsky, William T. Vetterling. (1992) http://www2.units.it/ipl/students_area/imm2/files/Numerical_Recipes.pdf -- You received this question notification because you are a member of yade-users, which 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 #253257]: generate a random number in the C++ code
New question #253257 on Yade: https://answers.launchpad.net/yade/+question/253257 Hi all, I need to generate a random number from a gaussian distribution in the C++ code of Yade. For that, basing myself on http://www.cplusplus.com/reference/random/normal_distribution/ I wrote in the cpp file : #includerandom std::default_random_engine generator; std::normal_distributiondouble distribution(0.0,1.0); double number = distribution(generator); When compiling, I get an error which I do not understand : In file included from /usr/include/c++/4.6/random:35:0, from /home/raphael/these/code/Yade/trunk/pkg/common/ForceEngine.cpp:13: /usr/include/c++/4.6/bits/c++0x_warning.h:32:2: erreur: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options. /home/raphael/these/code/Yade/trunk/pkg/common/ForceEngine.cpp: In member function ‘virtual void HydroForceEngine::action()’: /home/raphael/these/code/Yade/trunk/pkg/common/ForceEngine.cpp:94:3: erreur: ‘default_random_engine’ is not a member of ‘std’ /home/raphael/these/code/Yade/trunk/pkg/common/ForceEngine.cpp:94:30: erreur: expected ‘;’ before ‘generator’ /home/raphael/these/code/Yade/trunk/pkg/common/ForceEngine.cpp:95:3: erreur: ‘normal_distribution’ is not a member of ‘std’ /home/raphael/these/code/Yade/trunk/pkg/common/ForceEngine.cpp:95:28: erreur: expected primary-expression before ‘double’ /home/raphael/these/code/Yade/trunk/pkg/common/ForceEngine.cpp:95:28: erreur: expected ‘;’ before ‘double’ /home/raphael/these/code/Yade/trunk/pkg/common/ForceEngine.cpp:109:27: erreur: ‘generator’ was not declared in this scope /home/raphael/these/code/Yade/trunk/pkg/common/ForceEngine.cpp:109:36: erreur: ‘distribution’ was not declared in this scope make[2]: *** [CMakeFiles/yade.dir/pkg/common/ForceEngine.cpp.o] Erreur 1 make[2]: *** Attente des tâches non terminées make[1]: *** [CMakeFiles/yade.dir/all] Erreur 2 make: *** [all] Erreur 2 Do you have an idea from where this error come from ? If necessary I can put the whole code but I don't think it will bring something. Raphaël -- You received this question notification because you are a member of yade-users, which 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 #253257]: generate a random number in the C++ code
Question #253257 on Yade changed: https://answers.launchpad.net/yade/+question/253257 Status: Answered = Solved Raphaël Maurin confirmed that the question is solved: Hi Anton, I was using the 29/06/2014 version, I updated and it solved the problem. Thank you ! Raphaël -- You received this question notification because you are a member of yade-users, which 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 #253257]: generate a random number in the C++ code
Question #253257 on Yade changed: https://answers.launchpad.net/yade/+question/253257 Raphaël Maurin confirmed that the question is solved: Thanks Anton Gladky, that solved my question. -- You received this question notification because you are a member of yade-users, which 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 #253112]: memory leakage when passing a variable from python to C++
Question #253112 on Yade changed: https://answers.launchpad.net/yade/+question/253112 Raphaël Maurin posted a new comment: Hi Bruno, To assign the value in the python script I write : HydroForceEngine.vxFluct = X X being the vector containing all the values of fluctuations which is the size of the number of bodies. Raphaël -- You received this question notification because you are a member of yade-users, which 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 #253112]: memory leakage when passing a variable from python to C++
Question #253112 on Yade changed: https://answers.launchpad.net/yade/+question/253112 Status: Answered = Open Raphaël Maurin is still having a problem: It gives always the same size which correspond to len(O.bodies) What else do you need ? Because you have the C++ source code above (cpp and hpp, one after the other) and I tried a very simplified script only executing the command HydroForceEngine.vxFluct = np.zeros(len(O.bodies) and I have the same problem. Raphael -- You received this question notification because you are a member of yade-users, which 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 #253257]: generate a random number in the C++ code
Question #253257 on Yade changed: https://answers.launchpad.net/yade/+question/253257 Raphaël Maurin posted a new comment: One last thing, the random number generator using #includerandom std::default_random_engine generator; std::normal_distributiondouble distribution(0.0,1.0); double number = distribution(generator); is pretty bad, I am able to see by eyes some number which are repeated many times...I don't like it much. Does someone knows a better way to generate random numbers in C++ ? Thanks ! Raphaël -- You received this question notification because you are a member of yade-users, which 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 #253112]: memory leakage when passing a variable from python to C++
New question #253112 on Yade: https://answers.launchpad.net/yade/+question/253112 Hi all, I modified the source code of yade to have an engine applying drag and lift force on each particle at each time step in function of a given average velocity field. The fluid flow is turbulent so that I determine every dt_f also randomly a fluid velocity fluctuation associated to each particle. (dt_f~100 dt) To evaluate the drag and lift, I need then to pass the value of the fluctuation associated to each particles from the python script to the C++ engine. This takes the form of a vector of size len(O.bodies) and should then be given to the C++ engines every dt_f However, when the number of particle is high (~50 000), the simulation stops after about 60s and it is written : processus arrêté (processus stopped in french). This is most probably due to the fact the process is taking too much memory. For example a simulation of 83000 particles after 60s of virtual time simulated takes 14GB of memory and 10GB of SWAP. I made a test script and I found that the increase in memory consumption with time is due to the number of time I am passing the vector with the fluctuation associated to the particle from the python script to the C++ engine. I have possibilities to pass a smaller vector to the C++ engine, or to evaluate the turbulent fluctuation inside the C++ engine, however it does not seem normal to me to have memory leakage when passing a variable from python to C++. Any idea of what it is due to ? Is there a way to fix this problem ? Thanks for your help ! Raphaël Yade version : 2014-06-29.git-de4c01a linux version : Ubuntu 12.04 Hereafter the modification of the C++ code I made. ForceEngine.cpp : void HydroForceEngine::action(){ FOREACH(Body::id_t id, ids){ Body* b=Body::byId(id,scene).get(); if (!b) continue; if (!(scene-bodies-exists(id))) continue; const Sphere* sphere = dynamic_castSphere*(b-shape.get()); if (sphere){ Vector3r posSphere = b-state-pos;//position vector of the sphere int p = floor((posSphere[2]-zRef)/deltaZ); //cell number in which the particle is if ((pnCell)(p0)) { Vector3r liftForce = Vector3r::Zero(); Vector3r dragForce = Vector3r::Zero(); Vector3r vFluid(vxFluid[p]+vxFluct[id],0.0,vzFluct[id]); //fluid velocity at this point (including fluctuations) Vector3r vPart = b-state-vel; Vector3r vRel = vFluid - vPart; //Drag force calculation Real Rep = vRel.norm()*sphere-radius*2*rhoFluid/viscoDyn; Real A = sphere-radius*sphere-radius*Mathr::PI; //Crossection of the sphere if (vRel.norm()!=0.0) { Real hindranceF = pow(1-phiPart[p],-expoRZ); //hindrance function Real Cd = (0.44 + 24.4/Rep)*hindranceF; //drag coefficient dragForce = 0.5*rhoFluid*A*Cd*vRel.squaredNorm()*vRel.normalized(); } //lift force calculation due to difference of pressure (Saffman lift) int intRadius = floor(sphere-radius/deltaZ); if ((p+intRadiusnCell)(p-intRadius0)(lift==true)) { Real vRelTop = vxFluid[p+intRadius] - vPart[0]; // relative velocity of the fluid wrt the particle at the top of the particle Real vRelBottom = vxFluid[p-intRadius] - vPart[0]; // same at the bottom liftForce[2] = 0.5*rhoFluid*A*Cl*(vRelTop*vRelTop-vRelBottom*vRelBottom); } //Archimedes force calculation Vector3r archimedesForce = -4.0/3.0*Mathr::PI*sphere-radius*sphere-radius*sphere-radius*rhoFluid*gravity; //add the force to the particle scene-forces.addForce(id,dragForce+liftForce+archimedesForce); } } } } ForceEngine.hpp : class HydroForceEngine: public PartialEngine{ public: virtual void action(); YADE_CLASS_BASE_DOC_ATTRS(HydroForceEngine,PartialEngine,Apply drag and lift force (and Archimedes force) due to a fluid flow vector (1D) to each sphere. The applied force reads\n\n.. math:: F_{d}=\\frac{1}{2} C_d A\\rho|\\vec{v_f - v}| vec{v_f - v} \n\n where $\\rho$ is the medium density (:yref:`densityHydroForceEngine.rhoFluid`), $v$ is
[Yade-users] [Question #252065]: Compiling problem : eigen3 version
New question #252065 on Yade: https://answers.launchpad.net/yade/+question/252065 Hi everyone, This is probably very simple question which has more to do with installing package problem than with yade. I am trying to compile Yade from source on a machine under Ubuntu 12.04.4 LTS and when I type : cmake -DINSTALL_PREFIX=./ ../trunk I get : -- Version is set to 2014-07-22.git-d9ab58c -- GTS using gts-config /usr/bin/gts-config -- Using GTS from /usr -- Boost_VERSION: 104601 -- Boost_LIB_VERSION: 1_46_1 -- Boost_INCLUDE_DIRS: /usr/include -- Boost_LIBRARIES: /usr/lib/libboost_python.so/usr/lib/libboost_thread-mt.so/usr/lib/libboost_filesystem-mt.so/usr/lib/libboost_iostreams-mt.so/usr/lib/libboost_regex-mt.so/usr/lib/libboost_serialization-mt.so/usr/lib/libboost_system-mt.so/usr/lib/libboost_date_time-mt.so -- Found Eigen3, version: 3.2.0 CMake Error at CMakeLists.txt:143 (MESSAGE): Minimal required Eigen3 version is 3.2.1, please update Eigen3! -- Configuring incomplete, errors occurred! However, when I am trying to update the version of the package libeigen3-dev, doing : sudo apt-get install libeigen3-dev It is telling me that I already have the latest version. Any idea on how to fix the problem ? Thanks Raphaël You received this question notification because you are a member of yade-users, which 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 #252065]: Compiling problem : eigen3 version
Question #252065 on Yade changed: https://answers.launchpad.net/yade/+question/252065 Status: Answered = Open Raphaël Maurin is still having a problem: Hi Timos, I would like to avoid that, there is simulation running that does not belong to me and I am afraid that removing eigen3 will make their simulation crash. But maybe I am wrong ? Raphaël Message d'origine De: Yade-users de la part de Timos Papachristos Date: mer. 23/07/2014 16:32 À: yade-users@lists.launchpad.net Objet : Re: [Yade-users] [Question #252065]: Compiling problem : eigen3version Question #252065 on Yade changed: https://answers.launchpad.net/yade/+question/252065 Status: Open = Answered Timos Papachristos proposed the following answer: Hi Raphael, Did you try to remove completely the previous version and install the new one? (Worked for me) Timos Le 23/07/2014 16:17, Raphaël Maurin a écrit : New question #252065 on Yade: https://answers.launchpad.net/yade/+question/252065 Hi everyone, This is probably very simple question which has more to do with installing package problem than with yade. I am trying to compile Yade from source on a machine under Ubuntu 12.04.4 LTS and when I type : cmake -DINSTALL_PREFIX=./ ../trunk I get : -- Version is set to 2014-07-22.git-d9ab58c -- GTS using gts-config /usr/bin/gts-config -- Using GTS from /usr -- Boost_VERSION: 104601 -- Boost_LIB_VERSION: 1_46_1 -- Boost_INCLUDE_DIRS: /usr/include -- Boost_LIBRARIES: /usr/lib/libboost_python.so/usr/lib/libboost_thread-mt.so/usr/lib/libboost_filesystem-mt.so/usr/lib/libboost_iostreams-mt.so/usr/lib/libboost_regex-mt.so/usr/lib/libboost_serialization-mt.so/usr/lib/libboost_system-mt.so/usr/lib/libboost_date_time-mt.so -- Found Eigen3, version: 3.2.0 CMake Error at CMakeLists.txt:143 (MESSAGE): Minimal required Eigen3 version is 3.2.1, please update Eigen3! -- Configuring incomplete, errors occurred! However, when I am trying to update the version of the package libeigen3-dev, doing : sudo apt-get install libeigen3-dev It is telling me that I already have the latest version. Any idea on how to fix the problem ? Thanks Raphaël You received this question notification because you are a member of yade-users, which 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 -- Efthymios Papachristos PhD Student at Grenoble-INP Lab 3SR(Soils, Solids, Structures, Risks ) Building: E , Office 033 Office phone number: +33 4 56 52 86 38 You received this question notification because you are a member of yade-users, which 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 you are a member of yade-users, which 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 #252065]: Compiling problem : eigen3 version
Question #252065 on Yade changed: https://answers.launchpad.net/yade/+question/252065 Status: Answered = Solved Raphaël Maurin confirmed that the question is solved: Ok, done, it works now. Thank you for the help ! -- You received this question notification because you are a member of yade-users, which 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 #252065]: Compiling problem : eigen3 version
Question #252065 on Yade changed: https://answers.launchpad.net/yade/+question/252065 Raphaël Maurin confirmed that the question is solved: Thanks Anton Gladky, that solved my question. -- You received this question notification because you are a member of yade-users, which 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 #240164]: error when importing scipy.integrate
Question #240164 on Yade changed: https://answers.launchpad.net/yade/+question/240164 Raphaël Maurin proposed the following answer: Hi, It is kind of solved (see the discussion of the bug), you can run your script typing yade -lscipy yourScript.py and it should work. Raphael -- You received this question notification because you are a member of yade-users, which 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 #239900]: equivalent damping calculation in ViscElPhys
Question #239900 on Yade changed: https://answers.launchpad.net/yade/+question/239900 Raphaël Maurin gave more information on the question: I just realized there is the same formulation for the stiffness (and the rolling resistance), should I change that also (same logic as above) ? (I am not sure for the rolling resistance as I am not using it. ) Something like : if (cn10) or (cn20){ phys-cn = cn1*cn2/(cn1+cn2 ); } else { phys-cn = 0; } and the same for cs, kn, and ks (and maybe mR) seems ok to you ? Raphael -- You received this question notification because you are a member of yade-users, which 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 #239900]: equivalent damping calculation in ViscElPhys
New question #239900 on Yade: https://answers.launchpad.net/yade/+question/239900 Hi all, I have a question about the formulation of the equivalent damping in ViscElphys. For now, it is made such as : cn = ((1/cn1) + (1/cn2))^(-1) which is equivalent to cn = cn1cn2/(cn1+cn2) However, in the case where cn2 = 0 for example, the formulation in the code is not equivalent to the expression above. In the code, it is written that in case of cn2 = 0, 1/cn2 = 0, which gives : cn = ((1/cn1) + 0)^(-1) This is not equivalent to the formulation cn = cn1cn2/(cn1+cn2), because then cn would be 0. (The problem is the same if cn1 = 0) It seems to me that the formulation of the code is false : if one damping parameter of the contact is zero, then as the two dashpot are considered in series, the equivalent damping should be zero. However I am not completely sure it is that simple, so I would like to have your opinion on that. I hope my question is clear. Thanks Raphael -- You received this question notification because you are a member of yade-users, which 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 #234513]: import an external library
New question #234513 on Yade: https://answers.launchpad.net/yade/+question/234513 Hi all, I am trying to import an external library nsmp1d_yade.so in my script (see below) and I don't succeed to do it. When I am using my script with python, doing : python Simple.py everything is working and the script is using the content of the library. However, when I am running the same script with yade : yade-daily Simple.py I get an error : Welcome to Yade 3+3698+47~precise1 TCP python prompt on localhost:9000, auth cookie `ucdsea' XMLRPC info provider on http://localhost:21000 Running script Simple.py Traceback (most recent call last): File /usr/bin/yade-daily, line 168, in runScript execfile(script,globals()) File Simple.py, line 2, in module from nsmp1d_yade import * ImportError: No module named nsmp1d_yade I don't understand why it is working with python and not with Yade. Do you have any idea of how I can solve this problem? Thank you Raphael Here is my script Simple.py : from nsmp1d_yade import * from pylab import * from matplotlib import pyplot import matplotlib.gridspec as gridspec import numpy as np ## Define the situation rho_f = 1000 rho_s = 2500 slope = 1e-4 visco_f = 1e-3 dp=6e-3 ndimz=301 h=1. dsig=np.zeros(ndimz) dsig[0:ndimz-1]=h/(double(ndimz-1)) sig=linspace(0e0,1e0,ndimz) ufnp = np.zeros(ndimz) ufn= np.zeros(ndimz) alphaf = np.zeros(ndimz) us = np.zeros(ndimz) alphas = np.zeros(ndimz) alphaf=1e0-alphas tfin=2000. dt=1e-1 ufnp=nsmp1d_yade(h,sig,dsig,dp,ufn,alphaf,us,alphas,tfin,dt) ## ## plots ## zmin=0 zmax=h umin=min(ufnp) umax=max(ufnp) figure(1) plot(ufnp,sig*h,'ob',label='u_f') title('U_f') #axis([1200, 1900, zmin, zmax]) xlabel('U_f (m/s)') ylabel('z (m)') axis([umin, umax, zmin, zmax]) show() -- You received this question notification because you are a member of yade-users, which 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 #234513]: import an external library
Question #234513 on Yade changed: https://answers.launchpad.net/yade/+question/234513 Status: Answered = Open Raphaël Maurin is still having a problem: Thanks for the answer, I tried both solutions one by one, but both lead to another error : Welcome to Yade 3+3698+47~precise1 TCP python prompt on localhost:9000, auth cookie `dascks' XMLRPC info provider on http://localhost:21000 Running script Simple.py Erreur de segmentation (core dumped) translation : segmentation fault and I don't know how to fix that. Any idea ? Thanks Raphael (The script is still working in python) -- You received this question notification because you are a member of yade-users, which 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