CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   matlab mesh generation for fluent (http://www.cfd-online.com/Forums/main/64855-matlab-mesh-generation-fluent.html)

mleahy May 26, 2009 17:26

matlab mesh generation for fluent
 
I have been working on a elliptical mesh generator for an airfoil in matlab. I want to be able to write the mesh in a format that can be read by fluent. are there any source codes available that can do this? or other recommendations?

harishg May 28, 2009 22:19

I guess fluent can read vtk meshes. Check for the documentation which gives you the details of writing vtk meshes. Another option you can try if you have tecplot is to write the ascii data in tecplot format. Open it with tecplot and export it to fluent format.

RenardP May 29, 2009 10:58

Hello,

Fluent is an unstructured solver and if I understand correctly you have implemented a structured grid generation method in Matlab. You need to write your mesh in format similar with this (for a 2D mesh):

n1 n2 n3 4
.............
x1 y1
........

Where n1,n2 ... are the vertex numbers and x1 y1 are the coordinates of n1; x2 y2 the coordinates of n2 ....

In order to be able to import your mesh in Fluent I suggest you to create a simple 2D mesh example in Gambit (the mesh generator of Fluent) save this mesh in neutral format (*.neu). Using this file you will be able to see how you must format your mesh file in order to be able to use it with Fluent.

If you need help in coding this let me know.

amira May 29, 2009 11:43

that post lets me wonder about this
 
can we write a UDF using matlab and implement it into Fluent?

RenardP May 31, 2009 19:17

Quote:

Originally Posted by amira (Post 217612)
can we write a UDF using matlab and implement it into Fluent?

First, I strongly recommend you to read the Fluent help about UDF.
About your question now, the answer is NO! You can write a UDF only in the C language.

Sorin October 11, 2013 07:50

Hi Amira,

A Fluent UDF is a C library, so technically the answer is No.

You can drive Fluent from Matlab, though, but that is slightly different functionality that the one you handle in UDF. It is the equivalent if running Fluent in batch from a .m file instead of doing it from a *.jou file.

Sorin
Quote:

Originally Posted by amira (Post 217612)
can we write a UDF using matlab and implement it into Fluent?



All times are GMT -4. The time now is 11:55.