CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Best way to represent, store, and visualize surfaces?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 11, 2016, 16:06
Default Best way to represent, store, and visualize surfaces?
  #1
Senior Member
 
Pete Bachant
Join Date: Jun 2012
Location: Boston, MA
Posts: 173
Rep Power: 13
pbachant is on a distinguished road
I am looking for a way to store and visualize the 1/4 chord (point or vector) and planform areas (rectangles) of some actuator lines I am creating in some OpenFOAM code. What would be the best way to do this, such that when I open the case with paraFoam, I can see how this geometry is oriented at each time step?

Note that these geometric entities are not really associated with the mesh, and the main goal is really to create animations that can integrate with visualizations of other OpenFOAM data, e.g., flow velocity.
__________________
Home | Twitter | GitHub
pbachant is offline   Reply With Quote

Old   January 12, 2016, 07:19
Default
  #2
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
[QUOTE]
...and visualize the 1/4 chord (point or vector) and planform areas (rectangles) of some actuator lines...
[\QUOTE]

I've written a legacy VTK POLYDATA writer for my geometrical mess. I would suggest you to try using the VTK library, and find the appropriate classes that can represent your geometries. If you have a lot of vectors you can use the arrow glyphs there and the rectangles can be represented as vtkPolydata : polygon soup.

Either that, or read about the VTK legacy formats and implement your own OpenFOAM class that writes the stuff out.

Whichever option you choose, in the end, on the OpenFOAM side, be sure to inherit from regIOobject to make sure you can control the IO from controlDict, and extend the file names with zeroes, so that ParaView can read them as a sequence. This way you can convert the case to VTK with foamToVTK and visualize your geometry evolve together with an OpenFOAM simulatio case.
__________________
When asking a question, prepare a SSCCE.
tomislav_maric is offline   Reply With Quote

Old   January 12, 2016, 12:15
Default
  #3
Senior Member
 
Pete Bachant
Join Date: Jun 2012
Location: Boston, MA
Posts: 173
Rep Power: 13
pbachant is on a distinguished road
Did you look into using OpenFOAM's vtkSurfaceWriter? It seems to be able to write a pointField and faceList. Do you know off hand if these are convenient objects for small lists (N < 100) of points and rectangles?
__________________
Home | Twitter | GitHub
pbachant is offline   Reply With Quote

Old   January 13, 2016, 07:52
Default
  #4
Senior Member
 
Tomislav Maric
Join Date: Mar 2009
Location: Darmstadt, Germany
Posts: 284
Blog Entries: 5
Rep Power: 21
tomislav_maric is on a distinguished road
Quote:
Originally Posted by pbachant View Post
Did you look into using OpenFOAM's vtkSurfaceWriter? It seems to be able to write a pointField and faceList. Do you know off hand if these are convenient objects for small lists (N < 100) of points and rectangles?
I've looked into vtkSurfaceWriter, but the requirement of using a pointField and a faceList was what made it not useful for my purposes. I have geometrical data that changes size significantly as it evolves, and the sizes are large, so I needed to test out different datastructures..

From my experience, for small and/or constant size lists vtkSurfaceWriter worked fine.
__________________
When asking a question, prepare a SSCCE.
tomislav_maric is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 19:47.