CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Paraview & paraFoam (http://www.cfd-online.com/Forums/openfoam-paraview/)
-   -   Plot over line question (http://www.cfd-online.com/Forums/openfoam-paraview/130191-plot-over-line-question.html)

RodriguezFatz February 21, 2014 06: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 11: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 12: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 12: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 04: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 07: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 14: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 09: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


All times are GMT -4. The time now is 02:45.