I want to extract the data from the boundary surface of a cylinder (in a .vtu file) and plot it onto a plane, where the coordinates are theta (rotation angle) and Z(height) of the cylinder. I know that this could be done in many ways, but i am looking for a simple clean solution, using Paraview, python or both (i.e. a python macro in paraview)

  • I tried using the ExtractSurface option to export the outer points with their data, but for some reason, some "volume" points (i mean points not on the domain boundary) are also exported

  • I wrote a Python script using the VTK package to parse my input data file,then grab the cartesian coordinates, transform it to polar coordinates and finally take the boundary points using a condition on the radius. Although this works, it is not flawless because boundary points are not positioned "exactly" on the maximum radius but rather within an radius interval (diffuse interface)

Is there any way to use paraview filters to get the job done ? I also checked the Programmable filter option, tried some tutorial examples, but I find it complicated somehow.

Any suggestions or ideas ?

  • $\begingroup$ Is it possible to share your data set? The Extract Surface filter is quite robust but in parallel for unstructured grids it can have difficulties due to not having ghost information to figure out what cells have sides on the boundary. As a side note, even once you have the boundary properly extracted you will need to split cells that cross the theta value you choose for "unrolling" the boundary unless all of the edges of the 2D cells line up along this split location. Even with this you'll need to create a copy of the points. Programmable filter is probably your best choice in ParaView. $\endgroup$
    – andybauer
    Aug 21 '14 at 3:38
  • $\begingroup$ I am actually surprised that this feature is not implemented. The dataset can be downloaded here drive.google.com/file/d/0B56IjspqMe1id2RuZ3pYNWhSM2M/… $\endgroup$
    – SAAD
    Aug 21 '14 at 10:31
  • $\begingroup$ I tried the Extract surface filter in your dataset, and it seems to work for me. Can you use an image for showing us what you get and why it is wrong? $\endgroup$
    – nicoguaro
    Aug 21 '14 at 17:23

The best way I can think of doing it without doing any C++ or Python programming is the following steps, all with a serial run of ParaView:

  1. Use the Extract Surface filter
  2. Use either selections or clip filter to get rid of the caps of the cylinder (optional but better for viewing)
  3. Use a Clip filter to cut away the positive X side of the cylinder
  4. Use the Calculator filter to unroll this half of the cylinder boundary (check Coordinate Results to do this)
  5. From the output of 1 or 2, use a clip filter to cut away the negative X side of the cylinder
  6. Use the Calculator filter to unroll the half of the cylinder boundary output from 5
  7. Highlight both Calculator filters and then use the Append Datasets filter to stitch them back together (not necessary for viewing but probably useful for analysis)
  • $\begingroup$ I could easily project the curved surface to a plane using 0*iHat+coordsY*jHat+coordsZ*kHat but how to do the "unrolling" ? should I use a transformation ? $\endgroup$
    – SAAD
    Aug 21 '14 at 17:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.