CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Exporting velocity fileds data with node number and position (https://www.cfd-online.com/Forums/openfoam-post-processing/185345-exporting-velocity-fileds-data-node-number-position.html)

Bashar March 23, 2017 13:00

Exporting velocity fileds data with node number and position
 
Hi,

I have a question regarding the data export in para-view. I want to export my simulation velocity fields data for a matlab code that compute coherent structures of the turbulent flow. The code needs an input files that contains information regarding node location and respective x and y velocities at required time steps. As shown in the picture, which is taken from the web site :
https://auwaisblog.wordpress.com/author/auwaisblog/

How I can do that in paraview?
Regards,
Bashar

https://auwaisblog.files.wordpress.c...ode1.png?w=840

Joshua14 April 4, 2017 09:40

Bashar,

In paraview you can use a clip or slice to trim down your domain to the desired size you want for exporting. Then go to File -> Save Data. Paraview will then let you save the data you have selected as a *.csv. This will give you the x, y, and z components for location and velocity as well as any other fields.

Joshua

Bashar April 4, 2017 09:44

Quote:

Originally Posted by Joshua14 (Post 643640)
Bashar,



In paraview you can use a clip or slice to trim down your domain to the desired size you want for exporting. Then go to File -> Save Data. Paraview will then let you save the data you have selected as a *.csv. This will give you the x, y, and z components for location and velocity as well as any other fields.



Joshua



Thanks a lot for your help. I need also the node number , is there any way to get that also?



Sent from my iPhone using CFD Online Forum mobile app

Joshua14 April 4, 2017 09:53

Bashar,

It appears another post covers how to do this a few different ways at the following link.

https://www.cfd-online.com/Forums/pa...-paraview.html

The steps I used to do this are as follows.
1. Load case into Paraview and make any cuts, clips, etc...
2. Click the split screen icon and select "spreadsheet view" for the new view

This should then display Point ID, Points (location) and the other fields.

Joshua

Bashar April 4, 2017 10:15

Quote:

Originally Posted by Joshua14 (Post 643645)
Bashar,



It appears another post covers how to do this a few different ways at the following link.



https://www.cfd-online.com/Forums/pa...-paraview.html



The steps I used to do this are as follows.

1. Load case into Paraview and make any cuts, clips, etc...

2. Click the split screen icon and select "spreadsheet view" for the new view



This should then display Point ID, Points (location) and the other fields.



Joshua



Thank you very much Joshua. I will try this today .
Bashar


Sent from my iPhone using CFD Online Forum mobile app

Bashar April 4, 2017 13:34

1 Attachment(s)
Quote:

Originally Posted by Joshua14 (Post 643645)
Bashar,

It appears another post covers how to do this a few different ways at the following link.

https://www.cfd-online.com/Forums/pa...-paraview.html

The steps I used to do this are as follows.
1. Load case into Paraview and make any cuts, clips, etc...
2. Click the split screen icon and select "spreadsheet view" for the new view

This should then display Point ID, Points (location) and the other fields.

Joshua


Hi, Joshua,

Sorry to bother you again. I attached a pictures for what I got. First the spreadsheet gave me the cell ID but with out the coordinate, may be I am doing something wrong?
Also , when I saved the data as *.csv it only give me part of the data not like the informations contained inside the spreadsheet view!
Thank you.
Bashar

Bashar April 4, 2017 13:37

1 Attachment(s)
and here is the *.csv file . Also, just additional information, I made a slice inside my domain, and then open another view with spreadsheet.

Joshua14 April 4, 2017 13:56

Bashar,

First change your attribute from Cell Data to Point Data. Point Data should give you the additional fields.

As far as exporting the data, it appears that save data only saves the geometry and not the spread sheet. At least that was how it is working for me.

I am using Paraview 5.2 and there is a button at the top of the spread sheet that says "export spreadsheet." I use this to export the data. However, after exporting Paraview moves my columns around mid column. II'm not really sure why Paraview is changing these numbers for me. If you know a work around please share.

Hope this helps,
Joshua

Bashar April 4, 2017 14:02

Quote:

Originally Posted by Joshua14 (Post 643676)
Bashar,

First change your attribute from Cell Data to Point Data. Point Data should give you the additional fields.

As far as exporting the data, it appears that save data only saves the geometry and not the spread sheet. At least that was how it is working for me.

I am using Paraview 5.2 and there is a button at the top of the spread sheet that says "export spreadsheet." I use this to export the data. However, after exporting Paraview moves my columns around mid column. II'm not really sure why Paraview is changing these numbers for me. If you know a work around please share.

Hope this helps,
Joshua



Thank you again ! I will try this method.
Regards,
Bashar


Sent from my iPhone using CFD Online Forum mobile app

Bashar April 4, 2017 16:32

Quote:

Originally Posted by Joshua14 (Post 643676)
Bashar,

First change your attribute from Cell Data to Point Data. Point Data should give you the additional fields.

As far as exporting the data, it appears that save data only saves the geometry and not the spread sheet. At least that was how it is working for me.

I am using Paraview 5.2 and there is a button at the top of the spread sheet that says "export spreadsheet." I use this to export the data. However, after exporting Paraview moves my columns around mid column. II'm not really sure why Paraview is changing these numbers for me. If you know a work around please share.

Hope this helps,
Joshua

Joshua , thanks again . I managed to do the export of the whole spreadsheet using :File>export scene..
However, I couldn't get the coordinate (x,y,z) with the points and the velocity filed. I will look for this in this forum.

Many thanks
Bashar

Joshua14 April 4, 2017 16:35

Bashar,

I am sorry I couldn't have been of more help. When you figure it out can you please share what the solution was or where you found it?

Joshua


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