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.

Комментарии • 45

  • @TheOnlyRaceEngineer
    @TheOnlyRaceEngineer 5 лет назад +3

    the best checkMesh video on youtube. greatly explained

    • @CrocodileMundi
      @CrocodileMundi 4 года назад

      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!

  • @paullaimbock5731
    @paullaimbock5731 5 лет назад +8

    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?

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  5 лет назад +2

      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.

  • @DaleCKramer
    @DaleCKramer 4 года назад

    Jozsef, your video inspires me to learn more

  • @soorkie
    @soorkie 7 месяцев назад +1

    Thank you for this video.

  • @Squalldim
    @Squalldim 4 года назад +1

    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!! :)

  • @mohamedelmalah6716
    @mohamedelmalah6716 Год назад

    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

  • @karenanasco5759
    @karenanasco5759 4 года назад

    Is it possible in the openFOAM software problems of electric currents, electric fields in AC? or is it just electromagnetism?

  • @ilc15341
    @ilc15341 5 лет назад

    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.

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  5 лет назад

      Yes, the combination of snappy, cfMesh and in certain cases even extrudeMesh is the best alternative.

  • @mariarosales3535
    @mariarosales3535 11 месяцев назад

    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 ?

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  11 месяцев назад

      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...

  • @francootaola9172
    @francootaola9172 4 года назад

    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,

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  4 года назад

      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.

  • @GurpreetSingh-jq2ix
    @GurpreetSingh-jq2ix 5 лет назад +1

    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

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  5 лет назад +1

      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.

    • @GurpreetSingh-jq2ix
      @GurpreetSingh-jq2ix 5 лет назад +1

      @@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.

  • @horagurpreetsingh
    @horagurpreetsingh 4 года назад

    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.

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  4 года назад

      I have never done that before. Sorry, I do not know, how you would do this in an automatic way.

    • @horagurpreetsingh
      @horagurpreetsingh 4 года назад

      @@OpenFOAMJozsefNagy Hi Jozsef Nagy: I see. No problem thanks a lot for the reply. I appreciate it. I have an another question for you.

    • @horagurpreetsingh
      @horagurpreetsingh 4 года назад

      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?

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  4 года назад

      @@horagurpreetsingh Difficult to say. Should work, just without -consistent.

  • @yugu6086
    @yugu6086 5 лет назад

    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

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  5 лет назад

      Yes, should be possible with ACMI. I do not have tutorials available on this, however.

    • @yugu6086
      @yugu6086 5 лет назад

      @@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

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  5 лет назад

      @@yugu6086 Yes and yes there is a BC for that called flowRateInletVelocity.

    • @yugu6086
      @yugu6086 5 лет назад +1

      @@OpenFOAMJozsefNagy Got it, thanks a lot

    • @yugu6086
      @yugu6086 5 лет назад +1

      @@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

  • @aldiasbahatmaka1052
    @aldiasbahatmaka1052 5 лет назад

    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.

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  5 лет назад

      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.

    • @aldiasbahatmaka1052
      @aldiasbahatmaka1052 5 лет назад

      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

    • @Lilian13550
      @Lilian13550 5 лет назад +1

      @@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

    • @aldiasbahatmaka1052
      @aldiasbahatmaka1052 5 лет назад

      Hello @Lili An.
      Thanks for the help. ^^

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  5 лет назад

      @@aldiasbahatmaka1052 Mesh stat - cells

  • @sumitzanje5207
    @sumitzanje5207 4 года назад

    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.

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  4 года назад +2

      You can calculate the y+ values directly in OpenFOAM. simpleFoam -postProcess -func yPlus

  • @MalcolmAkner
    @MalcolmAkner 3 года назад

    Why is it bad to use tetrahedral cells for fluid simulations?

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  3 года назад

      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.

  • @riddhideepbiswas1895
    @riddhideepbiswas1895 5 лет назад

    sir can u please make a video on how the snappyHexMeshDict works in detail

    • @OpenFOAMJozsefNagy
      @OpenFOAMJozsefNagy  5 лет назад

      I just uploaded a detailed video onto my Patreon account, if you are interested I would appreciate the support there.