There is a number of ways to write a good CFD code in C++ and FOAM just represents one of the possible ways. The idea of FOAM is to represent the top-level equation we are trying to solve in the form that looks as similar as possible to its mathematical equivalent, i.e. using the field objects and differential operators (div, grad, curl). This has been described at length at the Nabla Ltd. web site and is also mentioned in various FOAM presentations, papers and reports.
For example
Doing advanced modelling in FOAM is very nice and convenient, but that's not all FOAM is about. In order to really benefit from all the nice modelling, FOAM needs to be efficient and provide geometrical flexibility to handle the geometries of industrial interest. This is my main concern, starting from my PhD work and carrying on on to this day. In order to do this, we have been forced to take a different path, working on arbitrarily unstructured Finite Volume discretisation. This looks to become a standard in the "next-generation" commercial CFD codes - Henry and I have been doing it from the start! I think FOAM today provides the geometrical flexibility at least on a par with all other commercial CFD software.
Object orientation in software design relies on the following:
Recognise main objects from the numerical modelling viewpoint
and represent them in software as classes. The main classes in
the hierarchy and their functionality is briefly listed in
several
presentations and given in detail in
Doxygen documentation.
In conclusion, FOAM is about doing advanced modelling with ease and confidence, but also about using the models on real geometries.
|
|
More details on FOAM class structure and interaction can be found in various presentation slides available on the resources page and in FOAM Doxygen documentation and the User Guide.