[Yade-users] [Question #708473]: Get bodyStressTensors with body ID
New question #708473 on Yade: https://answers.launchpad.net/yade/+question/708473 Hi, I would like to get the stress tensors of particular particles. What I understood is that I can use bodyStressTensors() which returns a table with per-particle stress tensors[1]. Referring to [2], I can get the stress of that particular particle by: s=bodyStressTensors() stress = s[b.id]##"b" being a body If I understood correctly, b.id is an id, while in s[*], * should be the location index. b.id seems to be the same as the location index when the packing is created initially. So this way works well. However, in my future simulation, some of the initial particles will be erased and there will be new particles created in the packing. I am not sure that after the erase-add particles (maybe more than one time the erase-add process), can I still use "stress = s[b.id]" to get the correct stress of the particular particle? If not, do you have any idea how to get the stress tensors of particular particles using body's Id. Thanks. Leonard [1]https://yade-dev.gitlab.io/trunk/yade.utils.html?highlight=bodystresstensors#yade._utils.bodyStressTensors [2]https://yade-dev.gitlab.io/trunk/user.html?highlight=paraview#micro-stress -- 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 #707675]: Shear force is lower than MaxShearForce but sliding occurs
Question #707675 on Yade changed: https://answers.launchpad.net/yade/+question/707675 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Karol Brzezinski, 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 #707069]: How to determine if a cohesive link is broken (Law2_ScGeom6D_CohFrictPhys_CohesionMoment)
Question #707069 on Yade changed: https://answers.launchpad.net/yade/+question/707069 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Robert Caulk, that solved my question. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #707069]: How to determine if a cohesive link is broken (Law2_ScGeom6D_CohFrictPhys_CohesionMoment)
New question #707069 on Yade: https://answers.launchpad.net/yade/+question/707069 Hi, I use cohesive material (CohFrictMat) and the contact law of Law2_ScGeom6D_CohFrictPhys_CohesionMoment to introduce cohesive bonds in my DEM model. In the description of Law2_ScGeom6D_CohFrictPhys_CohesionMoment [1], it says that if the maximum tensile or maximum shear force is reached and CohFrictPhys::fragile =True (default), the cohesive link is broken. I would like to ask how to know if a cohesive link is broken or not. Thanks Leonard [1]https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Law2_ScGeom6D_CohFrictPhys_CohesionMoment -- 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 #706766]: How to get Micro-strain field from a 2D simulation in YADE
Question #706766 on Yade changed: https://answers.launchpad.net/yade/+question/706766 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Karol, this is a great idea! Cheers, Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #706766]: How to get Micro-strain field from a 2D simulation in YADE
Question #706766 on Yade changed: https://answers.launchpad.net/yade/+question/706766 Status: Answered => Open Leonard is still having a problem: Hi Karol, Thank you for your reply. Could you please give more hints? Sorry that I didn't get the answer. Thanks Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #706766]: How to get Micro-strain field from a 2D simulation in YADE
New question #706766 on Yade: https://answers.launchpad.net/yade/+question/706766 Hi, YADE example [1] shows how to export the microstrain vtk from a 3D case. I would like to ask how to get the micro-strain from a (quasi) 2D simulation in YADE. I made a 2D MWE below (not a perfect 2D), where I use the approach demonstrated in [1] to get the microstrain. The calculated matrix is all zero. When the vtk file is imported into paraview, there is nothing. Possibly because it is based on volume calculation, while in quasi-2D, there is no volume. Do you have any idea of how to get the microstrain vtk for a 2D case in YADE? Thanks, Leonard ### 2D MWE # from __future__ import division from yade import pack, plot num_spheres=1000 rate=-0.01 damp=0.6 stabilityThreshold=0.001 young=5e6 confinement=6.7e3 mn,mx=Vector3(0,0,0.02),Vector3(1,2,0.02) O.materials.append(FrictMat(young=young, poisson=0.5, frictionAngle=radians(30), density=2600, label='spheres')) O.materials.append(FrictMat(young=young, poisson=0.5, frictionAngle=0, density=0, label='walls')) walls=aabbWalls([Vector3(0,0,0),Vector3(1,2,0.04)],thickness=0,material='walls') wallIds=O.bodies.append(walls) sp=pack.SpherePack() sp.makeCloud(mn,mx,-1,0.,num_spheres,False, 0.75,seed=1) O.bodies.append([sphere(center,rad,material='spheres') for center,rad in sp]) Gl1_Sphere.quality=3 for b in O.bodies: if isinstance(b.shape,Sphere): b.state.blockedDOFs='zXY' b.shape.color=[1,1,1] triax=TriaxialStressController( thickness = 0, stressMask = 7, internalCompaction=False, ) newton=NewtonIntegrator(damping=damp) O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Box_Aabb()]), InteractionLoop([Ig2_Sphere_Sphere_ScGeom(), Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()]), GlobalStiffnessTimeStepper(active=1, timeStepUpdateInterval=100, timestepSafetyCoefficient=0.8), triax, newton ] triax.goal1=triax.goal2=triax.goal3=-confinement while 1: O.run(1000, True) unb=unbalancedForce() print 'unbF:',unb,' meanStress: ',-triax.meanStress,'top:',-triax.stress(triax.wall_top_id)[1],'left:',-triax.stress(triax.wall_left_id)[0],'front:',-triax.stress(triax.wall_front_id)[2] if unbhttps://yade-dev.gitlab.io/trunk/user.html?highlight=paraview#micro-strain -- 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 #706553]: About simulating constant volume condition in a triaxial test
Question #706553 on Yade changed: https://answers.launchpad.net/yade/+question/706553 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Karol Brzezinski, 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 #706553]: About simulating constant volume condition in a triaxial test
Question #706553 on Yade changed: https://answers.launchpad.net/yade/+question/706553 Leonard posted a new comment: Hi Karol, Thanks very much for your reply. Yes, the strainDamping is a good clue. I add one line of code "triax.strainDamping=0.01" in the MWE and run the simulation. I compare the results with the original MWE results whose triax.strainDamping=0.99 by default. I found: triax.strainDamping=0.99 gives ev=4.3e-4 at e22=0.4 triax.strainDamping=0.01 gives ev=2.2e-6 at e22=0.4, which is much close to zero. This suggests that using a small strainDamping can make it close to a perfect constant volume condition, although the stress-strain results also change. Thanks Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #706553]: About simulating constant volume condition in a triaxial test
New question #706553 on Yade: https://answers.launchpad.net/yade/+question/706553 Hi, I would like to simulate a constant volume condition in a triaxial test (i.e., undrained triaxial test). In general, we can simulate the constant volume by setting triax controller like: triax.stressMask = 0 ## all strain control triax.goal2=rate triax.goal1=-0.5*rate triax.goal3=-0.5*rate For a constant volume condition, volumetric strain should be zero theoretically, while there could be some fluctuation in volumetric strain since it is a numerical simulation. It is OK if I only have a small amount of volumetric strain during the simulation (e.g. below 1e-5). However, I always get accumulation in volumetric strain to a relative large value (e.g. up to 1e-3), which doesn't satisfy the constant volume condition. Do you have any ideas about simulating a constant volume condition more precisely? For example, what parameters we can adjust to help us simulate constant volume more accurately? A MWE below modified from Bruno's triaxial script shows the accumulation in volumetric strain during undrained loading. from yade import pack nRead = readParamsFromTable( num_spheres=1000, compFricDegree=30, key='_triax_base_', unknownOk=True ) from yade.params import table num_spheres = table.num_spheres key = table.key targetPorosity = 0.43 compFricDegree = table.compFricDegree finalFricDegree = 30 rate = -0.01 damp = 0.2 stabilityThreshold = 0.01 young = 5e6 mn, mx = Vector3(0, 0, 0), Vector3(1, 1, 1) O.materials.append(FrictMat(young=young, poisson=0.5, frictionAngle=radians(compFricDegree), density=2600, label='spheres')) O.materials.append(FrictMat(young=young, poisson=0.5, frictionAngle=0, density=0, label='walls')) walls = aabbWalls([mn, mx], thickness=0, material='walls') wallIds = O.bodies.append(walls) sp = pack.SpherePack() sp.makeCloud(mn, mx, -1, 0., num_spheres, False, 0.95, seed=1) O.bodies.append([sphere(center, rad, material='spheres') for center, rad in sp]) triax = TriaxialStressController( maxMultiplier=1. + 2e4 / young, finalMaxMultiplier=1. + 2e3 / young, thickness=0, stressMask=7, internalCompaction=True, ) newton = NewtonIntegrator(damping=damp) O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Box_Aabb()]), InteractionLoop([Ig2_Sphere_Sphere_ScGeom(), Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()]), ## We will use the global stiffness of each body to determine an optimal timestep (see https://yade-dem.org/w/images/1/1b/Chareyre_licensed.pdf) GlobalStiffnessTimeStepper(active=1, timeStepUpdateInterval=100, timestepSafetyCoefficient=0.8), triax, TriaxialStateRecorder(iterPeriod=100, file='WallStresses' + table.key), newton ] Gl1_Sphere.stripes = 0 if nRead == 0: yade.qt.Controller(), yade.qt.View() triax.goal1 = triax.goal2 = triax.goal3 = -1 while 1: O.run(1000, True) unb=unbalancedForce() print 'unbalanced force:',unb,' mean stress: ',triax.meanStress if unbtargetPorosity: compFricDegree = 0.95*compFricDegree setContactFriction(radians(compFricDegree)) print "\r Friction: ",compFricDegree," porosity:",triax.porosity, sys.stdout.flush() O.run(500,1) triax.internalCompaction=False setContactFriction(radians(finalFricDegree)) triax.stressMask = 0 triax.goal2=rate triax.goal1=-0.5*rate triax.goal3=-0.5*rate newton.damping=0.6 from yade import plot def history(): plot.addData(e11=-triax.strain[0], e22=-triax.strain[1], e33=-triax.strain[2],ev=-triax.strain[0]-triax.strain[1]-triax.strain[2], s11=-triax.stress(triax.wall_right_id)[0],s22=-triax.stress(triax.wall_top_id)[1],s33=-triax.stress(triax.wall_front_id)[2],i=O.iter) O.engines=O.engines[0:5]+[PyRunner(iterPeriod=20,command='history()',label='recorder')]+O.engines[5:7] O.run(100,True) plot.plots={'e22':('s11',None,'ev')} plot.plot() ###### Thanks Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #706533]: Visualise forcechain in paraview
Question #706533 on Yade changed: https://answers.launchpad.net/yade/+question/706533 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Karol Brzezinski, 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 #706533]: Visualise forcechain in paraview
Question #706533 on Yade changed: https://answers.launchpad.net/yade/+question/706533 Status: Answered => Open Leonard is still having a problem: Hi Karol Thanks very much. I will try to avoid external links next time. The state file can be found here: https://we.tl/t-6NtnmZ6IR0 Thanks. Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #706533]: Visualise forcechain in paraview
Question #706533 on Yade changed: https://answers.launchpad.net/yade/+question/706533 Status: Answered => Open Leonard is still having a problem: Hi Karol, Many thanks for your reply. I updated my paraview version to 5.10.1. But it has the same problem. Which drop-down list do you mean? I add a new picture in [3] to illustrate the drop-down list I understood from you. But I couldn't open that drop-down list (it is empty). Does it work well using your paraview to visualise the example.vtk file I shared in #2? I am asking this because I wonder if it is the problem of the example.vtk file or the problem with my paraview settings. Thanks very much. Leonard [3]https://we.tl/t-5wFdBniP3j -- 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 #706533]: Visualise forcechain in paraview
Question #706533 on Yade changed: https://answers.launchpad.net/yade/+question/706533 Status: Answered => Open Leonard is still having a problem: Hi Karol, Do you mean that your paraview automatically shows the force chain scaled with its magnitude? May I ask that what version of paraview you use? The one I use is 5.9.1. Thanks. Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #706533]: Visualise forcechain in paraview
Question #706533 on Yade changed: https://answers.launchpad.net/yade/+question/706533 Status: Answered => Open Leonard is still having a problem: Hi Karol, Thank you for your reply. Sorry I still couldn't make it. I followed the instructions and played with Radius and Radius factors, but the force chain with red color (which means it has a high force) shows the same tube size as those force chains in blue color (blue represents low force). Actually, it doesn't change anything when I adjust Radius factors. May I invite you to have a look at my settings in paraview (together with an example vtk file)? Which can be found in [2]. Thanks Leonard [2]https://we.tl/t-IbGkg81hM5 -- 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 #706533]: Visualise forcechain in paraview
New question #706533 on Yade: https://answers.launchpad.net/yade/+question/706533 Hi, I'd like to visualise force chain in paraveiw, referring to [1], I can visualise the force chain in tube shape, but the tubes are in constant radius as mentioned in [1]. I would like to know how to make the tube sizes scaled by the force magnitude. Thanks. Leonard [1]https://yade-dev.gitlab.io/trunk/user.html?highlight=micro%20stress#rendering-interactions-as-force-chain -- 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 #706506]: How to output volumetric strain (micro strain field) in vtk file
Question #706506 on Yade changed: https://answers.launchpad.net/yade/+question/706506 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Karol Brzezinski, that solved my question. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #706506]: How to output volumetric strain (micro strain field) in vtk file
New question #706506 on Yade: https://answers.launchpad.net/yade/+question/706506 Hi, Referring to [1], we can use defToVtkFromPositions() to write a vtk file to visualise the deviatoric strain filed in paraview. For example: defToVtkFromPositions(position1.txt,position2.txt,"output_deviatoricStrain.vtk"). In this vtk file, it can show: solid color, strain_deviator and strain_matrix. It seems that no volumetric strain field from this vtk file. I would like to ask how to write a vtk file to visualise the volumetric strain field. Thanks. Leonard [1]https://yade-dev.gitlab.io/trunk/yade.wrapper.html?highlight=deftovtkfrompositions#yade.wrapper.TesselationWrapper.defToVtkFromPositions -- 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 #699998]: How to simulate small-strain triaxial compression test
Question #68 on Yade changed: https://answers.launchpad.net/yade/+question/68 Leonard posted a new comment: Hi William, >However, the unbalanced force is nan and the mean stress is 0 all the time whlie I modfy this using your code. The reason I think is that: you modify only the young from 5e6 to 29e9, while in triax=TriaxialStressController( maxMultiplier=1.+2e4/young, # spheres growing factor (fast growth) finalMaxMultiplier=1.+2e3/young, # spheres growing factor (slow growth) thickness = 0, stressMask = 7, internalCompaction=True, # If true the confining pressure is generated by growing particles ) The radii expansion multiplier is associated with the young value in my MWE, which means you set it very small when you change young very high. Actually, the particles are growing but very slowly, so that you didn't observe any contacts between particles and hence there is no unb and mean stress. If you wait enough time (could be very long), you may observe the unb and mean stress increase. You may play with the parameters in the TriaxialStressController, for example, using a fixed value of maxMultiplier. Cheers Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #704551]: How to make VTK file of relative particle rotation angle from state1 to state2
Question #704551 on Yade changed: https://answers.launchpad.net/yade/+question/704551 Leonard confirmed that the question is solved: Thanks Jan Stránský, that solved my question. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #704551]: How to make VTK file of relative particle rotation angle from state1 to state2
Question #704551 on Yade changed: https://answers.launchpad.net/yade/+question/704551 Status: Answered => Solved Leonard confirmed that the question is solved: Hi, Yes, that is a good idea and I am moving to the latest version of Yade. Just because lots of project data have been obtained in the old version, I would like to try whether it is possible to make use of them. Thanks, Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #704551]: How to make VTK file of relative particle rotation angle from state1 to state2
Question #704551 on Yade changed: https://answers.launchpad.net/yade/+question/704551 Status: Needs information => Open Leonard gave more information on the question: Hi Jan, It is python 2.7.17. Obtained by: In [1]: import sys; print(sys.version) 2.7.17 (default, Nov 28 2022, 18:51:39) [GCC 7.5.0] Thanks Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #704551]: How to make VTK file of relative particle rotation angle from state1 to state2
Question #704551 on Yade changed: https://answers.launchpad.net/yade/+question/704551 Status: Answered => Open Leonard is still having a problem: Hi Jan and Karol, Thanks for your MWEs. Because I use an old version of Yade (2018.02b), consequently executing the MWE gives error: ValueError: too many values to unpack[1]. Thereby, I need to adapt the MWE to my old verison. I successfully adapted Karol's MWE: # exporter.exportSpheres(ids='all',what=dict(rotation_method_1 = 'b.state.rot()',rotation_method_2 = '(b.state.refOri.conjugate()*b.state.ori).toRotationVector() ')) ## change to exporter.exportSpheres(ids='all',what=[('rotation_method_1','b.state.rot()'),('rotation_method_2','(b.state.refOri.conjugate()*b.state.ori).toRotationVector()')]) But I didn't make it for Jan's MWE. What I tried is: from yade import export import builtins # to store "data" and access them from a string command spheres = [ sphere((0,0,0),1), sphere((3,0,0),1), sphere((6,0,0),1), ] O.bodies.append(spheres) data = [ # e.g. angle 1, 2, 3, ] builtins.data = data # make data "global", visible in export module vtk = export.VTKExporter("test-angle") # vtk.exportSpheres(what=dict(angle="data[b.id]")) ## change it to vtk.exportSpheres(ids='all',what=[('ids','b.id'),('pos','b.state.pos'),('angle','data[b.id]')]) It returns the following error: Traceback (most recent call last): File "/usr/bin/yade", line 182, in runScript execfile(script,globals()) File "Jan_MWE.py", line 22, in vtk.exportSpheres(ids='all',what=[('ids','b.id'),('pos','b.state.pos'),('angle','data[b.id]')]) File "/usr/lib/x86_64-linux-gnu/yade/py/yade/export.py", line 431, in exportSpheres test = eval(command) # ... eval one example to see what type (float, Vector3, Matrix3) the result is ... File "", line 1, in NameError: name 'data' is not defined Could you please give some instructions? Thanks Leonard [1]https://answers.launchpad.net/yade/+question/695966 -- 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 #704551]: How to make VTK file of relative particle rotation angle from state1 to state2
Question #704551 on Yade changed: https://answers.launchpad.net/yade/+question/704551 Status: Answered => Open Leonard is still having a problem: Hi Jan, Thanks for your reply. I got the solution for each individual question. But I am not clear how to combine the two. If I understood correctly, for using VTKExporter, it is something like: vtkExporter.exportSpheres(ids='all',what=[('id',"b.id"),('ori','b.state.ori'),('radius',"b.shape.radius")]) It seems that the above code can only save the variables at one state. i.e. not some value calculated from two states, such as the relative rotation angle between state1 and state2. What I have in my mind is: storing the rotation angle (calculated by axis,angle = relOri.toAxisAngle()) into a VTK file. Something like: step1: from the sample at state1 --> output a txt file (lets name it txt1) which has b.ori for each particle. step2: from the sample at state2 --> output a txt file (txt2) which has b.ori for each particle. step3: calculating relOri = state1.ori.conjugate()*state2.ori and axis,angle = relOri.toAxisAngle() by using txt1 and txt2, then I have the angle for each particle. step4: store that angle into a VTK file which can be visualised in paraview Do you have any ideas? Thanks! Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #704551]: How to make VTK file of relative particle rotation angle from state1 to state2
New question #704551 on Yade: https://answers.launchpad.net/yade/+question/704551 Hi, I'd like to ask that is it possible to output VTK file of relative particle rotation angle from state1 to state2 by importing samples (or txt files). The motivation is: I carried out triaxial compression test and I have saved samples at many strain levels (e.g., at axial strain 1%, 2% ...). I would like to invesitgate the relative particle rotation angle between any of two states I am interested in, and visualise it in paraview. If it is possible, I would like to ask that (1) how to calculate the relative rotation angle of a sphere between two states? (2) how to write these information into VTK so that it can be visualised in paraview? Thanks Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #704293]: How to use TW.triangulate() to calculate strain between two states by importing samples
Question #704293 on Yade changed: https://answers.launchpad.net/yade/+question/704293 Leonard gave more information on the question: Hi Karol, Many thanks for your reply. Here are the output with triangulation part (i.e. not comment out) # Triangulated Grains : 33 sym_grad_u_total_g (wrong averaged strain): 0 0 0.125 0 0 0 0.125 0 0 Total volume = 8, grad_u = 0 0 0 0 0 0 0.25 0 0 sym_grad_u (true average strain): 0 0 0.125 0 0 0 0.125 0 0 Macro strain : 0 0 0 0 0 0 0 0 0 Here below are the output without triangulation part (i.e. comment out): ### Triangulated Grains : 33 sym_grad_u_total_g (wrong averaged strain): 0 0 0.125 0 0 0 0.125 0 0 Total volume = 8, grad_u = 0 0 0 0 0 0 0.25 0 0 sym_grad_u (true average strain): 0 0 0.125 0 0 0 0.125 0 0 Macro strain : 0 0 0 0 0 0 0 0 0 # In addition, the two vtk files are visulised in paraview and they look the same. Thanks Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #704293]: How to use TW.triangulate() to calculate strain between two states by importing samples
Question #704293 on Yade changed: https://answers.launchpad.net/yade/+question/704293 Status: Answered => Open Leonard is still having a problem: Hi Karol, Thanks very much for your reply and the nice reference example. >>You still need to triangulate and compute volumes Maybe it would be better to clarify my doubt: I think TW.triangulate() and TW.computeVolumes() are only needed in the approach of using TW.setState(0) TW.setState(1). While in the approach of using TW.defToVtkFromPositions( 'sp0.txt','sp1.txt' , 'strain_from_files.vtk'), TW.triangulate() and TW.computeVolumes() are not needed. Taking your example, now we don't compare the two approaches, but we compare the approach of using TW.defToVtkFromPositions with/ without triangulate and compute volumes: centers = [] for x in range(3): for y in range(3): for z in range(3): centers.append((x,y,z)) O.bodies.append([ sphere(center=center,radius=1,) for center in centers ]) sp = SpherePack() sp.fromSimulation() TW=TesselationWrapper() # TW.triangulate() ## without triangulate # TW.computeVolumes() ## without compute volumes sp.save('sp0.txt') shiftBodies(list(range(18,27,1)),(0,0,0.5)) # move one layer of spheres without engines (I am just being lazy) sp.fromSimulation() sp.save('sp1.txt') TW.defToVtkFromPositions( 'sp0.txt','sp1.txt' , 'strain_from_files2.vtk') The above example uses TW.defToVtkFromPositions without triangulate and compute volumes, and the vtk file visualised in paraview seems to be the same as TW.defToVtkFromPositions with triangulate and compute volumes. Thereby, I think it is not needed to triangulate and compute volumes when use TW.defToVtkFromPositions(). Please correct me if I misunderstood. Thanks Best regards, Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #704293]: How to use TW.triangulate() to calculate strain between two states by importing samples
Question #704293 on Yade changed: https://answers.launchpad.net/yade/+question/704293 Status: Answered => Open Leonard is still having a problem: Hi Karol, Haha, thanks for addressing this question again. Just two things to be confirmed to make sure I correctly understood: 1. In the two txt files, each line (which is the x, y, z, radius of a sphere) should be the same sphere. e.g. If sphere id 10 is at the 10th line in txt1, it should also be at the 10th line in txt2. 2.When I input the two txt files into defToVtkFromPositions(), I use the 2 lines of code as below: TW=TesselationWrapper() TW.defToVtkFromPositions("txt1.txt","txt2.txt","def.vtk") without TW.triangulate() which has been used in example [1]. I'd like to confirm that when we use defToVtkFromPositions(), there is no need to involve TW.triangulate(). Please correct me if I am wrong. One question is that, when I execute TW.defToVtkFromPositions(), it returns a Macro strain and it is always: 0 0 0 0 0 0 0 0 0 in all of my states against initial state in a triaxial compression test. Even I can observe strain_deviator difference in paraview at different states. May I ask what is Macro strain and why it is a zero matrix in my case. Thanks Best wishes Leonard [1]https://yade-dev.gitlab.io/trunk/user.html#micro-strain -- 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 #704293]: How to use TW.triangulate() to calculate strain between two states by importing samples
New question #704293 on Yade: https://answers.launchpad.net/yade/+question/704293 Hi, I'd like to ask that how to use TW.triangulate() to calculate strain between two states by importing the two samples at the corresponding states. The approach of calculating micro-strain between state 0 and state 1 is mentioned at [1], the main steps are as below: ### O.load("test.yade") ## import sample TW.setState(0) #store current positions internaly for later use as the "0" state O.run(100,True) #make particles move a little (let's hope they will!) TW.setState(1) #store current positions internaly in the "1" (deformed) state TW.defToVtk("strain.vtk") ### The above code works well during a simulation. However, I have carried out a series of triaxial compression tests and I saved samples at different axial strain levels (e.g. at strain 0%, 10%, 20%). I wonder if I can use TW.triangulate() to calculate the micro-strain between strain10% and strain20% (or any of the two strain states). If it is possible, it will save a lot of time as I don't need to re-run all the tests again. something like (pseudocode): ### O.load("sample_strain0.yade") TW.setState(0) #store current positions internaly for later use as the "0" state O.load("sample_strain1.yade") TW.setState(1) #store current positions internaly in the "1" (deformed) state TW.defToVtk("strain.vtk") ### Thanks! Leonard [1]https://yade-dev.gitlab.io/trunk/user.html#micro-strain -- 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 #702735]: Possible reasons why not introduce gravity in triaxial compression tests in DEM
Question #702735 on Yade changed: https://answers.launchpad.net/yade/+question/702735 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Janek Kozicki, 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 #702735]: Possible reasons why not introduce gravity in triaxial compression tests in DEM
Question #702735 on Yade changed: https://answers.launchpad.net/yade/+question/702735 Leonard posted a new comment: Hi, Thanks for your reply. I am sorry that I didn't fully get the link between what you mentioned and DEM gravity. Could you please explain more details? Thanks Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #702735]: Possible reasons why not introduce gravity in triaxial compression tests in DEM
New question #702735 on Yade: https://answers.launchpad.net/yade/+question/702735 Hi, Reading from literatures that most of the DEM studies on element tests (e.g., triaixal compression tests) don't introduce gravity. Do you know what are the possible reasons for this? Thanks Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #701941]: How to restart recording triax data
Question #701941 on Yade changed: https://answers.launchpad.net/yade/+question/701941 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Robert Caulk, that solved my question. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #701941]: How to restart recording triax data
New question #701941 on Yade: https://answers.launchpad.net/yade/+question/701941 Hi, I am using TriaxialStressController for a triaxial compression simulation and I'd like to ask that how to restart recording triax data from an insteresting state. Let's say, I have a packing and I use TriaxialStressController to compress it from state 0 to state 1, during this process the triax.strain evolves from Vector3(0,0,0) to Vector3(e11,e22,e33) and e11,e22,e33 are non-zero values. Now I want to restart recording the simulation data from state1, and I'd like to set the triax.strain at state 1 to Vector3(0,0,0). Is it possible? Thanks Leonard A MWE for illustrating compression process from state 0 to state 1 is as below: from yade import pack nRead=readParamsFromTable( num_spheres=1000,# number of spheres compFricDegree = 30, # contact friction during the confining phase key='_triax_base_', # put you simulation's name here unknownOk=True ) from yade.params import table num_spheres=table.num_spheres# number of spheres key=table.key targetPorosity = 0.43 #the porosity we want for the packing compFricDegree = table.compFricDegree # initial contact friction during the confining phase (will be decreased during the REFD compaction process) finalFricDegree = 30 # contact friction during the deviatoric loading rate=-1e-1 # loading rate (strain rate) damp=0.2 # damping coefficient stabilityThreshold=0.01 # we test unbalancedForce against this value in different loops (see below) young=5e6 # contact stiffness mn,mx=Vector3(0,0,0),Vector3(1,1,1) # corners of the initial packing O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=radians(compFricDegree),density=2600,label='spheres')) O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=0,density=0,label='walls')) walls=aabbWalls([mn,mx],thickness=0,material='walls') wallIds=O.bodies.append(walls) sp=pack.SpherePack() sp.makeCloud(mn,mx,-1,0.,num_spheres,False, 0.95,seed=1) #"seed" make the "random" generation always the same O.bodies.append([sphere(center,rad,material='spheres') for center,rad in sp]) triax=TriaxialStressController( maxMultiplier=1.+2e4/young, # spheres growing factor (fast growth) finalMaxMultiplier=1.+2e3/young, # spheres growing factor (slow growth) thickness = 0, stressMask = 7, internalCompaction=True, # If true the confining pressure is generated by growing particles ) newton=NewtonIntegrator(damping=damp) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), triax, TriaxialStateRecorder(iterPeriod=100,file='WallStresses'+table.key), newton, ] Gl1_Sphere.stripes=0 if nRead==0: yade.qt.Controller(), yade.qt.View() triax.goal1=triax.goal2=triax.goal3=-10 while 1: O.run(1000, True) unb=unbalancedForce() print 'unbalanced force:',unb,' mean stress: ',triax.meanStress if unbtargetPorosity: # we decrease friction value and apply it to all the bodies and contacts compFricDegree = 0.95*compFricDegree setContactFriction(radians(compFricDegree)) print "\r Friction: ",compFricDegree," porosity:",triax.porosity, sys.stdout.flush() O.run(500,1) print "### Compacted state reached ###" triax.internalCompaction=False setContactFriction(radians(finalFricDegree)) triax.stressMask = 5 triax.goal2=rate triax.goal1=-10 triax.goal3=-10 newton.damping=0.1 print "click run to start deviatoric loading" from yade import plot def history(): plot.addData(e11=-triax.strain[0], e22=-triax.strain[1], e33=-triax.strain[2], ev=-triax.strain[0]-triax.strain[1]-triax.strain[2], s11=-triax.stress(triax.wall_right_id)[0], s22=-triax.stress(triax.wall_top_id)[1], s33=-triax.stress(triax.wall_front_id)[2], i=O.iter) def stop(): if -triax.strain[1]>0.05: O.pause() print "state1 is reached" print "triax.strain is ",triax.strain O.engines=O.engines+[PyRunner(iterPeriod=20,command='history()',label='recorder')] O.engines=O.engines+[PyRunner(iterPeriod=1,command='stop()',label='stop')] # Finish -- 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 #701385]: Which factors cause the fluctuation/uncertainty in DEM simulation
Question #701385 on Yade changed: https://answers.launchpad.net/yade/+question/701385 Status: Answered => Solved Leonard confirmed that the question is solved: Hi, Thanks Karol and Jan for your reply. Currently I don't have an example at hand, I had this question when I read DEM papers. I know this is the feature of DEM, but I don't know why :( Good to know the above details! Cheers Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #701385]: Which factors cause the fluctuation/uncertainty in DEM simulation
Question #701385 on Yade changed: https://answers.launchpad.net/yade/+question/701385 Leonard confirmed that the question is solved: Thanks Jan Stránský, that solved my question. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #701385]: Which factors cause the fluctuation/uncertainty in DEM simulation
New question #701385 on Yade: https://answers.launchpad.net/yade/+question/701385 Hi, I'd like to ask that which factors cause the fluctuation/uncertainty in DEM simulation. For example, let's say the stress-strain curve from a triaxial compression test, it can be found that (1) the curve is not smooth, why? (2) It seems that different results can be got when run the same simulations for several times. which factors cause this uncertainty? Thanks Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #701150]: Details about radii expansion method in yade
Question #701150 on Yade changed: https://answers.launchpad.net/yade/+question/701150 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Robert Caulk, that solved my question. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #701150]: Details about radii expansion method in yade
New question #701150 on Yade: https://answers.launchpad.net/yade/+question/701150 Hi, I use the radii expansion method implemented in yade for sample preparation, as given in [1], in which I set internalCompaction=True (If true the confining pressure is generated by growing particles). It would be good to know more details about this method in Yade, for instance: 1. Do particles (sphere in my case) grow up (scale up) by its radius or volume? 2. During the process of reaching the target confining pressure, do particle monotonically grow up? Or it switch between size up and size down when approaching the target confining pressure? I imagine that if the current confining pressure is larger than the target after one step of growing, then it might be a size down in the next step. Not sure whether I understood correctly. 3. Could you please share me where I can find the source code of radii expansion method implemented in yade? 4. Currently I cite Yade there in my manuscript because it is implemented in Yade. It would be good if there is a specific paper then I can cite together. Thanks! Leonard [1]https://gitlab.com/yade-dev/trunk/blob/master/examples/triax-tutorial/script-session1.py -- 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 #700617]: core dumped after replacing boundary walls
Question #700617 on Yade changed: https://answers.launchpad.net/yade/+question/700617 Status: Open => Solved Leonard confirmed that the question is solved: Hi Jérôme, Yes, your answer can perfectly solve the problem. Thanks Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700617]: core dumped after replacing boundary walls
Question #700617 on Yade changed: https://answers.launchpad.net/yade/+question/700617 Status: Answered => Open Leonard is still having a problem: Hi Bruno, >> This script will not run with python3. Yes, my yade version is 2018.02b so it doesn't work with python3. >>why not defining larger walls in the first place? Previously I was working on triaxial compression tests and I already have lots of DEM samples. I'd like to use the same samples in triaxial extension tests for the purpose of (1) saving time (2) they are exactly the same as the one used in triaixal compression tests. >>why not changing the size of the existing walls Yes, this is actually what I want. Do you have any idea of how to change the size of the existing walls? Thanks Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #700617]: core dumped after replacing boundary walls
New question #700617 on Yade: https://answers.launchpad.net/yade/+question/700617 Hi, I'd like to ask that if is it possible to replace (or enlarge) the boundary walls after the sample is made? The reason why I want to replace or enlarge the boundary walls is that, I simulated triaxial compression tests before, in this case the boundary walls work well. Now I want to simulate triaxial extension tests on the same samples, and I found that the size of the wall is not enough when the axial strain reaches to a certain value, please see one example at [1]. The problem in [1] I think is that the size of walls are small because I didn't adjust oversizeFactors in [2]. The way I came up with is to erase the old walls and add new walls into it at the begining of deviatoric loading. But then I had the core dumped problem when I started the deviatoric loading after replacing the walls. The MWE below can show this problem. Please click run to start the deviatoric loading and the core domped will occur. from yade import pack nRead=readParamsFromTable( num_spheres=1000,# number of spheres compFricDegree = 30, # contact friction during the confining phase key='_triax_base_', # put you simulation's name here unknownOk=True ) from yade.params import table num_spheres=table.num_spheres# number of spheres key=table.key targetPorosity = 0.43 #the porosity we want for the packing compFricDegree = table.compFricDegree # initial contact friction during the confining phase (will be decreased during the REFD compaction process) finalFricDegree = 30 # contact friction during the deviatoric loading rate=-0.1 # loading rate (strain rate) damp=0.2 # damping coefficient stabilityThreshold=0.01 # we test unbalancedForce against this value in different loops (see below) young=5e6 # contact stiffness mn,mx=Vector3(0,0,0),Vector3(1,1,1) # corners of the initial packing O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=radians(compFricDegree),density=2600,label='spheres')) O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=0,density=0,label='walls')) walls=aabbWalls([mn,mx],thickness=0,material='walls') wallIds=O.bodies.append(walls) sp=pack.SpherePack() sp.makeCloud(mn,mx,-1,0.,num_spheres,False, 0.95,seed=1) #"seed" make the "random" generation always the same O.bodies.append([sphere(center,rad,material='spheres') for center,rad in sp]) triax=TriaxialStressController( maxMultiplier=1.+2e4/young, # spheres growing factor (fast growth) finalMaxMultiplier=1.+2e3/young, # spheres growing factor (slow growth) thickness = 0, stressMask = 7, internalCompaction=True, # If true the confining pressure is generated by growing particles ) newton=NewtonIntegrator(damping=damp) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), triax, TriaxialStateRecorder(iterPeriod=100,file='WallStresses'+table.key), newton, ] Gl1_Sphere.stripes=0 if nRead==0: yade.qt.Controller(), yade.qt.View() triax.goal1=triax.goal2=triax.goal3=-10 while 1: O.run(1000, True) unb=unbalancedForce() print 'unbalanced force:',unb,' mean stress: ',triax.meanStress if unbtargetPorosity: # we decrease friction value and apply it to all the bodies and contacts compFricDegree = 0.95*compFricDegree setContactFriction(radians(compFricDegree)) print "\r Friction: ",compFricDegree," porosity:",triax.porosity, sys.stdout.flush() O.run(500,1) O.save('compactedState'+key+'.yade.gz') print "### Compacted state saved ###" triax.internalCompaction=False setContactFriction(radians(finalFricDegree)) triax.stressMask = 5 triax.goal2=rate triax.goal1=-10 triax.goal3=-10 newton.damping=0.1 print "click run to start deviatoric loading" replacing walls print "Here I'd like to enlarge the size of the boundary walls" newWalls=aabbWalls(thickness=0,oversizeFactor=5,material='walls') newWalls=O.bodies.append(newWalls) for i in range(6): O.bodies.erase(i) # def stop(): if -triax.strain[1]>0.15: O.pause() print "deviatoric loading finished" O.engines=O.engines+[PyRunner(iterPeriod=1,command='stop()',label='stop')] If it is not possible to replace the walls, do you have any other idea to enlarge the walls? As my target is to simulate the triaxial extension test to a large strain level. Thanks Leonard [1]https://we.tl/t-OMx1y0hzgN [2]https://yade-dev.gitlab.io/trunk/yade.utils.html?highlight=aabbwalls#yade.utils.aabbWalls -- You received this question notification because your team yade-users is an answer contact for Yade.
Re: [Yade-users] [Question #700531]: Contacts in function getStress()
Question #700531 on Yade changed: https://answers.launchpad.net/yade/+question/700531 Leonard posted a new comment: Hi Karol, Thanks very much for your sharing. As described in the code: branch = b1->state->pos - b2->state->pos; stressTensor += (nsi->normalForce + nsi->shearForce) * branch.transpose(); Based on my limited knowledge of cpp, I think the brach vector is calculated by the position of the two objects, no matter they are sphere or wall. Please correct me if I am wrong. Best, Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700531]: Contacts in function getStress()
Question #700531 on Yade changed: https://answers.launchpad.net/yade/+question/700531 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Karol Brzezinski, 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 #700476]: Output micro-stress vtk
Question #700476 on Yade changed: https://answers.launchpad.net/yade/+question/700476 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Jan Stránský, that solved my question. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700476]: Output micro-stress vtk
Question #700476 on Yade changed: https://answers.launchpad.net/yade/+question/700476 Status: Needs information => Open Leonard gave more information on the question: Hi Jan, I use Ubuntu 18.04, Yade 2018.02b. Does it mean that Yade 2018.02b could not output microstress in this way? Thanks Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #700476]: Output micro-stress vtk
New question #700476 on Yade: https://answers.launchpad.net/yade/+question/700476 Hi, I'd like to ask that how to output vtk file for micro-stress[1]. Referring to previous answer at #6 in [2], a working MWE provided by Jan is copied as below: ### Working MWE from yade import export O.bodies.append(( sphere((0,0,0),1), sphere((1,0,0),1), )) O.step() s = bodyStressTensors() vtk = export.VTKExporter("stress-test") TW=TesselationWrapper() TW.setState() TW.computeVolumes() s=bodyStressTensors() for b in O.bodies: b.mystress = s[b.id]*4.*pi/3.*b.shape.radius**3/TW.volume(b.id) vtk.exportSpheres(what=[("stress","b.mystress")]) ## However, when I tried to adapt this code to a packing of particles like what example code [3] has done. I got an error saying: "AttributeError: 'Body' object has no attribute 'mystress'" ## Below is the not-working MWE from yade import export tt=TriaxialTest() tt.generate("test.yade") O.load("test.yade") O.run(100,True) particleIds=[] for i in O.bodies: if isinstance(i.shape,Sphere): particleIds.append(i.id) vtk = export.VTKExporter("microStress") TW=TesselationWrapper() TW.setState() TW.computeVolumes() s=bodyStressTensors() for b in O.bodies: if isinstance(b.shape, Sphere): b.mystress = s[b.id]*4.*pi/3.*b.shape.radius**3/TW.volume(b.id) vtk.exportSpheres(ids=[i for i in particleIds],what=[("stress","b.mystress")]) ## Do you know why this error occurs for the second MWE? Thanks Leonard [1]https://yade-dev.gitlab.io/trunk/user.html?highlight=paraview#micro-stress [2]https://answers.launchpad.net/yade/+question/685223 [3]https://gitlab.com/yade-dev/trunk/-/blob/master/examples/tesselationwrapper/tesselationWrapper.py -- 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 #700439]: How to use TW.triangulate() for only part of particles
Question #700439 on Yade changed: https://answers.launchpad.net/yade/+question/700439 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Karol Brzezinski, 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 #700439]: How to use TW.triangulate() for only part of particles
Question #700439 on Yade changed: https://answers.launchpad.net/yade/+question/700439 Status: Answered => Open Leonard is still having a problem: Hi Karol, Firstly many thanks for your quick reply. As this defToVtkFromPositions() is new info for me, if I understood correctly, what I need to do is: step1: output a txt file (one sphere per line, with x,y,z,rad separated by spaces). This is clear for me, in this way I can specific the part of particles. step2: pass this file to defToVtkFromPositions(), this function will write local deformations in vtk format from positions file as introduced in[1]. But what is not clear for me is that: there is only one state in the txt file, how can it calculate the microstrain from only one state? As the example code shows[2], it uses defToVtk() which write local deformations in vtk format from states 0 and 1. Thanks Leonard [1] https://yade-dem.org/doc/yade.wrapper.html?highlight=deftovtkfrompositions#yade.wrapper.TesselationWrapper.defToVtkFromPositions [2]https://yade-dev.gitlab.io/trunk/user.html?highlight=paraview#micro-strain -- 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 #700439]: How to use TW.triangulate() for only part of particles
New question #700439 on Yade: https://answers.launchpad.net/yade/+question/700439 Hi, I'd like to ask that how to export micro-strain[1] for part of the whole packing. There are two groups of particles in my packing, let's say, packing1 and packing2 for storing the ids respectively. I'd like to export micro-strain for particles in packing1. I guess it could be done by using TW.triangulate (i.e., computing regular Delaunay triangulation) for only packing1. Refering to the example code[2], it well demonstrates how to export the micro-strain for the whole packing by using TW.triangulate(), as below: TW.triangulate()#compute regular Delaunay triangulation, don’t construct tesselation TW.computeVolumes() #will silently tesselate the packing, then compute volume of each Voronoi cell I made some attemps such as using TW.triangulate(packing1) or TW.computeVolumes(packing1), but I got the feedback: did not match C++ signature. My question is that can we pass only packing1 to TW.triangulate()? Thanks Leonard [1]https://yade-dev.gitlab.io/trunk/user.html?highlight=paraview#micro-strain [2]https://gitlab.com/yade-dev/trunk/-/blob/master/examples/tesselationwrapper/tesselationWrapper.py -- 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 #700258]: How to involve adhesionForce in Hertz-Mindlin contact model
Question #700258 on Yade changed: https://answers.launchpad.net/yade/+question/700258 Leonard confirmed that the question is solved: Thanks Karol Brzezinski, 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 #700258]: How to involve adhesionForce in Hertz-Mindlin contact model
Question #700258 on Yade changed: https://answers.launchpad.net/yade/+question/700258 Status: Open => Solved Leonard confirmed that the question is solved: Hi Karol, Thanks for your feedback, I will start a new thread to ask this. Best, Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #700258]: How to involve adhesionForce in Hertz-Mindlin contact model
Question #700258 on Yade changed: https://answers.launchpad.net/yade/+question/700258 Status: Answered => Open Leonard is still having a problem: Hi Karol, Thanks for your reply which really helps me. I added gamma in Ip2_FrictMat_FrictMat_MindlinPhys as you suggested: O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_MindlinPhys(betan=betan,betas=betas,gamma=gamma,label='ContactModel')], [Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=False,includeAdhesion=True,label='Mindlin')] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), triax, TriaxialStateRecorder(iterPeriod=100,file='WallStresses'), newton, ] If I understood correctly, the value of gamma controls the adhesion force between particles. And move one step forward, I'd like to ask that if it is possible to assign different gamma to particles with different material? I remember MatchMaker may be able to do this, so that I tried: ContactModel.isAdhesive=True ContactModel.gamma=MatchMaker(matches=((Mat1,Mat1,0),(Mat1,Mat2,0),(Mat2,Mat2,gammaValue))) But I got: ArgumentError: Python argument types in None.None(Ip2_FrictMat_FrictMat_MindlinPhys, MatchMaker) did not match C++ signature: None(Ip2_FrictMat_FrictMat_MindlinPhys {lvalue}, double) I guess it is because that gamma is not a MatchMaker item, if so, I'd like to ask that how to assign different gamma to different material interactions. Thanks. Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #700258]: How to involve adhesionForce in Hertz-Mindlin contact model
New question #700258 on Yade: https://answers.launchpad.net/yade/+question/700258 Hi, I am simulating a triaxial compression test using Hertz-Mindlin model, and I'd like to ask that if it is possible to include adhesion in Hertz-Mindline contact model so that I can simulate bonded material (or cement material). I read from MindlinPhys[1], there seems to be an option to set adhesion (named adhesionForce in [1]). #I use FrictMat: MatSand = O.materials.append(FrictMat(young=young,poisson=0.3,frictionAngle=radians(30),density=2650,label='sand')) #The engines I used are as follow: O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_MindlinPhys(betan=betan,betas=betas,label='ContactModel')], [Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=False,includeAdhesion=True,label='Mindlin')] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), triax, TriaxialStateRecorder(iterPeriod=100,file='WallStresses'), newton, #PyRunner(iterPeriod=2000,command='history()',label='recorder'), #PyRunner(command='stopIfDamaged()',iterPeriod=500), ] #I tried to use the following command to active adhesion: ContactModel.isAdhesive=True ContactModel.adhesionForce=adhesion But I didn't make the adhesion come into effect. Thereby, I'd like to ask that: (1) How to include adhesion in Hertz-Mindline contact model if it is possible. (2) In [1], it explains adhesionForce as "Force of adhesion as predicted by DMT", what is DMT? (3) Where I can find the source code of Hertz-Mindline contact model in Yade trunk? Thanks! Leonard [1]https://yade-dev.gitlab.io/trunk/yade.wrapper.html?highlight=dmt#yade.wrapper.MindlinPhys -- 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 #699998]: How to simulate small-strain triaxial compression test
Question #68 on Yade changed: https://answers.launchpad.net/yade/+question/68 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Jérôme Duriez, 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 #700004]: What is non-dynamic body
Question #74 on Yade changed: https://answers.launchpad.net/yade/+question/74 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Jan Stránský, that solved my question. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #700004]: What is non-dynamic body
New question #74 on Yade: https://answers.launchpad.net/yade/+question/74 Hi, I'd like to ask that what is non-dynamic body? Specifically, is wall non-dynamic in Yade? I am asking this question because I saw in the triaxial compression example code[1], there is "setContactFriction(radians(finalFricDegree))" to control all the contact friction angle. And what we usually want is control the particle-particle friction angle, but the particle-wall friction angle remains at zero (to simulate frictionless boundary). So I checked at [2], and it says "The friction for non-dynamic bodies is not modified." Thereby I'd like to ask this question. Thanks Leonard [1]https://gitlab.com/yade-dev/trunk/blob/master/examples/triax-tutorial/script-session1.py [2]https://yade-dev.gitlab.io/trunk/yade.utils.html?highlight=setcontactfriction#yade._utils.setContactFriction -- 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 #699998]: How to simulate small-strain triaxial compression test
Question #68 on Yade changed: https://answers.launchpad.net/yade/+question/68 Leonard posted a new comment: Hi, I came up with a way: using a small enough dt for the simulation. Do you have any other ideas? Cheers Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #699998]: How to simulate small-strain triaxial compression test
New question #68 on Yade: https://answers.launchpad.net/yade/+question/68 Hi, I'd like to ask that how to simulate a drained triaxial compression test within a small-strain level. The goal of this simulation is to get the small strain stiffness G0. A typical way is (1) generating a sand packing and isotropically load it to target confining pressure, e.g., 100 kPa. (2) a small axial strain increment deps1 is applied on the top wall, while the lateral stresses sigma2 and sigma3 keep constant. (3) the simulation finishes when the shear strain, gamma = deps1-deps2, reaches 10e-6. (4) then G0 can be calculated by G0 = dsigma1/(2*gamma) What I have done is using the example code provided by Bruno[1]. I set the loading rate to a very small value (1e-20), and the simulations finished in one second. I thought this process is too quick to generate accurate results, actually the lateral confining pressure changes (i.e., not constant). I know this script works well for a classic triaxial compression test because usually we look at a large strain level (like 20% of axial strain), thereby a small amout of fluctuation on lateral stress is acceptable. But when we look at such a small range and in such a short time, this will lead to inaccurate results. So my question is how can we make the simulation of triaxial compression test within a small-strain level. Thanks, Leonard [1]https://gitlab.com/yade-dev/trunk/blob/master/examples/triax-tutorial/script-session1.py The MWE is as follow if the question is not clearly described. from yade import pack nRead=readParamsFromTable( num_spheres=1000,# number of spheres compFricDegree = 30, # contact friction during the confining phase key='_triax_base_', # put you simulation's name here unknownOk=True ) from yade.params import table num_spheres=table.num_spheres# number of spheres key=table.key targetPorosity = 0.43 #the porosity we want for the packing compFricDegree = table.compFricDegree # initial contact friction during the confining phase (will be decreased during the REFD compaction process) finalFricDegree = 30 # contact friction during the deviatoric loading rate=-1e-20 # loading rate (strain rate) damp=0.2 # damping coefficient stabilityThreshold=0.01 # we test unbalancedForce against this value in different loops (see below) young=5e6 # contact stiffness mn,mx=Vector3(0,0,0),Vector3(1,1,1) # corners of the initial packing O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=radians(compFricDegree),density=2600,label='spheres')) O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=0,density=0,label='walls')) walls=aabbWalls([mn,mx],thickness=0,material='walls') wallIds=O.bodies.append(walls) sp=pack.SpherePack() sp.makeCloud(mn,mx,-1,0.,num_spheres,False, 0.95,seed=1) #"seed" make the "random" generation always the same O.bodies.append([sphere(center,rad,material='spheres') for center,rad in sp]) triax=TriaxialStressController( maxMultiplier=1.+2e4/young, # spheres growing factor (fast growth) finalMaxMultiplier=1.+2e3/young, # spheres growing factor (slow growth) thickness = 0, stressMask = 7, internalCompaction=True, # If true the confining pressure is generated by growing particles ) newton=NewtonIntegrator(damping=damp) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), triax, TriaxialStateRecorder(iterPeriod=100,file='WallStresses'+table.key), newton, ] Gl1_Sphere.stripes=0 if nRead==0: yade.qt.Controller(), yade.qt.View() triax.goal1=triax.goal2=triax.goal3=-10 while 1: O.run(1000, True) unb=unbalancedForce() print 'unbalanced force:',unb,' mean stress: ',triax.meanStress if unbtargetPorosity: # we decrease friction value and apply it to all the bodies and contacts compFricDegree = 0.95*compFricDegree setContactFriction(radians(compFricDegree)) print "\r Friction: ",compFricDegree," porosity:",triax.porosity, sys.stdout.flush() O.run(500,1) O.save('compactedState'+key+'.yade.gz') print "###Compacted state saved ###" triax.internalCompaction=False setContactFriction(radians(finalFricDegree)) triax.stressMask = 5 triax.goal2=rate triax.goal1=-10 triax.goal3=-10 newton.damping=0.1 print "gamma before deviatoric loading is", abs(triax.strain[1]-triax.strain[0]) print "click run to start small-strain deviatoric loading" from yade import plot def history(): plot.ad
Re: [Yade-users] [Question #699741]: How to fix boundary walls
Question #699741 on Yade changed: https://answers.launchpad.net/yade/+question/699741 Leonard confirmed that the question is solved: Thanks Jan Stránský, that solved my question. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #699741]: How to fix boundary walls
Question #699741 on Yade changed: https://answers.launchpad.net/yade/+question/699741 Status: Answered => Solved Leonard confirmed that the question is solved: Hi Jan, Yes yes!!! That is the point! Thanks very much! Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #699741]: How to fix boundary walls
New question #699741 on Yade: https://answers.launchpad.net/yade/+question/699741 Hi, I'm carrying out triaxial tests using the script from [1], which uses rigid walls as boundary. The whole process contains: (a) making sample with target confining pressure and porosity, (b) deviatoric loading. I'd like to introduce another step for stress relaxation between step (a) and step (b). In this new step, I want to close the triaxial engine and fix all the six walls, and just let the simulation run for some steps with a higher damping coefficient. The way how I fix the walls is by blocking all the degrees of walls, as well as triax.dead=True: triax.wall_bottom_activated=False triax.wall_top_activated=False triax.wall_front_activated=False triax.wall_back_activated=False triax.wall_left_activated=False triax.wall_right_activated=False triax.dead=True for i in range(6): O.bodies[i].state.blockedDOFs='xyzXYZ' ### However, I found that in some cases, the size of the sample changes a lot after running for a long time, which means the boundary walls are actually not fully fixed. Do you have any idea about why this happened? Thanks Leonard [1]https://gitlab.com/yade-dev/trunk/blob/master/examples/triax-tutorial/script-session1.py -- 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 #699510]: How to get the resultant force on a particle
Question #699510 on Yade changed: https://answers.launchpad.net/yade/+question/699510 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Jan Stránský, that solved my question. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #699510]: How to get the resultant force on a particle
ction plate = O.bodies[-1] # the last particles is the plate # Wall objects are "fixed" by default, i.e. not subject to forces # prescribing a velocity will therefore make it move at constant velocity (downwards) plate.state.vel = (0, 0, -.1) # start plotting the data now, it was not interesting before O.engines = O.engines + [PyRunner(command='addPlotData()', iterPeriod=200)] # next time, do not call this function anymore, but the next one (unloadPlate) instead checker.command = 'unloadPlate()' def unloadPlate(): # if the force on plate exceeds maximum load, start unloading if abs(O.forces.f(plate.id)[2]) > maxLoad: plate.state.vel *= -1 # next time, do not call this function anymore, but the next one (stopUnloading) instead checker.command = 'stopUnloading()' def stopUnloading(): if abs(O.forces.f(plate.id)[2]) < minLoad: # O.tags can be used to retrieve unique identifiers of the simulation # if running in batch, subsequent simulation would overwrite each other's output files otherwise # d (or description) is simulation description (composed of parameter values) # while the id is composed of time and process number plot.saveDataTxt(O.tags['d.id'] + '.txt') O.pause() def addPlotData(): if not isinstance(O.bodies[-1].shape, Wall): plot.addData() return Fz = O.forces.f(plate.id)[2] plot.addData(Fz=Fz, w=plate.state.pos[2] - plate.state.refPos[2], unbalanced=unbalancedForce(), i=O.iter) O.run(1,1) waitIfBatch() print O.forces.f(20) a=[] for i in O.bodies[20].intrs(): f = i.phys.normalForce + i.phys.shearForce a.append(f) resultF=Vector3(0,0,0) for i in range(len(a)): resultF=resultF+a[i] print resultF Thanks Leonard [1]https://yade-dev.gitlab.io/trunk/tutorial-examples.html -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #699135]: How to reduce average particle velocity of a packing
Question #699135 on Yade changed: https://answers.launchpad.net/yade/+question/699135 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Jan Stránský, that solved my question. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #699135]: How to reduce average particle velocity of a packing
Question #699135 on Yade changed: https://answers.launchpad.net/yade/+question/699135 Status: Answered => Open Leonard is still having a problem: Hi Jan, Thanks for your reply. >>Why do you want to reduce average particle velocity? I want to make an attempt to look at the wave propagation on a sand packing, by modelling bender element test. I.e., a part of particles are treated as the transducer (whose velocity is controlled by the input signal), and a part of particles are treated as receiver (whose velocity are monitored during the process). As it is generally mentioned, for instance see section 3.2 in [1] and section 2.2 in [2], the input amplitude velocity is a small value (e.g., 1e-3 m/s) which preserves a very small strain regime, reducing average particle velocity allows us investigating the wave propagation with less effect from the original velocity of particles. Thereby, before the wave propagation test,a relaxation stage was conducted to remove kinetic energy of particles and hold the stress state stably. >>b.state.vel *= someFactor # possibly 0 Yes, if I understand correctly, using this way can fully control the velocity of particles, but the velocity of these particles will not be affected (i.e., the velocity is unchanged), which is not suitable for the case I described above. Do you have any ideas to remove kinetic energy/ reduce velocity of particles? Thanks Leonard [1]Tang, X., and J. Yang. "Wave propagation in granular material: What is the role of particle shape?." Journal of the Mechanics and Physics of Solids 157 (2021): 104605. [2]Li, Yang, Masahide Otsubo, and Reiko Kuwano. "DEM analysis on the stress wave response of spherical particle assemblies under triaxial compression." Computers and Geotechnics 133 (2021): 104043. -- 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 #699135]: How to reduce average particle velocity of a packing
New question #699135 on Yade: https://answers.launchpad.net/yade/+question/699135 Hi, I'd like to ask that how to reduce the average velocity of all the particles at a confined situation without any change in particle connections. The following MWE shows the way I came up with to reduce the average velocity: Firstly, carry out the compaction process to reach target confining pressure (100 kPa) with periodic boundary. Then switch to a calmdown process to reduce the average velocity of all the particles by increasing damping coefficient. However, one problem arises with this calmdown process: there are some particle interactions lost during this process. As you may check by running the MWE (it will take less than 1 minute in general): before the calmdown process, there are 30845 interactions, but after the calmdowm process there are 30766 interactions, Which is not I want. Do you have any idea about how to reduce the average velocity while keeping the packing fabric the same? Thanks Leonard MWE: ### from __future__ import print_function sigmaIso = -100e3 from yade import pack, qt, plot mn,mx=Vector3(0,0,0),Vector3(0.07,0.14,0.07) O.periodic = True O.cell.setBox(.07,.14,.07) sp = pack.SpherePack() sp.makeCloud(mn,mx,-1,0.,num=6000, periodic=True) sp.toSimulation() particleId=[] for i in O.bodies: particleId.append(i.id) newton=NewtonIntegrator(damping=0.2) O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb()]), InteractionLoop([Ig2_Sphere_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()]), PeriTriaxController( label='triax', goal=(sigmaIso, sigmaIso, sigmaIso), stressMask=7, dynCell=True, maxStrainRate=(10, 10, 10), maxUnbalanced=.1, relStressTol=1e-3, doneHook='compactionFinished()' ), newton, ] O.dt = .5 * PWaveTimeStep() O.trackEnergy = True def compactionFinished(): print('compaction finished') print('Number of interactions before calmDown',len(O.interactions)) triax.doneHook = 'calmDown()' print('average velocity before calmDown',avgVel_norm(particleId)) newton.damping=0.95 print('Now please click run button to start calmdown process') def avgVel_norm(idList): vel=0 avg=0 for i in idList: vel+=O.bodies[i].state.vel.norm() avg=vel/len(idList) return avg def calmDown(): print('avgVel_norm',avgVel_norm(particleId),'syy',triax.stress[1]) O.run(1000,False) # print("after run") if avgVel_norm(particleId) <0.0025: O.pause() print('Number of interactions after calmDown',len(O.interactions)) O.run() -- 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 #698594]: Triaxial test comparison between periodic boundary and rigid boundary
Question #698594 on Yade changed: https://answers.launchpad.net/yade/+question/698594 Status: Answered => Open Leonard is still having a problem: Hello Jan and Luc, Thanks very much for your reply. Here I made two MWE for rigid wall case and periodic boundary case respectively. It may take around 8 min for each of the simulation, or you can also find the results of stress-strain and volumetric strain evolution at [1]. >same strain rate (I think) Because in rigid wall which uses TriaxialStressController, I can specify the loading rate by triax.goal. But as far as I understand, it seems that for PeriTriaxController, it can only specify the loading rate by maxStrainRate. So I made triax.strain=1 (rigid case) and triax.maxStrainRate = (1., 1., 1.) in periodic case. Do you know how to specify the strain rate in PeriTriaxController? >the two cases use ... the same of sample size Now I know they are not the same. Just explain here why I though they were same before. If you run the periodic MWE below, it prints out the cell size just before the deviatoric loading, this size is almost the same as the size in rigid case. >initial porostiy Sorry for not clearly describe it. Yes, the initial porosity I mentioned is the porosity at the begining of the deviatoric loading. In the following two MWE, they are both 0.358 getting by function of porosity(). But note that, in rigid boundary case, I also print the porosity at the same state by using triax.porosity, which retures 0.33. >coordination number Thanks Luc, that is a good point to mention. In the two MWE, I print the coordination number (CN) just before the deviatoric loading. And the CN of rigid boundary is 7.28, while the CN in periodic is 6.3. Which means there are more contacts in rigid wall case, indicating a denser state in general. Then my question is why they have same inputtings (porosity, particle number...) but they have different CN? And another question is how can I make the same sample under the two boundary conditions? It would be conflict if I control them as the same from porosity and from CN. ### rigidWall case ## from __future__ import division from yade import pack, plot import numpy as np num_spheres=7000# number of spheres targetPorosity = 0.33 compFricDegree = 30 finalFricDegree = 35 damp=0.6 stabilityThreshold=0.001 confinement=100e3 mn,mx=Vector3(0,0,0),Vector3(0.07,0.14,0.07) #determine the size of the sample young=5e6 ## create materials for spheres and plates MatWall=O.materials.append(FrictMat(young=young,poisson=0.3,frictionAngle=0,density=0,label='walls')) MatSand = O.materials.append(FrictMat(young=young,poisson=0.3,frictionAngle=radians(30),\ density=2650.0,label='sand')) walls=aabbWalls([mn,mx],thickness=0,material='walls') wallIds=O.bodies.append(walls) sp=pack.SpherePack() sp.makeCloud(mn,mx,-1,0,num_spheres,False, 0.95,seed=1) O.bodies.append([sphere(center,rad,material='sand') for center,rad in sp]) Gl1_Sphere.quality=3 triax=TriaxialStressController( maxMultiplier=1.+2e4/young, finalMaxMultiplier=1.+2e3/young, thickness = 0, stressMask = 7, internalCompaction=True, ) newton=NewtonIntegrator(damping=damp) O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8), triax, TriaxialStateRecorder(iterPeriod=100,file='WallStresses'), newton, PyRunner(iterPeriod=100,command='history()',label='recorder'), PyRunner(command='stopIfDamaged()',iterPeriod=200,label="endSimulation"), ] recorder.dead=True endSimulation.dead=True Gl1_Sphere.stripes=0 triax.goal1=triax.goal2=triax.goal3=-confinement def getCN(): # get coordination number CN=0 for i in O.bodies: if isinstance(i.shape,Sphere): CN +=len(i.intrs()) Z = CN/ 7000.0 return Z while 1: O.run(1000, True) unb=unbalancedForce() print 'unbF:',unb,' meanStress: ',-triax.meanStress,'top:',-triax.stress(triax.wall_top_id)[1] if unb0.0001: compFricDegree = 0.95*compFricDegree setContactFriction(radians(compFricDegree)) print "\r Friction: ",compFricDegree," porosity:",triax.porosity, sys.stdout.flush() O.run(500,1) print "### state 2 Reach target porosity completed ###" print "particle radii is: ", O.bodies[2000].shape.radius ## here get the particle radius which wil
[Yade-users] [Question #698594]: Triaxial test comparison between periodic boundary and rigid boundary
New question #698594 on Yade: https://answers.launchpad.net/yade/+question/698594 Hi, I carried out triaxial compression tests at two boundary conditions (one case with rigid wall and one case with periodic boundary), the two cases use the same material, the same particle size distribution and paticle number, same contact law and the same initial void ratio, at same confining pressure, same strain rate (I think), and almost the same of sample size. But I got really different mechanical response, especially for the volumetric behaviour, the periodic one shows contractive behaviour, while the rigid case shows dilative behaviour. I thoungh I have controlled all the conditions (except boundary condition) the same. It is not surprise that there are some difference, but is it normal to have such a big difference? Or did I miss some factors which can also lead to the difference? Thanks! Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #698541]: Material of particle changed in the repeated cell
Question #698541 on Yade changed: https://answers.launchpad.net/yade/+question/698541 Status: Answered => Solved Leonard confirmed that the question is solved: Hi karol, Thanks for your reply and the very clear example codes. My question has been solved. Cheers Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #698541]: Material of particle changed in the repeated cell
New question #698541 on Yade: https://answers.launchpad.net/yade/+question/698541 Hi, I'd like to ask that why the material of particle changed in the repeated cell. I have two types of particles (material 1 and 2, respectively) in a cell, and after I repeated the cell by using cellRepeat function, all the particles in the repeated cells are changed into material 2. The MWE below may show my question. If you run the MWE, you will see that all the material Ids are 1, but I expect to have two types of materials. ## from yade import pack O.periodic=True define material, two materials are used for 2 type of particles Mat1 = O.materials.append(FrictMat(young=2e6,poisson=0.3,frictionAngle=radians(30),label='mat1')) Mat2 = O.materials.append(FrictMat(young=2e6,poisson=0.3,frictionAngle=radians(30),label='mat2')) particles with Mat1 sp1=pack.SpherePack() sp1.makeCloud((0,0,0),(5,5,5),rMean=.5,rRelFuzz=.5,periodic=True,num=5) sp1.toSimulation(color=(0,0,1),material='mat1') particles with Mat2 sp2=pack.SpherePack() sp2.makeCloud((0,0,0),(5,5,5),rMean=.05,rRelFuzz=.0,periodic=True,num=5) sp2.toSimulation(color=[1,0,0],material='mat2') store all the ids of particles from sp1 and sp2, they will be deleted after repeat cell. idIn1stCell=[] for i in O.bodies: idIn1stCell.append(i.id) ## repeat cell sp=pack.SpherePack() sp.fromSimulation() sp.cellRepeat((1, 3, 1)) sp.toSimulation(color=[1,1,1]) ## remove the original particles in the 1st cell for i in idIn1stCell: O.bodies.erase(i) ## print the material ids, I found that all the material ids are 1, but I expect to have two types of materials. for i in O.bodies: print (i.material.id) ### Thanks! Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #698498]: How to use cellRepeat
Question #698498 on Yade changed: https://answers.launchpad.net/yade/+question/698498 Status: Open => Solved Leonard confirmed that the question is solved: Hi, I made some attempts and seems got how to use cellRepeat. Below is a MWE. from yade import pack; from math import * O.periodic=True sp=pack.SpherePack() sp.makeCloud((0,0,0),(5,5,5),rMean=.5,rRelFuzz=.5,periodic=True,num=20) sp.cellRepeat((1,1,3)) ## don't forget to put them into simulation by using sp.toSimulation() sp.toSimulation() Thanks! Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #698498]: How to use cellRepeat
New question #698498 on Yade: https://answers.launchpad.net/yade/+question/698498 Hi, I'd like to ask how to use cellRepeat[1] function to stack several copies of a cell along one direction. One illustration can be found in Fig. 3 in [2]. I use the following MWE (from[3]) to make a sample in a cell, the MWE pauses after the sample reaches the target isotropic state. I'd like to reproduce several of the cell at that state, and stack them together along one direction, but I didn't make it after some attempts. Here is the MWE, it may take around 50 seconds for running. MWE begins ### from __future__ import print_function sigmaIso = -100e3 from yade import pack, qt, plot mn,mx=Vector3(0,0,0),Vector3(0.07,0.14,0.07) O.periodic = True O.cell.setBox(.07,.14,.07) sp = pack.SpherePack() sp.makeCloud(mn,mx,-1,0.,num=7000, periodic=True) sp.toSimulation() O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb()]), InteractionLoop([Ig2_Sphere_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()]), PeriTriaxController( label='triax', goal=(sigmaIso, sigmaIso, sigmaIso), stressMask=7, dynCell=True, maxStrainRate=(10, 10, 10), maxUnbalanced=.1, relStressTol=1e-3, doneHook='compactionFinished()' ), NewtonIntegrator(damping=.2), ] O.dt = .5 * PWaveTimeStep() O.trackEnergy = True def compactionFinished(): print('stage1 finished','sxx',triax.stress[0],'syy',triax.stress[1],'szz',triax.stress[2]) O.cell.trsf=Matrix3.Identity triax.goal = (sigmaIso, -0.1, sigmaIso) triax.stressMask = 5 triax.maxStrainRate = (1., 0.5, 1.) triax.maxUnbalanced = 10 O.pause() # here I want to repeat the current cell def triaxFinished(): print('Finished') O.pause() MWE finish ### Thanks very much! Leonard [1]https://yade-dev.gitlab.io/trunk/yade.pack.html?highlight=cell#yade._packSpheres.SpherePack.cellRepeat [2]Cheng, Hongyang, Stefan Luding, Kuniyasu Saitoh, and Vanessa Magnanimo. "Elastic wave propagation in dry granular media: effects of probing characteristics and stress history." International journal of solids and structures 187 (2020): 85-99. [3]https://gitlab.com/yade-dev/trunk/blob/master/doc/sphinx/tutorial/06-periodic-triaxial-test.py -- 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 #698487]: Change boundary condition from rigid wall to periodic boundary
2), # PyRunner(command='addPlotData()', iterPeriod=100), ] O.dt = .5 * PWaveTimeStep() O.trackEnergy = True def compactionFinished(): print('stage1 finished') # set the current cell configuration to be the reference one O.cell.trsf = Matrix3.Identity # change control type: keep constant confinement in x,z, 20% compression in y triax.goal = (sigmaIso,-0.4, sigmaIso) triax.stressMask = 5 # allow faster deformation along x,z to better maintain stresses triax.maxStrainRate = (1., 0.5, 1.) # next time, call triaxFinished instead of compactionFinished triax.doneHook = 'triaxFinished()' # do not wait for stabilization before calling triaxFinished triax.maxUnbalanced = 10 def triaxFinished(): print('Finished') O.pause() script2 done## Thanks! Leonard [1]https://gitlab.com/yade-dev/trunk/-/blob/mpi/examples/triax-tutorial/script-session1.py [2]https://gitlab.com/yade-dev/trunk/blob/master/doc/sphinx/tutorial/06-periodic-triaxial-test.py -- 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 #697610]: How to get the acceleration of body
Question #697610 on Yade changed: https://answers.launchpad.net/yade/+question/697610 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Jérôme Duriez, 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 #697612]: Velocity distribution in paraview
Question #697612 on Yade changed: https://answers.launchpad.net/yade/+question/697612 Leonard confirmed that the question is solved: Thanks Karol Brzezinski, 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 #697612]: Velocity distribution in paraview
Question #697612 on Yade changed: https://answers.launchpad.net/yade/+question/697612 Status: Answered => Solved Leonard confirmed that the question is solved: Hi Karol Yes! Now I set the paraviw as follow and it works! Glyph Type = Arrow Scalars = linVelLen Vectors = linVelVec Thanks very much. Best regards, Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #697612]: Velocity distribution in paraview
New question #697612 on Yade: https://answers.launchpad.net/yade/+question/697612 Hi, When I used paraview to look at the distribution of particle velocity, I met a problem that the direction of all the particle velocity (linVelVec) is always the same, like Figure 1 shows (in the attached link[1]). The way I visualise it in paraview is as follow, which can also be seen in attached Figure 2: Glyph Type = Arrow Scalars = linVelLen Vectors = None Scale mode = scalar The vtk files are also attached in the link. The file is exported from a triaxial compression simulation by using VTKRecorder(fileName='fileName',recorders=['all']). Do you have any comments on why it only shows one direction for all the velocity? Thanks Leonard [1]https://we.tl/t-cRsRDHJJ9c -- 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 #697610]: How to get the acceleration of body
New question #697610 on Yade: https://answers.launchpad.net/yade/+question/697610 Hi I'd like to ask that how to get the acceleration of body in yade? The acceleration I ask here is referring to F=ma. It seems that I can gain the acceleration by F/m, where F is the resultant force which can be gained by O.forces.f(b.id), and m is the mass of the body. I just wonder is there any built-in functions that I can get the acceleration? Thanks! Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #696704]: How to get P-wave and S-wave velocity
Question #696704 on Yade changed: https://answers.launchpad.net/yade/+question/696704 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Jérôme and Bruno! -- 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 #696704]: How to get P-wave and S-wave velocity
New question #696704 on Yade: https://answers.launchpad.net/yade/+question/696704 Hi, I'd like to ask that how to get the P-wave velocity and Shear wave velocity in Yade for a DEM soil model? According to [1], in which it gets timestep accoring to the velocity of P-Wave propagation, so I guess there is already an function that can directly get the P-Wave velocity, but I didn't find it. For the Shear wave velocity, do you have any suggestions to get it? Thanks! Leonard [1]https://yade-dev.gitlab.io/trunk/yade.polyhedra_utils.html?highlight=pwave#yade._polyhedra_utils.PWaveTimeStep -- 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 #694664]: Tiny particles don't react with the wall
Question #694664 on Yade changed: https://answers.launchpad.net/yade/+question/694664 Leonard confirmed that the question is solved: Thanks Jan Stránský, that solved my question. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #694664]: Tiny particles don't react with the wall
Question #694664 on Yade changed: https://answers.launchpad.net/yade/+question/694664 Status: Answered => Solved Leonard confirmed that the question is solved: Hi Jan, Thanks for your reply. Besides the way you suggest, I also tried using O.dt=(small value)*PWaveTimeStep[5] to decrease the timeStep, as it is computed from sphere radii, rigidities and masses[5]. I hope this way could also solve this problem. Cheers Leonard [5]https://yade- dev.gitlab.io/trunk/yade.utils.html?highlight=pwavetimestep#yade._utils.PWaveTimeStep -- 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 #694664]: Tiny particles don't react with the wall
New question #694664 on Yade: https://answers.launchpad.net/yade/+question/694664 Hi, I have a sand model with extral tiny particles among the pore space of the sample, and I use this model for triaxial compression test. The boundary condition is simulated by six rigid walls (use walls=aabbWalls([mn,mx],thickness=0,material='FrictMat')). And I use GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8) for setting the dt. However, I found that at the end of the simulation (where axial strain = 40%), many tiny particles stay at their original places, which means that these tiny particles didn't react with the boundary wall during the simulation, the example figure could be find at [1]. I guessed it is that there was no contact detection between these tiny particles and the top wall so that these particles passed through the top wall. Then I set the timestepSafetyCoefficient from 0.8 to 0.1 to decrease the dt (not sure if it is correct), but I gained the same result as [1] shows. My questions are: (1) The higher the timestepSafetyCoefficient, the more safe the dt is? Or the lower the timestepSafetyCoefficient, the more safe the dt is? (2) Is there any other way to let the missed contacts being detected correctly during the simulation? Thanks very much! Leonard [1]https://we.tl/t-SRQDF5JLh8 -- 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 #694240]: How to reach ctitical state in a triaxial compression test?
Question #694240 on Yade changed: https://answers.launchpad.net/yade/+question/694240 Status: Answered => Open Leonard is still having a problem: Hi Jérôme, >which axial strain did you actually reach ? I sheared to 40% of strain, typical results could be found in [1] if you are interested >>Could you please give some suggestions on which biais that could affect the simulated rheology? Did you mean the model parameters such as contact friction angle, rolling resistance, rolling limit coefficient? >>check what are the parameters of DEM simulations that influence DEM results. Yes, this is what I am doing now! Thanks Leonard [1]https://we.tl/t-NngdRx33jQ -- 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 #694240]: How to reach ctitical state in a triaxial compression test?
New question #694240 on Yade: https://answers.launchpad.net/yade/+question/694240 Hi everyone, I'd like to ask you the help on any possible suggestions to make a sand sample reach the critical state (no volumetric strain occurs) in triaxial compression test. I use cohFrictMat (with rolling resistance) and CohesionMoment for the simulation, the boundary condition is six rigid walls. And I have been testing a lot on calibrating the parameters of my model, but I still can't get a result which can reach the critical state, even at larger strain level, as a typical result of my tests in [1]. Refer to papers such as [2] and [3], it is very nice that the critical state has been captured. I guess I miss some knowledge on capturing this behaviour. I feel that the occurrence of critical state could be affected by many factors (not sure). I'd like to ask your valuable suggestions on this issue. For example, does the occurrence of this state only depend on the contact parameters? Is it related to the strain rate? Any efficient way to get this state? Thanks very much! Leonard [1]https://we.tl/t-tQUUETv2L5 [2]Hosn, R. A., Sibille, L., Benahmed, N., & Chareyre, B. (2017). Discrete numerical modeling of loose soil with spherical particles and interparticle rolling friction. Granular matter, 19(1), 4. [3]Plassiard, Jean-Patrick, Noura Belheine, and Frédéric-Victor Donzé. "A spherical discrete element model: calibration procedure and incremental response." Granular Matter 11.5 (2009): 293-306. -- 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 #694134]: How to use only rolling but no twisting when using CohFricMat.
Question #694134 on Yade changed: https://answers.launchpad.net/yade/+question/694134 Status: Open => Solved Leonard confirmed that the question is solved: Thanks Jérôme Duriez, 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 #694134]: How to use only rolling but no twisting when using CohFricMat.
Question #694134 on Yade changed: https://answers.launchpad.net/yade/+question/694134 Status: Answered => Open Leonard is still having a problem: Hi Jérôme and Luc, Thanks very much for the reply from both of you! This perfectly answered my question. Just another curiosity: I didn't get the meaning of the "(belt and suspender)" in #1. Is there a difference between the case"Ktw =0 or etaTwist=0" and the case "Ktw =0 and etaTwist=0"? if I understand the answer correctly, set any one of the two parameters to zero can make the twisting inactivated. Thanks Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #694134]: How to use only rolling but no twisting when using CohFricMat.
New question #694134 on Yade: https://answers.launchpad.net/yade/+question/694134 Hi, I am using CohFricMat[1] and CohFrictPhys_CohesionMoment law(useIncrementalForm=True,always_use_moment_law=True) for my simulations. I referred to many good papers which seem to use the same contact law (I'm not sure). And I got some doubts as follows: For example, in paper [2] and [3], they introduced the rolling resistance (rolling stiffness Kr and dimensionless rolling coefficien eta are defined in the paper), so I guess it is the CohFricMat that was used. But I didn't find any parameters about twisting (i.e., Ktw and etaTwist). Did they use another material? Or did they also use CohFricMat but just not active the twisting? If so, my question is how to introduce only rolling but no twisting when using CohFricMat. Thanks Leonard [1]https://yade-dev.gitlab.io/trunk/yade.wrapper.html?highlight=cohfrictmat#yade.wrapper.CohFrictMat [2]Tejchman, J., J. Kozicki, and D. Leśniewska. "Discrete simulations of shear zone patterning in sand in earth pressure problems of a retaining wall." International Journal of Solids and Structures 48.7-8 (2011): 1191-1209. [3]Hosn, R. A., Sibille, L., Benahmed, N., & Chareyre, B. (2017). Discrete numerical modeling of loose soil with spherical particles and interparticle rolling friction. Granular matter, 19(1), 4. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #693984]: How to export VTK file of walls
Question #693984 on Yade changed: https://answers.launchpad.net/yade/+question/693984 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Jan Stránský, that solved my question. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #693984]: How to export VTK file of walls
Question #693984 on Yade changed: https://answers.launchpad.net/yade/+question/693984 Status: Answered => Open Leonard is still having a problem: Hi Jan, Thanks for your reply. The general way to output VTK files could be (in O.engines): VTKRecorder(fileName='vtkRecorder',recorders=['all'],iterPeriod=500), In this way I can gain all the items (spheres, walls...) which is really good. But it exports the files evey 500 iters, which doesn't ensure I get the files at the strains that I want, and also it generates many files at other strains which I don't need. The way I export the VTK files by using VTKExporter at some interested strain level is like: vtkExporter = export.VTKExporter('sphere') strainLevel=[0.01,0.02,0.03] def outputVTK_sphere(): if -triax.strain[1]>strainLevel[0]: vtkExporter.exportSpheres(ids='all',what=[('linVel','b.state.vel'),('linVelLen','b.state.vel.norm()'),('id',"b.id")]) strainLevel.remove(strainLevel[0]) And then I put this function to the engines as: PyRunner(command='outputVTK_sphere()',iterPeriod=100) But in this way exporting the "wall" is not (yet) supported as you mentioned. >they are interchangeable. Do you have any idea to make the VTKRecorder being executed only at the desired strain? As something like the above example. Thanks Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #693984]: How to export VTK file of walls
New question #693984 on Yade: https://answers.launchpad.net/yade/+question/693984 Hi, I'd like to export the VTK files at some interested strain level. It seems that using VTKRecorder in engines like: VTKRecorder(fileName='vtkRecorder',recorders=['all'],iterPeriod=1000) can only export the VTK files according to the iterPeriod. So I go to use VTKExporter to output the VTK files at the desired strain level. With [1] I can output the spheres, and I still need to output the walls which is defined as walls=aabbWalls([mn,mx],thickness=0,material='walls' (for triaxial test). In [1] it mentions that using VTKExport can export: spheres facets polyhedra PotentialBlocks interactions contact points periodic cell I just wonder is it possible to export the walls using VTKExport? Thanks Leonard [1]https://yade-dev.gitlab.io/trunk/yade.export.html?highlight=vtkexporter#yade.export.VTKExporter.exportSpheres -- 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 #693769]: The whole view becomes very large at the end of a triaxial test
Question #693769 on Yade changed: https://answers.launchpad.net/yade/+question/693769 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Jan Stránský, that solved my question. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #693769]: The whole view becomes very large at the end of a triaxial test
Question #693769 on Yade changed: https://answers.launchpad.net/yade/+question/693769 Status: Answered => Open Leonard is still having a problem: Hi Jan, Thanks for your reply. > check use aabbExtrema() The initial size of my model is (vector3(0,0,0), vector3(0.07,0.14,0.07)) by using aabbExtrema(), The aabbExtrema of Fig2 shows is (vector3(0,0,0.05),vector3(0.126,2.7,0.078)). So I think some particles go out of the walls. > what "rigid wall boundary" is? Sorry for having not clearly described it. The walls I defined in my model are as that used in [1] for triaxial simulation: mn,mx=Vector3(0,0,0),Vector3(0.07,0.14,0.07) walls=aabbWalls([mn,mx],thickness=0,material='FrictMat') "penetrate" mean "go through" in my question. According to your suggestion, I think the time step could be the reason. And just a curiosity, From the results I got, the stress-strain response and volumetric response have not been affected by this situation. Does it mean that I can basically ignore this problem? Thanks [1]https://gitlab.com/yade-dev/trunk/blob/master/examples/triax-tutorial /script-session1.py -- 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 #693769]: The whole view becomes very large at the end of a triaxial test
New question #693769 on Yade: https://answers.launchpad.net/yade/+question/693769 Hi, I am working on a triaxial compression test. Normally, the test ends with the view like Fig1 shows in [1], in which the model located at the middle of the view space. However, some times I got the situation like Fig2 shows in [1], in which the whole view space became very large so that the model looks very small. Fig1 and Fig2 are just for illstration of my problem, the two figures came from different models. Actually, there are additional tiny particles in the model of Fig2, so I thought the reason why I got what Fig2 shows may because that some tiny particles have been ejected away from the main model. I am not sure about this because all my particles are generated in the rigid wall boundaries which means they would not leave out of this boundary. Particles will not penetrate the rigid wall I think. Do you have any ideas for avoiding this problem? Thanks Leonard [1]https://we.tl/t-fEElfCnqgZ -- 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 #693506]: How to get tension force of a cohesive contact
Question #693506 on Yade changed: https://answers.launchpad.net/yade/+question/693506 Status: Answered => Solved Leonard confirmed that the question is solved: Thanks Jan Stránský, that solved my question. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #693506]: How to get tension force of a cohesive contact
Question #693506 on Yade changed: https://answers.launchpad.net/yade/+question/693506 Leonard posted a new comment: Hi Jérôme, Yes, thanks for your reminder! Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #693506]: How to get tension force of a cohesive contact
Question #693506 on Yade changed: https://answers.launchpad.net/yade/+question/693506 Status: Answered => Open Leonard is still having a problem: Hi Jan, I test your idea with two particles which works really fine! I just have a question: For example, for one interaction in the model, i.phys.normalForce.dot(i.geom.normal) is positive which represents that it is compressive, does this apply for all the other interactions in the model? I.e., for other interactions whose i.phys.normalForce.dot(i.geom.normal) is positive, is the force compressive as well? I have this question because in my impression, the direction of contact normal unit vector "n" is arbitrary, not always orientates to the direction of compression. Thanks Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #693506]: How to get tension force of a cohesive contact
New question #693506 on Yade: https://answers.launchpad.net/yade/+question/693506 Hi, I use cohFrictMa with cohesion as particle material to do triaxial compression simulation. During the simulation, the contact force in normal direction could be compression and tension. I only know using i.phys.normalForce.norm() to get the value of the contact normal force, but I don't know how to extract the contact force in compression and tension respectively. Thanks, Leonard -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #693469]: questions about plotDirections
New question #693469 on Yade: https://answers.launchpad.net/yade/+question/693469 Hi, I have few questions about plotDirections[1] : 1. Every time I use utils.plotDirections() I can get a figure, my stupid question is how to save that figure automatically during the simulation? 2. There are two kinds of sphere particles in my model by using different materials (e.g., Mat1 and Mat2), the plotDirections() plots the distribution of overall contacts. What if I want to plot Mat1-Mat1, Mat1-Mat2 contacts distributions seperately? 3. Just a curiosity. Normally in fabric analysis, papers like to make the rose figure symmetric by plotting a pair of contact vectors for each interaction (i.e., one vector from sphere1 to sphere2 and another from sphere2 to sphere1). So I wonder if it can be done using plotDirections()? 4. May I ask yade developers what is the idea to plot the rose diagram of 3D vectors to a plane (let's say xy plane)? Project all vectors to the xy plane to gain the corresponding 2D vectors and draw the 2D rose diagram? I am asking this because if question2 and 3 couldn't be solved using the build-in functions in yade, then I will output the contact vectors and draw these diagrams in python. Thanks! Leonard [1]https://yade-dev.gitlab.io/trunk/yade.utils.html?highlight=plotdirections#yade.utils.plotDirections -- 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