CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Open Source Meshers: Gmsh, Netgen, CGNS, ...

Importing CAD Meshes in OpenFOAM

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   December 21, 2007, 06:16
Default Hello, I don't really know
  #1
New Member
 
Vanmaercke Simon
Join Date: Mar 2009
Location: Mol, Belgium
Posts: 8
Rep Power: 8
vanmaercke is on a distinguished road
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
vanmaercke is offline   Reply With Quote

Old   December 21, 2007, 06:35
Default Hi Simon, It look interstin
  #2
Senior Member
 
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 277
Rep Power: 9
vinz is on a distinguished road
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
vinz is offline   Reply With Quote

Old   December 21, 2007, 07:06
Default Hi Simon, your code could b
  #3
New Member
 
Stefano Dalla Costa
Join Date: Mar 2009
Posts: 4
Rep Power: 8
stefano is on a distinguished road
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
stefano is offline   Reply With Quote

Old   December 21, 2007, 11:02
Default Hi, I will make the progra
  #4
New Member
 
Vanmaercke Simon
Join Date: Mar 2009
Location: Mol, Belgium
Posts: 8
Rep Power: 8
vanmaercke is on a distinguished road
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
vanmaercke is offline   Reply With Quote

Old   December 21, 2007, 13:40
Default Hello, Good evening! I h
  #5
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 530
Rep Power: 16
philippose will become famous soon enough
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
philippose is offline   Reply With Quote

Old   December 24, 2007, 03:10
Default I use SALOME-3.2.6. It contain
  #6
Member
 
Ruben I. Mukhamadeev
Join Date: Mar 2009
Location: Obninsk, Kaluga reg., Russian Federation
Posts: 69
Rep Power: 8
benru is on a distinguished road
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.
benru is offline   Reply With Quote

Old   January 3, 2008, 19:43
Default Philippose How do you contr
  #7
New Member
 
marco
Join Date: Mar 2009
Posts: 3
Rep Power: 8
marco2 is on a distinguished road
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
marco2 is offline   Reply With Quote

Old   June 21, 2009, 00:31
Default Discretizer
  #8
New Member
 
vinu varghese
Join Date: Apr 2009
Posts: 9
Rep Power: 8
vinu is on a distinguished road
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/
vinu is offline   Reply With Quote

Old   August 17, 2009, 18:43
Default
  #9
Member
 
John
Join Date: Aug 2009
Posts: 93
Rep Power: 7
nomad is on a distinguished road
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 is offline   Reply With Quote

Old   August 19, 2009, 17:33
Default
  #10
Member
 
John
Join Date: Aug 2009
Posts: 93
Rep Power: 7
nomad is on a distinguished road
I suppose it's just a mesh which is one cell thick.
nomad is offline   Reply With Quote

Old   March 8, 2010, 14:17
Default
  #11
New Member
 
Join Date: Mar 2010
Posts: 14
Rep Power: 7
fiona is on a distinguished road
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
fiona is offline   Reply With Quote

Old   May 28, 2010, 10:07
Default
  #12
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Magdeburg/Geneva
Posts: 176
Blog Entries: 1
Rep Power: 7
Linse is on a distinguished road
Quote:
Originally Posted by nomad View Post
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 View Post
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...
Linse is offline   Reply With Quote

Old   May 7, 2011, 01:11
Smile
  #13
New Member
 
Manoj L Das
Join Date: Mar 2011
Location: Calcutta, India
Posts: 25
Rep Power: 6
run_cfd is on a distinguished road
Quote:
Originally Posted by benru View Post
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
run_cfd is offline   Reply With Quote

Old   May 13, 2011, 02:50
Default
  #14
Senior Member
 
Elvis
Join Date: Mar 2009
Location: Sindelfingen, Germany
Posts: 577
Blog Entries: 5
Rep Power: 13
elvis is on a distinguished road
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
elvis is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing Fluent polyhedral meshes fra76 OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 October 11, 2008 04:44
Problem importing mesh in openfoam from fluent alessandr0 OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 3 September 4, 2008 13:41
File format for import meshes in OpenFoam t42 OpenFOAM Meshing Format & General Technical 5 August 1, 2007 08:45
Importing Meshes from ANSYS Kieran Hood CFX 3 December 18, 2006 04:53
Importing a mesh in system memory using C directly to OpenFoam Solvers juanduque OpenFOAM Meshing & Mesh Conversion 1 August 10, 2006 04:15


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