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

extracting velocity field from 0/U file into matrix format

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By ssss

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 3, 2014, 11:17
Question extracting velocity field from 0/U file into matrix format
  #1
Member
 
Gowain
Join Date: May 2014
Location: Ireland
Posts: 86
Rep Power: 11
eaglemckenna is on a distinguished road
Hi

Does anyone know a methodology or is there a command or scrip in OF to extract the velocity components from the final time step U file into column matrix format? It is not feasible to do this manually due to the number of rows as well as the parenthesis. I intend to perform numerical analysis on the data.

thanks
g
eaglemckenna is offline   Reply With Quote

Old   November 3, 2014, 14:01
Default
  #2
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 12
ssss is on a distinguished road
Maybe this helps but it's not a decent way of doing it:

1) Go to paraView, last time step
2) Go to file save data
3) Save it in csv
4) Open the csv you will see some columns with {U:0} {U:1} {U:2} this are the velocity components.

Hope it helps.
eaglemckenna likes this.
ssss is offline   Reply With Quote

Old   November 4, 2014, 06:43
Smile
  #3
Member
 
Gowain
Join Date: May 2014
Location: Ireland
Posts: 86
Rep Power: 11
eaglemckenna is on a distinguished road
Thanks so much
Apologies for such an obvious question.
eaglemckenna is offline   Reply With Quote

Old   November 5, 2014, 11:29
Arrow
  #4
Member
 
Gowain
Join Date: May 2014
Location: Ireland
Posts: 86
Rep Power: 11
eaglemckenna is on a distinguished road
Greeting fellow CFD users.

I have created an algorithm to determine POD velocity basis vector for x and y components at each node point for a 2d mesh for 9 observations with Matlab.
I have a column vector x denoting the x co-ordinates at each node and a column vector y for the y co-ordinates.
plot(x,y) gives me the 2d domain.
I have a column vector r denoting the resulting velocity of x and y at each node.
Now all I need to do is map the resultant velocity vector at each node onto the back onto the 2d grid.
What is the command to do this?
I have tried meshgrid, and ndgrid but have no success as of yet.
kind regards
gowain
eaglemckenna is offline   Reply With Quote

Reply


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
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 06:42
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 11:44
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 10:23
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00


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