CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Open Source Meshers: Gmsh, Netgen, CGNS, ... (http://www.cfd-online.com/Forums/openfoam-meshing-open/)
-   -   SalomeNetgenOpenFoam (http://www.cfd-online.com/Forums/openfoam-meshing-open/61955-salomenetgenopenfoam.html)

nico December 8, 2005 12:05

Hi, i am studing mechanical
 
Hi,

i am studing mechanical engineering at the University Duisburg-Essen in Germany.

My Probmel is:
I want to create some geometry, for example a T-piece, mesh it an then convert it to OpenFOAM.
I use Salome to build the geometry and save it as a step file. After that i import this file in netgen and mesh it. (By the way, does anybody know how to refine the mesh locally?) Now i export the mesh in neutral format and convert it with netgenNeutralToFoam. Everything works fine till this moment.


My t-piece has 5 faces, but after converting it into OpenFoam there are 6?! I change the boundaryconditions for the 5 known faces and the fields, how it is discribed in another spot in this forum. After that it is possible to watch the mesh in paraview, but when i start the calculation i only get: time step continuity errors : sum local = 0, global = 0, cumulative = 0 ! it is the first time i work with openfoam, netgen and salome so i don't know where the mistake(s) happen. Got somebody an idea?

The t-piece ist part of a pipe. there are two inlets and one outlet. its a very simple case, because at first i want to test the way from creating a geometry till the simulation.
Can i use the simplecase to solve 3-Dim problems?

Perhaps it is possible, that i can send my OpenFoam case to somebody?


bye
Nico

in_flu_ence March 12, 2007 13:21

I am also looking for a soluti
 
I am also looking for a solution on a t-piece or in fact a y-piece where the sub section joins the main at an angle <90deg.

Any solution for that?

johannes_vierbuchen March 13, 2007 04:59

Hi Nico, i am studing mech.
 
Hi Nico,

i am studing mech.engineering at the fh kln. I've got some experience in the work with salome and OpenFoam. If you want, you can sent me your case to Johannesvierbuchen<at>web.de, or post it here in the board.

Johannes

nico March 13, 2007 05:24

Hi Johannes, i've posted my
 
Hi Johannes,

i've posted my question in dezember 2005 and so my question is not up to date. Nevertheless, thank you for your offered help.

Nico

Perhaps you can help Harris.

in_flu_ence March 18, 2007 18:18

Hi Johannes, I have crea
 
Hi Johannes,

I have created a unv mesh of a y-inlet but I do not know how to convert that into the openfoam format and eventually apply conditions using the interphase/twophaseEuler functions to get some data out of it.

Any chance if you might drop me some tips? You may email me at harris<at>udsn.net. Thanks very much.

Harris

johannes_vierbuchen March 19, 2007 06:59

Hi Harris, there is a unvTo
 
Hi Harris,

there is a unvToFoam-converter which works fine posted in this board. I'll sent you the file to your E-Mail-adress. The only problem is, that the converter don't catches the boundary-patches, so you have to catch them yourself by using the autopatch-utility, which comes with OpenFoam.

Johannes

sradl July 28, 2007 16:41

Hi Johannes, I've created a
 
Hi Johannes,

I've created a ideas unv file out of the meshing software CUBIT. However, if i use the ideasUnvToFoam utility, OpenFoam aborts with the message:
"Cell type 171 not supported". Do you have any idea what went wrong here?

br
Stefan

johannes_vierbuchen July 29, 2007 05:21

Hi Stefan, at the moment Im
 
Hi Stefan,
at the moment Im visiting a friend in Hamburg. But when Im back in Cologne at monday I`ll try to help you.Which kind of cell have you generated with Cubit(hex?).

Johannes

sradl July 30, 2007 01:11

Hi Johannes, there are hexe
 
Hi Johannes,

there are hexes and a few tets.

br
Stefan Radl

johannes_vierbuchen July 30, 2007 07:33

Hi Stefan, I've looked at t
 
Hi Stefan,

I've looked at the sourcecode of the unvToFoam converter. The Ideas-unv-code for tets is "111", for hex "115". So is it possible that you have different celltypes in your mesh? You can take a look at the 2412-sektion of the *.unv-file and count the number of nodes which are building a 171-Element. So you can get an idea of the celltype by the number of nodes.

Johannes

sradl July 30, 2007 16:17

Hi Johannes, I got the prob
 
Hi Johannes,

I got the problem: cubit's ideas export function writes out the hexes I have in the mesh, then "quads" (4 points) and lines (2 points) which are not needed by OpenFoam. I've created my own ideasUnvToFoam converter that will ignore the entries for the quads and lines. This works.

However, Cubit's Ideas support is limited to the cells only. So no boundary conditions can be exported which is not very useful :-). I'll try to contact them if it is possible to add this functionality.

The other way would be to use Cubit's supported formats:
- Exodus II File
- ABAQUS File
- LS-DYNA File
- Patran Neutral File

Cubit supports these file formats, preferentially Exodus II. Has anybody experience with Exodus II and would mind to provide and interface between Exodus II and OpenFOAM? I can support with minimal C++ knowledge and testing.

br
Stefan Radl

mattijs July 31, 2007 03:39

Hi Stefan, are the quads pe
 
Hi Stefan,

are the quads perhaps some boundary elements that denote the patches? (this is how gmsh works). Would be interesting to know how Cubit exports boundary regions.

sradl July 31, 2007 04:15

Hi Mattijs, yes that might
 
Hi Mattijs,

yes that might be the case. However, there was only one "cell type" of quads. However, Cubit explicitely does not export specific "sidesets" or boundary conditions (and regions). So this information on the quads is useless to define patches.

I already have contacted Cubit-Help to get support for exporting patch information to ideas format. However, do you personally feel that an import of the Exodus II mesh format might be possible?

br
Stefan Radl

mattijs July 31, 2007 04:40

Exodus II: looks like a lot of
 
Exodus II: looks like a lot of work.

From the manual (exodusII.pdf), opening page: Exodus .. is a binary file written via library routines.

And few pages on:
The EXODUS II library is maintained in the Sandia National Laboratories Engineering Anal-
ysis Code Access System (SEACAS) [2] and is available on a licensed basis.

kgmerk July 31, 2007 15:02

I'm one of the Cubit developer
 
I'm one of the Cubit developers and I've been lurking on the list for a while. We could approach the Cubit->openFOAM problem in a number of ways. We have recently added a CGSN export that does support dirichelt and neumann boundary conditions. Is there a path from CGNS to openFOAM? I could enhance the I-DEAS UNV exporter, I could develop the Exodus to openFOAM translator or I could create a direct openFOAM export. What is the preference of the community?

Could someone point me a document that provides the specifications for the openFOAM mesh format?

Thanks,
Karl

sradl July 31, 2007 15:44

Dear Karl, I'm using Cubit
 
Dear Karl,

I'm using Cubit since a week for my research and the algorithms are very fine. However, a direct export to OpenFoam is not possible at the moment as you now.

The only thing from my point of view that has to be added to Cubit's ideas export is that groups of faces can be exported. That should be only a few lines of additional code. If you like I can send you an file that contains the additional output that should be created by Cubit. It is basically a list of the faces that belongs to a specific group.

I've successfully read in an ideas-file created by Cubit into Salome, have added the groups of faces in Salome and exported again to ideas format. The read-in into OpenFoam worked with some minor modifications of the ideasUnvToFoam importer delivered with OpenFoam. So that seems to work with a heavy impact on run-through time. However, I'd very much appreciate a direct port from Cubit to OpenFOAM :-)

Regarding boundary conditions: that can be specified within OpenFoam relative conveniently. So once the cell faces are grouped, OpenFoam can do the job.

Regarding CGNS: I'm not up to date, maybe the OpenFoam developers know more about that?!?

br
Stefan Radl

mattijs August 1, 2007 03:52

Hello Karl, It would be nic
 
Hello Karl,

It would be nice if it output directly to OpenFOAM. I'll collect the info about the mesh format on the Wiki and publish it here.

No problem with extending the Ideas-UNV file either though it can only handle hex and hex degenerates. I'll adapt the ideasUnvToFoam converter to handle any boundary data you put in. What is the idea - output an extra element which shares points with the face of an element? Or have specific faces on elements marked to be boundaries (e.g. face 3 on tet 1344 belongs to boundary 2)

CGNS would not be easy. binary & requires extra library.

Feel free to contact me directly (m.janssens at opencfd.co.uk)

sradl August 1, 2007 04:13

Hello Mattijs, as explained
 
Hello Mattijs,

as explained, the ideasUnv converter does not need any mayor modifications if Cubit drops the following data:

1) Points and cell elements (Ok, that works)
2) a list of cell faces (Ok, that works, OpenFoam needs a minor modification of the converter).
3) a list of cell faces that belong to a patch (that has to be implemented in Cubit). The syntax that works with OF (output via salome) is very simple (I can publish it here for a simple example in the afternoon). OF will go through the list of faces and checks if it finds the cell numbers specified under a certain patch. That's it.

br
Stefan Radl

mattijs August 1, 2007 04:28

I put some information about t
 
I put some information about the mesh format on
http://openfoamwiki.net/index.php/Write_OpenFOAM_meshes

sradl August 1, 2007 14:59

Hello Foamers, thanks to a
 
Hello Foamers,

thanks to a guy named Andrew I now know how to get the information on patches from Cubit to OpenFoam.

1) In Cubit a group has to be defined that has to be named same as the patch you want to have in OF.

2) the faces (not the surfaces!) have to be added to this group. This can be done with the command:

group "test_group" add face in surface 2

in Cubit. This will create the group "test_group" and add all cell faces in surface 2 to this group.

3) do the ideas export in cubit and the groups will be displayed in the ideas file.

4) the ideasUnvToFoam converter has to be slightly modified as the IDs that Cubit exports is different to the current implementation. E.g. the read patches ID is 2452, the "rods" have ID 171 (and only one line should be read in instead of the two that are currently implemented) and the faces (which are called "quads" in cubit) have ID 94 and haven't been read in in the old implementation at all. So to modify the ideasUnvToFoam converter is easy. The rest is fine and all patches defined in Cubit can be found in the boundary file in OF.

However, I would appreciate if in future the export would be more obvious in Cubit or documented.

br
Stefan Radl


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