Alternative Mesh Generator from igs or stp format
Hello!
Can anyone suggest me an alternative mesh generator capable to generate good quality mesh with boundary layers from igs or stp geometry so that it can be easily translated to OpenFOAM format? Thank you! |
Greetings Sergey,
The only open source mesh generator I'm aware of that can handle IGES and STEP is SALOME. As for how good/bad it might be, I have no idea, because I've never used it myself. Best regards, Bruno |
Hi,
A Good Evening! There is yet another solution for meshing IGES and STEP files in the Open Source world..... Netgen (http://sourceforge.net/projects/netgen-mesher/). Netgen allows you to directly load IGES and STEP files when installed with OpenCascade support, and allows meshes to be exported directly into OpenFOAM format. Only unstructured tetrahedral meshes (in 3D) can be generated, though for my purposes this has worked fine since 2006 :-) Can be installed on Windows and Linux platforms. Hope this helps. Have a nice day ahead! Philippose |
Hi Bruno!
I was using SALOME. And it worked for first geometries I used. But when I made geometry more complex I started having problems. I still can create STL surfaces in salome and stitch them manually to form a closed domains for solid and fluid, snappyHexMesh seems to mesh it ok, however splitMeshRegions can't do the job properly, I've got a number of extra domains named domain0, domain1 ... additionally to my fluid and solid domains. And I could not get rid of this problem. |
Dear philippose,
thanks for your reply. I will try to use netgen, hope i will work for me. Does netgen keep the information about boundary names so that I can prescribe my inlets and outlets on the mesh or does it allow to create patches? Does it create boundary layers? Can it do multiregion mesh for OpenFOAM to be used for conjugate heat transfer? |
Hello Sergey,
Good Evening to you again. The typical workflow for going from an IGES/STEP Geometry to OpenFOAM Mesh is as follows: 1. Open Geometry in Netgen 2. Create a usable mesh making use of the various size controls, mesh density definition methods, etc... 3. Define Boundary Patches using one the following methods: ....a. Open the Boundary conditions dialog, set the entire mesh to one boundary number .... then manually double click each surface (this automatically selects all the surface mesh elements on that face) and assign a boundary index number. Since multiple surfaces can have the same boundary number, this is equivalent to patches in OpenFOAM. ....b. If you had already coloured different faces in your original STEP geometry, netgen recognises these colours and carries them on to the mesh. You can then ask Netgen to automatically assign boundary numbers to surfaces based on the colour of that surface. ....c. Same as "b"... but you can provide a colour definition file to Netgen which contains a mapping from surface colour (specified in [r,g,b] triplets) to boundary numbers, and ask netgen to assign surfaces based on this file. 4. Export the mesh in either uncompressed or compressed native OpenFOAM format..... Each boundary number will be exported as one patch, and netgen automatically writes a "boundary" file too, which can then be modified to change the "Patch<n>" names to actual patch names based on your needs. As for your question regarding multi-region meshes.... yes... Netgen does read in multi-region geometry, and mesh multiple regions (I have not personally tested this out, but I know it works.... whether it does what you expect it to do.... will have to be looked into :-)...) And boundary layers...... unless your geometry is extremely simple, netgen does not support creation of boundary layers..... yet...... I had written a test routine a couple of years ago, but it is far from ready for normal usage, and I dont think I will be able to get back to that anytime soon :-( Hope this helps. Enjoy :-) Philippose |
1 Attachment(s)
Philippose, thank you so much for the explanation.
I tried the first way and it works. The only concern that when I'll have too many faces (im doing porous material, therefore there will be a great amount of faces) it would be very hard(and many mistakes) to go through each face and assign a index number. regarding b) and c) - i don't know how to colour faces. Do you know if it Is possible to do in Abaqus before exporting in IGS or STP? Or can I do coloring in SALOME? Also sometimes netgen hangs up during meshing or writing mesh in OF format. Do you know which version of net grid is more stable (windows or linux)? Thank you! |
Hello Sergey,
Great that you were able to come up with a usable mesh using Netgen :-) I agree with you that using Netgen to manually click through all those faces one by one would be extremely painful and very error-prone. I have never used Abaqus, so I dont know if it is capable of giving different surfaces of the geometry different colours. Are you using Abaqus to generate your geometry? What software do you use initially to create the CAD Model? Is it not possible to use the CAD Software to change the surface colours? If the Geometry is easy to create and if you are not bound to a specific software, you could try using the open source CAD Software - FreeCAD (http://freecadweb.org/) to create your geometry. This software is capable of exporting STEP files, and if I remember right, can also give different surfaces different colours. As for the problem with Netgen hanging.... Are you using the 32-bit or the 64-bit version of Netgen? I know for a fact that the memory limitations in 32-bit systems prevents you from creating meshes larger than around 1.2 Million cells using the 32-bit version..... However, the 64-bit version should work without any issues. I have not had any stability issues with Netgen on Windows or Linux, and both platforms should be equally stable. What you could try, is use the following settings for the meshing options: 1. Under the "general" tab, change "Mesh granularity" to "fine" 2. Under the "Mesh size" tab, "un-tick the option "close edges" 2. Specify a minimum mesh size other than "0" (depends on the scales of your geometry) 3. Under the "optimizer" tab...: ----> reduce the "bad element criterion" to 160 ----> increase the surface optimisation steps to around 20 ----> increase the volume optimisation steps to around 15 - 20 This should come up with a much better mesh. Philippose |
Dear Philippose,
Thank a lot! A was able to generate meshes both for fluid and solid domains and export them into OpenFOAM format. I was trying to combine them into one conjugateHeatTransfer case: I created all folders: 0/fluid 0/solid constant/fluid/ constant/solid/ system/fluid system/solid and copied there my meshes and also created all other files. However, when I want to run this case I get an error: Code:
UCOptSideNetGenCoarser_run$ chtMultiRegionSimpleFoam Here is the case: (15 Mb): https://dl.dropboxusercontent.com/u/...ser_run.tar.gz Thank you! Quote:
|
All times are GMT -4. The time now is 05:31. |