OpenFOAM SnappyHexMesh Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ธ.ค. 2024

ความคิดเห็น • 166

  • @linse2
    @linse2 10 ปีที่แล้ว +25

    Great stuff, Calum!
    Thanks a lot for that video! I just learned a lot about sHM and actually consider giving it another try.
    Two comments:
    1.) It seems everything works for 2.0.x as well except for the surfaceFeatureExtractDict. In this version I just had to go with the old terminal command for each of the patches. Otherwise the tutorial seems to be very valid for that older version as well.
    2.) How about adding the links to the different timesteps to the description? I took the freedom to kind of prepare that already for you:
    OpenFOAM SnappyHexMesh Tutorial CAD Model View
    OpenFOAM SnappyHexMesh Tutorial STL file format and patch names
    OpenFOAM SnappyHexMesh Tutorial Scale STL to meters
    OpenFOAM SnappyHexMesh Tutorial Merging STL files
    OpenFOAM SnappyHexMesh Tutorial triSurface folder
    OpenFOAM SnappyHexMesh Tutorial blockMesh
    OpenFOAM SnappyHexMesh Tutorial surfaceFeatureExtract
    OpenFOAM SnappyHexMesh Tutorial eMesh files
    OpenFOAM SnappyHexMesh Tutorial surfaceFeatureExtractDict
    OpenFOAM SnappyHexMesh Tutorial snappyHexMeshDict
    OpenFOAM SnappyHexMesh Tutorial Edit boundary text file
    OpenFOAM SnappyHexMesh Tutorial View the Mesh
    OpenFOAM SnappyHexMesh Tutorial Layer addition parameters
    OpenFOAM SnappyHexMesh Tutorial Volume refinement parameters
    OpenFOAM SnappyHexMesh Tutorial run simpleFoam in parallel
    OpenFOAM SnappyHexMesh Tutorial running showing residuals
    OpenFOAM SnappyHexMesh Tutorial post-processing
    OpenFOAM SnappyHexMesh Tutorial function object code template
    OpenFOAM SnappyHexMesh Tutorial U and p results
    Cheers,
    Bernhard

  • @maso8660
    @maso8660 5 ปีที่แล้ว +8

    I owe you an important part of my thesis! A clear explanation of how to set up and run a case, from the beginning to the end. I found especially useful the part on building the geometry, meshing, exporting files, converting files and those matching problems between programs (in particular from CAD to OpenFOAM). Thank a lot!

  • @SomeTechGuy666
    @SomeTechGuy666 2 ปีที่แล้ว +1

    Don't apologize for long videos when they are clear and helpful ! Thanks for sharing.

  • @hemanthkumars6250
    @hemanthkumars6250 3 ปีที่แล้ว

    Thanks a Lot for this Video, This is the most educating video for someone with zero knowledge in SnappyHexMesh!

  • @ashishtiwari1912
    @ashishtiwari1912 5 ปีที่แล้ว +1

    Excellent tutorial. The only tutorial worth watching.

    • @CalumDouglas
      @CalumDouglas  5 ปีที่แล้ว

      Thanks so much for your comment, I`m pleased it helped you so much.

  • @JohnWilson-mt8ld
    @JohnWilson-mt8ld 4 ปีที่แล้ว

    Very helpful Calum. I am new to OpenFoam and am setting up a similar case, to the extent that I have an internal flow in a domain consisting of several parts (a spherical container with a cylindrical neck, the whole divided into four layers which are to have differing wall temperatures that result in a buoyancy-driven circulation). There is one aspect of the tutorial that had puzzled me, but perhaps now I have resolved it. We see in your tutorial (at about 39 min) that the needed entries for your patches (inlet, outlet, etc.) have been conveyed to your .../constant/polyMesh/boundary file, along with the unwanted patches stemming from blockMeshDict. In my case, while I am able to created the wanted mesh, my patch names do not propagate into .../constant/polyMesh/boundary. I have tried countless variations for snappyHexMeshDict, but have never succeeded to get those patches to appear (with their face count etc.) in constant/polyMesh/boundary.
    To my surprise, after a good while puzzling over this, I found that the needed entries are made in ...run/casefolder/1/polyMesh/boundary and in
    .../run/casefolder/2/polyMesh/boundary, so that one can copy the needed information over to .../constant/polyMesh/boundary.

  • @anecitosilvano2166
    @anecitosilvano2166 6 ปีที่แล้ว +3

    Thanks for producing this video, appreciate the work, time and effort. This speed up the learning for someone new like me..

  • @MajPirate
    @MajPirate 5 ปีที่แล้ว +3

    Calum, thank you very much for your work. Great stuff. For the beginners, who will work on newer versions of OpenFOAM: you will encounter some problems when applying the solver (the last step) with the files provided. Solution: stackoverflow.com/questions/48421407/openfoam-foam-fatal-error-unknown-turbulencemodel-type-rasmodel/48428177#48428177 . You will also need to change WallShearStress function in controlDict, as the syntax changed slightly. Check in OpenFOAM documentation for wallShearStress.

    • @CalumDouglas
      @CalumDouglas  5 ปีที่แล้ว +1

      Thanks Jan, sadly I am too busy to update these at the moment :(

    • @MajPirate
      @MajPirate 5 ปีที่แล้ว

      @@CalumDouglas No worries, thank you very much for all your work here on YT. It's immensely helpful for the first steps with OpenFoam.

    • @BOBOY162
      @BOBOY162 4 ปีที่แล้ว +1

      @@MajPirate man thank you so much. I was going crazy when it didnt work. Actually the renumberMesh didnt work either. I then changed the setting descriped in the link and suddenly (at least) the solver started his job. I was a bit suprised about the time. It is my first experience in this domain and the solving just took about 3 1/2 min to finish.
      Update: reconstructPar shows error -> Unkown patchField Type epsilonWallFunction for patch type wall

    • @MajPirate
      @MajPirate 4 ปีที่แล้ว

      @@BOBOY162 I'm glad to hear it helped!

    • @BOBOY162
      @BOBOY162 4 ปีที่แล้ว

      @@MajPirate Do you know a solution for this epsilonWallfunction error?

  • @sriharisha251
    @sriharisha251 3 ปีที่แล้ว +1

    Hey! thank you for the video mate! please do try to upload the longer one, the 2 hr 20 min length video as well, students like us live by those videos man. please do upload that :)

  • @vikramsngh91
    @vikramsngh91 9 ปีที่แล้ว +1

    Hi Callum! Thanks a lot for making the video. Really helped me a lot understand Snappyhexmesh.

  • @FelipePires89
    @FelipePires89 10 ปีที่แล้ว

    Calum, the tutorial answered the questions i had about snappyHexMesh and it is very informative!
    Well done and thanks for the video!

  • @muhammadaimanbinnorshama189
    @muhammadaimanbinnorshama189 2 ปีที่แล้ว

    Hello sir. Can I utilise the snappyhexmesh tool for a triangular cylinder geometry?

  • @itanison9581
    @itanison9581 7 หลายเดือนก่อน

    Hello,idk if ur still active or not bu thanks for the tutorial, i just had a couple of problems.First when i do the reconstructparmesh, it gives me 3 new polymesh folder instead of combining them into one in the original one.And when i run the simulation it gives me an error in the fvschemes from line 32 to 39 where i defined the div and it says Entry 'div((nuEff*dev2(T(grad(U)))))' not found in dictionary "system/fvSchemes.divSchemes".It would be appreciated if you could give me any tips on how to fix this

  • @polaris_e06
    @polaris_e06 3 หลายเดือนก่อน

    Thank you so much, I followed your tutorial to export the model of a cardiovascular system, now I have to put the non-newtonian flow equations QwQ

  • @mariarosales3535
    @mariarosales3535 ปีที่แล้ว

    Great video! Thanks for sharing it. Please, what could be recommendation to ensure addLayers work? I have tried low refinement in surfaces and regions, and they are not generated. You mentioned a 'good background'... how would be one? Thanks!

  • @simonzh89
    @simonzh89 10 ปีที่แล้ว

    This is a very good video. Thanks. I am a question about using SHM. If I mesh a semi-submerged pipe (with on thickness) in a large domain using SHM, it will definitely cut off the outer part of the pipe. Is there a way to keep the whole pipe but the outer top as inlet while the inner top as open through which the flow can go into the domain? I am not sure if I explain it clearly, and I hope you offer any suggestions on it. Thanks.

  • @martinbldx1088
    @martinbldx1088 9 ปีที่แล้ว +1

    Thanks for the video, it helps a lot in understanding sHM. However, is there any tutorial available to show how to extract the desired surfaces from the CAD program? I'm a newbie to AutoCAD and I don't manage to extract easily surfaces from my solid, which blocks me for solving my case.

  • @DavoodZeinali
    @DavoodZeinali 7 ปีที่แล้ว +2

    Excellent work, Calum! Many thanks!

    • @CalumDouglas
      @CalumDouglas  7 ปีที่แล้ว

      No problem, glad you found it useful. What are you using OpenFOAM for ?

  • @murchanaab
    @murchanaab 3 ปีที่แล้ว

    Hello. I am unable to execute simpleFoam solver in Version 8. All other processes worked fine. I even edited the surfaceFeatureExtract to surfaceFeatures. But now i am stuck at running simpleaFoam.

  • @michelecavallerin4968
    @michelecavallerin4968 10 ปีที่แล้ว +1

    Thank you very much!!! Finally someone made something useful about SHM tutorial!

    • @CalumDouglas
      @CalumDouglas  10 ปีที่แล้ว +1

      Glad it was useful, if you want anything more specific please let me know.

    • @michelecavallerin4968
      @michelecavallerin4968 10 ปีที่แล้ว

      Calum Douglas
      I would like to ask if you're good as well with meshLab, and if you can publish a video on general using on how to deal with imported STL from CAD: i mean repairing, sewing ecc...

    • @CalumDouglas
      @CalumDouglas  10 ปีที่แล้ว

      Michele Cavallerin Hi Michele, I do use MESHLAB - but I only use it for looking at STL files and also for changing their format from Binary to ASCII so I can change the patch names within the file. I put alot of effort into making my surfaces perfect before I export the STL. Much better than repairing a bad file later on....if you have a big problem I can make an STL from a STEP file for you.

    • @michelecavallerin4968
      @michelecavallerin4968 10 ปีที่แล้ว

      Calum Douglas
      ok thanks you anyway, I was just asking, because sometimes I face this problem and I was hoping to know someone skilled at meshlab usage. thanks anyway, but I do prefer "bother you with other questions concerning SHM as well, maybe directly on your web site, in case of help. thanks again for the video!!! bye

  • @stratosdoukakis4837
    @stratosdoukakis4837 10 ปีที่แล้ว

    Hi Calum,
    When you finish meshing with the SHM and modify the boundary file(delete the unnecessary patches) all the boundaries the SHM produces are of type "wall".. Is there any way to make some of them type "patch"?

  • @kendytan91
    @kendytan91 8 ปีที่แล้ว

    Hi! I think the link you provided for the download of your tutorial files isn't working. Are there alternative links for us to access your files? Thank you!

  • @muismuhtadi359
    @muismuhtadi359 ปีที่แล้ว

    Thank you for sharing the video! It is so much helpful in understanding the SHM.

  • @newlenin
    @newlenin 4 ปีที่แล้ว

    Hi I liked your tutorial very much. The only thing I do not understand, is why you did the region refinement of "volume" in distance mode? what purpose is that? would it be the same to just refine the surface and then choose nCellsBetweenLevels higher, maybe 3?

  • @catalinaa.pino-munoz1250
    @catalinaa.pino-munoz1250 4 ปีที่แล้ว +3

    Thank you Calum, really a great tutorial!

  • @bhootmehra
    @bhootmehra 4 ปีที่แล้ว

    Hi thanks great video. I am solving a conjugate heat transfer problem and using snappy for that. Is it possible to identify different regions separately nto different cellZones using snappy ? like different solid regions and the background mesh to be identified as fluid. I want to split the mesh using cellzones later. Thanks a lot

  • @jennavergeynst
    @jennavergeynst 8 ปีที่แล้ว

    Nice video, I'm just stuck with the pyFoamPlotRunner.py. I would like to see the residuals, installed gnuplot, numpy and pyfoam, but it gives the error: AttributeError: 'GnuplotProcess' object has no attribute 'gnuplot'. Any idea?

  • @JaydeepDeshpande
    @JaydeepDeshpande 8 ปีที่แล้ว +1

    Thanks for the tutorial Calum. I am trying to export surfaces to STL as you've indicated, however since it is not a solid or a watertight body, it does not allow me to do so. Could you tell me what CAD software did you use to export the surfaces in the STL format?

    • @JaydeepDeshpande
      @JaydeepDeshpande 8 ปีที่แล้ว

      never mind, I just checked Salome has the capability.

  • @alpaysedatdurukan2361
    @alpaysedatdurukan2361 4 ปีที่แล้ว

    Hi, I have a question. What could be the reason of boundary file not being updated after I run reconstructParMesh -constant ? Is it possible that it would not work when the mesh is not water tight ? Or can you think of any other thing? Thank you so much for a great video and hopefully you can help me out :)

  • @luismir4264
    @luismir4264 3 ปีที่แล้ว

    Great tutorial!
    It was really helpful for any OF user.
    Thank you very much for sharing this knowledge with us!
    Best regards from Brazil!

  • @testAjitSNU
    @testAjitSNU 6 ปีที่แล้ว +1

    Thanks, Calum. This tutorial was very helpful for my project.

    • @CalumDouglas
      @CalumDouglas  6 ปีที่แล้ว

      Very good, glad it was helpful. When I have time I will try to do a new video as OpenFoam has a lot of newer versions, but Snappy is basically nearly exactly the same. Only a couple of small new features have been created.

    • @testAjitSNU
      @testAjitSNU 6 ปีที่แล้ว +1

      I am working on OpenFOAM-v1706, and it worked like a charm.

  • @skyakash627
    @skyakash627 2 ปีที่แล้ว

    This video actually helped me a lot in my thesis . And thanks in advance as I tried snappy and one of my surfaces (fins) got removed as zero sized patch.. is their anyway to solve this issue... am doing a multi region case with chtMultiRegionFOAM ( cooling of graphics card with fin) .Kindly reply .

  • @JanFare
    @JanFare 9 ปีที่แล้ว

    Hi Calum, your video helped me alot! Very good step by step explanation there. I am a physicist working on my Ph.D. and I need to model flow through capillaries. So it's quite close to your case.

    • @CalumDouglas
      @CalumDouglas  7 ปีที่แล้ว

      Hi Jan, may I ask permission to use your comment here to put on my website please ? I am planning to make some more videos and start a proper website. Your assistance would be much appreciated. Let me know with a comment underneath please ! Thanks!

  • @edwardkraft1031
    @edwardkraft1031 10 ปีที่แล้ว

    Hi. I followed your tutorial and loved it! I do have a simple question before I start on my own project. I’ve modeled an elbow pipe with a second inlet in SolidWorks. I made a “cap” for the two inlets and outlet as separate parts and then assemble the 3 caps to my wall. So I created 4 .stl files from the assembly. In the tutorial, you also have the volume.stl. So I need to make the assembly I created in to 1 part and import that in to the triSurfaces as well?

    • @CalumDouglas
      @CalumDouglas  10 ปีที่แล้ว

      To do distance defined surface refinement requires a single, closed STL file to work from. Hence if you wish to do that, yes you will also need an STL file which is a 100% closed surface.

    • @edwardkraft1031
      @edwardkraft1031 10 ปีที่แล้ว

      Calum Douglas Thanks! I did that, but now I'm getting an error after changing to my stl files. Any chance I can email you what i changed and the error it gave me or do you prefer on here?

    • @CalumDouglas
      @CalumDouglas  10 ปีที่แล้ว

      Edward Kraft You need to explain alot more clearly what you mean by "error".
      You need to paste in the error message for a start, about 90% of SHMesh errors are caused by syntax errors.
      Usually accidentally deleting a bracket, a semicolon, or mis-spelling a file name. When you are starting out,
      make only one change at a time.

  • @bm9117
    @bm9117 10 ปีที่แล้ว +1

    Thank you very much for this tutorial. That is really the best one I have found so far in the internet. Great work! :) One can see that you are really experienced with OpenFoam and CFD.

    • @CalumDouglas
      @CalumDouglas  10 ปีที่แล้ว +1

      You`re welcome - glad you liked it.

    • @CalumDouglas
      @CalumDouglas  7 ปีที่แล้ว

      Hi Manuel, may I ask permission to use your comment here to put on my website please ? I am planning to make some more videos and start a proper website. Your assistance would be much appreciated. Let me know with a comment underneath please ! Thanks!

  • @AhsanKhanPhD
    @AhsanKhanPhD 5 ปีที่แล้ว

    I have a question, can someone please help me out?
    I want to run the solver multiPhase/interFoam/RAS/floatingObject but by default it runs with a cuboid body, I have a cylindrical body in .stl format and I want to use it as a floating object.
    How can I do this? I have been able to insert the cylindrical mesh in blockMesh by using snappyHexMesh, but how can I use the cylinder as a floating object? Thanks if someone can help me out, I am doing a univerisity homework :)

  • @Leonardo-xo6ec
    @Leonardo-xo6ec 6 ปีที่แล้ว

    it's like having a cfd lesson from Theon Greyjoy lmao
    thanks for the content.

    • @CalumDouglas
      @CalumDouglas  6 ปีที่แล้ว +1

      Hmm not sure quite what that means but it seems you are intending it as a positive comment overall so thats ok. Dont recall Theon being much into his science....

    • @Leonardo-xo6ec
      @Leonardo-xo6ec 6 ปีที่แล้ว +1

      @@CalumDouglas i'm only saying it because i'm not used to the accent. But i did intended to be positive it has been helping me a lot.

  • @Axelander1111
    @Axelander1111 10 ปีที่แล้ว

    Hi Calum,
    thanks for the tutorial!
    I have a question about the *.eMesh file that is created by the surfaceFeatureExtract command. When I try to create the mesh with SnappyHexMesh the process fails because there seems to be a problem with the *.eMesh file. I have compared it to the fridgeA.eMesh from the iglooWithFridges tutorial and it has a totally different structure. What do your *.eMesh files look like?

    • @CalumDouglas
      @CalumDouglas  10 ปีที่แล้ว

      Hi there,
      I cannot help you without:
      -Knowing which version of OpenFOAM you are using
      -The error code / error message you get
      In what way does "The process fail" ?

    • @Axelander1111
      @Axelander1111 10 ปีที่แล้ว

      Calum Douglas
      I'm using foam-extend-3.1 and get the following error message:
      "Reading external feature lines.
      --> FOAM FATAL IO ERROR:
      Expected a '(' while reading VectorSpace, found on line 19 the word 'externalStart'
      file: /Volumes/foam-extend-3.1/tutorials/multiphase/interFoam/ras/NACA0015Test/constant/triSurface/NACA0015.eMesh at line 19.
      From function Istream::readBegin(const char*)
      in file db/IOstreams/IOstreams/Istream.C at line 86.
      FOAM exiting"
      I have uploaded my test case to dropbox.
      www.dropbox.com/s/45nv9u8le7mthoa/NACA0015%20Test.zip
      snappyHexMesh runs without any errors when I comment out the featureEdgeMesh in snappyHexMeshDict. But it seems to ignore my stl file because I cannot see the NACA airfoil in the mesh.

    • @CalumDouglas
      @CalumDouglas  10 ปีที่แล้ว

      Axelander1111 OpenFOAM extend is a totally different branch of OpenFOAM. Which does not share the latest developments as openfoam 2.3. I have never used it and so cant help directly. Since you`re using a totally different OpenFOAM installation you will have to just google search your error codes.
      Looks like is probably an issue with Binary vs ASCII file types.

    • @Axelander1111
      @Axelander1111 10 ปีที่แล้ว

      Thanks for your reply! I already tried a google search but couldn't find a solution. Maybe I can try to test the case with another version of OpenFOAM.

  • @ElChe-Ko
    @ElChe-Ko 9 ปีที่แล้ว

    Hi Calum! I guess you designed the pipe in a CAD software like Solid-Works/Solid-Edge or whatsoever.... How did you managed to extract the inlet/outlet/wall STL files from the CAD model (3:10)?

    • @CalumDouglas
      @CalumDouglas  9 ปีที่แล้ว

      MegaSancho1990 Depends on what software you have. If you can save-as STL then you can do it. I just extract surfaces I want from the solid and then save each surface as an STL separately.

    • @ElChe-Ko
      @ElChe-Ko 9 ปีที่แล้ว

      Calum Douglas What software did you use? Did you extract the surfaces from the solid before or after saving it as STL?

    • @CalumDouglas
      @CalumDouglas  9 ปีที่แล้ว +1

      MegaSancho1990 I use commercial software to do that. As I said in the comment above, extract surfaces then save each as STL.

    • @DrHodis
      @DrHodis 9 ปีที่แล้ว

      +Calum Douglas
      First of all, Thank you Calum for providing this tutorial. I managed to mesh my first model in openfoam following your neat instructions.
      My model is from medical scans, so the geometry is complex, but I managed to separate the STL parts using an opensource software: meshmixer.
      Thank you!

  • @IBI-r3f
    @IBI-r3f 11 หลายเดือนก่อน

    sir how to convert stl file to stp file in salome?

  • @ElChe-Ko
    @ElChe-Ko 10 ปีที่แล้ว +2

    You are the man!!! thanks for sharing and post more if you can!!!

  • @stratosdoukakis4837
    @stratosdoukakis4837 10 ปีที่แล้ว

    Hello Calum,
    Very good video indeed. I want to ask you a question about the boundary box. The blockMesh utility helps you define the boundary box but you define some patches on it(blockMeshdict file) why so? I mean do you need them somewhere?

    • @CalumDouglas
      @CalumDouglas  10 ปีที่แล้ว

      In this case we`re deleting all the mesh outside of the pipe. So those patches should be deleted, however thats just because its an "internal flow" problem. If we were doing for example external aero on a car, we would keep the mesh OUTSIDE of the body, and so would need all those patch names from BlockMeshDict - eg as Inlet, Outlet, topwall etc etc. So thats why I start with a BlockMeshDict with named patches, as for many geometries and problems you WILL need them. Here those patches are not in the final mesh, and so should be deleted as it shows in my video.

    • @martadrabek8392
      @martadrabek8392 10 ปีที่แล้ว

      Calum Douglas
      Thanks for helping us all baby foamers, Calum! I wonder, how does the determination of BCs change if you have both internal AND external flow? E.g. an object in a channel - so flow around the object (external) which is sitting inside a channel (internal)?

    • @CalumDouglas
      @CalumDouglas  10 ปีที่แล้ว

      Marta Drabek You`ll need to email me a picture. Its very easy to get confused with descriptions of model setups. You can contact me via my website contact form. Then I can email you back, so you can email attachments.

  • @133wavi
    @133wavi 10 ปีที่แล้ว

    Hi Calum
    I am trying to use snappyhexmesh for single stl file. In that case do i need to decompose, because I was trying to decomposePar but it was not working
    I was trying to mesh a simple cylinder, i am getting following error for decomposePar
    Unknown decompositionMethod ptscotch
    Valid decompositionMethods are :
    8
    (
    hierarchical
    manual
    metis
    multiLevel
    none
    scotch
    simple
    structured
    )

    • @CalumDouglas
      @CalumDouglas  10 ปีที่แล้ว +1

      It would help to know which version of OpenFOAM you are trying to use.
      But just to keep it simple, decomposing has nothing at all to do with how many STL files you may (or may not) have. DecomposePar is the command to do the meshing in parallel processing - depending on how many CPU cores you have.
      I suggest you update to OFv2.3 if you have not already done so. Or try to run the "motorcycle" tutorial in your openfoam installatio and see if it works Because thats also a parallel snappyhexmesh case.

    • @133wavi
      @133wavi 10 ปีที่แล้ว

      Thank you

  • @133wavi
    @133wavi 10 ปีที่แล้ว

    Hi Calum
    I have one more question
    In this tutorial volume.stl file has complete geometry without any patch. And other STL file are for different patches. Is it necessary that we use separate stl file for each patch or we can add all patches in one file to appy boundary condition e.g in volume.stl in this tutorial

    • @CalumDouglas
      @CalumDouglas  10 ปีที่แล้ว +1

      You do not need to use separate STL files you can join them together with the cat command in linux. However they are then named inside the snappyhexmeshdict in a different way. I dont think it matters which technique you use. The reason the volume stl is there, is to enable a regional distance refienment. To do that you must use a CLOSED stl volume so you cannot use the existing patches.

  • @Leonardo-xo6ec
    @Leonardo-xo6ec 6 ปีที่แล้ว

    I have an issue related to my boundaries... I have 3 objects (2 solids and 1 fluid) which represent a pipe. Only the two solid regions appear at the polymesh/boundaries after the snap. I checked surfaceFeatureExtractDict and snappyHexMeshDict but it seems i did specify all correctly. I tried to keep all advanced settings standard tho.

    • @CalumDouglas
      @CalumDouglas  6 ปีที่แล้ว

      I dont understand your question really, firstly what do you mean you have a fluid representing part of the pipe ? They need to be closed surfaces, exactly as in my description. You probably have problems with your STL files. Sorry its very hard to diagnose these things without photos, this process works so if it doesnt, and you followed it, then your starting CAD files are not ok. The most common problems are not scaling STL`s properly, having gaps from bad CAD and the mesh location point for snappy being in the wrong place.

    • @Leonardo-xo6ec
      @Leonardo-xo6ec 6 ปีที่แล้ว

      @@CalumDouglas Nevermind. The problem was the cad file. Thanks!

  • @alpaysedatdurukan2361
    @alpaysedatdurukan2361 4 ปีที่แล้ว +1

    Thanks a lot for this video, it was a great help for me.

  • @耿晓天
    @耿晓天 2 หลายเดือนก่อน

    it's nice for me, because of i doing the job about meshing in openfoam auto. thanks

  • @iijumark
    @iijumark 9 ปีที่แล้ว

    How do you fix your Final/InitialLayerThickness for a required y+ value. How do you estimate it for a complex Geometry?

    • @CalumDouglas
      @CalumDouglas  9 ปีที่แล้ว +2

      +Isaac Mark
      First calculate what it should be:
      www.cfd-online.com/Tools/yplus.php
      Then run simulation, do yPlusRAS command in OpenFOAM- which will show you what y+ value actually IS. Alter your mesh and re-run.
      Iterate until satisfied.
      Unless you have adaptive meshing software, thats as good as it gets (there are some differences of opinion about how y+ is defined in the yPlusRas command.....but thats problem #2...I`m afraid).

  • @riccardomaione3846
    @riccardomaione3846 9 ปีที่แล้ว

    Hi Calum,
    first things first, this tutorial is great, thank you, however I wished to ask you a question:
    I have created a good quality STL, snappyHexMesh runs fine and produce a good mesh, however I wasn't able to split this STL in parts to manage dimensions and boundary conditions. You can pinpoint me to the right direction perhaps?
    thank you

    • @CalumDouglas
      @CalumDouglas  9 ปีที่แล้ว

      +Riccardo Maione
      Do the separation in the CAD program, and turn each part into an STL later on. Its a very messy buisiness manipulating STL`s you already have. But if you must then:
      th-cam.com/video/6rostD8O5sg/w-d-xo.html

  • @Hahahazhang
    @Hahahazhang 9 ปีที่แล้ว

    Hi Calum, I am facing a problem with merging two different stl files into a stl file with only one single object. I tried the "cat" command but I got a stl with two seperate objects. How can I do that? Thanks

    • @CalumDouglas
      @CalumDouglas  9 ปีที่แล้ว

      David Zhang Yes CAT command is not for doing that. I think you are much better off modifying your shape in CAD and re-exporting.
      However if you cannot do that I recommend experimenting with MESHLAB. However I have never actually tried to do what you are trying. It sounds messy and I do not think its a good way to get your mesh.

    • @Hahahazhang
      @Hahahazhang 9 ปีที่แล้ว

      Calum Douglas ok, first I'll try with meshLab and I'll let you know. Thank you Calum Douglas!

  • @wheresmyspanner
    @wheresmyspanner 8 ปีที่แล้ว

    Excellent tutorial - however I am stuck at the first step! You import your model as a series of .stl files such that you can define your patches and refinement areas later on. How is this done? For example if I built a simple pipe in SolidWorks, how could I define the inlet and outlet patches - without physically addding any additional volume to the pipe?
    Best Regards

    • @CalumDouglas
      @CalumDouglas  8 ปีที่แล้ว

      I dont really understand your question about "additional volume" because STL models are surfaces.
      I`m afraid that you need to go onto a Solidworks forum and ask how to extract STL surfaces from that software package. You do not need a solid
      model to do this, surfaces are ok too.

    • @wheresmyspanner
      @wheresmyspanner 8 ปีที่แล้ว

      Right, I understand. Re: the pipe example, I am capable of exporting the pipe surfaces as an STL - however the inlet and outlet would obviously be an empty space - with no surface point data. I assume in OpenFOAM I could set this up as an "empty" patch, however I'm struggling to grasp this concept when there is no data there. I'm not sure whether my lack of understanding is CAD based or CFD theory based. Any ideas?
      Thanks again for your time.

    • @CalumDouglas
      @CalumDouglas  8 ปีที่แล้ว +1

      You can use a closed pipe and use open foams tools which can be set to work on angle difference to automatically separate into different patches (I never use this but it works) or you can create two 2D discs to represent each pipe end. These are then inlet / outlet patches.

    • @wheresmyspanner
      @wheresmyspanner 8 ปีที่แล้ว

      Thanks for your input, i'll keep playing with the models

  • @uvporat
    @uvporat 10 ปีที่แล้ว

    Hey Calum,
    First of all thanks for the very informative video!
    I have a question about the surfaceFeatureExtractDict.
    I've tried to follow your instructions, but with some geometrie I've made myself in a CAD software.
    As a starting point for the meshing I've copied the contents of the motorbike case from the tutorials as you suggested and ran the blockMesh.
    However when I try to run the the surfaceFeatureExtract (and also everything that follows) I get error messages.
    It seems that I need to change somehow also the surfaceFeatureExtractDict, which is not explained in your video.
    So my question is basicaly how and what should I change before I can run surfaceFeatureExtract?
    Thanks and keep up the good work!

    • @CalumDouglas
      @CalumDouglas  10 ปีที่แล้ว

      It is all explained in the video, its also given in the contents that SurfaceFeatureExtract is described at 21:00. How to edit the surfaceFeatureExtract dict is shown at prescisely 23:10

    • @uvporat
      @uvporat 10 ปีที่แล้ว

      Calum Douglas So true. sorry for that. don't know how I've missed it.
      Thanks again!

    • @luigigetsu
      @luigigetsu 10 ปีที่แล้ว

      Yuval Porat If you have an OF version previous to 2.2.0, you may have my problem since the surfaceFeatureExtractDict do not exist for those versions, I solved this problem executing (surfaceFeatureExtract -includedAngle 150 patchname.stl features) for every patch in order to generate the emesh files, you have to take into account that for executing this command you have to copy the stl files in the case directory instead of the triSurface directory

  • @cheesyfeet956
    @cheesyfeet956 9 ปีที่แล้ว

    While following your tutorial I got to the point where I enter decomposePar but unlike your program the only out put I received was
    Create time
    Decomposing mesh region0
    Create mesh
    Calculating distribution of cells
    Selecting decompositionMethod ptscotch
    Attempting to use an MPI routine before initializing MPI
    in addition to this when I entered
    mplrun -np 8 snappyHexMesh -overwrite -parallel
    I received the error: command not found
    Any help would be much appreciated.

    • @CalumDouglas
      @CalumDouglas  9 ปีที่แล้ว

      +Ryan Cunningham
      Well I dont know if what you have pasted here is what you actually typed......but you have typed the letter "L" instead of "i" in the command mpirun.....
      If you have issues other than that, you probably have bigger problems. I suggest you read this
      web.student.chalmers.se/groups/ofw5/Basic_Training/runningInParallelLucchini.pdf

    • @CalumDouglas
      @CalumDouglas  8 ปีที่แล้ว

      Van Sang Pham Generally means you are using a different version of OpenFOAM - or have installed something incorrectly. Please google before you post, there are lots of answers for this on cfd-online forum.....

    • @vansangpham9314
      @vansangpham9314 8 ปีที่แล้ว

      +Calum Douglas Thank you!, I will check that.

  • @kevinconde5528
    @kevinconde5528 5 ปีที่แล้ว +1

    Thank you, Calum. I can't thank you enough!

    • @CalumDouglas
      @CalumDouglas  5 ปีที่แล้ว

      Glad it helped you, what were you struggling with in particular ?

    • @kevinconde5528
      @kevinconde5528 5 ปีที่แล้ว +1

      @@CalumDouglas So... I am newbie with SHMesh. But this is being helpful already. Again, thank you!

  • @piergiorgiospazzini5060
    @piergiorgiospazzini5060 7 ปีที่แล้ว +1

    hey, thank you Calum, very good tutorial indeed. But, I would like to get the files you show as examples, you say in the tutorial that they are available on your website but...I cannot find your website, I tried the calumdouglas.ch site but apparently it is free domain......

  • @jakobtrydal7298
    @jakobtrydal7298 10 ปีที่แล้ว

    Hi Calum! First of all, thank you for a great video! I was wondering which program you used to extract the surfaces from the CAD model? I have managed to do it in Salome, but I end up with huge STL files, and quite bad quality. I have tried to export STL in Salome from both geometry and mesh module.

    • @CalumDouglas
      @CalumDouglas  10 ปีที่แล้ว

      I use commercial CAD software, large sizes are common - for a full size car STL, easily 150Mb is common.
      Low resolution STLs cause bad meshes in SHMesh....

  • @erickmontesdeoca103
    @erickmontesdeoca103 8 ปีที่แล้ว

    Hello Calum! Really nice tutorial!
    I'm using OpenFoam version 3.0 and when trying to run the model with the command: "mpirun -np 8 simpleFoam -parallel" the program runs but it fails almost inmediatly with the following error:
    "Selecting incompressible transport model Newtonian
    Selecting turbulence model type RASModel
    [0] [1]
    [1]
    [1] --> FOAM FATAL ERROR:
    [1] Unknown TurbulenceModel type RASModel"
    Do you know how I may solve it?
    Many thanks!

    • @thawtar682
      @thawtar682 8 ปีที่แล้ว

      This case is from 2014. So, may be he used OpenFOAM 2.3.0 or 2.4.0. There are a large number of differences between 2.3.0 or 2.4.0 and 3.0. So, you need to change the entry names one by one. I have similar experience. I am sorry but you need to make a lot of small changes. :(

    • @CalumDouglas
      @CalumDouglas  8 ปีที่แล้ว +1

      As Thaw Tar says I am using OF 2.3, I suggest you look at the example cases in your OF 3.0 folder and read the commands used for each one to understand what has changed between versions.

  • @hernanmejias6978
    @hernanmejias6978 10 ปีที่แล้ว

    I really appreciate this tutorial but I was wondering about a tutorial on external flow? I find this tutorial to be for internal flows, but how about external flows? like 3D flows through porous/non-porous obstacles? do you have any suggestion on that? would appreciate your reply. thanks!

    • @CalumDouglas
      @CalumDouglas  10 ปีที่แล้ว +2

      Just dont delete the patch names in the boudary file like I do here, and obviously move your locationinmesh point to the other side of the domain. Be very careful with the blockmesh density, as if its too course with a very very fine mesh right up against the object inside, it will not converge. Also SimpleFOAM does not like to converge if you have a bad mesh, so eliminate all skew elements etc. Do not waste your time running any mesh that fails checkmesh, if you really have to get it running increase your solver tolerances from maybe 0.7 up to perhaps 1.0 but the solution will be less accurate.

    • @hernanmejias6978
      @hernanmejias6978 10 ปีที่แล้ว

      Calum Douglas ok, so how do you remove skewed elements, what specific "checks" need to be followed? does it matter if my geometry is really small? it seems like my geometry is really small that there still exist skewed elements (you're right, blockMesh is coarse compared to geometry mesh..tried to make "fine" the blockMesh...still there are skewed elements) and that snappyhexmesh "messes" it up which makes it fail checkMesh... :-( can you help me with this? thanks so much.

    • @CalumDouglas
      @CalumDouglas  10 ปีที่แล้ว +1

      Hernan Mejias Run checkMesh, this writes the areas that fail into files for you. These can then be viewed in paraFoam, after you convert them to VTK format. This will show you which areas are bad, normally means refining those areas more, or altering your geometry.

    • @CalumDouglas
      @CalumDouglas  10 ปีที่แล้ว +1

      Hernan Mejias For example:
      checkMesh
      foamToVTK -faceSet skewFaces
      paraFoam

    • @hernanmejias6978
      @hernanmejias6978 10 ปีที่แล้ว

      Calum Douglas Hello there again! Thanks for the prompt reply. Well, I tried what you said and for some reason, my "simple" geometry which is a very small geometry though gets messed up and found that the skew faces occurs at the "angled" portions of my drawing...Imagine a cylinder with extruded sides (that's my simple geometry). So i got it "fixed" by using resolveangle 90 and up...but the mesh is OK for a single geometry...Unfortunately, I would like to simulate flow around multiples of this geometry, say, 50 times of such...and snappyHexMesh messes up my geometry big time...even if i increase the resolveangle to 130 (which I think shouldn't be the case or should i say would be bad), checkMesh fails big time! Of course I looked into the skew faces and well, from there, "portions" of my geometry are missing/broken/discontinued which makes my mesh fail. :-(

  • @alvincenizaalvarado3216
    @alvincenizaalvarado3216 10 ปีที่แล้ว

    Hi Calum! Thanks for this great video. It's really helpful. I have one question for you. When I tried to run the mesh in parallel, I am getting this error even if I already reformatted the snappyHexMeshDict sample file. Any thoughts? thanks
    (keyword castellatedMeshControls is undefined in dictionary "/home/psci/OpenFOAM/psci-2.3.0/run/BBSF_nopigs_SHmesh_3Dec/processor1/system/snappyHexMeshDict"
    [1]
    [1] file: /home/psci/OpenFOAM/psci-2.3.0/run/BBSF_nopigs_SHmesh_3Dec/processor1/system/snappyHexMeshDict from line 0 to line 0.
    [1]
    [1] From function dictionary::subDict(const word& keyword) const
    [1] in file db/dictionary/dictionary.C at line 643.

    • @CalumDouglas
      @CalumDouglas  10 ปีที่แล้ว +1

      Funny errors usually mean you have made a syntax error in the snappyhexmesh dict.
      Almost certainly you have accidentally deleted a bracket, or missed out a semi-colon.

  • @luigigetsu
    @luigigetsu 10 ปีที่แล้ว

    This is a pretty clear video, I'm not so expert creating meshes so I'd like to know how exactly do you create .stl files, are they simply exported from a CAD?, did you create one by one? or did you split the whole geometry in every patch? thanks for the help (y)

    • @CalumDouglas
      @CalumDouglas  10 ปีที่แล้ว

      The geometry was made in CAD as a solid model. then surfaces extracted for each required patch. Each surface can then be exported as an STL. Its very very important to set the STL export settings to maximum fine-ness for a good result with SHMesh. You can do this in opensource with Salome-Meca.

    • @luigigetsu
      @luigigetsu 10 ปีที่แล้ว

      Calum Douglas Trying to follow your instructions with my own mesh I get an error when executed surfaceFeatureExtract command, I tried executing the same sequency on your example files too and I get the same error "FOAM FATAL ERROR: Wrong number of arguments, expected 2 found 0", I dont know if its a problem of my OF installation or its from the dictionary settings, have you any idea of how to solve it, thanks for the help

    • @luigigetsu
      @luigigetsu 10 ปีที่แล้ว

      miguel zapata I already found the error, it was a problem of OF version in 2.1.1 that dictionary is not available so you have to input the parameters of every patch with the comand (surfaceFeatureExtract -includedAngle 150 surface.stl features) to create the emesh files

    • @uvporat
      @uvporat 10 ปีที่แล้ว

      miguel zapata
      I believe I encountered the exact same problem, and funnily enough, also posted a similar question a minute ago :)
      Any help will be very appreciated!

    • @CalumDouglas
      @CalumDouglas  10 ปีที่แล้ว

      Yuval Porat
      Unfortunately as it says in the video, its all based on OpenFOAM 2.3
      If you`re not using that I cannot predict what errors you will get using my files on earlier versions. Given the very large upgrades made to SHMesh between 2.0 and 2.3 I suggest you upgrade.

  • @fizzybubblyify
    @fizzybubblyify 4 ปีที่แล้ว

    SOLIDWORKS USERS: you need to rename file extension from .STL to .stl for surfaceFeatureExtract to work.

  • @jalilahmadjamily3813
    @jalilahmadjamily3813 5 ปีที่แล้ว

    Hello everyone!
    I use snappyHexMesh but it does the refinement job, but does not remove the extra cells. Can anyone identify the problem.?
    Thank you!

    • @CalumDouglas
      @CalumDouglas  5 ปีที่แล้ว

      Probably you have either bad geometry (you have gaps somewhere) or maybe you have the "location in mesh" point incorrectly placed, errors in scaling often cause problem #2

  • @harishselvam3155
    @harishselvam3155 4 ปีที่แล้ว +1

    Thank you so much

  • @seanmike024
    @seanmike024 9 ปีที่แล้ว +1

    Thank you Calum, really helpful !

  • @alexmachado3257
    @alexmachado3257 7 ปีที่แล้ว

    have you ever use blender to generate STL files?

    • @CalumDouglas
      @CalumDouglas  7 ปีที่แล้ว +1

      No I`m afraid that I do not use Blender.

    • @nicsmagar
      @nicsmagar 7 ปีที่แล้ว +2

      The stl format of blender has a complete different encoding than catia or some other cad softwares. Just give it a try, you can see it in a editor (may be vim)

  • @petrikRk
    @petrikRk 7 ปีที่แล้ว +1

    great tutorial, helped me a lot

  • @dantongshi8010
    @dantongshi8010 6 ปีที่แล้ว +2

    Thanks for the tutorial!

    • @CalumDouglas
      @CalumDouglas  6 ปีที่แล้ว

      No problem, can you tell me what was most useful about it for you ?

  • @Fisherdec
    @Fisherdec 9 หลายเดือนก่อน

    Really annoying how OpenFOAM changes so much between versions. For others who got derailed at SurfaceFeaturesExtract, that has been deprecated in openFOAM 11 and surfaceFeaturesDict is used instead. The command to run is sufraceFeatures

  • @subramanyamn
    @subramanyamn 9 ปีที่แล้ว

    Thanks for the great tutorial!

  • @piergiorgiospazzini5060
    @piergiorgiospazzini5060 7 ปีที่แล้ว

    no problem, found it, thank you!

    • @CalumDouglas
      @CalumDouglas  7 ปีที่แล้ว

      Hi Pier, Ok glad you found it - as you noticed I have a new website domain now. Sorry I missed your comment because it was captured by the spam filter. Can you tell me a bit about yourself and what problems you are solving in OpenFOAM ?

  • @smrutimayapattanaik4077
    @smrutimayapattanaik4077 8 ปีที่แล้ว

    Wonderful video, thanks a lot.

    • @CalumDouglas
      @CalumDouglas  8 ปีที่แล้ว

      Good - I`m pleased it helped you.

  • @thecoolcrasher
    @thecoolcrasher 9 ปีที่แล้ว

    good and detailed explanation :)

  • @DustinNick
    @DustinNick 9 ปีที่แล้ว

    helps a lot ,thank you

  • @BobBeatski71
    @BobBeatski71 6 ปีที่แล้ว

    Went to obtain the files for this tutorial, only for AVG to report "We've safely aborted connection on www.calum-douglas.com because it was infected with HTML:RedirMe-inf [Trj]."

    • @CalumDouglas
      @CalumDouglas  6 ปีที่แล้ว

      Well that has not been a problem to anyone else in 4 years, so I can only surmise that your AVG is playing up. I suggest you try from a different PC and tell me if the same thing happens.

    • @BobBeatski71
      @BobBeatski71 6 ปีที่แล้ว +1

      @@CalumDouglas I used an Android tablet, not running AVG and everything is ok. Seems AVG was a little over zealous.

  • @savitar7692
    @savitar7692 ปีที่แล้ว

    god you helped me a lot !

  • @Hahahazhang
    @Hahahazhang 9 ปีที่แล้ว

    Otherwise you also have paraview who can do the same job.

    • @amitvikramdutta294
      @amitvikramdutta294 9 ปีที่แล้ว

      David Zhang Can Paraview take an stl file and add patches to it?

    • @CalumDouglas
      @CalumDouglas  9 ปีที่แล้ว

      Amitvikram Dutta ParaView is really just postprocessing software. You can mess around with VTK data - but I do not think its the right choice for
      preparing your STLs. MeshLab is very good free Linux software for manipulating STLs.

    • @Hahahazhang
      @Hahahazhang 9 ปีที่แล้ว

      Amitvikram Dutta I don't think Paraview has this functionality. However, if you have different solids defined in your stl file, you can assign them to patches under snappyhexmesh.

    • @amitvikramdutta294
      @amitvikramdutta294 9 ปีที่แล้ว

      Here's my problem. I have a rather complicated geometry which is like a pipe. I need to simulate internal flows through it. The problem is, I can't seem to assign patches to it before running the sHM process. If I try to assign groups to it in Salome and then import it as different stl files, whenever I run surfaceCheck it always shows an open geometry. If I define different stl files and concatenate them as this video shows, the same problem persists

    • @amitvikramdutta294
      @amitvikramdutta294 9 ปีที่แล้ว

      David Zhang Do you, mean by concatenating them like Callum does in this video? Whenever I try that, it results in an open surface :(

  • @experimentalandnumericalfl7370
    @experimentalandnumericalfl7370 10 ปีที่แล้ว

    gut gemacht

  • @bfigueroae
    @bfigueroae 9 ปีที่แล้ว +1

    Excellent tutorial. Thank you!

  • @hallohallo6465
    @hallohallo6465 4 ปีที่แล้ว

    perfect video, thank you so much!