OpenFOAM using Salome 7.2 Tutorial

So here is how to use SALOME to create your boundary patches, from an imported STEP file of a “real world” part geometry – then
import into OpenFOAM and run your case.

I will run an interFoam solver in 8 core parallel mode.

Here are all the files you need to follow it, I deleted the actual timestep folders to save filespace. So you need to
run decomposePar then run the simulation again to see the results. I added in March 2014 a new version of the files
which will work with OpenFOAM 2.3 – see below “casting_OF_2.3.tar” (I think the old one will only work until OpenFoam 2.0.x)

casting_OF_2.3.tar

OpenFoam_T3

To follow how I did it all, you can watch my youtube video tutorial. Probably best to open properly in youtube so
you can see in detail whats happening.

27 thoughts on “OpenFOAM using Salome 7.2 Tutorial

  1. […] CAE in general have an easier time to figure it out. http://www.youtube.com/watch?v=1zQbU-E4k https://www.calum-douglas.com/openfoam/…-7-2-tutorial/ Its just to show how you can get a STEP file into Salome, set up the inlet/outlet/wall patches […]

  2. hello i’m seeing the video, one thing, around 12.20 time, you don´t need “recreate” the groups done in Geometry in the Mesh mode, you can do in the top bar, Mesh->Create Groups From Geometry->Select the 3 groups and its done.
    [ ]

    1. Yes that does save some time, thankyou for the tip.

  3. oh! i saw now that you refer something about that option i mentioned. sorry

    1. Dont apologise, your suggested method is faster so I will use it in future.

  4. a question, isn’t the “Constant” folder missing on your files? isn’t it required? mainly the “transportproperties” i guess.
    best regards

    1. Hi,
      Yes its missing, but this doesnt matter as its just the Dambreak case (which the whole thing is based on).
      This is mentioned in the video (20:00). However I guess not everyone will be sitting through the entire video.

      Just copy the CONSTANT folder from dambreak case and it will work. It might just look slightly different because the viscosity and density are different.

      However this was obviously not clear, so I have added an annotation to the tutorial to clarify this right at the start.

  5. Just wanted to say thanks! Your tutorial helped a lot.

  6. Calum Douglas, I am such a fan of your work. I’ve been following your blog since I started working on my thesis and honestly, I dont think I would have been able to use openfoam for my multiphase simulation and see results in such a short time. I can argue that your work is the most valuable resource for beginnings. I feel the urge to thank you for everything you’re sharing with us and I don’t think I can thank you enough. Please keep up the great superb work. Ghazi Hallaby.

    1. Im very glad you got a positive result from my video, this was my motivation that others would not have to repeat all
      the mistakes I made. So im happy I succeeded in my aim.

  7. Hello sir,
    I have watched both of your tutorials several times. They were really helpful.

    In this video, alpha 1 (liquid aluminium) was initialized using set fields which was actually the intersection of the area (involving xyz min point and xyz max point) and the main mesh.

    My doubts:
    (1) How can the inlet volume (in which the liquid is to be poured) be defined using two points ??
    (2) How this fluid is getting poured into the volume by defining these two max and min xyz point ?? And what does these two points refer to ? And what is the origin according to which the coordinates of these two points are set ??
    (3) I also didn’t understand the boxtocell command .Here what does box and cell refer to ??

    Can you please elaborate on SetFields file in reference to my doubts ??

    Thanks in advance.

  8. Hei,
    Thank you for your very concise and informative video on Youtube. I am brand new to Salome / Openfoam and flow modelling I have done some in Soliworks but very limited.
    I have a case which is a unit that is part of a ventilation exhaust, called a jet hat. This has a conical section internally which prevents me from shelling the the solid shape. In Solidworks the inlet and outlets are defined as “lids”, in Salome I do not see a method of creating a similar inlet and outlet. The type of unit can be seen at the web address http://www.fercell.com/cowls-caps.html and it is the unit called “KWIK-FIX JET CAP”. These are generic Products produced by a wide range of manufacturers.

    I would be grateful if you could help.
    very best regards,
    Jeff.Tyrrell.

    1. Hi Jeff,
      My video explains how to do this, I suggest you watch it again between 0 and 10mins video time. That covers the imported CAD
      and naming the patches in Salome.

      I cannot comment about meshing your “jet cap” as I cant see your overall geometry. But generally you should simplify
      it into the lid and base. Forget about the side-struts.

  9. Hi,
    I need help regarding how to solve heat transfer problems and magneto hydrodynamic problems in openfoam.

    1. Register with cfd-online forum and post your problem there in the Openfoam section. You need to be ALOT more specific
      when you ask for help, or nobody will reply.

  10. Calum: December 5, 2014
    Thank you to you and the others whose tutorials got me off to such a good start on OF, having first installed it just three weeks ago. (I worked on Fluent 14 years ago.)
    I can’t seem to get started on heat transfer as the simplest of tutorials aren’t simple enough. Or maybe I just haven’t found one basic enough?. What about a tutorial of a simple 10cm metal square, 1cm thick, with three edges having temperatures of 0C, 50C and 100C?, and the other faces being isothermal with insulation? This would seem to be a trivial problem to set up and solve but could illustrate how to get started in heat transfer. I suspect this tutorial is out there but I can’t find it. Any ideas?
    thank you. Pete in Wisconsin, USA

    1. Hi Pete,
      I`m really sorry but I`m afraid that heat transfer is not an area I`m yet competent with in Openfoam…
      I suggest you register at cfd-online forums and post there. There is a large Openfoam community there.

  11. Hi, Callum.

    I noticed that the OF 2.3 version of your tutorial names different the fields alpha, i.e., in the 2.0 version they are named alpha1 and in the other, alpha.water. Why is this?
    I tried running the 2.0 version in OF 2.3 and there was always a problem with the names of this field.

    Thank you, Callum.

    1. There are always many small changes between major openfoam updates. I suggest unless you
      cannot – to upgrade to OF 2.3 – then these things stop being an issue.

  12. HI,

    Thanx for your video it helped me a lot, but i am facing an error segmentation fault. i am trying to fix it but any advice will be appreciated 🙂

    1. Segmentation fault when working in which area ? Openfoam, Linux itself, Salome ?

  13. Thank you so much for this tutorial – really helpful to get me going.
    Also like the photo of the Dents-du-midi on your desk top!

  14. Hello,

    First thank you for the tutorial. It was very helpful since I do not have a background in CFD or C++.

    Do you think you could update the files again? there’s an OpenFoam ver 3.0.1 and it doesn’t seem to play well together. I’ve tried renaming a few things (like patch names) myself but I seem to just be getting lost in the forest so to speak.

    1. Yes alot of people are asking for me to do this now, I will try my best to do it soon – I`m very buisy
      so do not rely on me doing that very soon. If you are stuck for a uni project I recommend posting on CFD_Online forum

  15. Just want to say thank you so much for this. Worked a treat and was set at the perfect level of comprehension!

    Cheers,
    Brani

Leave a Reply

Your email address will not be published. Required fields are marked *