CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Post-Processing (
-   -   visualize OF using Matlab (

flames February 14, 2014 12:38

visualize OF using Matlab
hi there,

I got the openfoam results of the three dimensional fields. Now I would like to make a planar slice of it and then visualize the 2D slice using matlab. Does anybody know how to realize it? I know matlab may only handle the slice data of structured meshes, however in openfoam as you know the meshes are unstructured. Anybody know how to do it properly? Thank you all.


akidess February 14, 2014 14:21

Use the "sample" tool to get data on a slice (in ASCII format). If you have problems plotting that data in MATLAB directly, you can interpolate it to a structured grid using builtin MATLAB functions.

flames February 14, 2014 18:02

Thank you! If I generate the structured mesh for openfoam, I found that I have to output the mesh as an unstructured mesh. So when I output the 'structured mesh', actually the results are still UNSTRUCTURED. I found that this is a little complex. Thanks.

All times are GMT -4. The time now is 23:59.