# Validation Study: How do I plot wind tunnel data (*.dat) in Paraview

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 28, 2011, 14:33 Validation Study: How do I plot wind tunnel data (*.dat) in Paraview #1 Member   Alex Join Date: Jun 2010 Location: Planet Earth Posts: 43 Rep Power: 16 I'm new to CFD openFOAM so I'm running through a validation case to sharpen my skills. The windtunnel data for the Ahmed Body is taken from here The *.dat files contain data points for given planes. How to I plot them and interpolate it over the plane to compare my results to the windtunnel?

August 3, 2011, 10:27
#2
Member

Alex
Join Date: Jun 2010
Location: Planet Earth
Posts: 43
Rep Power: 16
Update:

Ok I managed to import the data after cleaning it up a little in excel and saving it as a CSV file (comma delimited)

Paraview can open CSV files as a table. Then I applied the Filter > TableToPoints to get points. However I wasn't able to see them until I clicked on the split "horizontal button" on the right and chose a 3D view.

Now I have the points where I want them, but I can't manage to get a surface from the points. Any ideas?
Attached Images
 Screenshot.jpg (53.2 KB, 93 views)

Last edited by bigbang; August 3, 2011 at 11:27. Reason: wrong procedure described to reach goal

August 4, 2011, 14:15
matlab to the rescue
#3
Member

Alex
Join Date: Jun 2010
Location: Planet Earth
Posts: 43
Rep Power: 16
OK so I finally managed to get a surface from my points.

Unfortunately it was not by means of free software. I used matlab to interpolate the points over a structured grid and then plotted the result. First you must load your data into matlab under 3 arrays. I used 'x', 'y' and 'z'. Where x and y were the coordinates and z was the magnitude of the velocity.

Code:
```ti = -250:1:250;
tj = 28:1:538;
[qx,qy] = meshgrid (ti,tj);
F = TriScatteredInterp(x,y,z);
qz = F(qx,qy);
R = maprasterref();
mapshow(qz, R, 'DisplayType', 'surface');```
And after adjusting the plot using plotting tools you can see the attached result.
Attached Images
 ahmedBody25_data_YZ_X0.jpg (21.3 KB, 58 views)

 August 5, 2011, 03:30 #4 Senior Member     Anton Kidess Join Date: May 2009 Location: Germany Posts: 1,377 Rep Power: 30 Alex, have you tried the TableToStructuredGrid filter instead of TableToPoints?

August 5, 2011, 08:00
#5
Member

Alex
Join Date: Jun 2010
Location: Planet Earth
Posts: 43
Rep Power: 16
Yes. Unfortunately I get a long error message about the number of rows.

I imported my data from CSV and it all comes in clean with the headers. There are 911 datapoints.

Then I select the TableToStructuredGrid filter and enter the range of my data and select the columns for x, y and z coordinates:
x {0,0}
y {-250,250}
z {28, 538}

I apply and get the following error:

Code:
```ERROR: In /home/opencfd/OpenFOAM/ThirdParty-2.0.0/ParaView-3.10.1/VTK/Graphics/vtkTableToStructuredGrid.cxx, line 97
vtkPTableToStructuredGrid (0x2621f90): The input table must have exactly 256011 rows. Currently it has 911 rows.

ERROR: In /home/opencfd/OpenFOAM/ThirdParty-2.0.0/ParaView-3.10.1/VTK/Filtering/vtkExecutive.cxx, line 756
vtkPVCompositeDataPipeline (0x2623220): Algorithm vtkPTableToStructuredGrid(0x2621f90) returned failure for request: vtkInformation (0x26ccb40)
Debug: Off
Modified Time: 82398
Reference Count: 1
Registered Events: (none)
Request: REQUEST_DATA
ALGORITHM_AFTER_FORWARD: 1
FROM_OUTPUT_PORT: 0
FORWARD_DIRECTION: 0

ERROR: In /home/opencfd/OpenFOAM/ThirdParty-2.0.0/ParaView-3.10.1/VTK/Graphics/vtkTableToStructuredGrid.cxx, line 97
vtkPTableToStructuredGrid (0x2621f90): The input table must have exactly 256011 rows. Currently it has 911 rows.

ERROR: In /home/opencfd/OpenFOAM/ThirdParty-2.0.0/ParaView-3.10.1/VTK/Filtering/vtkExecutive.cxx, line 756
vtkPVCompositeDataPipeline (0x2623220): Algorithm vtkPTableToStructuredGrid(0x2621f90) returned failure for request: vtkInformation (0x26cc300)
Debug: Off
Modified Time: 85434
Reference Count: 1
Registered Events: (none)
Request: REQUEST_DATA
ALGORITHM_AFTER_FORWARD: 1
FROM_OUTPUT_PORT: 0
FORWARD_DIRECTION: 0

ERROR: In /home/opencfd/OpenFOAM/ThirdParty-2.0.0/ParaView-3.10.1/VTK/Graphics/vtkTableToStructuredGrid.cxx, line 97
vtkPTableToStructuredGrid (0x2621f90): The input table must have exactly 256011 rows. Currently it has 911 rows.

ERROR: In /home/opencfd/OpenFOAM/ThirdParty-2.0.0/ParaView-3.10.1/VTK/Filtering/vtkExecutive.cxx, line 756
vtkPVCompositeDataPipeline (0x2623220): Algorithm vtkPTableToStructuredGrid(0x2621f90) returned failure for request: vtkInformation (0x26cc300)
Debug: Off
Modified Time: 85468
Reference Count: 1
Registered Events: (none)
Request: REQUEST_DATA
ALGORITHM_AFTER_FORWARD: 1
FROM_OUTPUT_PORT: 0
FORWARD_DIRECTION: 0

ERROR: In /home/opencfd/OpenFOAM/ThirdParty-2.0.0/ParaView-3.10.1/VTK/Graphics/vtkTableToStructuredGrid.cxx, line 97
vtkPTableToStructuredGrid (0x2621f90): The input table must have exactly 256011 rows. Currently it has 911 rows.

ERROR: In /home/opencfd/OpenFOAM/ThirdParty-2.0.0/ParaView-3.10.1/VTK/Filtering/vtkExecutive.cxx, line 756
vtkPVCompositeDataPipeline (0x2623220): Algorithm vtkPTableToStructuredGrid(0x2621f90) returned failure for request: vtkInformation (0x26cc300)
Debug: Off
Modified Time: 85506
Reference Count: 1
Registered Events: (none)
Request: REQUEST_DATA
ALGORITHM_AFTER_FORWARD: 1
FROM_OUTPUT_PORT: 0
FORWARD_DIRECTION: 0

Warning: In /home/opencfd/OpenFOAM/ThirdParty-2.0.0/ParaView-3.10.1/VTK/Filtering/vtkDataObject.cxx, line 910
vtkTable (0x2549d40): Attempted to ShallowCopy from null.```
Attached Images
 step1.jpg (62.1 KB, 39 views) step2.jpg (61.4 KB, 34 views)

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post littlelz CFX 4 June 11, 2009 05:51 ND FLUENT 0 April 7, 2006 07:43 zi FLUENT 1 August 5, 2005 18:19 Pandu CFX 3 May 19, 2003 21:49 Mike Worthey Main CFD Forum 0 June 6, 2000 02:27

All times are GMT -4. The time now is 13:47.