CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] Plot over line question (https://www.cfd-online.com/Forums/paraview/130191-plot-over-line-question.html)

RodriguezFatz February 21, 2014 05:12

Plot over line question
 
2 Attachment(s)
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:
Attachment 28802

The plot over line is always equally sampled:
Attachment 28803


Thanks for any help!
Philipp.

wyldckat February 22, 2014 10:52

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

alexeym February 22, 2014 11:38

1 Attachment(s)
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.

wyldckat February 22, 2014 11:57

Hi Alexey,
Quote:

Originally Posted by alexeym (Post 476219)
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

RodriguezFatz February 24, 2014 03:02

Quote:

Originally Posted by wyldckat (Post 476212)
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!!!

Carla September 3, 2014 06:28

Quote:

Originally Posted by wyldckat (Post 476212)
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

wyldckat October 12, 2014 13:36

1 Attachment(s)
Greetings Carla and welcome to the forum!

Quote:

Originally Posted by Carla (Post 508922)
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 ;)):

http://www.cfd-online.com/Forums/att...1&d=1413135364

Best regards,
Bruno

Hueto November 3, 2014 08:57

Quote:

Originally Posted by wyldckat (Post 476212)
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

wyldckat April 6, 2015 14:03

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

Saideep April 28, 2017 07:19

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


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