CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[CAD formats] Importing CAD Meshes in OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 21, 2007, 06:16
Default Importing CAD Meshes in OpenFOAM
  #1
New Member
 
Vanmaercke Simon
Join Date: Mar 2009
Location: Mol, Belgium
Posts: 8
Rep Power: 17
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: 283
Rep Power: 18
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: 17
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: 17
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: 552
Rep Power: 25
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: 17
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: 17
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, 01:31
Default Discretizer
  #8
New Member
 
vinu varghese
Join Date: Apr 2009
Posts: 9
Rep Power: 17
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, 19:43
Default
  #9
Member
 
John
Join Date: Aug 2009
Posts: 92
Rep Power: 17
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, 18:33
Default
  #10
Member
 
John
Join Date: Aug 2009
Posts: 92
Rep Power: 17
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: 16
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, 11:07
Default
  #12
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 16
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, 02:11
Smile
  #13
New Member
 
Manoj L Das
Join Date: Mar 2011
Location: Calcutta, India
Posts: 25
Rep Power: 15
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, 03:50
Default
  #14
Senior Member
 
Elvis
Join Date: Mar 2009
Location: Sindelfingen, Germany
Posts: 620
Blog Entries: 6
Rep Power: 24
elvis will become famous soon enough
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

Old   December 14, 2017, 17:30
Default
  #15
New Member
 
alix cattermole
Join Date: Nov 2017
Posts: 14
Rep Power: 9
alixcattermole is on a distinguished road
Hello,

I am trying to convert a netgen mesh into openfoam but whenever I use the netgenNeutralToFoam [filename.neutral] command I get and error in openfoam saying FOAM FATAL IO ERROR: cannot find file.
Any ideas at how I can get around this?
Thanks.
alixcattermole is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to import the CAD drawing into openfoam shadyenany OpenFOAM 9 March 22, 2021 12:26
OpenFOAM Training Jan-Jul 2017, Virtual, London, Houston, Berlin CFDFoundation OpenFOAM Announcements from Other Sources 0 January 4, 2017 07:15
Can OpenFOAM currently import CAD geometry? Davitt OpenFOAM Pre-Processing 2 November 2, 2015 08:46
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 07:55
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 07:25


All times are GMT -4. The time now is 15:48.