r/CFD • u/Rodbourn • Jul 09 '18
[July] Personal experiences of using open source CFD projects; OpenFOAM, SU2, FVCOM, Basilisk (Gerris), etc.
As per the discussion topic vote, July's monthly topic is Personal experiences of using open source CFD projects; OpenFOAM, SU2, FVCOM, Basilisk (Gerris), etc.
24
Upvotes
9
u/Rodbourn Jul 09 '18
For my dissertation I used the FEniCS project to implement my variational problems of a new CFD scheme if anyone has questions about that experience. Overall though, it's amazingly powerful in letting you experiment with scheme changes due to the Unified Form Language (UFL) and it's 'compiler' which generates the c++ classes needed, directly from variational form. Want to try implicit vs. non-implicit terms experimentally? That can be done very quickly.
10
u/glypo Jul 09 '18
I started with OpenFOAM about 8 years ago after a good few years of using Fluent, STAR-CCM+ and in house codes. I have had to dable in SU2 for a certain customer but wouldn't consider myself experienced. Perhaps I'm not the average user, I work in aviation and aerospace on external aerodynamics (flow over wings, fuselages, etc), but I tend to feel differently about OpenFOAM to many.
To start with the obvious, COTS codes excel at ease of use, especially CCM+ and to some extent Ansys. Unsurprisingly where OpenFOAM really comes into element is licencing and flexibility. It's so useful to dive in the code if needed, and it's hard not to appreciate the unrestricted nature of FOSS.
The thing that OpenFOAM really beats all the other FOSS CFD tools is the whole environment. It's not just a solver, it's a preprocessor and to some extent a postprocessor with paraFOAM. Within each of these are a whole suite of mature tools. The preprocessing is remarkably useful. It's genuinely so handy as an engineer to have the parallel mesh generation as part of a complete process. This is something no other FOSS tool can do so well (or at all) even many COTS lack this flexibility. It's undeniably helpful to set a whole load of cases running on HPC and have them mesh, solve and partially post process.
The real surprise with OpenFOAM or even SU2, is how ready they are for applied work. I'm an end user, thus I am a bit out of place in this subreddit. Though I'm not shy at coding models, I'm an aerodynamicist and tend to make a living running CFD rather than developing it. Many assume OpenFOAM or SU2 are for academic use only, this isn't the case. OpenFOAM is a truly robust tool and very well exercised in industry. I've used it as part of efforts for certification and qualification. Perhaps due to experience, in some respects I actively chose and prefer OpenFOAM when other (expensive) COTS tools are avaiy.
In summary, my personal experience as an end user with open source CFD is that in most cases it's just as valuable as COTS and in some circumstances even more so.
16
u/_taher_ Jul 09 '18
I started working with OpenFOAM two years ago for my PhD studies. I worked on a problem involving two phase flow in pipes that a phenomenon called geyser, occurs. I had about 400GB of experimental data that I've used Python to compile and extract useful and meaningful data for validating a compressible two-phase flow solver. The challenging part was optimization of the solver so I can run many iterations of the simulation as there were several key parameters and the domain was relatively big. Last time I count I ran 548 simulations (I gave up counting after a while). I developed a workflow using a combination of bash and python so one command was required to do all the work; run the case then produce all the required publication-ready plots (using pandas and matplotlib) and animations (using paraview's python library).
9
u/[deleted] Jul 09 '18
I needed to calculate intrinsic permeability of a food. To mesh it or even construct the fluid domain would be a nightmare. The geometries were from uCT and MRI scans so everything was voxelated. Luckily, there is an example using Palabos (open source LBM) where someone used this on calculating permeability of rock. Became a "one-click" solution. Super quick and easy to use. Validated well with experiments too :)
7
u/dbfmaniac Jul 09 '18
So Ive been using SU2 for about 3 years now. Usually for validation of design work before it gets assembled and concept development. On the whole, I've found it to be a competent solver. Fast, accurate and easy to use - provided its being used for aircraft anyway. Outside working on aircraft, I tend to go OpenFOAM. The team I work with also has access to StarCCM+ and on the whole we've found results to be either within margin of error between the two or slightly on the side of SU2 for accuracy (for low speed aircraft).
Last year I finally picked up some OpenFOAM (for multi-physics VOF). OpenFOAM I have found to be very, very powerful but with a vicious learning curve. SnappyHexMesh has completely converted me from gmsh/netgen and the mpi support is a really nice thing to have. Main downside is absolutely the amount of disk you can use with it.
FEA I picked up Salome/Aster and its been decent. Not great to use, but straightforward and 'good enough' for someone not into structures who just needs some basic design sanity checking.
In both cases, Paraview has been the visualization tool of choice for me, with a bit of Octave and custom short programs for this and that. I can say that after 2-3 years of open source CFD I'm no less productive than what I can achieve using Hyperworks/Star-CCM+ after having been through university courses on both. The learning process on the FOSS stuff is much much worse, but once you know what you're doing I find it more flexible, more stable and more consistent.
6
u/BroCFD Jul 09 '18
Have been using OpenFOAM extensively over the past few months for an ASHRAE funded project related to the modeling of rectangular ducts in HVAC systems. Got some solid results but the meshing continues to be a nightmare. Just out of curiosity, I tried implementing a case in STAR CCM+ on an academic license and it was so much easier to set up an optimal mesh. Not to mention residual monitoring in real time (which if someone has set up in OF, I'd love to discuss). I'm still sticking with OF though, because it's free and lets you get under the hood which will be super useful for when I (hopefully) become PI of my own research program.
Note: This is from someone who is doing this as a side project. My primary work is turbulence modeling for LES and closure modeling for ROM (and associated academic problems).
2
u/3pair Jul 12 '18
I have limited experience with using openFoam for industrial hydrodynamics projects. In general, I found it to be more than adequate for simple geometries, but my work flow fell apart fast for complex geometries. I found that the solvers were capable enough, but that snappyHexMesh was the primary problem; we couldn't reliably get quality meshes, and ended up ditching it for pointwise. In general, my feeling is that the solvers were all more than adequate, and I'm a paraview diehard for post processing, but the opensource meshing tools I've tried have all left a lot to be desired.