Re: [Yade-users] [Question #681474]: force chain in paraview
Question #681474 on Yade changed: https://answers.launchpad.net/yade/+question/681474 Status: Needs information => Solved Alireza Sadeghi confirmed that the question is solved: YES, Thank you Jan, Thank you very much. It solved. -- 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 #681474]: force chain in paraview
Question #681474 on Yade changed: https://answers.launchpad.net/yade/+question/681474 Status: Open => Needs information Jan Stránský requested more information: I got syntax error in history() function.. What is the problem now? I have tried the script without the function. It prints the warnings (apparently when there are no interactions), but it also saved a few files with interactions.. 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 #681474]: force chain in paraview
Question #681474 on Yade changed: https://answers.launchpad.net/yade/+question/681474 Status: Needs information => Open Alireza Sadeghi gave more information on the question: Hello Jan, Thank you very much for your response. I think the vtk export express just the initial interaction, because at the beginning there is no interaction between the particles. This is my complete code: from yade import utils, plot from yade import pack, qt from datetime import datetime from yade import export qtr=qt.Renderer() qtr.bgColor=(1,1,1) #=== #==set a periodic boundary== #=== O.periodic=True O.cell.refSize=(2e-1,2e-1,2e-1) #== #= define the materials === #== O.materials.append(CohFrictMat(normalCohesion= 1e20, shearCohesion= 1e20, isCohesive= True, young=6.81e8, density=1377.5, poisson=0.3, frictionAngle= 0.31, fragile=False, label='Coke')) #=== #=== define packing #=== nums=['t'] mats=['Coke'] coke=(5e-3,150) nums=pack.SpherePack() nums.makeCloud((0,0,0),(2e-1,2e-1,2e-1),rMean=coke[0],rRelFuzz=0,num=coke[1]) O.bodies.append([utils.sphere(c,r,material=mats[0],color=(0,0,1)) for c,r in nums]) sigmaIso=-1e8 #=== #=VTK=== #=== vtkExporter = export.VTKExporter('VTK_simulatione') #=== #=== define Engine = #=== 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=(1,1,1), maxUnbalanced=.01,relStressTol=1e-3, doneHook='compactionFinished()' ), NewtonIntegrator(damping=0.4), PyRunner(iterPeriod=100, command="vtkExporter.exportInteractions(ids='all',what=[('forceN','i.phys.normalForce.norm()')])"), PyRunner(command='history()',iterPeriod=10,label='recorder'), ] O.dt=1e-6 O.saveTmp() def history(): plot.addData(unbalanced=unbalancedForce(), szz=-triax.stress[2],ezz=-triax.strain[2],i=O.iter,) print 'porosity:', porosity() print 'iteration', O.iter O.run() plot.plots={'ezz':('szz')} plot.plot() def compactionFinished(): print 'Finished' O.pause() -- 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 #681474]: force chain in paraview
Question #681474 on Yade changed: https://answers.launchpad.net/yade/+question/681474 Status: Open => Needs information Jan Stránský requested more information: Please provide a new version of complete script. It is possible that that the vtk export is done at the time when the particles are already gone through each other? thanks 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 #681474]: force chain in paraview
Question #681474 on Yade changed: https://answers.launchpad.net/yade/+question/681474 Alireza Sadeghi gave more information on the question: Dear Jerome and Dear Jan, Thank you very much for your help. I increased the confining pressure to -1e8 Pa. the particles go through each other. but in the ParaView there is no interaction. in addition, I added PyRunner(command='history()',iterPeriod=10,label='recorder'), to my engine and added def history(): plot.addData(szz2=-triax.stress[2], ezz=-triax.strain[2], i=O.iter,) O.run() plot.plots={'ezz':('szz2')} plot.plot() to my code, and the diagram shows the stress versus strain and it is not zero. All in all, my problem does bot solve. Thank you very much for your help. Best Regards Alireza -- 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 #681474]: force chain in paraview
Question #681474 on Yade changed: https://answers.launchpad.net/yade/+question/681474 Jan Stránský posted a new comment: I tried your script with 3D view. The packing is very loose and there are visually no interactions.. so I guess Yade is right :-) let us know 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 #681474]: force chain in paraview
Question #681474 on Yade changed: https://answers.launchpad.net/yade/+question/681474 Jérôme Duriez posted a new comment: If YADE (VTKExporter) says there is no interactions, a first bet is to consider he is right and that there is no interaction, regardless your visual impressions Did you first try to check what O.interactions.countReal() says ? -- 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 #681474]: force chain in paraview
Question #681474 on Yade changed: https://answers.launchpad.net/yade/+question/681474 Status: Answered => Open Alireza Sadeghi is still having a problem: Dear Jan, Thank you very much. You comment works great. But my question doesn't solve completely. Now, the program run successfully, but I have a warning "Warning (yade.export.VTKExporter): no interactions" The particles hit to each other and compaction process is completed. but the VTKExporter says that no interactions. I don't know what should I do now. Thank you very much for your help. Best Regards Alireza -- 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 #681474]: force chain in paraview
Question #681474 on Yade changed: https://answers.launchpad.net/yade/+question/681474 Status: Open => Answered Jan Stránský proposed the following answer: Hello, > TypeError: 'Vector3' object is not callable > i.phys.normalForce().norm() should be i.phys.normalForce.norm() because, as the error says, i.phys.normalForce is Vector3 and is not callable, i.e. adding () has undefined behavior. > The program gave me a file with name "VTK_simulatione- intrs-.vtk". I don't know where did the zeros come from. zeros mean the very first output. If you output more times in the simulations, you would get, 001, 002 ... > However, when I deleted the zeroes I could open the file with Paraview. if I understand correctly, the deletion is not necessary as it is just file name and Paraview does not care how the file is named. > In the Paraview ... it is probably because of the error 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 #681474]: force chain in paraview
Question #681474 on Yade changed: https://answers.launchpad.net/yade/+question/681474 Status: Answered => Open Alireza Sadeghi is still having a problem: Hello Jerome, Thank you very much for your response. I added the sentences which you told. Now, I have this error "TypeError: 'Vector3' object is not callable". The program gave me a file with name "VTK_simulatione- intrs-.vtk". I don't know where did the zeros come from. However, when I deleted the zeroes I could open the file with Paraview. In the Paraview, I can't select Cell Data to Point Data. In addition, all the tube has the same radius and I can't set the color by forceN. I was wondering if you could help me. If there is an example which is similar to my problem, I will be grateful if you could share it with me. Thank you very much Alireza -- 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 #681474]: force chain in paraview
Question #681474 on Yade changed: https://answers.launchpad.net/yade/+question/681474 Status: Open => Answered Jérôme Duriez proposed the following answer: Hello VTKExporter() being a part of YADE export module, you first need to import that module (like always in Python), in a consistent manner with your exact calls to that function. E.g. from yade import export vtkExporter = export.VTKExporter('VTK_simulatione') PS: to demonstrate your problem, I guess giving us vtkExporter = VTKExporter('VTK_simulatione') instead of the whole script would have been enough and more in the MWE [*] spirit ;-) [*] https://www.yade-dem.org/wiki/Howtoask -- 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 #681474]: force chain in paraview
New question #681474 on Yade: https://answers.launchpad.net/yade/+question/681474 Hello All, I want to model force chain in the paraview, but I have problem to do it. I have the error that "NameError: name 'VTKExporter' is not defined". I was wondering if you could give me an example to solve my problem. Thank you very much. Best Regards Alireza P.S. my code is : from yade import utils, plot from yade import pack, qt from datetime import datetime qtr=qt.Renderer() qtr.bgColor=(1,1,1) #=== #==set a periodic boundary== #=== O.periodic=True O.cell.refSize=(2e-1,2e-1,2e-1) #== #= define the materials === #== O.materials.append(CohFrictMat(normalCohesion= 1e20, shearCohesion= 1e20, isCohesive= True, young=6.81e8, density=1377.5, poisson=0.3, frictionAngle= 0.31, fragile=False, label='Coke')) #=== #=== define packing #=== nums=['t'] mats=['Coke'] coke=(5e-3,150) nums=pack.SpherePack() nums.makeCloud((0,0,0),(2e-1,2e-1,2e-1),rMean=coke[0],rRelFuzz=0,num=coke[1]) O.bodies.append([utils.sphere(c,r,material=mats[0],color=(0,0,1)) for c,r in nums]) sigmaIso=-1e5 #=== #=VTK=== #=== vtkExporter = VTKExporter('VTK_simulatione') #=== #=== define Engine = #=== 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=(1,1,1), maxUnbalanced=.01,relStressTol=1e-3, doneHook='compactionFinished()' ), NewtonIntegrator(damping=0.4), PyRunner(iterPeriod=50, command="vtkExporter.exportInteractions(ids='all',what=[('forceN','i.phys.normalForce().norm()')])") ] O.dt=1e-6 O.saveTmp() O.run(20,True) def compactionFinished(): print 'Finished' O.pause() -- 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