Writing mesh in FORTRAN or C
can anybody please tell me how to generate my own mesh with FORTRAN or C and then import into Fluent?
Ive read UDF manuals but couldnt find anything useful :eek: I wanna know the structure and order of the code that fluent can work with :confused: |
Are you talking about the script for automating the process or your own grid generation code?
|
1 Attachment(s)
The information you need is present in the User's guide manual.
However, if you are in need of a free mesh generator for Fluent i think you can use the ones present in the OpenFOAM suite (blockmesh and snappyhexmesh) and convert the mesh in Fluent format (i'm pretty sure there is also something to do that among the several applications) As an example, you can find attached a simple, single-block, structured grid generator for Fluent. It is written in MATLAB but i am very FORTRAN oriented so it should be easily translated. Of course it is just an example, so do not go over 1-2 million cells. The code should be understandable as it is; you have: - a routine to create a point distribution over a line (newgrid.m) - a routine to create 3 matrix of points x(i,j,k), y(i,j,k) and z(i,j,k) (createmesh.m) - a routine to convert the above matrix in a fluent readable .msh file (writemsh.m) Hope it helps |
Quote:
|
Quote:
I read UDF and mesh manuals NOWHERE its been mentioned how to write a mesh code for fluent |
Of course, in the manual it's not written how to write a mesh but how Fluent is expecting the msh file (which is all you need to write it).
As i said, the reference part in the manual is: User's guide - B.3 Case and Data File Formats - Grid Sections This has nothing to do with the UDF |
Quote:
|
What version of Fluent are you working on and what versions of the manuals do you have?
|
Quote:
I will check it |
Quote:
it was useful :) |
You're welcome.
Still, i recently found some warnings related to some faces when using the above routines (actually just writemsh.m). This does not seem to be a major problem as Fluent can handle them correctly but means that something wrong is done somewhere. I was not aware of this or i wouldn't have shared them, i will share the correct version (as soon as i have it) if you still need it. Regards |
Quote:
I believe that Ansys stuff is cool but they DO REALLY NEED to develop a good grid generator for their stuff both Ansys Meshing and ICEM have serious grid issues specially when it comes to quadrilaterals and smoothing in boundary layers :( |
All times are GMT -4. The time now is 02:57. |