Contour plot of fluent-ansys results

Hi Everyone,
There is a program called fluent, which is a CFD (Computational Fluid Dynamics) program. It provides predictions of various fluid dynamics simulations. The fluent results can be saved in various formats, the only one that I can find to read into matlab is ASCII. The problem with the format for exporting fluent data is that is provide one giant vector for the x coordinates, one giant vector for the y coordinate and giant vectors for each solution variable (density, velocity, viscosity, pressure, etc.).
My question is this: Has anyone out there found a way to export data from fluent and import it into Matlab so you can make contour plots? If not, can someone help me figure out how to do it? Is there a way I can attach an exported ASCII file to this question? That way you can see how the data is exported from fluent.
Thanks, Casey

5 comentarios

Casey
Casey el 6 de Jul. de 2012
Ok, here is a link to the exported ASCII data from matlab. The last column is the volume fraction of one of the phases.
I accidentally had it export the x and y coordinates twice. As you can see there is some adaption to the mesh in certain regions, which makes this problem a little harder.
Here is a link to an image of the mesh: http://dl.dropbox.com/u/56831415/ADAPT2JohnsJackRSM-mesh.tif
I can also export the data as CGNS, but I don't think there is a way to read CGNS data with matlab...
Sven
Sven el 7 de Jul. de 2012
Editada: Sven el 7 de Jul. de 2012
Hi Casey,
If you're looking to "visualise the results superimposed on the mesh", then I'm afraid you've only exported part of what is needed.
FE (or CFD) meshes are in the form of nodes and elements. The nodes sit in XYZ (or XY) space, and the elements tell us which nodes need to be joined to form a triangle (or square, or whatever mesh type you have). This is analogous to MATLAB's faces/vertices (as sent to the patch() function), so if you can export this information then I think it can be visualised.
It looks to me like you loaded the (real) results file into a Fluent visualisation program, then just exported the node "locations and volume fractions" at some particular timestep. (You'll note that the text file you linked to has no information about the timestep itself.)
I have a feeling that if Fluent is anything like LS-Dyna, it will use a binary format to store this somewhat heavy data describing node locations, element node indices, and "results" for each node (such as pressure, volume, etc). To visualise results superimposed on the mesh in MATLAB, you may need to write (or find) a file reader for Fluent's output data. This is no small task, but once you get your hands on the specification of the file from the Fluent documents, things become a little clearer.
The element node indices shouldn't change in each timestep (unless mesh adaptation occurs at each timestep), but the node locations and "results" should all be time-dependent, thus there should be data of these results per timestep.
[Note that some FE codes expect the output file(s) to be read in conjunction with the input file (with the node indices defining the mesh), therefore they will choose not to duplicate this information in the output file... I don't think Fluent does this however.]
Casey
Casey el 9 de Mayo de 2014
Unfortunatly this is an issue with fluent. You can't export the data in the format you are requesting.
sai kiran
sai kiran el 15 de Feb. de 2020
how can be import geometry obtained in matlab to cfd

Iniciar sesión para comentar.

 Respuesta aceptada

Sarah Palfreyman
Sarah Palfreyman el 10 de En. de 2017

0 votos

See ANSYS for the MATLAB AAS Toolbox interface.

Más respuestas (0)

Categorías

Más información sobre Computational Fluid Dynamics (CFD) en Centro de ayuda y File Exchange.

Preguntada:

el 5 de Jul. de 2012

Comentada:

el 16 de Nov. de 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by