Wednesday, May 4, 2011

OpenFOAM ... new basic libraries for GEOtop ?

Matteo Dall'Amico, of Mountain-eering brought to my attention the OpenFoam community at:

OpenFoam is a set of models and libraries for simulations of fluid dynamics problems. From their own site:

"The OpenFOAM® (Open Field Operation and Manipulation) CFD Toolbox is a free, open source CFD software package produced by a commercial company, OpenCFD Ltd. It has a large user base across most areas of engineering and science, from both commercial and academic organisations. OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics.
The core technology of OpenFOAM is a flexible set of efficient C++ modules. These are used to build a wealth of: solvers, to simulate specific problems in engineering mechanics; utilities, to perform pre- and post-processing tasks ranging from simple data manipulations to visualisation and mesh processing; libraries, to create toolboxes that are accessible to the solvers/utilities, such as libraries of physical models.
OpenFOAM is supplied with numerous pre-configured solvers, utilities and libraries and so can be used like any typical simulation package. However, it is open, not only in terms of source code, but also in its structure and hierarchical design, so that its solvers, utilities and libraries are fully extensible.
OpenFOAM uses finite volume numerics to solve systems of partial differential equations ascribed on any 3D unstructured mesh of polyhedral cells. The fluid flow solvers are developed within a robust, implicit, pressure-velocity, iterative solution framework, although alternative techniques are applied to other continuum mechanics solvers. Domain decomposition parallelism is fundamental to the design of OpenFOAM and integrated at a low level so that solvers can generally be developed without the need for any ’parallel-specific’ coding.
This section of the website describes some of the features of OpenFoam. The information is a little out of date, but more information will be added during 2010 to catalogue the full list of features of OpenFOAM. "

What could be important for us could be, not just the solvers, since we do solvers, but the tools and the rules. Soon in fact we will be facing to move our GEOtop C-based code to some object oriented language (possibly in a mmix of Java and C++). Object oriented programming has a lot of advantages with respect to procedural programming with respect to many topics, which can help us to do better programming and work more easily in cooperation. Since a full-Java solution could not be as efficient as we desire, using C++ could be the choice.

The lesson we learned from the past work is that large modelling efforts without a community supporting the various needs, is an overwhelming task. JGrass experience viceversa, taught us that one can learn a lot from a community of developers, even if they have slightly different scopes from ours, and even their presence help us.

Thus, OpenFoam, having a community, and having solved many of the problems we have with our own code, is a good candidate for substituting the old beloved Fluidturtle Libraries that I coded fifteen years ago

No comments:

Post a Comment