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

Visualize custom results in ParaView

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By akidess

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 29, 2019, 10:35
Default Visualize custom results in ParaView
  #1
Member
 
David Andersson
Join Date: Oct 2019
Posts: 46
Rep Power: 7
sippanspojk is on a distinguished road
Hi all,

I've written my own functionObject that is producing some results (scalar value) for each face of some specified patches that I save in a List<double>.

I would like to visualize these results in ParaView and my question is how?

I would guess that I need to save the result in some kind of field (e.g. surfaceScalarField) instead of a list to make this possible. If that's the case my next question is - how do I do that?

Thankful for any help on this!

Cheers,
david

Last edited by sippanspojk; December 12, 2019 at 05:24.
sippanspojk is offline   Reply With Quote

Old   December 12, 2019, 05:28
Default
  #2
Member
 
David Andersson
Join Date: Oct 2019
Posts: 46
Rep Power: 7
sippanspojk is on a distinguished road
Is there someone out there who knows how I can solve this problem?

I was starting to modify the pimpleFoam solver so it would create a custom field for me and I was at one point thinking that I should do all computations within the solver instead of in my functionObject. But then I realized that I will loose functionality that I need, e.g. being able to specify what patches that should be included in the computations. So I am pretty convinced that I should do this in a functionObject and then figure out a way to visualize this in ParaView.


I am really in need for help on this one!

cheers
sippanspojk is offline   Reply With Quote

Old   December 13, 2019, 04:19
Default
  #3
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
You can visualize any point field in ParaView. Just create a text data file with structure [X Y Z VALUE]. After loading the file, use the "Table to Points" filter to get a 3D render view of the point cloud data. To get a plane from the point cloud, use the "Delauney" filter.
vivek05 likes this.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   December 13, 2019, 07:04
Default
  #4
Member
 
David Andersson
Join Date: Oct 2019
Posts: 46
Rep Power: 7
sippanspojk is on a distinguished road
Quote:
Originally Posted by akidess View Post
You can visualize any point field in ParaView. Just create a text data file with structure [X Y Z VALUE]. After loading the file, use the "Table to Points" filter to get a 3D render view of the point cloud data. To get a plane from the point cloud, use the "Delauney" filter.
Thank you so much, this is exactly what I need.

But a question - what is the exact format? Because I tried it out with a txt file whit the format "xCoord yCoord zCoord value" but it didn't work to convert from table to point. I could load the file in ParaView and the table looked as it should but I couldn't convert it.

I got the following messages in paraview:
"Failed to locate the columns to use for the point coordinates"

I guess it interperate the text file as a file with many rows and only one column?

EDIT:
I solved it by comma seperation and some other settings in ParaView.
I managed to plot the center point of each cell with it's corresponding value. I applied the Dulaney 2d Filter as you suggested and that basically created a mesh using the points. If I instead would like to use the initial mesh and give the same value as the center point to the whole face, how would I do that? Can I in a similar way define a face and a value in text format and convert table to face?

Last edited by sippanspojk; December 13, 2019 at 08:51.
sippanspojk is offline   Reply With Quote

Reply

Tags
functionobjects, paraview, visualize


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM] how to visualize mapped data using ParaView ggulgulia ParaView 2 April 16, 2019 05:40
[General] Who ever loaded CFL3D results, plot3d format, in paraview? northfly ParaView 0 April 11, 2018 23:04
[OpenFOAM] Visualize a faceZone in paraView CellZone ParaView 2 January 18, 2017 11:20
Regarding regIOobjectRead.C at line 73 error while converting results to paraview hhh OpenFOAM Post-Processing 5 November 24, 2016 03:45
[OpenFOAM] how to visualize using paraView KeiJun ParaView 1 March 12, 2016 15:36


All times are GMT -4. The time now is 16:52.