yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #20996
Re: [Question #685082]: errors in plot, print, save file, micro data, time step, 3D show
Question #685082 on Yade changed:
https://answers.launchpad.net/yade/+question/685082
Status: Open => Needs information
Jan Stránský requested more information:
Hello,
if this is really the code you are using, I got:
- a few SyntaxError because of missing commas.
- Spherepack AttributeError (should be SpherePack)
- NewtonIntegrato NameError (should be NewtonIntegrator)
Please next time try to post exactly the code you are using and make sure it is working.
> 1- When I run my code, no plot will show up however I coded plotting
commands
Without O.run(), I got the plot. What is the behavior on your side
without O.run?
> 2 ... when I try to modify my code a little
please provide actual code. Little modifications and have significant
consequences.
> 3- The timp steps are so low and run will take a long time (more than
1 hour)
GlobalStiffnessTimeStepper should be reliable, so dt is close to the
critical time step. Without changing the physics of the system (increase
density or decrease stiffness), this is just how DEM works..
> 4- I cannot save the dada as a text file that I coded its command at
the end of my code
please be more specific what is the problem. The file is not save? is saved but is empty? Do you get some error? If yes, which one? ....
I got the saved file OK..
> 5- I do not know how can I get micro information such as contact
forces through my code
e.g. (depending on your specific needs)
for i in O.interactions:
id1,id2 = i.id1,i.id2
f = i.phys.normalForce + i.phys.shearForce
Basically from Python you have access to any data in the simulation.
> 6- I do not see on the screen the printed test text I used in my code.
Could not reproduce it. I got 4 warnings concerning SpherePack and then
****** TEST TEXT ****** line
> 7- please let me know if I have any other problem with my code
O.run() should not be directly followed by other commands. O.run() just starts the simulation and Python continues to evaluate further commands, which are evaluated "at random time" w.r.t Yade running.
Use O.run(N,True) # running N time steps and continue after it is finished
or
O.run(); O.wait()
This start running, but before evaluating other commands, Python waits for Yade to stop (e.g. some O.pause() inside PyRunner)
cheers
Jan
--
You received this question notification because your team yade-users is
an answer contact for Yade.