CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   XY curved plot with Paraview (https://www.cfd-online.com/Forums/openfoam/73832-xy-curved-plot-paraview.html)

nunoloureiro March 18, 2010 04:51

XY curved plot with Paraview
 
Hi all,

I have two questions regarding the way one can get results with a Line Plot in Paraview:

1- I want to measure a quantity over a curved line but the filter I find in Paraview only allows to select 2 points. Is there a way to make this line curved and plot the values in the line?

2- After getting the 2D plot with the filter is it possible to export the data. So I can use it with another program (Excel for example)?

Thanks,

Nuno

nunoloureiro March 18, 2010 05:53

I found the answer for the second question already:
After having the plot, click in the button split horizontal in the up-right corner and then spreadsheet. You should see a table with the points of the plot.
To export go to File->Export and you will have a cvs file wich can be opened in Excel.

Still looking for the answer to the first question...

Nuno

Stylianos March 18, 2010 06:17

You can give a look on pv-meshless (a viration of paraview). There you can insert external point prob files and plot variables on them .
An example of a point prob file is:

#Label X Y Z
PointProbe
P01 2.3955 0.50 0.021

where you can give as many points as you wont.

Stelios

p.s. there are also other type of probs like line,disc etc you can check them out your self and pick what suits your needs.
I usually use a line prob where a number of small line segments gives me the curve i want (thats pretty easy if can export this file directly out of your grid generator).

nunoloureiro March 18, 2010 08:17

Thank you for the answer.

I installed pv-meshless and I am trying to insert the probes. Individual points and the line works fine (just like in PV) but I cannot make a disc.
Is it possible to add a file and import the points where you want to measure? For example it would be nice to generate points on a sphere surface and measure the values there.

I am not sure if this was what you meant with:
Quote:

#Label X Y Z
PointProbe
P01 2.3955 0.50 0.021
If yes, please tell me where I can edit the file.

Thanks,
Nuno

Stylianos March 18, 2010 09:03

A typical prob file for disc is:

#Label X Y Z Nx Ny Nz out-radius in-radius
DiskProbe
D01 0.0 0.0 -0.165 0.0 0.0 -1.0 0.0 0.0

p.s. Disc with inner radius = 0 for normal installation (to manipulate the inner radius you need to hack vtkProbeReader.cxx)

I Don't think there is a ready to use sphere prob (although it might be there) but you can either create something yourself within PV (and share it with the community :)) or simply create a perl(or whatever) script that creates a pointProb file with the points on a sphere.

Stelios

nunoloureiro March 18, 2010 09:17

I actually found how to do this with the sphere;
You can add a sphere by Sources->Sphere; Then select the Filsters->SPH Probe qnd on the source select the sphere. I works just fine.

But for the disc I didn't quite get it. Where should I add the file you just wrote?
Or what kind of extension should I give it?

Nuno

Stylianos March 18, 2010 09:30

To use a prob file:

1) load the probe file (File --> Open)
2) choose the "Probe Mesh/Meshless DataSet" filter (Filter --> Alphabetical --> Probe Mesh/Meshless DataSet). Input is your object and probe the probe file.

Stelios
p.s. maybe there is something similar to the way you used sphere though.. what ever is easier for you :)

nunoloureiro March 18, 2010 09:50

Quote:

#Label X Y Z Nx Ny Nz out-radius in-radius
DiskProbe
D01 0.0 0.0 -0.165 0.0 0.0 -1.0 0.0 0.0
Thanks for the answers.

With what extension should I save the file of the disc? Since there are just certain files that PV can open.

Stylianos March 18, 2010 09:55

You can use .probe .

Glad to help
Stelios

nunoloureiro March 18, 2010 10:09

sorry but that extension doesn't work for the PV-meshless I have. maybe I am doing something wrong: I just copied the file you gave to a text editor and saved as new.probe. I then tried to load it (File->Open) but it doesn't recognize the file.
Can you tell me how you do it?

Stylianos March 18, 2010 10:14

Actually the extension dose not play any role, its just good just to keep track of everything. file-->open-->files of type -->"All files"-->select probe file --> open

nunoloureiro March 18, 2010 10:31

I am using Windows.. Maybe that is the reason why it does not work. When i try to open the file, after clicking "all files" qnd "OK" it asks for the reader to open the file: "A reader could not be found please selected one: ". There are a lot of possibilities but most of them give errors.
thanks

Stylianos March 18, 2010 10:46

I've never used it under windows so i can't really help. Although i don't think this should be a prob (maybe a versioning think)!

Hope someone else can give you an answer ...
Stelios

nunoloureiro March 18, 2010 11:14

thanks! I'll wait for someone else to answer :)

nunoloureiro April 23, 2010 05:35

Hi all,

I actually found a way of having the points on a circumference slice with paraview. I did this by making a first slice with a sphere and after making a slice of the sphere with a plane.
The advantage of doing this with PV and not pv-meshless is that we can export the points in the end (to excel for exmple). I couldn't find a way of exporting with pv-meshless.

Question: Does anyone know how to increase the number of points of each slice? When I cut the sphere I only get 60 points and I need a lot more to plot a good graph.

Nuno

aerothermal August 25, 2010 18:40

Quote:

Originally Posted by nunoloureiro (Post 250643)
thanks! I'll wait for someone else to answer :)

There is a file type in pv-meshless that is ESPHI-Probe (*.probe).
Use that to load you probe file.

xingyun2013 August 26, 2013 13:16

Hi all,
I have found a way without using pv-meshless. The plot on intersection curve filter would help. First, transfer cell data to point data, then use plot intersection curve filter to create an object(plane,box,or sphere) which intersect with the domain you are interested, the use plot data and you can view the data on this object.


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