Re: [Yade-users] [Question #707972]: why the data is 1 iter behind
Question #707972 on Yade changed: https://answers.launchpad.net/yade/+question/707972 Status: Open => Solved mikexue confirmed that the question is solved: Problem solved at Gitlab. Thanks! -- 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 #707972]: why the data is 1 iter behind
New question #707972 on Yade: https://answers.launchpad.net/yade/+question/707972 Hello, The data I recorded is one simulation step behind, which confused me . Take the gravity depostion as an example. Let the O.dt = 1e-5. I want to record the postion of ball no.36 and save it in TXT at Virperiod = 9.5e-5. I assume that the data in O.Iter = 10 should be recorded because 9 < 9.5 <10 . However , actually the positon of the ball in O.iter = 11 is recorded in Txt although the txt is named by iter10. I want to record the postion in Iter10 instead. I really appreciate your help. == 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=.05, rRelFuzz=.5) sp.toSimulation() O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4), PyRunner(command='depth36()',virtPeriod=9.5e-5), ] def depth36(): depth_36 = O.bodies[36].state.pos[2] plot.addData(i=O.iter, time=O.time,depth = depth_36) plot.saveDataTxt('depth-36 '+ str(O.iter)+ '-'+str(O.time)+'.txt') O.dt = 1e-5 O.saveTmp() === Best. Mikexue -- 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 #707909]: export the position of sphere
Question #707909 on Yade changed: https://answers.launchpad.net/yade/+question/707909 Status: Needs information => Solved mikexue confirmed that the question is solved: Thank you, 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 #707909]: export the position of sphere
Question #707909 on Yade changed: https://answers.launchpad.net/yade/+question/707909 mikexue posted a new comment: Jan, I am sorry.I rerun the script.It worked -- 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 #707909]: export the position of sphere
New question #707909 on Yade: https://answers.launchpad.net/yade/+question/707909 Hello, I wanted to get the positions of spheres when unbalanced Force < .05 and use export.text() to get the positions of spheres, but I failed. from yade import pack, plot from yade import export # create rectangular box from facets O.bodies.append(geom.facetBox((.5, .5, .5), (.5, .5, .5), wallMask=31)) # create empty sphere packing sp = pack.SpherePack() # generate randomly spheres with uniform radius distribution sp.makeCloud((0, 0, 0), (1, 1, 1), rMean=.05, rRelFuzz=.5) # add the sphere pack to the simulation sp.toSimulation() O.engines = [ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4), PyRunner(command='checkUnbalanced()', realPeriod=2), ] O.dt = .5 * PWaveTimeStep() # if the unbalanced forces goes below .05, the packing # is considered stabilized, therefore we stop collected def checkUnbalanced(): if unbalancedForce() < .05: O.pause() export.textExt("positions.txt") O.saveTmp() I appreciate your help. Best. Mikexue -- 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 #703920]: How to excute the VTKRecorder at virtual time
Question #703920 on Yade changed: https://answers.launchpad.net/yade/+question/703920 Status: Answered => Solved mikexue 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 #703920]: How to excute the VTKRecorder at virtual time
Question #703920 on Yade changed: https://answers.launchpad.net/yade/+question/703920 mikexue posted a new comment: Hi,Jan Thanks! Your code works just fine! I am just curious why my code didn't work although it's poorly written. ### O.engines = [ PyRunner(command='record_vrk()',virtPeriod=1,nDo = 2),#call "record_vtk"at O.time=20 for only once ] def record_vrk(): VTKRecorder(fileName='3d-vtk-',recorders=['all','bstresses'],virtPeriod = 3,nDo = 5) Best, Mikexue -- 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 #703920]: How to excute the VTKRecorder at virtual time
Question #703920 on Yade changed: https://answers.launchpad.net/yade/+question/703920 mikexue gave more information on the question: Going through the documentation, I understand I can set the "virtPeriod” and the “nDo” to achieve control of the period and the exact number of times. But I can't find a way to set the specific virtual time to call the vtkrecorder. Did I miss something? -- 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 #703920]: How to excute the VTKRecorder at virtual time
Question #703920 on Yade changed: https://answers.launchpad.net/yade/+question/703920 Summary changed to: How to excute the VTKRecorder at virtual time Description changed to: Hello, I see there is "realPeriod" that I can use to define the real time period calling the VTKRecorder. However, I want to start to call the VTKRecorder at a specific virtual time in the simulation instead of "firstIterRun" and deactivated it after several virtual time Period. How can I manage to do that? Besides, am I getting it right that If I want to call the VTKRecorder at a specific virutal time , I should set the initRun =true? I appreciate your help. Best. Mikexue -- 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 #703920]: How to excute the VTKRecorder at REAl time
New question #703920 on Yade: https://answers.launchpad.net/yade/+question/703920 Hello, I see there is "realPeriod" that I can use to define the real time period calling the VTKRecorder. However, I want to start to call the VTKRecorder at a real time in the simulation instead of "firstIterRun" and deactivated it after several realPeriod. How can I manage to do that? Besides, am I getting it right that If I want to call the VTKRecorder at a specific real time , I should set the initRun =true? I appreciate your help. Best. Mikexue -- 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 #703901]: whats the difference between “GlobalStiffnessTimeStepper”and "O.dt"
Question #703901 on Yade changed: https://answers.launchpad.net/yade/+question/703901 Status: Answered => Solved mikexue 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 #703901]: whats the difference between “GlobalStiffnessTimeStepper”and "O.dt"
Question #703901 on Yade changed: https://answers.launchpad.net/yade/+question/703901 mikexue posted a new comment: Hi, Jan. Thank you for your answer. I find that "O.dt=SafetyCoefficient*utils.PWaveTimeStep() " is also commonly used in the Yade documentation. Here is another question related to dt: Besides the fact that GlobalStiffnessTimeStepper is dynamic and utils.PWaveTimeStep() is fixed, should they be of the same value at the very beginning of the simulation? I mean dt="GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=10,timestepSafetyCoefficient=0.8) "equals to dt="0.8*utils.PWaveTimeStep()" at the beginning of the simulation? I am confused coz I tried these two ways and they are different in my simulation. best, yong -- 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 #703901]: whats the difference between “GlobalStiffnessTimeStepper”and "O.dt"
New question #703901 on Yade: https://answers.launchpad.net/yade/+question/703901 Hi, My simulation is about a rotating rod inserted into a chamber that contains about 470,000 particles. When I use "GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=10,timestepSafetyCoefficient=0.8)", I get a dynamic dt around 3.64e-6. The program proceeded with a speed of 3 iter/s. It takes a long time to run the whole simulation. For some reasons I want to set a fixed dt to calculate the position. I wonder if I can set the dt equals to maybe 4e-6 or 1e-5 or even a larger dt to save some time? Would it affect the stability or the data such as the contact force between the particles? I appreciate your help, Mikexue -- 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