Thank you! I wasted so much time today on sHM parameters for my geometry, that it got me frustrated and it made me think of how slow I am at solving my problems just because of dozen not satisfying remeshings each time. sMH works fine most of the time, but sometimes it forces me to use unreasonably large amount of cells, just to get rid of few bad ones, sometimes the layer addition totally distorts cells away from the viscous sublayer, and sometimes I cannot force layer addition on some faces no matter what mesh quality settings I pick. And it is more frustrating the more simple shape appears to be in my opinion. This looks very simple and fast, I'll give it a try tommorow. It might be the real game changer
@@OpenFOAMJozsefNagy I've been testing cfMesh for the past week and I have this conclusion that it is nearly impossible to create any mesh that passes "checkMesh -allGeometry -allTopology" with minor errors. The mesh looks great, it fits layers with ease, but it has a lot of skew cells, non-orthogonal cells, negative volumes, warped faces etc. and it doesn't have any additional parameters to improve this . Even the tutorial cases return bad quality meshes. Not in terms of how they represent real geometries, but in terms of cell quality criteria.
@@HolzmannCFD I had some issues with convergence back then, but I figured out later, that the problem was the oscillating nature of flow i tried to capture with the steady state solver. I ran some successful simulations on cfmeshes since then. I've learned that I can 'manually' merge/zone my cfmeshes to perform cht or ami and I find cfmesh even more usefull now (i used to think that i'm forced to use sHM to do this). Lack of control over mesh quality criteria might be sometimes annoying, I had one geometry with shaped narrow channel and bunch of U-shaped heaters, which for me was so hard to properly mesh, that i gave up meshing and built a physical prototype with many sensors and see-through bulk :/ cfMesh is a great tool and I can't recommend it enough, it has its limitations, but you can find some work-arounds for them with other openFOAM tools
Thanks a million Jozsef Nagy for this awesome tutorial. Finally I can use a better tool other than snappy for my axial turbine because for me snappy didn't end up with smooth mesh around sharp blade edges.
Hello Mr. Jozsef, I'm using OpenFOAM 7 and I do not see cfmesh installed anywhere. Could you please instruct me on how I can install it? Sincere thanks
Hi József, very helpful video!! One question: how did you create STL-files for the walls and the in- and outlet. I think these consist of surfaces and not of solids. If I try to create such surfaces, I cannot export them (e.g. with AutoCAD or Inventor) because there are no volumes. Best regards
@@OpenFOAMJozsefNagy Sir, Thanks for reply. Having watched your video carefully. I checked the module folder but it. was empty. I downloaded the cfmesh separately and completed the rest video tutorials.
Hi Jozsef, firstly, thank you for amazing tutorial. It was very easy to replicate. However, I have an issue how to handle baffle surfaces with cfMesh. I went through the user guide and as much as I searched the internet for an example of how to treat the baffles, I was unable to find any guide. I am wondering if you can point me to where to find the treatment of baffles.
Hell, really cfmesh is the best code for meshing. I think and I tried to use polyhedral mesh, and it was excellent and speedy but some time makes more nodes more than 9 million.
Fixed it now (answer below) I've been testing different meshing utilities, but i keep getting the same error saying that openfoam cant find the controlDict file. Fistly, i didn't think you needed a controlDict file for meshing (only a blockMeshDict or meshDict etc), but also, i do have a controlDict file. So i'm confused. I am in my home directory, the files are in the right places. the directory where the controlDict text file is this: /home/"my name"/cylinderTestCase/system/ Any ideas? when i created the dict files, i made them all .txt . Since i wasn't copying any from tutorials and making my own up. I'm new to linux and Openfoam, so i dont know what file extension (if any?!) when creating - say - a meshDict or whatever. To fix it i copied a random controlDict file, replaced it with my meshDict info, and renamed it meshDict, and deleted the original.
I did all you did, but can't read edge. and failed. please help me with how to use salome python script for creating edge and fms file. Because it dosen't work with the salome 9.3. Thanks
Hi, nice video. I have a question regarding to fluid-structure interaction. In your case, you only generate mesh beween bounding box and dog, we could say it fluid domain. What if I want to create mesh for solid domain (e.g. the dog) in the meantime? I'm wondering how to do it in cfmesh. Looking forward to hearing any constructive ideas.
@@OpenFOAMJozsefNagy Hi Jozsef, thanks for your reply. I tried to mesh them separately, but mesh at interface is not conformal. I'm not sure if there is one utility in cfmesh can merge the cells perfectly.
Respected Sir, the stl files that you have uploaded in github showing some co-ordinates with notepad ++. However , the stl files created using freeCAD are showing "Null" in notepad ++ although the figures are visible in paraview. Can you please help me in this regards??
It seems Blender could not name the 'solid' in the stl file correctly so that part needs to be renamed manually in Notepad. Also the stl file has to be in ASCII format, otherwise 'cat' command and 'surfaceFeatureEdges' command would generate some weird result. Tested in OpenFOAM V2012 windows version(mingw64).
cfMesh is a pretty nice meshing tool in terms of its efficiency, simplicity and flexibility!! One thing I don't like it is that it accepts only the fms file containing patches and extracted feature edges (remark: it accepts stl as well but stl contains only patches, no edges). There're two ways to do - 1. using command surfaceFeatureEdges with a specified angle (remark: there's no full control on the selection of the feature edges), and 2. using Salome together with python script (remark: full control on selected feature edges but only in Salome). Do you know if there's any way to have full control of the feature edges selection if I use Blender for geometry buildup? Exporting stl (prepared in Blender) into Salome can be a way but a bit trouble.
No, unfortunately. I mean theoretically it is possible to program an exporter for blender, but my python skills are unfortunately not up to the challenge. If anyone has the python master skills, I would be happy to support.
Hi Joszef, thanks for your contribution. I will ask you why the second mesh is much coarser compared to the second run. I don't get the point here as you limited the max parameter while keeping the smaller one. I would have expected the same surface mesh with finer internal cells. Even the surface refinement was reduced from 0.3 to 0.1. So for me it should be vice versa if the meshing output. First mesh, coarser as the max parameter is 0.5 Second mesh finer as the min parameter is 0.1 However it seems that cfmesh is using some special refinement on the dog in the coarse case. Why it does not happen with the second ru., I don't know. Can you please clarify my doubts.?
Hi Joszef, I much prefer the workflow of setting a cell size at the surface of interest and a growth rate from that surface, similar to what you demonstrated. Unfortunately, I have not been able to find a way to adjust the growth rate of the cells in cfmesh (you are able to adjust the distance from the surface for which the specified cell size holds true). When there is a big difference between the surface cell size and freestream cells, the transition between these cells is not smooth. In order to smooth these out the cells I use multiple box object refinements to gradually increase cell size to freestream, although this can be very time consuming. I am hoping you, or someone else, have a good suggestion of where to look for a solution. And as always, thank you for the videos!
@@vaibhavvb9898 Yeah. The problem was a large metal enclosure with lots of small circuit boards attached to the front panel. Airflow for the enclosure was around the port on the front panel, some being only 0.5mm if I remember correctly.
cfmesh rocks! I'll never believe SHM is better, and the ones saying this are just bragging dandies. (I'm kidding obviously :D) However, I do believe SHM has a better layer addition tool (for who wants to invest the time), compared to the free version of cfmesh atleast which is not too controlable. I discussed with a guy using cfmesh for the core mesh, and snappy for the layers. Everything is possible haha. I think what is missing out there is a HEXA BLOCK type open-source mesher, ICEM-like. (not blockmesh).
Hey Mr Jozsef Nagy, Thank you for the amazing tutorial. I have an issue with combining the stl files. I have attached the link to files here : drive.google.com/drive/folders/1Q-NOoOtFV2ui9Jc7u8rK279wVzxE4wIP?usp=sharing I would really appreciate if you could help. Thanks in advance
This is really helpful József, keep these tutorials coming.
Thank you! I wasted so much time today on sHM parameters for my geometry, that it got me frustrated and it made me think of how slow I am at solving my problems just because of dozen not satisfying remeshings each time. sMH works fine most of the time, but sometimes it forces me to use unreasonably large amount of cells, just to get rid of few bad ones, sometimes the layer addition totally distorts cells away from the viscous sublayer, and sometimes I cannot force layer addition on some faces no matter what mesh quality settings I pick. And it is more frustrating the more simple shape appears to be in my opinion. This looks very simple and fast, I'll give it a try tommorow. It might be the real game changer
In my experience for some geometries snappy is the better choice, for some cfMesh. It is worth investigating though.
@@OpenFOAMJozsefNagy I've been testing cfMesh for the past week and I have this conclusion that it is nearly impossible to create any mesh that passes "checkMesh -allGeometry -allTopology" with minor errors. The mesh looks great, it fits layers with ease, but it has a lot of skew cells, non-orthogonal cells, negative volumes, warped faces etc. and it doesn't have any additional parameters to improve this . Even the tutorial cases return bad quality meshes. Not in terms of how they represent real geometries, but in terms of cell quality criteria.
@@piotrmecht2500 Thank you for your input. checkMesh is usually very strict. Do the simulations run?
@@piotrmecht2500 just one question. Does foam handle the calculation with cfmesh in your case?
@@HolzmannCFD I had some issues with convergence back then, but I figured out later, that the problem was the oscillating nature of flow i tried to capture with the steady state solver. I ran some successful simulations on cfmeshes since then. I've learned that I can 'manually' merge/zone my cfmeshes to perform cht or ami and I find cfmesh even more usefull now (i used to think that i'm forced to use sHM to do this). Lack of control over mesh quality criteria might be sometimes annoying, I had one geometry with shaped narrow channel and bunch of U-shaped heaters, which for me was so hard to properly mesh, that i gave up meshing and built a physical prototype with many sensors and see-through bulk :/ cfMesh is a great tool and I can't recommend it enough, it has its limitations, but you can find some work-arounds for them with other openFOAM tools
Very nice to watch your video in 2020. Thank you uploading videos!
Thanks a million Jozsef Nagy for this awesome tutorial. Finally I can use a better tool other than snappy for my axial turbine because for me snappy didn't end up with smooth mesh around sharp blade edges.
Great! I am glad it helps.
Thank you so much for this great tutorial.
Hello Mr. Jozsef,
I'm using OpenFOAM 7 and I do not see cfmesh installed anywhere. Could you please instruct me on how I can install it?
Sincere thanks
you need to add it yourself
Yes for v7 you have to compile it yourself. Works only with the openfoam.com version out of the box
@@OpenFOAMJozsefNagy I'll look into it. Thanks!
Hi József, very helpful video!! One question: how did you create STL-files for the walls and the in- and outlet. I think these consist of surfaces and not of solids. If I try to create such surfaces, I cannot export them (e.g. with AutoCAD or Inventor) because there are no volumes. Best regards
... I found the answer. Thanks again: ruclips.net/video/b0h8MxEMQPM/видео.html
@@janpeterbalmes9354 Great!
Hello Sir,
I have installed v12 in WSL. I donot find the cfMesh in the modules. How to resolve the issue?
If it is v2012 then it should work out of the box. It is in OpenFOAM/OpenFOAM-v2012/modules/cfmesh
@@OpenFOAMJozsefNagy Sir,
Thanks for reply. Having watched your video carefully. I checked the module folder but it. was empty. I downloaded the cfmesh separately and completed the rest video tutorials.
@@shivamgupta9967 Great!
Hi Jozsef, firstly, thank you for amazing tutorial. It was very easy to replicate. However, I have an issue how to handle baffle surfaces with cfMesh. I went through the user guide and as much as I searched the internet for an example of how to treat the baffles, I was unable to find any guide. I am wondering if you can point me to where to find the treatment of baffles.
thanks for this tutorial; very helpful
Thank you professor..!!
Hell, really cfmesh is the best code for meshing. I think and I tried to use polyhedral mesh, and it was excellent and speedy but some time makes more nodes more than 9 million.
For some geometries it is better than snappy.
Cfmesh or salome ; which is better ?
My personal preference is cfMesh
Fixed it now (answer below)
I've been testing different meshing utilities, but i keep getting the same error saying that openfoam cant find the controlDict file. Fistly, i didn't think you needed a controlDict file for meshing (only a blockMeshDict or meshDict etc), but also, i do have a controlDict file. So i'm confused. I am in my home directory, the files are in the right places.
the directory where the controlDict text file is this: /home/"my name"/cylinderTestCase/system/
Any ideas?
when i created the dict files, i made them all .txt . Since i wasn't copying any from tutorials and making my own up. I'm new to linux and Openfoam, so i dont know what file extension (if any?!) when creating - say - a meshDict or whatever. To fix it i copied a random controlDict file, replaced it with my meshDict info, and renamed it meshDict, and deleted the original.
Thanks József!
I did all you did, but can't read edge. and failed. please help me with how to use salome python script for creating edge and fms file. Because it dosen't work with the salome 9.3. Thanks
Awesome, you are really helpful sir. Thanks
Hi, nice video. I have a question regarding to fluid-structure interaction. In your case, you only generate mesh beween bounding box and dog, we could say it fluid domain. What if I want to create mesh for solid domain (e.g. the dog) in the meantime? I'm wondering how to do it in cfmesh. Looking forward to hearing any constructive ideas.
Separately and then join the meshes.
@@OpenFOAMJozsefNagy Hi Jozsef, thanks for your reply. I tried to mesh them separately, but mesh at interface is not conformal. I'm not sure if there is one utility in cfmesh can merge the cells perfectly.
@@kewu6250 No there is not.
Respected Sir, the stl files that you have uploaded in github showing some co-ordinates with notepad ++. However , the stl files created using freeCAD are showing "Null" in notepad ++ although the figures are visible in paraview. Can you please help me in this regards??
Maybe you exported as binary nd not as ascii?
@@OpenFOAMJozsefNagy thanks a lot sir
Why i cant do the surfaceFeatureEdges Combined.stl Combined.fms? The error is command not found. Can anyone help?
Maybe you use the .org version. Please use .com for compatibility.
It seems Blender could not name the 'solid' in the stl file correctly so that part needs to be renamed manually in Notepad. Also the stl file has to be in ASCII format, otherwise 'cat' command and 'surfaceFeatureEdges' command would generate some weird result. Tested in OpenFOAM V2012 windows version(mingw64).
Try this video of mine: ruclips.net/video/jqhla5SDonY/видео.html
"Ruff" tutorial? Well played :D
It is really helpful, thank you sir.
cfMesh is a pretty nice meshing tool in terms of its efficiency, simplicity and flexibility!!
One thing I don't like it is that it accepts only the fms file containing patches and extracted feature edges (remark: it accepts stl as well but stl contains only patches, no edges). There're two ways to do - 1. using command surfaceFeatureEdges with a specified angle (remark: there's no full control on the selection of the feature edges), and 2. using Salome together with python script (remark: full control on selected feature edges but only in Salome).
Do you know if there's any way to have full control of the feature edges selection if I use Blender for geometry buildup? Exporting stl (prepared in Blender) into Salome can be a way but a bit trouble.
No, unfortunately. I mean theoretically it is possible to program an exporter for blender, but my python skills are unfortunately not up to the challenge. If anyone has the python master skills, I would be happy to support.
@@OpenFOAMJozsefNagy Thanks for your reply. I'm also not an expert in python, so sad! It looks not an easy task.
When I'm trying this i always get "surfaceFeatureEdges command not found". Why? :C
Possibly you are using .org version and not .com
@@OpenFOAMJozsefNagy Thank you very much, that helped a lot!
@@OpenFOAMJozsefNagy then can i just skip the surfaceFeatureEdges command?
Hi Joszef, thanks for your contribution. I will ask you why the second mesh is much coarser compared to the second run. I don't get the point here as you limited the max parameter while keeping the smaller one. I would have expected the same surface mesh with finer internal cells.
Even the surface refinement was reduced from 0.3 to 0.1. So for me it should be vice versa if the meshing output.
First mesh, coarser as the max parameter is 0.5
Second mesh finer as the min parameter is 0.1
However it seems that cfmesh is using some special refinement on the dog in the coarse case. Why it does not happen with the second ru., I don't know. Can you please clarify my doubts.?
Hi, I couldn't generate layers in polyhedral mesh "pMesh" why??
the "touch open.foam" is skipped so briefly it is hard to follow. I just get an empty file
It is just an empty text file. The ending .foam i important for Paraview.
Hi Joszef,
I much prefer the workflow of setting a cell size at the surface of interest and a growth rate from that surface, similar to what you demonstrated. Unfortunately, I have not been able to find a way to adjust the growth rate of the cells in cfmesh (you are able to adjust the distance from the surface for which the specified cell size holds true). When there is a big difference between the surface cell size and freestream cells, the transition between these cells is not smooth. In order to smooth these out the cells I use multiple box object refinements to gradually increase cell size to freestream, although this can be very time consuming. I am hoping you, or someone else, have a good suggestion of where to look for a solution.
And as always, thank you for the videos!
All settings are in the docu. Additional features are in the paid version of cfmesh+.
@@OpenFOAMJozsefNagy Thank you for the response!
What file extension arises after using cfMesh? Is it a .msh file?
OpenFOAM mesh in constant/polyMesh
How do you share ubuntu's file with windows? I have to copy them when I want to check them in windows GUI.
With Windows, you can enable/use WSL and then can share the files between windows and Linux quickly. I do this regularly.
Wonderful work
Why did you changed the file from stl to fms?
Better input quality. It is optional.
Thank you very much Sir!
👍 Great stuff. Have a model that SHM cannot mesh because I 'only have' a combined 200GB of RAM.
:D Not bad. Hopefully cfMesh can handle it.
I know this is a very old comment. But I guess your background mesh in SHM is too fine and you use refinement levels upto 4 on that background mesh.
@@vaibhavvb9898 Yeah. The problem was a large metal enclosure with lots of small circuit boards attached to the front panel. Airflow for the enclosure was around the port on the front panel, some being only 0.5mm if I remember correctly.
Thanks!!!! 👍
cfmesh rocks!
I'll never believe SHM is better, and the ones saying this are just bragging dandies. (I'm kidding obviously :D)
However, I do believe SHM has a better layer addition tool (for who wants to invest the time), compared to the free version of cfmesh atleast which is not too controlable.
I discussed with a guy using cfmesh for the core mesh, and snappy for the layers. Everything is possible haha.
I think what is missing out there is a HEXA BLOCK type open-source mesher, ICEM-like. (not blockmesh).
What is your opinion about Salome ?
Thank you a lot
Hey Mr Jozsef Nagy,
Thank you for the amazing tutorial.
I have an issue with combining the stl files. I have attached the link to files here : drive.google.com/drive/folders/1Q-NOoOtFV2ui9Jc7u8rK279wVzxE4wIP?usp=sharing
I would really appreciate if you could help.
Thanks in advance
Yes, your files are in binary. Check the checkbox in blender for "ASCII" while exporting the STLs and it should work.
@@OpenFOAMJozsefNagy Thanks!! it worked
what did you want to render that was not family friendly? LAMO
I don't remember, but I think it was a werewolf or something like that.
@@OpenFOAMJozsefNagy ah ok👌 my imagination went wild for a minute. Love your videos!
@@peterparrish7890😂😂