|
[Sponsors] |
[CAD formats] Hexahedral meshing of CAD files - Which free software? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 14, 2009, 11:08 |
Hexahedral meshing of CAD files - Which free software?
|
#1 |
Member
Wolfram Kretzschmar
Join Date: Dec 2009
Posts: 71
Rep Power: 17 |
Hi all,
I read a lot in this forum and elsewhere on the internet, trying to obtain as much information on what would be the best software to achieve the following: How to get a (preferrably pure) hexahedral mesh, compatible to OpenFOAM, out of (standardized) CAD files (let's say STL, STEP, IGES)? This is, what I tried: 0. blockMesh. As we have somewhat complicated geometry, I don't think, that this is a good solution. We would like to have something that is associative to our CAD models, that undergo changes of course... 1. Netgen. Only tetrahedral meshes, as far, as I could manage to find out. 2. Gmsh. I could only produce tetrahedral meshes, though I found out, that there should be a possibility to generate hexahedral meshes with Gmsh. I found out, there's an option "Options > Mesh > General > Subdivision algorithm", that can be set to "all hexa". I don't know how to proceed from there on (next step should be some kind of refinement by subdivision of the tets, I think). On the other hand, I found a mailing list contribution by the author (or host of the project), stating, that there isn't something like a working "automatic hex mesh routine" and that there are possibilities similar to blockMesh techniques, that might work. That's not an option (as it seems) like described for blockMesh. ( http://www.geuz.org/pipermail/gmsh/2007/002421.html ) 3. IA-FEMesh. I managed to create a mesh of my imported CAD model, though it would need some more tweaking. Unfortunately, IA-FEMesh can only export to vtk or Abaqus and I couldn't find a way to convert any of those to OpenFOAM formats (Threads in forum exist, but don't include answers.)... 4. Salome. I read, that only Netgen is supported as a built-in mesher (Salome seems to be a frontend) and other meshers would need licencing of commercial products. 5. CalculiX. There are screenshots that show poly or hexahedral meshes. But I'm not sure, whether they have been made wit CalculiX or whether CalculiX is only a frontend like Salome...? 6. snappyHexMesh. The tutorial in the User Guide shows a 2D case, did I get that right? Also most of the screenshots I saw related to snappyHexMesh seem to deal with 2D cases, although written statements say that 3D is possible. Is that true (is there an applicable tutorial)? 7. Discretizer. No CAD import... 8. Others? As you can see, I'm at a point, where I have to decide, which software to use. I'm willing to take tutorials to get along with an applicable software. But first, I would like to know, which software can do, what I would like to do... Otherwise I would have to undergo several tutorials to every software, just to find out, what's not going to be a solution... Thanks in advance Wolle |
|
December 15, 2009, 03:53 |
|
#2 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
Quote:
Code:
$ find tutorials/ -name snappyHexMeshDict
|
||
December 15, 2009, 04:55 |
|
#3 |
Member
Wolfram Kretzschmar
Join Date: Dec 2009
Posts: 71
Rep Power: 17 |
Hi Mark,
Thank you very much for your directions. Especially the motorBike tutorial I found by myself earlier, but didn't know, whether this would fit my case. So I'm going to make my way through these tutorials... Cheers Wolle |
|
December 15, 2009, 05:18 |
|
#4 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
Quote:
You can use snappy for internal or external flows. Which region gets retained is determined from the start point. I haven't found a way to get nice crisp feature edges, but I haven't worked on it much either. |
||
December 22, 2009, 06:28 |
|
#5 |
Member
Wolfram Kretzschmar
Join Date: Dec 2009
Posts: 71
Rep Power: 17 |
Hi Mark,
I'm at the point of working with the motorbike tutorial right now. First question: Do the tutorials (except the first three ones) consist of only the case files or is there a description available to each? I get along with most of the case files (concerning geometry (not the automatic generated files though, but I think, I don't need to understand them perfectly... do I?) and process control) and even seem to understand sHM, but especially the turbulence modelling settings (trubulenceProperties) are too much for me. Basically I understand how the files are set up... I suppose it's the CFD background knowledge and its implementation in OpenFOAM I'm lacking of... Do you have any hints, where to learn something more about the turbulence modelling (i.e. "What model is appropriate in which case / under what circumstances?")? Second question: In order to set up a case for internal flow, is there a tutorial? When there isn't, do I still need the surrounding box, as in the motorBike tutorial? If I position my STL geometry in such a bounding box for an internal flow... what would the external mesh be useful for? I would like to have the boundary conditions applied directly to the STL geometry (resp. the corresponding mesh / patch), but will have to set up BCs for the surrounding box as well, wouldn't I? Or has the surrounding box have to share some faces with the inlet/outlet regions of my STL geometry (Don't suppose so, as how I understand sMH procedures...)? Cheers Wolle |
|
January 8, 2010, 14:33 |
|
#6 | |||||
Member
Johannes Baumann
Join Date: Mar 2009
Location: Baden-Wuerttemberg, Germany
Posts: 43
Rep Power: 17 |
Hi Wolle,
I'm trying to answer at least a few of your numerous questions... Quote:
Quote:
Quote:
Quote:
Regarding BCs with snappy, you may check some of the forum threads on this topic. To make it short: There are two alternatives - using STL files with named sections like in the motor bike tutorial - or using multiple STL files where each file includes one BC surface. Choose whatever you find easier to prepare since it strongly depends on the geometry creation software. Quote:
Best regards, Johannes //edit: typo... Last edited by johannes; January 8, 2010 at 15:10. |
||||||
February 2, 2010, 05:34 |
|
#7 |
Member
Wolfram Kretzschmar
Join Date: Dec 2009
Posts: 71
Rep Power: 17 |
Hi all,
right now, I've come to the following point. 1. Export geometry as IGES. 2. Open new study in Salome. 3. Python script for importing IGES, exploding to faces and exporting faces to STL, also reporting geometrys bounding box measurements, also lets you select faces in order to determine their name by which they will be addressed for BC application later on 4. Bash script for manipulating STL-files (adding names to solids) and joining them together to one STL file 5. Editing blockMeshDict with geometry bounding box data Everything works fine until now. (I even carried out a first rough internal flow case, which seemed to work. But by now, I'm trying to get things working more sorted, less confused, with lots of comments and as automated as possible). Now, for proceeding with snappy, I've got the following question: As far, as I understood: for an internal flow, the patches of the external mesh created by blockMesh are dismissed... What BCs do I specify (for the patches, that blockMesh creates and that are later on dismissed) in the different files in the 0 directory? In blockMeshDict I use patch. What do I use in 0/k, 0/p, 0/U, 0/omega, 0/nut files? Can I use simply anything? What would give the least computing time? Or should I even set no BCs at all for the outer blockMesh box? Cheers Wolle P.S.: I read the UG section about boundary types. Well, I think I will have to go back there and read again, when it comes to the real BCs for calculating the case. However, for the usage of snappyHexMesh I didn't find anything... Last edited by Wolle; February 2, 2010 at 07:47. |
|
February 2, 2010, 14:15 |
|
#8 | |
Member
Johannes Baumann
Join Date: Mar 2009
Location: Baden-Wuerttemberg, Germany
Posts: 43
Rep Power: 17 |
Quote:
Best regards, Johannes |
||
February 2, 2010, 14:56 |
|
#9 | |
Member
Wolfram Kretzschmar
Join Date: Dec 2009
Posts: 71
Rep Power: 17 |
Hi Johannes,
Thanks for your replies. I read what you wrote. That is: So I still need to specify some at first, right? Which ones? OF provides numerous types of BCs. For example I could just set all of them to a random fixedValue or maybe zeroGradient. Would there be any difference (e.g. concerning computing time) between those (examplary) different types? Are there BC types that I should not use at all in order to avoid any conflicts? Quote:
Cheers Wolle
__________________
CAELinux 2010 -- OpenFOAM 1.7 |
||
February 4, 2010, 04:26 |
|
#10 | |
Member
Johannes Baumann
Join Date: Mar 2009
Location: Baden-Wuerttemberg, Germany
Posts: 43
Rep Power: 17 |
Quote:
If your case is an external flow you have to choose the right Base type BCs depending on your application and geometry. However, you don't have to specify the final BCs in the 'boundary' file for blockMesh because you still can edit the final 'boundary' file creating by the snappyHexMesh process. Hope things got a bit clearer now. Best regards, Johannes |
||
February 4, 2010, 06:15 |
|
#11 | |
Member
Wolfram Kretzschmar
Join Date: Dec 2009
Posts: 71
Rep Power: 17 |
Hi Johannes,
Quote:
Thank you very much, I'm getting closer to my goals step by step. I'm thinking about setting up a tutorial for internal flows based on snappyHexMesh and for mesh generation out of standardized CAD file formats, as those seem to be very frequently asked questions, for which there aren't any tutorials available at the moment (to my knowledge). Sadly, at the moment my hardware seems to be outdated and insufficent for proceeding... we'll see. Thanks again for your help! Cheers Wolle
__________________
CAELinux 2010 -- OpenFOAM 1.7 |
||
February 4, 2010, 13:32 |
|
#12 |
Member
Johannes Baumann
Join Date: Mar 2009
Location: Baden-Wuerttemberg, Germany
Posts: 43
Rep Power: 17 |
Hi Wolle,
you're welcome! I totally agree with you that such a tutorial would be very useful. If you haven't yet planned to put the tutorial and/or some similar explanations about this topic on the wiki, I'd encourage you to do so, because users could easily contribute, e.g. in form of a 'best practics' section. Maybe I even got something worth adding there, too. Best regards, Johannes |
|
February 5, 2010, 03:17 |
|
#13 |
Member
Wolfram Kretzschmar
Join Date: Dec 2009
Posts: 71
Rep Power: 17 |
Hi Johannes,
well, the wiki would be alright for me. Nevertheless I would prefer to set it all up and running perfectly prior to publishing it. At the moment I'm facing a lack of virtual memory while snappyHexMeshing (works good with smaller geometries though!), on the other hand I don't know, whether my method/scripts produce a closed volume or whether there are gaps that lead to unintentional sHM behaviour. If so, there are still possibilities of curing/healing/stitching the faces together. Another possibiliy for the behaviour observed, is that snappy itself might create those gaps due to cell removement after just a low refinement level. This would then be a result of my efforts on coping with too few memory... And another serious issue is, that I'm going to need help on setting up the correct simulation parameters as I do not intend to publish working, but finally senseless examples. But one at a time... Cheers Wolle
__________________
CAELinux 2010 -- OpenFOAM 1.7 |
|
March 23, 2010, 07:39 |
|
#14 |
Senior Member
|
Hi Wolfram,
did you have a look at engrid http://engits.eu/cms/index.php?id=5 http://engits.eu/cms/index.php?id=3 ? what about using polyDualMesh http://www.idurun.com/?p=367 for working with the mesher you mentioned before? |
|
November 22, 2014, 22:40 |
|
#15 | |
New Member
Marta Drabek
Join Date: Oct 2014
Posts: 7
Rep Power: 12 |
Quote:
Thanks! |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What software to clean/fix/prepare CAD files? | lovecraft22 | Main CFD Forum | 13 | February 4, 2017 05:44 |
free GUI based CFD software | devalvyas | Main CFD Forum | 3 | June 15, 2016 15:18 |
[Gmsh] Vertex numbering is dense | KateEisenhower | OpenFOAM Meshing & Mesh Conversion | 7 | August 3, 2015 11:49 |
Which opensource and free CAD program? | Xwang | Main CFD Forum | 1 | October 24, 2010 18:29 |
Free CFD Software wanted | Zhou Hua | Main CFD Forum | 47 | February 18, 2000 01:52 |