CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

How are people getting on with current open source meshing software?

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 15, 2023, 18:51
Default How are people getting on with current open source meshing software?
  #1
Senior Member
 
andy
Join Date: May 2009
Posts: 303
Rep Power: 18
andy_ is on a distinguished road
I have recently started a project with the intention of maximising the use of open source software. I was expecting meshing to go fairly smoothly but with the exception of initial tetrahedral meshes this has so far not been the case. Have others been able to use gmsh, salome or similar open source meshing programs without significant issues for engineering-type projects?
Kummi likes this.
andy_ is offline   Reply With Quote

Old   March 17, 2023, 17:32
Default
  #2
Senior Member
 
andy
Join Date: May 2009
Posts: 303
Rep Power: 18
andy_ is on a distinguished road
Apologies for replying to and bumping my own post. Does anybody engaged in primarily engineering rather than academic work use open source meshing software?
andy_ is offline   Reply With Quote

Old   March 18, 2023, 16:02
Default
  #3
Senior Member
 
Joern Beilke
Join Date: Mar 2009
Location: Dresden
Posts: 530
Rep Power: 20
JBeilke is on a distinguished road
No answer is also an answer. Maybe you should ask at first, who is using OpenSource software for doing serious engineering work.
I know OF since version 1.0 and also used it sometimes for engineering projects. But usually with GridPro meshes.
sbaffini and aerosayan like this.
JBeilke is offline   Reply With Quote

Old   March 18, 2023, 17:27
Default
  #4
Senior Member
 
Join Date: Oct 2011
Posts: 242
Rep Power: 17
naffrancois is on a distinguished road
Hello,

We use freecad, gmsh, paraview on a regular basis for different projects, played a bit with salome some time ago. These open source softwares are used with our pde solver. Most of our projects involve trivial geometries but very tough physics and there these great softwares do the job very nicely.

But sometimes some projects come with really complicated geometries and things get more tricky, usually heavy scripting is necessary to build the workflow. Example, we did some python scripts to make freecad deal with SRTM data and cities shapefiles (but could we have been able to do so with a closed proprietary soft ?). Other annoying things generally occur to make CAD soft communicate properly with the mesher, like surface and volume markers getting lost in the process, cleaning geometry, holes etc. Other limitation, as far as I know freecad does not have an official assembler which makes complex systems difficult to build and constrain. Gmsh gui is still a bit limited and you have to go deep in the scripting to leverage the full potential of the algorithms. Etc

Nevertheless, with some efforts, you can get quite complex simulations done with these pre/post softwares and their development curve is very steep considering they are open source. In the end, time is valuable and there is always a tradeoff to be made between licence cost and soft capabilities vs engineer cost and capabilities
Kummi and aerosayan like this.

Last edited by naffrancois; March 18, 2023 at 22:35.
naffrancois is offline   Reply With Quote

Old   March 19, 2023, 05:30
Default
  #5
Senior Member
 
andy
Join Date: May 2009
Posts: 303
Rep Power: 18
andy_ is on a distinguished road
Quote:
Originally Posted by JBeilke View Post
No answer is also an answer. Maybe you should ask at first, who is using OpenSource software for doing serious engineering work.
I know OF since version 1.0 and also used it sometimes for engineering projects. But usually with GridPro meshes.
I had picked up the impression from the chat on the web that open source meshing software was being used for a registerable amount of engineering work. Having now had a go with gmsh and salome I am checking how true that might be. The issues experienced were different but I was surprised to find them given the length of time the software has been around.
andy_ is offline   Reply With Quote

Old   March 19, 2023, 07:40
Default
  #6
Senior Member
 
andy
Join Date: May 2009
Posts: 303
Rep Power: 18
andy_ is on a distinguished road
Quote:
Originally Posted by naffrancois View Post
But sometimes some projects come with really complicated geometries and things get more tricky, usually heavy scripting is necessary to build the workflow. Example, we did some python scripts to make freecad deal with SRTM data and cities shapefiles (but could we have been able to do so with a closed proprietary soft ?).
If you are writing a script to create and mesh a complicated geometry wouldn't that make freecad redundant?

Quote:
Originally Posted by naffrancois View Post
Other annoying things generally occur to make CAD soft communicate properly with the mesher, like surface and volume markers getting lost in the process, cleaning geometry, holes etc. Other limitation, as far as I know freecad does not have an official assembler which makes complex systems difficult to build and constrain.
Perhaps I need to give freecad another go but a few years back it was pretty buggy and the lack of a reasonable way to assemble seemed to me to make it a largely pointless layer between the OCC solid modeller and grid generators.

Quote:
Originally Posted by naffrancois View Post
Gmsh gui is still a bit limited and you have to go deep in the scripting to leverage the full potential of the algorithms. Etc
I have found the gui for the mesh OK for supporting scripts now there is a python interface and top down geometry handling. I found the bottom up approach using it's own scripting language too much hard work to bother with after a bit of dabbling. Never used the post processing or solvers. Never generated a mesh interactively but have pressed a few buttons now and again to see what happens. Anything labelled experimental seems to core dump.

Quote:
Originally Posted by naffrancois View Post
Nevertheless, with some efforts, you can get quite complex simulations done with these pre/post softwares and their development curve is very steep considering they are open source.
Not sure I understand what you mean by steep development curve? It is difficult to learn how to use for users? difficult to learn how to fix for software developers? or something else?

Quote:
Originally Posted by naffrancois View Post
In the end, time is valuable and there is always a tradeoff to be made between licence cost and soft capabilities vs engineer cost and capabilities
Yes this is at the heart of my question. I had initially thought that open source meshing had made more progress replacing commercial software than I now think may be the case. If I have to fall back on using my own bits and bobs of meshing software thrown together over the decades to support the development of CFD and related solvers should I take a few weeks out and do a proper job? If so, would releasing it as open source create more overhead than benefit?

I tried to report/discuss some bugs/problems in gmsh but my application for a userid to do so was rejected. That may be a clue. Having looked at how the salome software is developed it is from the other end of the spectrum to how I develop code. Doesn't make it poor software but it does make it harder to work with than I want to pick up.

PS What type of mesh/elements does your software use?
andy_ is offline   Reply With Quote

Old   March 19, 2023, 13:12
Default
  #7
Senior Member
 
Join Date: Oct 2011
Posts: 242
Rep Power: 17
naffrancois is on a distinguished road
Quote:
If you are writing a script to create and mesh a complicated geometry wouldn't that make freecad redundant?
What I meant is that freecad lets you quite easily get access to all of its functions through its python interface. Then if some functionalities are missing in the gui, you can go beyond and code it yourself. I cannot say if freecad is redundant to gmsh occ. To be honest last time I tried using gmsh boolean operations, it was pretty limited. But things have probably improved. By the way, what I wanted to say with "steep development curve" is that these two softwares improved quite a lot in a few years.

Quote:
Perhaps I need to give freecad another go but a few years back it was pretty buggy and the lack of a reasonable way to assemble seemed to me to make it a largely pointless layer between the OCC solid modeller and grid generators.
I agree that the assembler is a must have. I do not know when it will be ready but many threads convinced me that they're working hard on it.

Quote:
I tried to report/discuss some bugs/problems in gmsh but my application for a userid to do so was rejected. That may be a clue.
Not sure to understand what you mean. There is a gmsh issues website where you can post issues but also how-to questions.

Quote:
PS What type of mesh/elements does your software use?
The classical element types: segments in 1D, tris/2nd order tris/quads in 2D and tetra/2nd order tetras/hexas/pyras/prisms in 3D
naffrancois is offline   Reply With Quote

Old   March 19, 2023, 16:43
Default
  #8
Senior Member
 
andy
Join Date: May 2009
Posts: 303
Rep Power: 18
andy_ is on a distinguished road
Quote:
Originally Posted by naffrancois View Post
Not sure to understand what you mean. There is a gmsh issues website where you can post issues but also how-to questions.
In order to post to the issues list a gmsh moderator on gitlab must accept your application to do so. In my case the moderator refused for reasons unknown but I did get an email stating my application had been refused. It wasn't lost. This suggests an inclination towards rejecting people rather than accepting them presumably based on experience over the past couple of decades of managing their open source project. Useful information assuming I am not reading too much into what happened.

Quote:
Originally Posted by naffrancois View Post
The classical element types: segments in 1D, tris/2nd order tris/quads in 2D and tetra/2nd order tetras/hexas/pyras/prisms in 3D
Have you had issues generating acceptable hex and prism elements with gmsh?
andy_ is offline   Reply With Quote

Old   March 19, 2023, 18:28
Default
  #9
Senior Member
 
Join Date: Oct 2011
Posts: 242
Rep Power: 17
naffrancois is on a distinguished road
Quote:
In order to post to the issues list a gmsh moderator on gitlab must accept your application to do so. In my case the moderator refused for reasons unknown but I did get an email stating my application had been refused. It wasn't lost. This suggests an inclination towards rejecting people rather than accepting them presumably based on experience over the past couple of decades of managing their open source project. Useful information assuming I am not reading too much into what happened.
Ok, sorry to hear about that. I did not remember there was something to fill and be accepted before being able to post issues or ask questions there.

Quote:
Have you had issues generating acceptable hex and prism elements with gmsh?
Oh well yes I had. Pyramidal transition layer was quite limited when they first introduced it (or maybe at that time I did not know how to build them correctly). I gave it another shot not so long time ago and it went smoother. So I can only tell it is going better. I cannot say I am an expert of meshing and hybrid grids are not really needed for our tasks for now, I just generated some to check its correct handling in our pde solver. Very probably not as complex as the one you may need.
naffrancois is offline   Reply With Quote

Old   March 20, 2023, 04:44
Default
  #10
Senior Member
 
andy
Join Date: May 2009
Posts: 303
Rep Power: 18
andy_ is on a distinguished road
Quote:
Originally Posted by naffrancois View Post
Ok, sorry to hear about that. I did not remember there was something to fill and be accepted before being able to post issues or ask questions there.
Thanks but there is nothing to be sorry about. I was reporting bugs because that is what one does for open source software that one uses. Rejecting my application saved me a chore and, I think, told me something useful about running open source projects.

Quote:
Originally Posted by naffrancois View Post
Oh well yes I had. Pyramidal transition layer was quite limited when they first introduced it (or maybe at that time I did not know how to build them correctly). I gave it another shot not so long time ago and it went smoother. So I can only tell it is going better. I cannot say I am an expert of meshing and hybrid grids are not really needed for our tasks for now, I just generated some to check its correct handling in our pde solver. Very probably not as complex as the one you may need.
The current project involves thick panels with bolted on objects and simulating both the structure and fluid. An automatic tet mesh was generated with gmsh and python scripts with no significant issues compared to commercial meshing software. However like many structures the appropriate elements are primarily hex with prisms around the awkward shaped cutouts in the panels assuming a semi-automatic approach without a competent automatic hex mesher. Using a bottom up approach and working around the issues/bugs it might have been possible to generate something but the effort would be excessive and the mesh less than ideal given the lack of algorithms supporting hex meshing.
andy_ is offline   Reply With Quote

Old   March 20, 2023, 04:59
Default
  #11
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by andy_ View Post
Thanks but there is nothing to be sorry about. I was reporting bugs because that is what one does for open source software that one uses. Rejecting my application saved me a chore and, I think, told me something useful about running open source projects.


I once suggested to the developer of gmsh about exporting the mesh to one very simple format that one can load from a simple c or c++ (or fortran) code. So that one can convert the mesh to their solvers format easily.


This i did after having huge pain in A**s from converting from su2 format (another opensource that can not describe their format) that was exported from gmsh.


He told me to just open a token.

Well I wanted to suggest gmsh to people who use Wildkatze but then if they themselves do not want to make life easy for people then who am i to argue with that.


PS: This was needed because su2 format is not clear and every time i had to convert i had to make changes in code to load it. Their BCs (numbering of nodes in them) are just random guess since docs do not explain.
PS2: I no longer support su2 files in wildkatze since in l have better things to do in life than to fix their import every time a new mesh has to be converted.
arjun is offline   Reply With Quote

Old   March 20, 2023, 05:52
Default
  #12
New Member
 
Ivan
Join Date: Nov 2012
Location: Czech Republic
Posts: 22
Rep Power: 13
cfdhelp is on a distinguished road
Could you please recommend some software for OpenFOAM ?
cfdhelp is offline   Reply With Quote

Old   March 20, 2023, 06:29
Default
  #13
Senior Member
 
andy
Join Date: May 2009
Posts: 303
Rep Power: 18
andy_ is on a distinguished road
Quote:
Originally Posted by arjun View Post
Well I wanted to suggest gmsh to people who use Wildkatze but then if they themselves do not want to make life easy for people then who am i to argue with that.
The project has been running for a long time and I suspect they have learnt how to best manage it to satisfy their objectives. If they were to make it easy for people then they will have to allocate time to deal with what turns up. The majority of people are going to absorb time without making any significant positive contributions to the project. The question is how much of this is acceptable in order to pick up some positive contributions? Do the project authors want collaboration? My suspicion is that many, possibly most, authors of solo projects don't. They welcome suggestions and bug fixes but the project is wholly their's which is of course absolutely fine.

The gmsh bug tracker is the first I have come across that prevents people from reporting bugs and feature suggestions but they do seem to be using it as a forum as well which is likely to be relevant. There was something about using work emails which I will no longer do for casual forums on the web given the problems it has caused me in the past. This is possibly the reason for the rejection given they would seem to have little else to work with. Again an interesting and probably informative choice should one be considering a similar open source project.

Gmsh is a good project that seems to be doing well and growing. I would recommend it as a free and reasonably straightforward automatic tet mesh generator but not for other types of meshes.
andy_ is offline   Reply With Quote

Old   March 20, 2023, 07:26
Default
  #14
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Yaa it seems it is working out for them. Too bad can't recommend it for Wildkatze.


Quote:
Originally Posted by andy_ View Post
The project has been running for a long time and I suspect they have learnt how to best manage it to satisfy their objectives. If they were to make it easy for people then they will have to allocate time to deal with what turns up. The majority of people are going to absorb time without making any significant positive contributions to the project. The question is how much of this is acceptable in order to pick up some positive contributions? Do the project authors want collaboration? My suspicion is that many, possibly most, authors of solo projects don't. They welcome suggestions and bug fixes but the project is wholly their's which is of course absolutely fine.

The gmsh bug tracker is the first I have come across that prevents people from reporting bugs and feature suggestions but they do seem to be using it as a forum as well which is likely to be relevant. There was something about using work emails which I will no longer do for casual forums on the web given the problems it has caused me in the past. This is possibly the reason for the rejection given they would seem to have little else to work with. Again an interesting and probably informative choice should one be considering a similar open source project.

Gmsh is a good project that seems to be doing well and growing. I would recommend it as a free and reasonably straightforward automatic tet mesh generator but not for other types of meshes.
arjun is offline   Reply With Quote

Old   March 20, 2023, 08:59
Default
  #15
Senior Member
 
Joern Beilke
Join Date: Mar 2009
Location: Dresden
Posts: 530
Rep Power: 20
JBeilke is on a distinguished road
Is gmesh able to export OF format?

In that case you can use "foamMeshToFluent" to create a *.msh file as long as you have only regular cells or use "foamToCcm" in case you have polyhedral cells.
JBeilke is offline   Reply With Quote

Old   March 20, 2023, 09:21
Default
  #16
Senior Member
 
Joern Beilke
Join Date: Mar 2009
Location: Dresden
Posts: 530
Rep Power: 20
JBeilke is on a distinguished road
Quote:
Originally Posted by cfdhelp View Post
Could you please recommend some software for OpenFOAM ?

We would be happy if there was a free software that we could recommend.

Some people buy a single core license of StarCCM+ to use it for the meshing stuff :-) At first you need a CAD-program that can read solid models and pure surface models and also partially defective solids, which then can be repaired. It is always very embarrassing when you can't even read the client's data.
JBeilke is offline   Reply With Quote

Old   March 20, 2023, 11:52
Default
  #17
New Member
 
Ivan
Join Date: Nov 2012
Location: Czech Republic
Posts: 22
Rep Power: 13
cfdhelp is on a distinguished road
Hello, I would like to ask you have you ever try to find opensource software for polyhedral meshes with prism. layer ?
For FMV central centered ?
cfdhelp is offline   Reply With Quote

Old   March 21, 2023, 03:29
Default
  #18
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by JBeilke View Post
Is gmesh able to export OF format?

In that case you can use "foamMeshToFluent" to create a *.msh file as long as you have only regular cells or use "foamToCcm" in case you have polyhedral cells.



That would require one to install openfoam. If there was an easy output then i would have written a converter from it to Fluent format and created a git repository so that people can download and simply use it in their projects. (A simple C++ code).



That way the mesh would be available to almost all of the finite volume users.



The mesh that is exported by gmsh is for finite element solvers. That is they just list nodes for each element. While the finite volume solvers need face based mesh export ie list of faces and nodes for them.



Anyway if someone want to use gmsh then i only advise them to convert the mesh themselves. (I wanted to remove this part and make life easy for user).
arjun is offline   Reply With Quote

Old   September 29, 2023, 04:14
Default My experience with open source meshing...
  #19
Member
 
Bob Tipton
Join Date: Apr 2020
Posts: 34
Rep Power: 6
Bob Tipton is on a distinguished road
I was taught that if I have nothing nice to say, I should say nothing at all.


<Long silence goes here>

I am trying to do develop devices relying on passively energized vortices, large vortices. The shapes are complex as is the fluid dynamics. I had expected the engineering challenge to be in developing the shapes and I've run about 100 trade studies. I've done enough to convince myself I have to keep going.


The unfortunate facts are that meshing the models is taking about 90% of my labor time and 2/3 of my CPU budget. I've been searching for 3 years.



BlockMesh and SnappyHexMesh seem to be the only widely used apps. I have no experience with Salome, but based on posts here I doubt I'll invest the time.

BlockMesh is a setup tool, for my use case. It lays out hexahedrals which are Cartesian grids in their coordinate systems. Parallelepiped blocks, hexahedral cylindrical sections etc. More than adequate for pipe flow and heat transfer in rectilinear models.

SnappyHexMesh seems to be the most (only?) supported tool for creating meshes of arbitrary shapes. It can be made to work, but it's highly iterative, can take hours and frequently fails to converge.

cfMesh is regularly reported as the best open source tool - but its SourceForge page shows it was abandoned two years ago and it won't compile with OpenFoam-11. I just tried that. No binaries are provided for download. cfMesh+ is available for purchase.

That seems to be it.

Right now my problem is obscure and difficult enough that I'm weighing the cost/benefits of writing a new one. Not joking.

Our research grant's budget isn't large enough to afford to purchase the pro-meshers.
I've spent the last 20+ years in 3D cad doing meshing, voxels, distance fields etc. So I have the algorithm figured out.
The analysis itself has enough error that we will probably end up doing much of the work empirically anyway.

Last edited by Bob Tipton; September 29, 2023 at 04:15. Reason: typos
Bob Tipton is offline   Reply With Quote

Old   September 29, 2023, 04:22
Default Follow up...
  #20
Member
 
Bob Tipton
Join Date: Apr 2020
Posts: 34
Rep Power: 6
Bob Tipton is on a distinguished road
I see many posts in the "you can force it to get your job done" category. Perhaps some of you have the luxury of expending hours or days setting up a run.


Some of us have 4 weeks to get 100 trade studies done or lose a project. We are looking for a mesher that actually works quickly, reliably and we don't have to hold its hand while it runs.


One other issue - thin walls, fabric, sails and baffles.

We're working in the area. SnappyHexMesh supports these, but the leading edge conditions combined with the mesher insufficiently sample the region resulting in early predictions of detachment and stall. Modeling a good fabric sail design accurately requires much better meshing. Worse, we have Coanda slots and ejectors which must be modeled insitu. That results in micro-meshes in and around the slots and macrmeshes on the rest of the body - or the slots detach and choke.
Bob Tipton 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
[swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc ofslcm OpenFOAM Community Contributions 25 March 6, 2017 11:03
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 17:02
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 13:41
[swak4Foam] funkySetFields compilation error tayo OpenFOAM Community Contributions 39 December 3, 2012 06:18
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 18:51


All times are GMT -4. The time now is 08:41.