← Back to team overview

yade-users team mailing list archive

Re: [Question #218621]: Yade simulation python script wont start using xrdp (remote access)

 

Question #218621 on Yade changed:
https://answers.launchpad.net/yade/+question/218621

    Status: Solved => Open

Eugen Kubowsky is still having a problem:
hmm, I tried using the vtkrecorder. but it doesnt work as expected.
As a tets I used the 3D Postprocessing example. But because i have to use the "-n" mode - i cant use the qt-parts of the tutorial. At least I think so.
If possible I would love to create a video from simulation but if I get the example right, for recording a mpeg video, i need to explicitly open qt.view() but this of course end up in error messages because there is no display environment variable.

I ended up using this code:

# demonstrate 3d postprocessing with yade
#
# 1. qt.SnapshotEngine saves images of the 3d view as it appears on the screen periodically
#    utils.makeVideo is then used to make real movie from those images
# 2. VTKRecorder saves data in files which can be opened with Paraview
#    see the User's manual for an intro to Paraview

# generate loose packing
from yade import pack
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(2,2,2),rMean=.1,rRelFuzz=.6,periodic=True)
# add to scene, make it periodic
sp.toSimulation()

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb()]),
   InteractionLoop(
      [Ig2_Sphere_Sphere_L3Geom()],
      [Ip2_FrictMat_FrictMat_FrictPhys()],
      [Law2_L3Geom_FrictPhys_ElPerfPl()]
   ),
   NewtonIntegrator(damping=.4),
   # save data for Paraview
   VTKRecorder(fileName='3d-vtk-',recorders=['all'],iterPeriod=1),
]
O.dt=.5*utils.PWaveTimeStep()

# prescribe constant-strain deformation of the cell
O.cell.velGrad=Matrix3(-.1,0,0, 0,-.1,0, 0,0,-.1)


executing it via 
# yade-daily -n -j2 3DPostprocessing.py
nothing happens. I expected some files being produced but nohting happens.

Could you please help me?

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.