Re: [Yade-users] [Question #293955]: How to generate dense packing of aggregates
Question #293955 on Yade changed: https://answers.launchpad.net/yade/+question/293955 Status: Open => Answered Jan Stránský proposed the following answer: Hi Varun, as I mentioned before, I am not really familiar with CohFrictMat, but you may check [1,2], it should be what you need cheers Jan [1] https://answers.launchpad.net/yade/+question/257058 [2] https://answers.launchpad.net/yade/+question/266828 2016-05-30 0:42 GMT+02:00 VG: > Question #293955 on Yade changed: > https://answers.launchpad.net/yade/+question/293955 > > Status: Answered => Open > > VG is still having a problem: > Thanks a lot Jan, that did the trick! > > I am facing another challenge with the dense packing generated this way. > When I use this packing in the main simulation, lot of cohesive bonds > break even before I apply the actual loading. This is mostly because the > initial packing has overlaps and is not stress-free. Now, I can think of > two possible solutions to this: > > 1. The solution proposed by Luc Scholtest in #6 at > https://answers.dogfood.paddev.net/yade/+question/164575 , i.e changing > the interaction law such that the initial overlapping is utilized as > equilibrium distance to compute the normal force Fn=k*(D-Deq). I tried > to look into Yade documentation but I couldn't find much on this and how > I can go about doing this. > > 2. In compress.py, after compressing the sample by > compressor.goal1 = compressor.goal2 = compressor.goal3 = -1e-7 > O.run(5,True) > compressor.goal1 = compressor.goal2 = compressor.goal3 = -1e-5 > O.run(3,True) > > May be uncompress the sample by > compressor.goal1 = compressor.goal2 = compressor.goal3 = 1e-5 > O.run(5, True) > > > The second solution above would again make the packing loose, defeating > the purpose. So really, if there is a possibility of somehow using the > first solution above. Or if anyone can please provide some other suggestion > ? > > Thanks > Varun > > -- > You received this question notification because your team yade-users is > an answer contact for Yade. > > ___ > Mailing list: https://launchpad.net/~yade-users > Post to : yade-users@lists.launchpad.net > Unsubscribe : https://launchpad.net/~yade-users > More help : https://help.launchpad.net/ListHelp > -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #293955]: How to generate dense packing of aggregates
Question #293955 on Yade changed: https://answers.launchpad.net/yade/+question/293955 Status: Answered => Open VG is still having a problem: Thanks a lot Jan, that did the trick! I am facing another challenge with the dense packing generated this way. When I use this packing in the main simulation, lot of cohesive bonds break even before I apply the actual loading. This is mostly because the initial packing has overlaps and is not stress-free. Now, I can think of two possible solutions to this: 1. The solution proposed by Luc Scholtest in #6 at https://answers.dogfood.paddev.net/yade/+question/164575 , i.e changing the interaction law such that the initial overlapping is utilized as equilibrium distance to compute the normal force Fn=k*(D-Deq). I tried to look into Yade documentation but I couldn't find much on this and how I can go about doing this. 2. In compress.py, after compressing the sample by compressor.goal1 = compressor.goal2 = compressor.goal3 = -1e-7 O.run(5,True) compressor.goal1 = compressor.goal2 = compressor.goal3 = -1e-5 O.run(3,True) May be uncompress the sample by compressor.goal1 = compressor.goal2 = compressor.goal3 = 1e-5 O.run(5, True) The second solution above would again make the packing loose, defeating the purpose. So really, if there is a possibility of somehow using the first solution above. Or if anyone can please provide some other suggestion ? Thanks Varun -- 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 #294531]: Change colour of spheres when based on Movement
Question #294531 on Yade changed: https://answers.launchpad.net/yade/+question/294531 Status: Open => Solved Clinton Schramm confirmed that the question is solved: Got it! Thanks so much for all your help Jan! -- 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 #294531]: Change colour of spheres when based on Movement
Question #294531 on Yade changed: https://answers.launchpad.net/yade/+question/294531 Status: Answered => Open Clinton Schramm is still having a problem: Hi Jan I have tried to implement what you said, but get the error "State object has no attribute 'Pos' Could you give an example on how to reference this correctly. Ideally I would like to see the colour change based on the cummunulative displacement from a certain point. (When the translation engine begins) def checkUnbalancedtunnelmovement(): global voidcheck if voidcheck==2: O.engines=O.engines+[TranslationEngine(translationAxis=[0,1,0],velocity=0.05,ids=TBM)] for s in O.bodies: s.state.refPos[1]=s.state.Pos[1] O.engines=O.engines+[PyRunner(command='Changecolor()',iterPeriod=200)] print O.engines, '2' voidcheck=1 # start plotting the data now, it was not interesting before #O.engines=O.engines+[PyRunner(command='addPlotDataForceTunnel()',iterPeriod=200)] checker.command='calculateforces()' def Changecolor(): for s in O.bodies: s.shape.color=scalarOnColorScale(s.state.displ().norm(),0,.7) # for changing color based on the movement of sheres. -- 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 #294588]: Question about Ig2_facet_sphere_scgeom.cpp
Question #294588 on Yade changed: https://answers.launchpad.net/yade/+question/294588 Status: Open => Answered Jan Stránský proposed the following answer: Hi Mike, see [1,2]. It is left for backward compatibility. If you need 1*sphereRadius, I guess you can trick it by assigning facet material stiffness such that the resulting interaction stiffness equals the one that would be computed with 1*sphereRadius (not tested, just guessing). cheers Jan [1] https://answers.launchpad.net/yade/+question/236412 [2] https://answers.launchpad.net/yade/+question/228778 2016-05-29 16:26 GMT+02:00 MikeZhao: > New question #294588 on Yade: > https://answers.launchpad.net/yade/+question/294588 > > Line 115: scm->radius1 = 2*sphereRadius; > > I understand that A facet-sphere interaction is actually converted to a > sphere-sphere interaction to calculate contact force. > > What I don't understand is why should we equalize a facet to a sphere with > a radius 2*sphereRadius? Could any one give me an explanation? > > -- > You received this question notification because your team yade-users is > an answer contact for Yade. > > ___ > Mailing list: https://launchpad.net/~yade-users > Post to : yade-users@lists.launchpad.net > Unsubscribe : https://launchpad.net/~yade-users > More help : https://help.launchpad.net/ListHelp > -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #294588]: Question about Ig2_facet_sphere_scgeom.cpp
New question #294588 on Yade: https://answers.launchpad.net/yade/+question/294588 Line 115: scm->radius1 = 2*sphereRadius; I understand that A facet-sphere interaction is actually converted to a sphere-sphere interaction to calculate contact force. What I don't understand is why should we equalize a facet to a sphere with a radius 2*sphereRadius? Could any one give me an explanation? -- 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 #294531]: Change colour of spheres when based on Movement
Question #294531 on Yade changed: https://answers.launchpad.net/yade/+question/294531 Status: Open => Answered Jan Stránský proposed the following answer: > > > I've managed to get the colors changing, but the s.state.displ().norm() > function seems to have a value even before that part of the code has > been run (perhaps stored previosu displacements? > > Is there a way to reset that value? state.displ() is computed internally as state.pos - state.refPos, so the displacement from the "original position". state.refPos may be set manually to arbitrary value, you can try something like b.state.refPos = b.state.pos. You can do this regularly to color the particles according to "displacement increment" from previous color change. This way is quite flexible, so depending on your needs you can use different approaches. cheers Jan -- 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 #294531]: Change colour of spheres when based on Movement
Question #294531 on Yade changed: https://answers.launchpad.net/yade/+question/294531 Status: Answered => Open Clinton Schramm is still having a problem: Thanks for all the tips Jan. I'll be sure to use them next time. I've managed to get the colors changing, but the s.state.displ().norm() function seems to have a value even before that part of the code has been run (perhaps stored previosu displacements? Is there a way to reset that value? -- 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 #294531]: Change colour of spheres when based on Movement
Question #294531 on Yade changed: https://answers.launchpad.net/yade/+question/294531 Jan Stránský proposed the following answer: And if you need the color information not directly in simulation but for postprocessing, another option is to export displacement information to vtk files and use paraview for the postprocessing cheers Jan 2016-05-29 12:07 GMT+02:00 Jan Stránský: > Hi Clinton, > > There could be several problems, why you don't see the spheres colored: > - the PyRynner is called not very often > - the scale is wrong (too small or too large) > > follows your first example, for me works ok (particles goes from green to > yellow and to green again) > # > readParamsFromTable(rMean=.05,rRelFuzz=.3,maxLoad=1e6,minLoad=1e4) > from yade.params.table import * > > from yade import pack, plot > O.bodies.append(geom.facetBox((.5,.5,.5),(.5,.5,.5),wallMask=31)) > sp=pack.SpherePack() > sp.makeCloud((0,0,0),(1,1,1),rMean=rMean,rRelFuzz=rRelFuzz) > sp.toSimulation() > > O.engines=[ > ForceResetter(), > > InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]), > InteractionLoop( > > [Ig2_Sphere_Sphere_L3Geom(),Ig2_Facet_Sphere_L3Geom(),Ig2_Wall_Sphere_L3Geom()], > [Ip2_FrictMat_FrictMat_FrictPhys()], > [Law2_L3Geom_FrictPhys_ElPerfPl()] > ), > NewtonIntegrator(gravity=(0,0,-9.81),damping=0.5), > PyRunner(command='checkUnbalanced()',realPeriod=2,label='checker'), > PyRunner(command='ccc()',iterPeriod=10,label='checker'), > ] > O.dt=.5*PWaveTimeStep() > def checkUnbalanced(): > print O.iter > if O.iter<5000: return > if unbalancedForce()>.1: return > O.bodies.append(wall(max([b.state.pos[2]+b.shape.radius for b in O.bodies > if isinstance(b.shape,Sphere)]),axis=2,sense=-1)) > global plate > plate=O.bodies[-1] > plate.state.vel=(0,0,-.1) > O.engines=O.engines+[PyRunner(command='addPlotData()',iterPeriod=200)] > checker.command='unloadPlate()' > > def unloadPlate(): > if abs(O.forces.f(plate.id)[2])>maxLoad: > plate.state.vel*=-1 > checker.command='stopUnloading()' > > def stopUnloading(): > if abs(O.forces.f(plate.id)[2]) 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) > > def ccc(): > for s in O.bodies: > s.shape.color=scalarOnColorScale(s.state.displ().norm(),0,1) > > O.run() > # > > > cheers > Jan > > PS: when posting a code, try to make it minimal - deleting functions, > lines and comments, that are not important (like plots) > > > 2016-05-29 5:16 GMT+02:00 Clinton Schramm < > question294...@answers.launchpad.net>: > >> Question #294531 on Yade changed: >> https://answers.launchpad.net/yade/+question/294531 >> >> Clinton Schramm gave more information on the question: >> Sorry for just spamming the code. >> >> I'm not sure how else to explain it. >> >> Cheers >> >> -- >> You received this question notification because your team yade-users is >> an answer contact for Yade. >> >> ___ >> Mailing list: https://launchpad.net/~yade-users >> Post to : yade-users@lists.launchpad.net >> Unsubscribe : https://launchpad.net/~yade-users >> More help : https://help.launchpad.net/ListHelp >> > > -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #294531]: Change colour of spheres when based on Movement
Question #294531 on Yade changed: https://answers.launchpad.net/yade/+question/294531 Status: Open => Answered Jan Stránský proposed the following answer: Hi Clinton, There could be several problems, why you don't see the spheres colored: - the PyRynner is called not very often - the scale is wrong (too small or too large) follows your first example, for me works ok (particles goes from green to yellow and to green again) # readParamsFromTable(rMean=.05,rRelFuzz=.3,maxLoad=1e6,minLoad=1e4) from yade.params.table import * from yade import pack, plot O.bodies.append(geom.facetBox((.5,.5,.5),(.5,.5,.5),wallMask=31)) sp=pack.SpherePack() sp.makeCloud((0,0,0),(1,1,1),rMean=rMean,rRelFuzz=rRelFuzz) sp.toSimulation() O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_L3Geom(),Ig2_Facet_Sphere_L3Geom(),Ig2_Wall_Sphere_L3Geom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_L3Geom_FrictPhys_ElPerfPl()] ), NewtonIntegrator(gravity=(0,0,-9.81),damping=0.5), PyRunner(command='checkUnbalanced()',realPeriod=2,label='checker'), PyRunner(command='ccc()',iterPeriod=10,label='checker'), ] O.dt=.5*PWaveTimeStep() def checkUnbalanced(): print O.iter if O.iter<5000: return if unbalancedForce()>.1: return O.bodies.append(wall(max([b.state.pos[2]+b.shape.radius for b in O.bodies if isinstance(b.shape,Sphere)]),axis=2,sense=-1)) global plate plate=O.bodies[-1] plate.state.vel=(0,0,-.1) O.engines=O.engines+[PyRunner(command='addPlotData()',iterPeriod=200)] checker.command='unloadPlate()' def unloadPlate(): if abs(O.forces.f(plate.id)[2])>maxLoad: plate.state.vel*=-1 checker.command='stopUnloading()' def stopUnloading(): if abs(O.forces.f(plate.id)[2]): > Question #294531 on Yade changed: > https://answers.launchpad.net/yade/+question/294531 > > Clinton Schramm gave more information on the question: > Sorry for just spamming the code. > > I'm not sure how else to explain it. > > Cheers > > -- > You received this question notification because your team yade-users is > an answer contact for Yade. > > ___ > Mailing list: https://launchpad.net/~yade-users > Post to : yade-users@lists.launchpad.net > Unsubscribe : https://launchpad.net/~yade-users > More help : https://help.launchpad.net/ListHelp > -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp