vtk recoder
hi i m new on YADE. I have problems with vtk recoder. I m able to export the particles positions of my deposition and the facets that i have , but i can't export my "impact mass". This mass is a sphere too, and i specified in the vtk exportSpheres to take all ( ids='all'), but it is taking only the particles deposition. So i try to use again exportSpheres saying to take only sp : ( ids=sp, #line 69 and in pyrunner #line 90) but the terminal say that sp is not an iterable object. How can i do? this is my code but you ll not have the particle depositions , so it can't work. thank you to help me.
CODE:
from yade import pack, plot
from yade import export, ymport
from yade import utils
#######
########### INITIAL DATA ############
#######
h=18.45 #initial falling position
v=(2*9.81*h)**0.5 #falling velocity before impact
secVirt=0.9 #desired max virtual time [s]
fps=200 #frame per seconds (per vtk)
maxIt=int(
term=maxIt-1 # used to stop and print the results just one iteration before the end
vtk_it=
#desired frames per second
#######
##### CREATING CONTAINER #########
#######
O.bodies.
#######
#### DEFINING SOIL MATERIAL ######
#######
idSoil=
O.materials.
##positions and radii particles is added and material defined##
s=ymport.
sfere=O.
#######
##### CREATING FALLING MASS ###
#######
##material##
idCA=FrictMat(
O.materials.
sp=utils.
#defining impact velocity##
sp.state.
##add impact mass to simulation
O.bodies.append(sp)
#############
#### VTK ####
#############
vtkExporter=
vtkExporter.
vtkExporter.
#vtkExporter.
#######
# DEFINITION OF TYPE OF CONTACTS,LAW AND FUNCTIONS NEEDED TO RUN SIMULATION #
#######
O.engines=[
ForceResetter(),
InsertionSor
InteractionLoop(
[
[
[
),
NewtonIntegr
# PyRunner(
PyRunner(
PyRunner(
#PyRunner(
PyRunner(
PyRunner(
]
O.trackEnergy=True
#######
#######
#######
def EndSimulation():
if O.time > 0.6 :
O.pause()
# Function that blocks the particles rotations#
def BlockRotation():
for b in O.bodies :
#plotting general data
#def addPlotData():
# plot.addData(
# b=O.bodies[184081]
# plot.addData(
# plot.addData(
#plot.plots=
#plot.plot(
#plot.plots=
# show the plot on the screen, and update while the simulation runs
#plot.plot()
#######
O.dt=.8*
O.run()
O.stopAtIter=maxIt;
O.saveTmp()
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Bruno Chareyre
- Solved:
- Last query:
- Last reply: