CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   CAD -> gMsh -> enGrid -> OpenFOAM Problem (http://www.cfd-online.com/Forums/openfoam/66260-cad-gmsh-engrid-openfoam-problem.html)

AlGates July 10, 2009 02:05

CAD -> gMsh -> enGrid -> OpenFOAM Problem
 
Hi all!

After searching and trying for quite a while, I decided to post my problem here, maybe someone has an idea.

I am using gMsh and enGrid for Windows (XP) and OpenFOAM under Ubuntu 9.04. Tried to compile the other 2 on my ubuntu system, but then I always get a QT-4.5.0 Version and the paraFoam command doesn't work anymore, so I prefer to keep my 4.3.4 QT Version and not to use the other 2 softwares on linux.

However... I am quite new to this software and try to do the first calculations in OpenFOAM using my own geometry. I tried it with 2 cylinders being connected on one surface.

The first thing was to design it under a CAD program, import the step file in gMsh, make a 2D mesh, export it as gmesh 2.0 (tried VTK as well...), import it to enGrid and export it as OpenFOAM file-bundle.

The problem is that enGrid nearly always has a problem with the gmsh-mesh and cannot create the 3D mesh, because of some missing or overlapping triangles.

I also tried to create the part in gMsh and to mesh it there. Lead to the same problem.

Here my geo-file of gmsh. Maybe someone has an idea, why this cannot be exported to be used with enGrid.

Code:

Point(1) = {0, 0, 0, 0.1};
Point(2) = {1, 0, 0, 0.1};
Point(3) = {0, 1, 0, 0.1};
Point(4) = {0, -1, 0, 0.1};
Point(5) = {-1, 0, 0, 0.1};
Circle(1) = {3, 1, 2};
Circle(2) = {2, 1, 4};
Circle(3) = {4, 1, 5};
Circle(4) = {5, 1, 3};

Line Loop(5) = {1,2,3,4};
Plane Surface(6) = {5};Extrude {0, 0, 1} {
  Surface{6};
}
Extrude {0, 0, 5} {
  Surface{28};
}

Thank you!

marico July 10, 2009 09:33

Hi,

this is not the right place to find help for an (only) enGrid related problem... ;) Try it here:
enGrid discussion board: http://78.140.120.226/phpBB3/

Marco

AlGates July 10, 2009 14:25

Thanks so far, although this is more a gmsh related problem, because the "gmsh-meshes" are not correctly generated. ;-)

Ahmed July 10, 2009 19:40

Alex
There is a gmsh binary that you can install on your Linux
also there is a binary engrid (.deb) that you can install
I have both installed on my debian Linux and they run ok

Marco Müller
Sorry to disagree with your post, cfd Online is the right home for any fluid mechanics and CFD questions.
I really hope to see engrid forum here

Good luck

Ahmed July 12, 2009 15:52

Quote:

Originally Posted by AlGates (Post 222174)
Hi all!

After searching and trying for quite a while, I decided to post my problem here, maybe someone has an idea.

I am using gMsh and enGrid for Windows (XP) and OpenFOAM under Ubuntu 9.04. Tried to compile the other 2 on my ubuntu system, but then I always get a QT-4.5.0 Version and the paraFoam command doesn't work anymore, so I prefer to keep my 4.3.4 QT Version and not to use the other 2 softwares on linux.

However... I am quite new to this software and try to do the first calculations in OpenFOAM using my own geometry. I tried it with 2 cylinders being connected on one surface.

The first thing was to design it under a CAD program, import the step file in gMsh, make a 2D mesh, export it as gmesh 2.0 (tried VTK as well...), import it to enGrid and export it as OpenFOAM file-bundle.

The problem is that enGrid nearly always has a problem with the gmsh-mesh and cannot create the 3D mesh, because of some missing or overlapping triangles.

I also tried to create the part in gMsh and to mesh it there. Lead to the same problem.

Here my geo-file of gmsh. Maybe someone has an idea, why this cannot be exported to be used with enGrid.

Code:

Point(1) = {0, 0, 0, 0.1};
Point(2) = {1, 0, 0, 0.1};
Point(3) = {0, 1, 0, 0.1};
Point(4) = {0, -1, 0, 0.1};
Point(5) = {-1, 0, 0, 0.1};
Circle(1) = {3, 1, 2};
Circle(2) = {2, 1, 4};
Circle(3) = {4, 1, 5};
Circle(4) = {5, 1, 3};

Line Loop(5) = {1,2,3,4};
Plane Surface(6) = {5};Extrude {0, 0, 1} {
  Surface{6};
}
Extrude {0, 0, 5} {
  Surface{28};
}

Thank you!

Alex
This weekend, I copied your geometry file to gmsh, produced a surface mesh and saved it, using the standard msh format,
reading the file into engrid was straigtforward, using v2, but the quality is really nasty, engrid reader, reads the correct number of nodes but not the elements and the result is nothing similar to the original. This is really annoying, anyway, the best you can do is to be patient and wait till engrid has its own surface mesher/geometry creator modules.
It has always been a problem even using commercial programmes, to read files produced by a certain programme into another programme

Good luck.
It is now that I realize that both programmes have no facilities to produce screen dumps, thus you cannot produce image files to show to others or attach them to posts and reports. pitty

AlGates July 13, 2009 10:18

Hi Ahmed,

thanks for checking this problem. In the meantime I gave it up as well and used blockMeshDict to set the necessary points and define everything myself. Took some time, but at least it works now.

Thanks for your help!

kroetenechse August 2, 2010 17:47

Hello Alex,
maybe you found a better way now, but my fellow student and I are working on a problem as you. First CAD -> Gmsh -> enGrid and then OpenFOAM. We got the same problems as you.
Then we tried with netgen instead of Gmsh. After surface meshing with netgen, adjust the 'export filtype' in 'gmsh format' (after that save the part with the ending '.msh'). Then import the file as a gmsh -> v1.0 (ASCII). Then it should work.
There is a nice tutorial of enGrid. You can get it on the enGrid side.
good luck
phil

AlGates August 6, 2010 12:46

Hehe... about 8 months earlier it could have helped. ;-)

But nice, that there is a working solution for this problem.

Thank you for your time.

Alex


All times are GMT -4. The time now is 18:08.