Checking the mesh quality in OpenFOAM
HTML-код
- Опубликовано: 11 сен 2024
- In this short video I would like to give you some tips, how you can check and visualize the mesh quality in Paraview.
The command is as following:
checkMesh -allGeometry -allTopology -writeAllFields -writeSets vtk
This material is published under the creative commons license CC BY (Attribution). If you plan to use it, please acknowledge it.
the best checkMesh video on youtube. greatly explained
I second this comment. As a reasonably experienced user who has always wanted some easy way of visualizing checkMesh output, this is the best thing I've ever seen. Thanks for the awesome video Jozsef!
Hi Jozsef, thank you for the great video on checkMesh. Do you also have a tutorial on mesh improvement e.g. how to remove tet wedges, tetrahedra cells, concave cells and faces. Are there specific rules or is it just a matter of trial and error with the mesh settings? Are mesh improvement skills perhaps part of your patreon program?
Hi, unfortunately I do not have videos on that. Currently on Patreon I have only one tutorial specifically concentrating on meshing with snappy. In September I will upload a tutorial on cfmesh onto Patreon. If you are interested, I would welcome your support.
Jozsef, your video inspires me to learn more
Thank you for this video.
Hello Jozsef! I'm using OF 7 and I don't have the option -writeAllFields, where should I get it? Thank you for all the tutorials, it helps me a lot!! :)
With v1912.
Thanks a lot for your efforts. Please, could you help me , I have written "checkMesh - help" , it gives me all the options as in the video except writeAllFields . However-despite not appearing in the option list- I tried to execute the writeAllFields but it says " FOAM FATAL ERROR:
Invalid option: -writeAllFields" . I would appreciate if you could help.Thanks in advance
Is it possible in the openFOAM software problems of electric currents, electric fields in AC? or is it just electromagnetism?
Hello Mr Nagy, great video, i used checkMesh all my life with openFOAM and never noticed these features.
You have probably used a lot of open-source mesh generators for CFD, would you say that snappyHexMesh is the best way of making high quality mesh for your simulation, or is there another one that you preffer?
The way i generate mesh today i can assure high quality, but it takes considerably long, and i been thinking on spending some time to learn how to use snappy, cfmesh or salome. Maybe you can share your comments on which you preffer and why... i would greatly appreciate it, so i can focus my time on more efficient tool.
Yes, the combination of snappy, cfMesh and in certain cases even extrudeMesh is the best alternative.
Hi sir, thanks for the video. How do we know that is our .stl file the one with problems? What kind of problems are related to .stl in meshing ?
Many many, e.g. not closed STLs with gaps. double sided STLs blockMesh is exaclty as large as the bounding box of the STLs. Many more...
Hello Josef! Thanks as always, two questions, first you have writefields and writesets I understand that write sets creates the files in the post-processing folder but write fields it creates files? Where? Or it modify them and then which? And the second question that is a bug bomb as question, what we do when we have some problematic cells? After doing the snappy It showed some bad cells in the mesh quality check, how can I improve this for the different qualities?
Thanks as always great videos,
sets are always in the polyMesh folder. fields are usually in 0. You can identify the region, where you have the problematic cells, improve your STL and your refinement level there locally.
Hi Dear Jozsef,
very very helpful for checking the Mesh Quality in Paraview. I am getting this error while running this command in terminal " checkMesh -allGeometry -allTopology -writeAllFields -writeSets vtk "
--> FOAM FATAL ERROR:
Invalid option: -writeAllFields
I am running OpenFOAM6 Version on Ubuntu. Can you please
This is working with v1712 and newer. I didn't know, but obviously it doesn't work for the .org branch. This is an example, where a feature is missing in the .org branch, so it is better to use the .com branch.
@@OpenFOAMJozsefNagy
Thanks a lot Jozsef for your reply. I installed OpenFOAM v_1812 and its working now. Thanks a lot for teaching us new command.
Hi Jozsef Nagy, I am a big fan of you. I am learning OpenFOAM from your videos and they are really helpful. I am really grateful to you for your wonderful support. I have a question for you regarding meshing. In blockMesh we specify the Nx, Ny, and Nz i.e. number of cell/cubes in each direction but in snappyHexMesh we do not have this control. I mean we specify the refinement level while using this utility. Now I want to find the number of cubes/cells in each direction in the mesh created by snappyHexMesh. Could you please suggest me how can I do this. I will truly appreciate your help.
I have never done that before. Sorry, I do not know, how you would do this in an automatic way.
@@OpenFOAMJozsefNagy Hi Jozsef Nagy: I see. No problem thanks a lot for the reply. I appreciate it. I have an another question for you.
Hi, Can you suggest something to me for this problem: I am running a simulation: Open channel flow with a cube placed inside the channel. Now I wanted to map velocity field on a new refined open channel but without any cube in it. So there are geometries one with a channel with a cube in it and other one will be a channel only. i was thinking to use mapFields utility but no success yet. Would you like to suggest something for this issue?
@@horagurpreetsingh Difficult to say. Should work, just without -consistent.
Thanks so much for sharing these useful videos, which help me a lot. I want to ask you a question but not related to this video...
Do you have any ideas about adding a flowrate on a moving boundary in OpenFOAM? which i mean two boundary conditions on one boundary, the fluid flows inside the domain through a moving boundary.
thanks in advance
Yes, should be possible with ACMI. I do not have tutorials available on this, however.
@@OpenFOAMJozsefNagy thanks for your answer, ACMI means Arbitrarily Coupled Mesh Interface? another question... do you think is it possible to give a constant flowrate? because during the mseh moving, the area of this boundary is changing. Thanks again
@@yugu6086 Yes and yes there is a BC for that called flowRateInletVelocity.
@@OpenFOAMJozsefNagy Got it, thanks a lot
@@OpenFOAMJozsefNagy Hi, dear Jozsef, I have looked a little bit of ACMI, it seems that doesn't work for my case, mine is more like velocity BC provide flow rate relative to dynamic mesh motion. Any ideas...thanks a lot
Hello.. nice video!
I wanna ask something to you.
How did you find and calculate the total of mesh?
Is that on Tetrahedral or in cell?
Thank you.
Thank you! Unfortunately, I do not entirely understand your question. Do you mesh, how I generated the mesh? I used snappyHexMesh in this case. I hope this answers your question.
József Nagy Thank you for the reply
I mean how to know the mesh size in OpenFoam?
For example in ANSYS CFX, just click the button then mesh size will be appeared
But in openfoam by checkMesh, which one is indicated for the mesh value?
Sorry for the misunderstanding
@@aldiasbahatmaka1052 When running checkMesh, in the first lines you will see:
Mesh stats
points: 1122715
faces: 4132566
internal faces: 3949715
cells: 1542319
// This one gives you the total number of cells in your mesh
...
To know more about checkMesh, check this presentation : openfoamwiki.net/images/f/f0/Final-AndrewJacksonSlidesOFW7.pdf
From page 65, it details the checkMesh output
Hello @Lili An.
Thanks for the help. ^^
@@aldiasbahatmaka1052 Mesh stat - cells
How to measure the height of cells close to the wall boundary; basically, I need this value to compare my calculated y+ value with generated value.
You can calculate the y+ values directly in OpenFOAM. simpleFoam -postProcess -func yPlus
Why is it bad to use tetrahedral cells for fluid simulations?
Mesh quality and non-orthogonal corrections. You will see sometimes your mesh in your results and this is not good. Take a look at the tri mesh in my very first tutorial.
sir can u please make a video on how the snappyHexMeshDict works in detail
I just uploaded a detailed video onto my Patreon account, if you are interested I would appreciate the support there.