CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] Overlay scatter plot of experimental data on 'plot over line' in ParaView (https://www.cfd-online.com/Forums/paraview/121508-overlay-scatter-plot-experimental-data-plot-over-line-paraview.html)

gcengineer July 30, 2013 07:58

Overlay scatter plot of experimental data on 'plot over line' in ParaView
 
I have experimental data of velocity and position (x, V) in a text file in two-column format:

# x (mm) V (m/s)
1.2 -0.081
2.2 -0.115
3.2 -0.124

In ParaView 3.12, how do I overlay a scatter plot of this data on a 'plot over line' of the same quantity that I have already created?

Thanks.

gonpe July 31, 2013 11:37

I don't quite remember the intricacies of 3.12, but you should be able to read in the data file as a csv file. So, fields separated by commas. x-axis values in the first column ... other data in the following.

Change the focus to the 2D plot pane and activate the visibility on the newly read in data.

That should do it.

Good luck!
Goncalo

gcengineer August 2, 2013 18:45

Overlay scatter plot of experimental data on 'plot over line' in ParaView Reply to Th
 
Thank you for your response.

Yes. The ERCOFTAC test data files (e.g., mv_z0_50_lo.dat) must be modified to add y,z coordinates and stored as a csv file. Then the data can be overlaid with the Plot Data filter in ParaView. (Plot Data might also accept a space-delimited file, but I did not do it that way.)

Note that ParaView does not include a scale factor for Plot Data so the test data position in millimeter must also be manually converted to meter. I also stripped the first few comment lines from the .dat file, but I can't say this is necessary.

Thanks again.

gonpe August 6, 2013 14:26

You could use the transform filter to scale your values too ... no messy pre-processing required :)

Goncalo

gcengineer August 6, 2013 19:35

I will look at that. Thanks for the tip.


All times are GMT -4. The time now is 07:37.