Visualize custom results in ParaView
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 |
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 |
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.
|
Quote:
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? |
All times are GMT -4. The time now is 13:40. |