Problem with visualization of boxes in ParaView 4.0.1

Asked by Jonathan Pergoli

Hi everybodi!

I cannot see rotation of my box when I postprocess it with paraview. If I open the contreller I can see the box star rotating after bouncing on the ground, but when I open it with paraview I the box is always in horizontal position. The problem is that I cannot use SnapshotEngine because I have to run my simuations on vesion without the graphic interface.

Can someone help me?

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hi Jonathan,
watching the source code, rotations are missing for boxes. The fix is easy,
I will push it soon. How did you install yade (yadedaily, compiled from
source...)?
cheers
Jan

2016-05-12 23:37 GMT+02:00 Jonathan Pergoli <
<email address hidden>>:

> New question #293635 on Yade:
> https://answers.launchpad.net/yade/+question/293635
>
> Hi everybodi!
>
> I cannot see rotation of my box when I postprocess it with paraview. If I
> open the contreller I can see the box star rotating after bouncing on the
> ground, but when I open it with paraview I the box is always in horizontal
> position. The problem is that I cannot use SnapshotEngine because I have to
> run my simuations on vesion without the graphic interface.
>
> Can someone help me?
>
> 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 : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Jonathan Pergoli (j812p89) said :
#2

Hi Jan!

I have installed both yadedaily from package and yade-1.07.0 from source.

Maybe I have solved the problem using VTKExport from the export module:
- in the engine
        PyRunner(command='vtkExporter.exportPolyhedra()',iterPeriod=2500),
 PyRunner(command='vtkExporter.exportSpheres()',iterPeriod=2500),
        PyRunner(command='vtkExporter.exportFacets()',iterPeriod=2500),
- out of the engine
Prova="prova"
vtkExporter = export.VTKExporter(Prova)
vtkExporter.exportSpheres(ids="all",what=[('pos','b.state.pos')])
vtkExporter.exportFacets(ids="all",what=[('pos','b.state.pos')])
vtkExporter.exportPolyhedra(ids="all",what=[('orientation','b.state.se3')])

Now it seems to work correcttly since it is the same in the View. But maybe you can confirm it to me and help to write it in a smarter way if what I have written above is incorrect.

P.S.
As you can notice I have to use polyhedra instead of box

Cheers

Jonathan

Revision history for this message
Jan Stránský (honzik) said :
#3

Hi Jonathan,

the fix should be available soon in yadedaily (the fix is already in the
trunk version).

could you please post the full example with export.VTKExporter? According
to the lines you provided it should not work :-D

cheers
Jan

2016-05-13 15:13 GMT+02:00 Jonathan Pergoli <
<email address hidden>>:

> Question #293635 on Yade changed:
> https://answers.launchpad.net/yade/+question/293635
>
> Jonathan Pergoli posted a new comment:
> Hi Jan!
>
> I have installed both yadedaily from package and yade-1.07.0 from
> source.
>
> Maybe I have solved the problem using VTKExport from the export module:
> - in the engine
> PyRunner(command='vtkExporter.exportPolyhedra()',iterPeriod=2500),
> PyRunner(command='vtkExporter.exportSpheres()',iterPeriod=2500),
> PyRunner(command='vtkExporter.exportFacets()',iterPeriod=2500),
> - out of the engine
> Prova="prova"
> vtkExporter = export.VTKExporter(Prova)
> vtkExporter.exportSpheres(ids="all",what=[('pos','b.state.pos')])
> vtkExporter.exportFacets(ids="all",what=[('pos','b.state.pos')])
> vtkExporter.exportPolyhedra(ids="all",what=[('orientation','b.state.se3')])
>
> Now it seems to work correcttly since it is the same in the View. But
> maybe you can confirm it to me and help to write it in a smarter way if
> what I have written above is incorrect.
>
> P.S.
> As you can notice I have to use polyhedra instead of box
>
> Cheers
>
> Jonathan
>
> --
> 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 : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Jonathan Pergoli (j812p89) said :
#4

ahahahah lol

# Ground
s=ymport.textExt('Prova3',format='x_y_z_r')
sphere=O.bodies.append(s)

# Container
c=geom.facetCylinder((0,0,.2),radius=.75,height=.4,segmentsNumber=100,wallMask=6,material="gravel")
O.bodies.append(c)

# Polyhedra
p=utils.polyhedron((v1,v2,v3,v4,v5,v6,v7,v8),fixed=False,color=(.6,.45,0),material="MLI",wire=False)
O.bodies.append(p)

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Polyhedra_Aabb()]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Sphere_Polyhedra_ScGeom()],
  [Ip2_FrictMat_FrictMat_MindlinPhys(en=MatchMaker(matches=((gravel,MLI,.6),(gravel,gravel,.55))),es=MatchMaker(matches=((gravel,MLI,.6),(gravel,gravel,.55))),krot=3)],
  [Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True)]
 ),
 NewtonIntegrator(gravity=(0,0,-9.81),damping=.2),
 PyRunner(command='vtkExporter.exportFacets()',iterPeriod=2500)
 PyRunner(command='vtkExporter.exportPolyhedra()',iterPeriod=2500),
 PyRunner(command='vtkExporter.exportSpheres()',iterPeriod=2500)
]

O.dt=.5*PWaveTimeStep()

Revision history for this message
Best Jan Stránský (honzik) said :
#5

Thanks for the script, with Polyhedra it work, but not with boxes :-)
cheers
Jan

2016-05-13 16:08 GMT+02:00 Jonathan Pergoli <
<email address hidden>>:

> Question #293635 on Yade changed:
> https://answers.launchpad.net/yade/+question/293635
>
> Jonathan Pergoli posted a new comment:
> ahahahah lol
>
> # Ground
> s=ymport.textExt('Prova3',format='x_y_z_r')
> sphere=O.bodies.append(s)
>
> # Container
>
> c=geom.facetCylinder((0,0,.2),radius=.75,height=.4,segmentsNumber=100,wallMask=6,material="gravel")
> O.bodies.append(c)
>
> # Polyhedra
>
> p=utils.polyhedron((v1,v2,v3,v4,v5,v6,v7,v8),fixed=False,color=(.6,.45,0),material="MLI",wire=False)
> O.bodies.append(p)
>
> O.engines=[
> ForceResetter(),
>
> InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Polyhedra_Aabb()]),
> InteractionLoop(
>
> [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Sphere_Polyhedra_ScGeom()],
>
> [Ip2_FrictMat_FrictMat_MindlinPhys(en=MatchMaker(matches=((gravel,MLI,.6),(gravel,gravel,.55))),es=MatchMaker(matches=((gravel,MLI,.6),(gravel,gravel,.55))),krot=3)],
> [Law2_ScGeom_MindlinPhys_Mindlin(includeMoment=True)]
> ),
> NewtonIntegrator(gravity=(0,0,-9.81),damping=.2),
> PyRunner(command='vtkExporter.exportFacets()',iterPeriod=2500)
> PyRunner(command='vtkExporter.exportPolyhedra()',iterPeriod=2500),
> PyRunner(command='vtkExporter.exportSpheres()',iterPeriod=2500)
> ]
>
> O.dt=.5*PWaveTimeStep()
>
> --
> 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 : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Jonathan Pergoli (j812p89) said :
#6

Thanks Jan Stránský, that solved my question.