CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Extract velocity field in certain time step to MATLAB (https://www.cfd-online.com/Forums/cfx/68167-extract-velocity-field-certain-time-step-matlab.html)

spatialtime September 9, 2009 03:55

Extract velocity field in certain time step to MATLAB
 
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

ghorrocks September 9, 2009 06:21

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.

spatialtime September 9, 2009 07:24

1 Attachment(s)
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 (Post 228994)
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 September 9, 2009 18:30

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.


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