Meshing STL Using snappyHexMesh in OpenFOAM

Поділитися
Вставка
  • Опубліковано 27 гру 2024

КОМЕНТАРІ •

  • @shahriarhossain53
    @shahriarhossain53 5 місяців тому +7

    very good and well explained video. learn a lots of things. keep posting similar videos on OpenFOAM.

    • @Codeynamics
      @Codeynamics  5 місяців тому

      Means a lot. thankyou so much. Share and support

  • @polmagdalenasoler
    @polmagdalenasoler 3 місяці тому +3

    thank you very much, best tutorial I have seen about the topic

    • @Codeynamics
      @Codeynamics  3 місяці тому

      🤗. Thankyou for your comment. Keep supporting.

  • @massimocampanella4321
    @massimocampanella4321 Місяць тому +2

    What a useful video! Thanks a lot!

    • @Codeynamics
      @Codeynamics  Місяць тому

      Thanks for your comment. Keep supporting. 😃🤗

  • @nevinjestus
    @nevinjestus 8 днів тому +1

    Great video! I am new to Linux and openFOAM so this may be a basic question, but I am still confused on where to save these files freshly from installation. Right now OpenFOAM is installed at the file location, \\wsl.localhost\Ubuntu-24.04\opt\openfoam12. When I begin a new simulation, where do I start saving and moving these files? Do I create new simulations within the "openfoam12" folder, or "\\wsl.localhost\Ubuntu-24.04\home\user\OpenFOAM", or can it just be under "My PC" like typical things? Essentially, where is your UA-cam folder and what other files needed to be stored there for OpenFoam to function?

    • @Codeynamics
      @Codeynamics  8 днів тому

      Good question. I have answered this in detail in my OpenFOAM installation video.
      Although the video is about installing v2406, you can skip over to the additional tips and check it out.
      I hope it helps.

  • @imonghosh7286
    @imonghosh7286 7 місяців тому +1

    Thank you very much sir, well and enough explained video like always.

    • @Codeynamics
      @Codeynamics  7 місяців тому +1

      Thankyou soo much.
      Do support by subscribing and sharing 😊

    • @imonghosh7286
      @imonghosh7286 7 місяців тому +1

      ​@@Codeynamics Today I followed the tutorial and succesfully did the meshing. I am also thinking to run the case considering a random velocity of fluid. I must again thank you for making everything as clear as possible.
      I was wondering if you can make a tutorial meshing the same file in "cfMesh" .
      Also, can you make any tutorial on meshing and case setting a wind turbine!

    • @Codeynamics
      @Codeynamics  7 місяців тому +1

      Sure will try to make them.

  • @whotfisryan4431
    @whotfisryan4431 8 місяців тому +2

    Thanks for the video..Sir.!

    • @Codeynamics
      @Codeynamics  8 місяців тому

      Welcome. please subscribe and support.

  • @ayushtokeria6965
    @ayushtokeria6965 7 днів тому +1

    for some reason, maybe because I am running openfoam 12 but when I pull motorbike, it does not provide the same files, is there something I can do to get the same files you do? or do I have to downgrade my openfoam versions?

    • @Codeynamics
      @Codeynamics  7 днів тому

      Yes. OpF 12 is totally different. It is a foundation or .org versions such as v10, v11, v12. I personally prefer to use ESI or .com versions such as v2306, v2312, v2406. So it will be entirely different for you.

    • @ayushtokeria6965
      @ayushtokeria6965 6 днів тому

      @@Codeynamics Would you recommend those versions overall? whats the differences?

    • @Codeynamics
      @Codeynamics  6 днів тому

      @@ayushtokeria6965 I would recommend ESI Versions. v2406 is my fav. Next month I will also start using v2412 once it is released. For some reason I am not very comfortable with foundation versions.

  • @disinlungkamei2869
    @disinlungkamei2869 5 місяців тому +2

    Thanks you so much sir

    • @Codeynamics
      @Codeynamics  5 місяців тому +1

      Most welcome. Thanks for your support

  • @itanison9581
    @itanison9581 7 місяців тому +1

    thanks really helpful.Just a quick question did you run the silulation and if so which command did you use?

    • @Codeynamics
      @Codeynamics  7 місяців тому

      Thankyou.
      I did not run the simulation. If you had to run for that case specifically, you should be using simpleFoam command.
      It depends on the solver.
      Please do subscribe and support for more useful videos.

    • @itanison9581
      @itanison9581 7 місяців тому

      @@Codeynamics hello again, i'm having a problem with the snappyhexmesh.When i run it i am usually having blocks meshed around the airplane instead of the geometry being meshed completly.So the resulting mesh is just a bunch of blocks surrounding the aircraft what can be causing this error?I just used the snappyhexmesh command without the mpirun because for some reason it told me that this command doesn't exist could this be the reason?

    • @Codeynamics
      @Codeynamics  7 місяців тому

      The reason is that in the snappyHexMeshDict, under snapControls function, see the 6th and the 7th parameters. set the implicitFeatureSnap to false and set explicitFeatureSnap to true. This should make your problem solved.
      The behavior with just snappyHexMesh will be exactly the same as doing it with decomposed case. It is only a matter of time that differs for both the process. mpirun case is faster due to parallel processing.
      I hope this is clear.

  • @joshuabrookes9189
    @joshuabrookes9189 26 днів тому +1

    I got a huge error message after I ran the 'mpirun... np...snappyHexMesh....overwrite' command. any advice?

    • @Codeynamics
      @Codeynamics  26 днів тому +1

      Please email us the command, the error message as screenshots and questions if any to codeynamics@gmail.com

  • @rukhsarfiza1837
    @rukhsarfiza1837 3 місяці тому +1

    Thanks for the tutorial!!
    Can you please upload video for the simulation and post-processing also?

    • @Codeynamics
      @Codeynamics  3 місяці тому

      Will try. The procedure for simulation and post processing is going to be the same as the flow over a prism case. Please check my previous videos.

  • @b208-w6e
    @b208-w6e Місяць тому +1

    hello,
    i received the error "mpirun noticed that process rank 2 with PID 0 on node LAPTOP... exited on signal 11 (Segmentation fault)" when i ran mpirun np -4 snappyHexMesh -overwrite -parallel. i've tried changing the number of processors, adding more swap space, and changing the parameters in decomposepar, but nothing has worked.
    do you have any ideas as to what the cause of the error might be?
    thank you so much!

    • @Codeynamics
      @Codeynamics  Місяць тому

      Can you please send the error message screenshots at codeynamics@gmail.com
      We will look into it.

  • @reeddowns1129
    @reeddowns1129 2 місяці тому +1

    Small mistake in the vid about parallel processing. Using mpirun with the flag --use-hwthread-cpus , OpenFOAM executables can be run with as many logical cores as you have available, not just the number of physical cores. However, it's a bad idea to use all of them. Save 1 or 2 logical cores in case the system needs to do something else. For example, I have 8 physical cores and 12 logicial cores. I run most simulations on 10 logical cores with the flag above.
    One question: Are the boundary conditions handled by blockMesh? Other than that, very helpful, thanks very much!!

    • @Codeynamics
      @Codeynamics  2 місяці тому

      Thankyou for the comment.
      If the virtualization is enabled in a PC, then it will take threads as you rightly mentioned. Which is actually the case in most performance or gaming laptops. But many people watching this channel use very simple laptops that don't come with virtualization enabled. So in that case only the processor will be used.
      Regarding Saving a few logical cores for other tasks of the computer is absolutely true. I just didn't want to over complicate things about parallel processing in a video focused on snappyHexMesh. So didn't go much inside. I have already made a video on MPI parallel processing for OpenFOAM and I'm planning to make a dedicated video to explain the problems and it's possible solutions during parallel processing in OpenFOAM. I'll make sure to include this suggestion of yours too ☺️. Thankyou very much.
      The boundary patch names are handled by blockMesh. The boundary conditions as such as handled by files under 0/ folder.

    • @reeddowns1129
      @reeddowns1129 2 місяці тому

      @@Codeynamics Ahhh thank you very much for explaining! I use a wsl2 environment, so I've always had virtualization enabled! I never knew!

  • @cleisonarmandomanriqueagui9176
    @cleisonarmandomanriqueagui9176 Місяць тому +1

    How much time to run this ?

    • @Codeynamics
      @Codeynamics  Місяць тому

      Depends on the PC Config. It took me 8-10 mins. I only have an average PC.

  • @Tars-20
    @Tars-20 6 місяців тому +2

    Hey this is a great video and thank you for that.
    Would be nice if you can also run the sim and make a video of it, PLEASE!!!

    • @Codeynamics
      @Codeynamics  6 місяців тому +1

      I will try for sure!

    • @Tars-20
      @Tars-20 6 місяців тому

      @@Codeynamics Thanks!!!!

  • @jayendrarajanala7047
    @jayendrarajanala7047 7 місяців тому +1

    Need a help about the surfacefeatureExtract command its not working for me?

    • @Codeynamics
      @Codeynamics  7 місяців тому

      Please write a detailed email about the error along with screenshots to codeynamics@gmail.com. Our engineers will reply soon.

    • @Codeynamics
      @Codeynamics  4 місяці тому

      We do not suggest using the .org/foundation version. Especially anything after v-10. To follow our videos, please use ESI/.com version of OpenFOAM.

    • @Theoretical_Mass
      @Theoretical_Mass 4 місяці тому

      @@Codeynamics Alright thanks so much!

    • @silviasimi4394
      @silviasimi4394 2 місяці тому

      @@Codeynamics Hi, is this email address still active? Thanks!

  • @victorlorenzo3959
    @victorlorenzo3959 6 місяців тому +1

    Thanks for your video, I change all the motorbike name for the goodone and launch simplefoam but at the time=6 i have a error with #1 to #12 line, do you know what's the cause?

    • @Codeynamics
      @Codeynamics  6 місяців тому

      Thanks for commenting. Please mail the zipped case file to codeynamics@gmail.com we will get back to you asap

    • @victorlorenzo3959
      @victorlorenzo3959 6 місяців тому

      @@Codeynamics thanks a lot, have a great day

  • @swap_pat29
    @swap_pat29 3 місяці тому +1

    Hello,
    Thanks for this great video!
    I am having difficulty working with a 2D case using snappyHexMesh. Despite defining the front and back patches as empty in the blockMeshDict file, snappyHexMesh is still refining the blockMesh in the third direction, which should not happen for a 2D case. Could you please provide some suggestions on what changes I should make?
    Thank you!

    • @Codeynamics
      @Codeynamics  3 місяці тому +1

      Have you kept the third direction as a single cell length in blockMesh itself?
      I generally wouldn't recommend snappyHexMesh for 2D cases, it is good for 3D. You can try gmsh. That's much better.

    • @swap_pat29
      @swap_pat29 3 місяці тому

      ​@@Codeynamics Yes, I’ve kept the number of cells in the third direction to just a single cell. The blockMesh creates a good representation of a 2D mesh with only one cell in the third direction, as defined in the blockMeshDict file. The issue arises when I use snappyHexMesh to snap the mesh to the .stl geometry, which is a CD nozzle. I was trying out this particular geometry because I wanted hands-on experience with mesh generation, rather than just using the tutorial files. And also after running snappyHexMesh the boundary condition file in constant/boundary directory gets altered and shows absurd boundaries.
      I’ll definitely try Gmsh, but as I'm learning OpenFOAM, I’m curious: What do industries typically prefer for meshing-snappyHexMesh or Gmsh? Or does it depend on the specific problem?
      Thank you

    • @Codeynamics
      @Codeynamics  2 місяці тому +1

      @@swap_pat29 The way to do that is, you have to take a section of the 3D geometry and extract the 2D. Then extrude it to give a thickness. Now use snappyHexMesh to make the 3D mesh.
      Then, you can use the extrudeMesh tool to change the thickness of the mesh to 0 and then extrude it back to 1 cell thickness.
      This sure is cumbersome. Most people prefer using blockMesh for simple 2D meshes. For geometry driven meshes, gmsh is much better and convenient than the above mentioned process.
      This is the thing with Open source tools. You learn one, and one way or the other you will have to learn the associated opensource tools as well sooner or later (if you want to be efficient at what you do).

    • @swap_pat29
      @swap_pat29 2 місяці тому

      @@CodeynamicsThanks a lot for the detailed explanation! That makes sense now.

  • @anlongtran6850
    @anlongtran6850 5 місяців тому +1

    Sorry for bothering you but I cannot successfully scale down the stl file, could you show me how to fix it ?

    • @Codeynamics
      @Codeynamics  5 місяців тому

      Please mail your problem with detailed description to admin@codeynamics.com