November 01 1998 | H. G. Weller; G. Tabor; H. Jasak; C. Fureby
This article presents a tensorial approach to computational continuum mechanics using object-oriented techniques. The authors describe the FOAM C++ class library, which enables the implementation of complex mathematical and physical models as high-level expressions. The library is designed to closely resemble standard vector and tensor notation, making it easier to develop reliable and efficient computational continuum-mechanics codes. The approach uses object-oriented programming (OOP) to create data types that mimic those of continuum mechanics and allows the use of normal mathematical symbols for basic operations. The library is demonstrated through examples of turbulence modeling in a computational-fluid-dynamics code, as well as codes for solving structures and magnetohydrodynamics. The article discusses the implementation of tensor fields, partial-differential-equation classes, mesh topology, and boundary conditions. It also presents an example of the icoFoam code for solving incompressible Navier–Stokes equations and discusses turbulence modeling, including Reynolds-averaged simulation (RAS) and large-eddy simulation (LES). The article concludes with examples of flow around a square prism and stress analysis, demonstrating the flexibility and accuracy of the FOAM library. The results show that the library can accurately simulate complex fluid dynamics and solid mechanics problems.This article presents a tensorial approach to computational continuum mechanics using object-oriented techniques. The authors describe the FOAM C++ class library, which enables the implementation of complex mathematical and physical models as high-level expressions. The library is designed to closely resemble standard vector and tensor notation, making it easier to develop reliable and efficient computational continuum-mechanics codes. The approach uses object-oriented programming (OOP) to create data types that mimic those of continuum mechanics and allows the use of normal mathematical symbols for basic operations. The library is demonstrated through examples of turbulence modeling in a computational-fluid-dynamics code, as well as codes for solving structures and magnetohydrodynamics. The article discusses the implementation of tensor fields, partial-differential-equation classes, mesh topology, and boundary conditions. It also presents an example of the icoFoam code for solving incompressible Navier–Stokes equations and discusses turbulence modeling, including Reynolds-averaged simulation (RAS) and large-eddy simulation (LES). The article concludes with examples of flow around a square prism and stress analysis, demonstrating the flexibility and accuracy of the FOAM library. The results show that the library can accurately simulate complex fluid dynamics and solid mechanics problems.