CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Open Source Meshers: Gmsh, Netgen, CGNS, ... (https://www.cfd-online.com/Forums/openfoam-meshing-open/)
-   -   Importing CAD Meshes in OpenFOAM (https://www.cfd-online.com/Forums/openfoam-meshing-open/61971-importing-cad-meshes-openfoam.html)

vanmaercke December 21, 2007 06:16

Hello, I don't really know
 
Hello,

I don't really know whether a satisfying solution for converting CAD shapes into OpenFOAM meshes is already available. But I have written a small tool to easily create OpenFOAM Meshes from CAD files (IGES and STEP). If anyone is interested i can put it available for download...
The way i proceeded is as follows:
1)Using OpenCasCade import the CAD file.
2)Let the user assign Boundary conditions and material properties using a simple GUI based on Qt.
3) Create a quality surface mesh for the imported shapes (Using an adapted version of the STL mesh generator of OpenCascade to avoid sharp angle triangles which yield problems further on...)
4)Translate this surface mesh to an Tetgen input file and generate the mesh.
5)Using an adapted version of netgenToFoam (for reading in Tetgen files) the mesh is converted to an OpenFOAM mesh. (i have seen that tetgenToFOAM also exists already but i was unable find it..)

If anyone is interested i will put it online for download. However be warned: i'm not a programmer and my code is in no way (even remotely) as beautiful as the code of openFOAM ;-)

Regards,

Simon

vinz December 21, 2007 06:35

Hi Simon, It look interstin
 
Hi Simon,

It look intersting!
Could you post some picture of tetings that you did?
I might be interested by your set of tools.

Regards,

Vincent

stefano December 21, 2007 07:06

Hi Simon, your code could b
 
Hi Simon,

your code could be a solution, or a consistent starting point, for my CAD-import daily problems.
To post online the code for download should be a good idea!

Thanks,

Stefano

vanmaercke December 21, 2007 11:02

Hi, I will make the progra
 
Hi,

I will make the program available for download very shortly then... I will first have to make it more easily redistributable...
I have created some screenshots and placed them on the following website:

http://student.studentenweb.org/

The examples do not have any significance but they illustrate that a mesh can be created starting from a cad file. And the colours are beautiful...

Regards,
Simon

philippose December 21, 2007 13:40

Hello, Good evening! I h
 
Hello,

Good evening!

I have been using OpenFOAM for over a year now, and I exclusively use models I export from Pro-Engineer for the cases.

Since I work in the field of Hydraulic valve development, the geometry is almost never trivial.

What I do is to use Netgen :-)! (Available for both windows, and Linux. And.... also...is open source).

Netgen does exactly what you have done.... it imports STEP / IGES files which can be exported from the CAD Environment using the OpenCascade libraries.

And then it uses its own internal edge, surface and volume mesh generation algorithms (which are extremely robust....uses Advancing front Delaunay Meshing) to generate the mesh. Various factors which govern the mesh generation can ofcourse... be adjusted.

After that I can choose surfaces of the geometry to which I can assign numbers which are used in OpenFOAM for boundary condition definitions.

Finally.... as you already know, netgenToFoam already exists in OpenFOAM.

So... here it is.... a streamlined pathway from CAD -> OpenFOAM :-)!

Enjoy!

Philippose

benru December 24, 2007 03:10

I use SALOME-3.2.6. It contain
 
I use SALOME-3.2.6. It contains as OpenCASCAD as NETGEN (and TETGEN, and Hex) algorithms. And it can import IGES & STEP files, after that it possible to generate a mesh with patches, write it as ideas unv file and with ideasUnvToFoam convert to OpenFoam.

You can see theme SALOME-NETGEN-OPENFOAM in MESH part of forum.

marco2 January 3, 2008 19:43

Philippose How do you contr
 
Philippose

How do you control in netgen different grid refinements on different surfaces (i.e. different boundaries) ?
Do you set boundary patches on mesh surface or on geometry ?
Do you know how to use the "insert virtual boundary layer" command under the special menu ?

Regards

Marco

vinu June 21, 2009 00:31

Discretizer
 
Hi,,


I found a free tool called Descretizer. This tool is directly interfaced with OpenFOAM. I dont know why no one is using that. I find it very useful.

The link for discretizer is http://www.discretizer.org/

nomad August 17, 2009 18:43

How can I create a 2D mesh from a 3D model exported as IGES, STEP, or STL from SolidWorks?
Can I do this in a mesh generator or in OpenFOAM?
I'm currently using NetGen for mesh generation.

Thanks.

nomad August 19, 2009 17:33

I suppose it's just a mesh which is one cell thick.

fiona March 8, 2010 14:17

Hi Philippose,

I'm new to Netgen. Followed the instructions, I installed OpenCascade in order to import STEP file into Netgen, but I could not find the commandline options. Do you know how to?

Thanks,

Fiona

Linse May 28, 2010 10:07

Quote:

Originally Posted by nomad (Post 226628)
How can I create a 2D mesh from a 3D model exported as IGES, STEP, or STL from SolidWorks?
Can I do this in a mesh generator or in OpenFOAM?
I'm currently using NetGen for mesh generation.

Thanks.

Quote:

Originally Posted by nomad (Post 226886)
I suppose it's just a mesh which is one cell thick.

At least that is what it says in the user's guide for OpenFOAM.
Seems OpenFOAM is explicitly designed for 3d-cases and the 1-cell-thickness is the only way to use it kind of 2d...

run_cfd May 7, 2011 01:11

Quote:

Originally Posted by benru (Post 183322)
I use SALOME-3.2.6. It contains as OpenCASCAD as NETGEN (and TETGEN, and Hex) algorithms. And it can import IGES & STEP files, after that it possible to generate a mesh with patches, write it as ideas unv file and with ideasUnvToFoam convert to OpenFoam.

You can see theme SALOME-NETGEN-OPENFOAM in MESH part of forum.


Hi Ruben,

Greetings!!!

Could you please help me in finding and installing the SALOME- 3.2.6.
Or, could you help me in in getting the OpenCascade geometry kernel as demanded by the Netgen install to import iges file. i already have installed Netgen, but have no idea how to get OpenCascade geometry kernel and how to club it with the netgen installation. I need to import a iges file converted in Hypermesh from the Autocad dxf file.

Thanks in advance,

MLD

elvis May 13, 2011 02:50

Hello Manoj,

why do you want to install SALOME- 3.2.6? http://www.salome-platform.org/downloads/salome-v3.2.6
http://www.salome-platform.org/downloads/salome-v5.1.5
Opencascade is incorporated into Salome so you can work with it right after installing.
Netgen and gmsh are some of the meshing opportunites in Salome.
http://www.caelinux.org/wiki/index.php/Doc:CAETutorials might be some additional documentation for working with Salome


All times are GMT -4. The time now is 17:02.