CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] Plot over line question

Register Blogs Community New Posts Updated Threads Search

Like Tree22Likes
  • 20 Post By wyldckat
  • 2 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 21, 2014, 05:12
Default Plot over line question
  #1
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Hi all,

I really don't know how to explain this:
Is there any way to get a "plot over line" plot, where only the cell center values of a cell are shown? I want to see the numerical (spatial) resolution of my grid in the plot, to see if all calculated curves are sampled sufficiently.

Basically, I want exactly what I get when I do an x-y-plot in Ansys Fluent.

In the surface plot you can see the cell size / spatial resolution:
surface_plot.jpg

The plot over line is always equally sampled:
plot_over_line.jpg


Thanks for any help!
Philipp.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   February 22, 2014, 10:52
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Philipp,

Took me a while to think about this, but I believe I know what you're looking for. The steps should be as follows:
  1. Apply the "Slice" filter, along the direction of your original line.
  2. Apply a second "Slice" filter, applied to the first one, along the location of the intended line.
  3. You should now have the same line you originally intended, but with some extra information that the "Plot over line" doesn't give you, namely the "Cell Data". This is because "Plot over line" does interpolation into point data.
  4. Now, apply the filter "Plot data" to the second slice.
  5. In the... I think it's the "Display" tab (writing from memory here ), you can choose to plot the cell data, instead of the point data.
And that should be the solution for your question!

Best regards,
Bruno
bigphil, kiddmax, Tobi and 17 others like this.
__________________
wyldckat is offline   Reply With Quote

Old   February 22, 2014, 11:38
Default
  #3
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Maybe you are looking for 'Point Data To Cell Data' filter? I've attached comparison of the Plot Over Line with and without applying the filter. Steps in the plot over line after point data to cell data correspond to the cells of the mesh.
Attached Images
File Type: jpg Capture d’écran 2014-02-22 à 17.32.07.jpg (35.1 KB, 641 views)
alexeym is offline   Reply With Quote

Old   February 22, 2014, 11:57
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Alexey,
Quote:
Originally Posted by alexeym View Post
Maybe you are looking for 'Point Data To Cell Data' filter? I've attached comparison of the Plot Over Line with and without applying the filter. Steps in the plot over line after point data to cell data correspond to the cells of the mesh.
Be very careful with that filter, because that filter interpolates the data from points to cells. And interpolating twice (cell -> point -> cell) does not necessarily give you the same exact original data.

Best regards,
Bruno
Tobi and bentkj like this.
__________________
wyldckat is offline   Reply With Quote

Old   February 24, 2014, 03:02
Default
  #5
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Quote:
Originally Posted by wyldckat View Post
Greetings Philipp,

Took me a while to think about this, but I believe I know what you're looking for. The steps should be as follows:
  1. Apply the "Slice" filter, along the direction of your original line.
  2. Apply a second "Slice" filter, applied to the first one, along the location of the intended line.
  3. You should now have the same line you originally intended, but with some extra information that the "Plot over line" doesn't give you, namely the "Cell Data". This is because "Plot over line" does interpolation into point data.
  4. Now, apply the filter "Plot data" to the second slice.
  5. In the... I think it's the "Display" tab (writing from memory here ), you can choose to plot the cell data, instead of the point data.
And that should be the solution for your question!

Best regards,
Bruno
Great Bruno, that worked in a minute!!!
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   September 3, 2014, 06:28
Default
  #6
New Member
 
Carla Ubbink
Join Date: Sep 2014
Posts: 5
Rep Power: 11
Carla is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings Philipp,

Took me a while to think about this, but I believe I know what you're looking for. The steps should be as follows:
  1. Apply the "Slice" filter, along the direction of your original line.
  2. Apply a second "Slice" filter, applied to the first one, along the location of the intended line.
  3. You should now have the same line you originally intended, but with some extra information that the "Plot over line" doesn't give you, namely the "Cell Data". This is because "Plot over line" does interpolation into point data.
  4. Now, apply the filter "Plot data" to the second slice.
  5. In the... I think it's the "Display" tab (writing from memory here ), you can choose to plot the cell data, instead of the point data.
And that should be the solution for your question!

Best regards,
Bruno
Hi Bruno,

Thank you so much for your help. I have tried this, but would really like to plot the cell data vs the y-coordinates ( Points (1) ). Do you know of a way?

Thanks,
Carla
Carla is offline   Reply With Quote

Old   October 12, 2014, 13:36
Default
  #7
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Carla and welcome to the forum!

Quote:
Originally Posted by Carla View Post
Thank you so much for your help. I have tried this, but would really like to plot the cell data vs the y-coordinates ( Points (1) ). Do you know of a way?
Sorry for the very late reply, but only did I manage to get to your question. I believe the following image pretty much answers your question (Note: you have to log-in to see the picture ):



Best regards,
Bruno
Attached Images
File Type: jpg Screenshot from 2014-10-12 18:33:40.jpg (56.0 KB, 2311 views)
__________________

Last edited by wyldckat; October 12, 2014 at 13:38. Reason: added "Note:"
wyldckat is offline   Reply With Quote

Old   November 3, 2014, 08:57
Default
  #8
New Member
 
Alejandro Martinez-Cava
Join Date: Oct 2012
Posts: 1
Rep Power: 0
Hueto is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings Philipp,

Took me a while to think about this, but I believe I know what you're looking for. The steps should be as follows:
  1. Apply the "Slice" filter, along the direction of your original line.
  2. Apply a second "Slice" filter, applied to the first one, along the location of the intended line.
  3. You should now have the same line you originally intended, but with some extra information that the "Plot over line" doesn't give you, namely the "Cell Data". This is because "Plot over line" does interpolation into point data.
  4. Now, apply the filter "Plot data" to the second slice.
  5. In the... I think it's the "Display" tab (writing from memory here ), you can choose to plot the cell data, instead of the point data.
And that should be the solution for your question!

Best regards,
Bruno
Hi Bruno,

Thank you for your advice in this post, is really helping me to understand how Paraview works

I still have a doubt that I hope you can solve:
Basically I would like to retrieve Boundary Layer data using Paraview, and obviously 'Plot Over Line' is not the correct choice.
The thing is that if I use the 'Slice' filter over a normal line from the surface, the conflict could appear if the 'slicing line' does not follow a perfect normal direction from the surface.
Retrieving cell data in that way can imply the appearance of noise, can't it?

Thank you in advance.

Alex
Hueto is offline   Reply With Quote

Old   April 6, 2015, 14:03
Default
  #9
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Alex and welcome to posting on the forum!

Sorry, but only today did I finally manage to look into your question. Essentially the solution is that you should:
  1. Use the filter "Extract Cells by Region" to extract only the cells you want to measure.
  2. Then use the filter "Plot Data" on that result, and don't forget to choose the "Cell Data" data type, so that you can see the accurate result of the values for the centres of the cells.
The other possibility is to:
  1. Select the cells with the face selection tool, as shown here: http://www.paraview.org/Wiki/index.p...ev&oldid=57405
  2. Then use the "Extract Selection" filter.
  3. Then use the filter "Plot Data" on that result.
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   April 28, 2017, 07:19
Default
  #10
Senior Member
 
Saideep
Join Date: Apr 2015
Location: INDIA
Posts: 203
Rep Power: 12
Saideep is on a distinguished road
Hi Bruno and others;

I am trying to analyze flow in a channel and I am looking at the velocity field at various locations in the channel domain.
I see some bumps along my plot over line and guess it is only because of the interpolation of the cell data's along the line.

I have tried several combinations of Bruno's 5 step advice but was unsuccessful. I guess I am doing something wrong straight away.

1. I initially upload my .VTK file

2. Now, I can slice a section,
-> How can you apply another slice over this? I tried and it shows nothing which isnt surprising for me.
What have I understood wrong here?

Thanks;
Saideep
Saideep 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unknown function type pressureTools Dorian1504 OpenFOAM Post-Processing 23 May 25, 2021 09:24
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' muth OpenFOAM Running, Solving & CFD 3 August 27, 2018 04:18
[OpenFOAM] could not open file .vtk in paraview ali_atrian ParaView 8 August 27, 2014 10:31
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 09:56
Problems of Duns Codes! Martin J Main CFD Forum 8 August 14, 2003 23:19


All times are GMT -4. The time now is 06:50.