CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

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

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 28, 2011, 15:33
Question 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: 15
bigbang is on a distinguished road
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?
bigbang is offline   Reply With Quote

Old   August 3, 2011, 11:27
Default
  #2
Member
 
Alex
Join Date: Jun 2010
Location: Planet Earth
Posts: 43
Rep Power: 15
bigbang is on a distinguished road
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
File Type: jpg Screenshot.jpg (53.2 KB, 92 views)

Last edited by bigbang; August 3, 2011 at 12:27. Reason: wrong procedure described to reach goal
bigbang is offline   Reply With Quote

Old   August 4, 2011, 15:15
Default matlab to the rescue
  #3
Member
 
Alex
Join Date: Jun 2010
Location: Planet Earth
Posts: 43
Rep Power: 15
bigbang is on a distinguished road
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
File Type: jpg ahmedBody25_data_YZ_X0.jpg (21.3 KB, 58 views)
bigbang is offline   Reply With Quote

Old   August 5, 2011, 04:30
Default
  #4
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Alex, have you tried the TableToStructuredGrid filter instead of TableToPoints?
akidess is offline   Reply With Quote

Old   August 5, 2011, 09:00
Default
  #5
Member
 
Alex
Join Date: Jun 2010
Location: Planet Earth
Posts: 43
Rep Power: 15
bigbang is on a distinguished road
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
File Type: jpg step1.jpg (62.1 KB, 39 views)
File Type: jpg step2.jpg (61.4 KB, 34 views)
bigbang is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to consider perforated wind tunnel wall in CFD simulation littlelz CFX 4 June 11, 2009 06:51
Virtual Wind Tunnel in FLUENT ND FLUENT 0 April 7, 2006 08:43
Wind Tunnel Experiment Validation zi FLUENT 1 August 5, 2005 19:19
Wind tunnel modeling Pandu CFX 3 May 19, 2003 22:49
Wind Tunnel Website now online Mike Worthey Main CFD Forum 0 June 6, 2000 03:27


All times are GMT -4. The time now is 05:21.