NOVEMBER 01 1998 | H. G. Weller, G. Tabor, H. Jasak, C. Fureby
This article outlines the principles of the field operation and manipulation (FOAM) C++ class library for computational continuum mechanics. The authors aim to make it easy to develop reliable and efficient codes for computational continuum mechanics by closely aligning the top-level syntax with conventional mathematical notation for tensors and partial differential equations. Object-oriented techniques are used to create data types that mimic those in continuum mechanics, and operator overloading in C++ allows mathematical symbols to be used for basic operations. The article discusses the implementation of various turbulence models in a FOAM computational fluid dynamics (CFD) code and presents results from a standard test case of flow around a square prism. To demonstrate the flexibility of the FOAM library, codes for solving structures and magnetohydrodynamics are also presented, along with appropriate test case results. The article covers the implementation of tensor fields, partial differential equation classes, mesh topology, and boundary conditions, and provides examples of turbulence modeling using Reynolds-averaged simulation and large-eddy simulation. The flexibility of the FOAM library is further illustrated through examples of stress analysis and magnetohydrodynamics calculations.This article outlines the principles of the field operation and manipulation (FOAM) C++ class library for computational continuum mechanics. The authors aim to make it easy to develop reliable and efficient codes for computational continuum mechanics by closely aligning the top-level syntax with conventional mathematical notation for tensors and partial differential equations. Object-oriented techniques are used to create data types that mimic those in continuum mechanics, and operator overloading in C++ allows mathematical symbols to be used for basic operations. The article discusses the implementation of various turbulence models in a FOAM computational fluid dynamics (CFD) code and presents results from a standard test case of flow around a square prism. To demonstrate the flexibility of the FOAM library, codes for solving structures and magnetohydrodynamics are also presented, along with appropriate test case results. The article covers the implementation of tensor fields, partial differential equation classes, mesh topology, and boundary conditions, and provides examples of turbulence modeling using Reynolds-averaged simulation and large-eddy simulation. The flexibility of the FOAM library is further illustrated through examples of stress analysis and magnetohydrodynamics calculations.