How to plot the acceleration of the boulder and or the grains?
Dear all,
I am trying to plot the velocity and acceleration:
1. How to add plot data for acceleration (for the boulder and or the grains)?
2. Based on my script, is that the way correct if I wanna plot velocity for the boulder like in my script?
##SCRIPT
#Sphere Cylinder pack
readParamsFromT
from yade.params.table import *
from yade import pack, plot
from pylab import rand
O.bodies.
#Define material of the grains
O.materials.
sp=pack.
sp.makeCloud(
sp.toSimulation
O.bodies.
##Engines and Constitutive Law
O.engines=
InsertionSort
InteractionLo
[Ip2_
[Law2_
NewtonIntegr
PyRunner(
O.dt=.5*
def checkUnbalanced():
if O.iter<1000:return # at the very start, unbalanced force can be low as there is only few contacts, but it does not mean the packing is stable
if unbalancedForce
O.bodies.
O.materials.
global boulder # without this line, the BOULDER variable would only exist inside this function
boulder=
boulder.
O.engines=
checker.
def unloadBoulder():
if abs(O.forces.
boulder.
checker.
def stopUnloading():
if abs(O.forces.
O.run()
def addPlotData():
b=O.bodies[-1]
plot.
plot.plots=
plot.plot()
yade.qt.
O.saveTmp()
#######
Thank you for your any suggestions.
Cheers!
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jan Stránský
- Solved:
- 2020-12-15
- Last query:
- 2020-12-15
- Last reply:
- 2020-12-15
|
#1 |
Hello,
> 1. How to add plot data for acceleration (for the boulder and or the grains)?
there are several approaches depending on actual purpose:
- acceleration = force / mass
- it can be derived from position evolution
- it can be derived from velocity evolution
- ...
> 2. Based on my script, is that the way correct if I wanna plot velocity for the boulder like in my script?
assuming velocity magnitude is the quantity of interest, it seems OK
cheers
Jan
Defri (daredefri) said : | #2 |
Thank you so much..
It has been solved.
Defri (daredefri) said : | #3 |
Thanks Jan Stránský, that solved my question.