I have to solve a simulation of fluid flow on Ansys, but my prof wants me to run a parallel simulation using the Volume of Fluid method in something with more visible guts than Ansys? Any recommendations, or should I try doing it in Matlab?

  • 6
    $\begingroup$ What do you mean by 'visible guts'? Matlab is a no-go for any serious fluid dynamics simulations. Did you consider using OpenFoam? $\endgroup$
    – nluigi
    Commented Oct 26, 2015 at 14:58
  • $\begingroup$ By visible guts, I mean that I should be able to demonstrate all the equations and the exact process of solving for the numerical solution. Can open foam do phase transformation? I need to incorporate solidification down the line. $\endgroup$
    – Avidiotic
    Commented Oct 27, 2015 at 22:39
  • $\begingroup$ Why can't you demonstrate those for Ansys? I think everything is well documented in the manual. Openfoam is also well documented but is considerable more tweakable (read: requires more skill) than Ansys which in my opinion is nice to quickly set some settings and get a simulation going. If you are not afraid to down to the bare metal, Openfoam is the way to go. I do not know if it has phase transformation, but since it is opensource, if it doesn't, you can add it! $\endgroup$
    – nluigi
    Commented Oct 28, 2015 at 13:28
  • $\begingroup$ I will try to convince my professor in that case! Thanks a lot for your help. Didn't know I could do that with Openfoam. $\endgroup$
    – Avidiotic
    Commented Oct 28, 2015 at 20:15
  • 1
    $\begingroup$ Unless you use Mex files, (cpu/gpu) parallelization, etc., matlab will likely not give you enough performance because it is an interpreted language. Besides why reinvent the wheel if Ansys/OpenFoam already provides a fully fledged fluid solver in which you can do VOF. If you need additional functionality you can add it on top of the existing framework. In the case of Ansys you can look into User Defined Functions $\endgroup$
    – nluigi
    Commented Oct 28, 2015 at 20:57

1 Answer 1


I would advise against using MATLAB - you will be spending too much time reinventing the wheel. OpenFOAM has a VoF implementation readily available (interFoam), and you can find hints on adding solidification phase change code here. There are other, more sophisticated, open source codes such as Gerris and Paris, but you may find it more difficult to add phase change. If you're into finite elements, also have a look at Elmer.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.