|
[Sponsors] |
June 28, 2012, 01:30 |
Writing mesh in FORTRAN or C
|
#1 |
Member
Join Date: Oct 2011
Location: OH, USA
Posts: 77
Rep Power: 15 |
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 I wanna know the structure and order of the code that fluent can work with |
|
June 28, 2012, 05:25 |
|
#3 |
Senior Member
|
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 |
|
June 28, 2012, 14:19 |
|
#4 |
Member
Join Date: Oct 2011
Location: OH, USA
Posts: 77
Rep Power: 15 |
||
June 28, 2012, 22:27 |
|
#5 | |
Member
Join Date: Oct 2011
Location: OH, USA
Posts: 77
Rep Power: 15 |
Quote:
I read UDF and mesh manuals NOWHERE its been mentioned how to write a mesh code for fluent |
||
June 29, 2012, 04:38 |
|
#6 |
Senior Member
|
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 |
|
June 30, 2012, 19:20 |
|
#7 | |
Member
Join Date: Oct 2011
Location: OH, USA
Posts: 77
Rep Power: 15 |
Quote:
|
||
June 30, 2012, 19:26 |
|
#9 |
Member
Join Date: Oct 2011
Location: OH, USA
Posts: 77
Rep Power: 15 |
||
July 1, 2012, 22:24 |
|
#10 | |
Member
Join Date: Oct 2011
Location: OH, USA
Posts: 77
Rep Power: 15 |
Quote:
it was useful |
||
July 2, 2012, 16:53 |
|
#11 |
Senior Member
|
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 |
|
July 2, 2012, 16:56 |
|
#12 | |
Member
Join Date: Oct 2011
Location: OH, USA
Posts: 77
Rep Power: 15 |
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 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
reading gambit mesh files using fortran | zonexo | FLUENT | 4 | December 15, 2020 13:39 |
[Gmsh] 2D Mesh Generation Tutorial for GMSH | aeroslacker | OpenFOAM Meshing & Mesh Conversion | 12 | January 19, 2012 04:52 |
[ICEM] Problem making structured mesh on a surface | froztbear | ANSYS Meshing & Geometry | 4 | November 10, 2011 09:52 |
[snappyHexMesh] external flow with snappyHexMesh | chelvistero | OpenFOAM Meshing & Mesh Conversion | 11 | January 15, 2010 20:43 |
Icemcfd 11: Loss of mesh from surface mesh option? | Joe | CFX | 2 | March 26, 2007 19:10 |