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

Extract velocity field in certain time step to MATLAB

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 9, 2009, 03:55
Default Extract velocity field in certain time step to MATLAB
  #1
New Member
 
Join Date: Apr 2009
Posts: 12
Rep Power: 17
spatialtime is on a distinguished road
Hi,

I have a simulation with different time steps. At the different time steps I want to extract the velocity in a plane (velocity, velocity u and velocity v) to MATLAB. What is the best way to do it? Defining a point and using

Code:
=probe(Velocity)@Point 1
in TABLE cfx postworks for one point for the current time step. However, I need to obtain the velocity in a matrix. I can define a point cloud with rectangular grid, but don't know how to obtain the values in one step and let CFX number them well so it can be easily processed in MATLAB.

I hope to hear from you soon. Thank you in advance.

With kindest regards,
Mab
spatialtime is offline   Reply With Quote

Old   September 9, 2009, 06:21
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Your two options are:
1) Make a set of monitor points to specify the plane and run the simulation. You can then export the values at the monitor points at each timestep in the solver manager.
2) Output a transient results file at every timestep you wish to look at. Export the plane of results from CFD-Post.

Option 2 would use excessive disk space if you want good temporal resolution so I would go with option 1 most of the time. It means you will have zillions of monitor points in your CEL but as long as you don't go overboard it should work OK.
ghorrocks is offline   Reply With Quote

Old   September 9, 2009, 07:24
Default
  #3
New Member
 
Join Date: Apr 2009
Posts: 12
Rep Power: 17
spatialtime is on a distinguished road
Thanks for your reply. First option is not applicable since the simulation is already done (weeks simulation). Second option is my question, how to output the results from CFD-Post.

At the moment this is my method: as explained in my question I have done that for 1 point and made a session file for it. Then I made a MATLAB script to edit the session file (loop, to make a rectangular grid, with the point defined).

The method works but is extremely slow.... Any suggestions?

Quote:
Originally Posted by ghorrocks View Post
Your two options are:
1) Make a set of monitor points to specify the plane and run the simulation. You can then export the values at the monitor points at each timestep in the solver manager.
2) Output a transient results file at every timestep you wish to look at. Export the plane of results from CFD-Post.

Option 2 would use excessive disk space if you want good temporal resolution so I would go with option 1 most of the time. It means you will have zillions of monitor points in your CEL but as long as you don't go overboard it should work OK.
Attached Images
File Type: jpg untitled.JPG (50.2 KB, 17 views)

Last edited by spatialtime; September 9, 2009 at 10:58.
spatialtime is offline   Reply With Quote

Old   September 9, 2009, 18:30
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
If you have already done the simulation then your only option is CFD-Post. In that case you can do a CFD-Post script to output the data.

If you are interested in points on a plane you can define a plane through the domain and export points from that. You can also set it to have points on the plane at the intersection of element edges or on a regular grid. Then use file/export with the plane as the location and you will get the entire plane of data in one go.
ghorrocks 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
Differences between serial and parallel runs carsten OpenFOAM Bugs 11 September 12, 2008 11:16
time step size in Custom Field Function Tong FLUENT 0 May 2, 2008 15:51
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 14:09
HELP TIME STEP!! merry FLUENT 2 March 25, 2004 14:38
unsteady calcs in FLUENT Sanjay Padhiar Main CFD Forum 1 March 31, 1999 12:32


All times are GMT -4. The time now is 09:07.