Close

28th June 2016

OpenFOAM 4.0 Released

The OpenFOAM Foundation is pleased to announce the release of version 4.0 of the OpenFOAM open source CFD toolbox. Version 4.0 increases CFD productivity by significant improvements and changes to general usability, post-processing, case management and software management.  It provides a solid platform for the future, sustainable development of OpenFOAM through reimplementation of core and major libraries, over 120 bug fixes and much better consistency, robustness and performance.  It is packed with numerous new and improved boundary conditions, new rigid body dynamics libraries, and developments in turbulence and transport modelling, meshing, ACMI and multiphase, reacting flow.

The version number has been simplified from 3 digit format (e.g., 3.0.1) to 2 (e.g., 4.0) where the first digit is the major version number and the second digit is the patch version number. Version 4.0 is a new major version release in which some backward compatibility to OpenFOAM version 3 is not maintained (requiring some changes to case input files), containing over 900 code commits since version 3.  OpenFOAM 4.0 supports the ISO/IEC 14882:2011 (C++11) standard, maintaining compatibility with the C++ compilers in GCC v4.5+ (tested up to v6.1), Intel ICC v15.0.3+ and Clang v3.6+ (3.7 recommended).

OpenFOAM 4.0 is distributed under the General Public Licence by the OpenFOAM Foundation as:

Case Management

  • Case Control command line interface (CLI): new foamDictionary utility for printing, modifying and adding new dictionary entries from the command line » more », see OpenFOAM User Guide, Section 4.6.
  •  foamListTimes: lists time directories for a case, without the 0 directory by default; the -rm option deletes the listed directories so foamListTimes -rm cleans a case directory.
  • foamSearch: helps users find examples of case settings quickly, by searching a directory for dictionary files of a particular name and extracting entries of a particular keyword, sorted into a unique list. » more »
  • Tutorials: moved all Allrun scripts within their own case or “tutorial” directory for consistency, including the cavity and damBreak cases from the tutorials. » more »

Post-processing and run-time-processing

  • Post-Processing CLI: unified set of tools which simplifies post-processing considerably, improves functionality and maintainability, supported by new documentation — making obsolete the inconsistent, unmaintainable, often-duplicated functionality dispersed across utility applications, function objects, tutorial files and tools such as foamCalc and execFlowFunctionObjects, see OpenFOAM User Guide, Section 6.2.
  • postProcess utility: general and flexible CLI that replaces foamCalc and postCalc » more » and field processing utilities such as Co, createTurbulenceFields (now turbulenceFields), enstrophy, Lambda2, Mach, patchAverage, patchIntegrate, Pe, probeLocations, ptot, Q, R, sample, wallShearStress and yPlus.
  • ParaView: upgraded to version 5.0.1, whose VTK is rewritten to support OpenGL2 rendering. » more »
  • Graphs and sampling : functionality is simplified, more compatible with the foamMonitor monitoring tool, and more robust (» more », » more ») see OpenFOAM User Guide, Section 6.3.
  • Function objects: redesigned and rewritten the underlying code structure, simplifying the code, reducing duplication and making it easier to develop and use » more »; refactored several function objects, e.g. writeObjects (formerly writeRegisteredObject » more »), scalarTransport, with support for steady-state solution (» more »), fieldAverage, with redesigned restart options (» more »); added new function objects, e.g. icoUncoupledKinematicCloud (» more »), writeVTK (» more ») and histogram. (» more »).

Boundary Conditions

  • noSlip: more robust, convenient alternative to fixedValue with value uniform (0 0 0); » more »
  • extrapolatedCalculatedFvPatchField: calculates patch values by zero gradient extrapolation; robust replacement for zeroGradient for temporary fields, to avoid risks associated with derived fields inheriting zeroGradient. » more »
  • fixedProfile: applies a specified 1D profile at an inlet, e.g. obtained from experimental data. » more »
  • plenumPressure: calculates pressure based on a zero-dimensional model of an enclosed volume of gas upstream of an inlet. » more »
  • fixedFluxExtrapolatedPressure: extrapolated pressure boundary conditions for impinging flows, extrapolated inlet conditions with body-forces, highly viscous flows and pressure-induced separation. » more »
  • prghTotalHydrostaticPressure: uses the hydrostatic pressure field as the reference state for the far-field which provides much more accurate entrainment for large domains, e.g. in fireFoam. » more »
  • SRFWallVelocity: velocity condition on walls with the single rotating frame (SRF) model. » more »
  • Time-varying boundary conditions: replaced DataEntry with Function1 for run-time selectable “unary” functions, i.e. functions of 1 variable, e.g. time » more »; in addition to existing tabulated and polynomial functions, added Sine (» more ») and Square (» more ») wave functions, with oscillatingFixedValue being replaced by uniformFixedValue with a Sine function. » more »
  • flowRateInletVelocity: new option to extrapolate the velocity profile back to the inlet. » more »
  • totalPressureFvPatchScalarField (and uniformTotalPressureFvPatchScalarField) : improved usability. » more »
  • Note: calculated boundary conditions now requires a value entry to avoid problems with non-initialization. » more »

Rigid Body Dynamics

  • rigidBodyDynamics: new library for the dynamics of n-degrees of freedom (n-DoF) articulated bodies in parallel. » more »
  • rigidBodyMeshMotion: new library for the mesh-motion of multiple articulated rigid-bodies with joints, restraints and external forces. » more »
  • Vector algebra: redesigned to support spatial vector algebra. » more »
  • Examples: the interDyMFoam tutorials, e.g. for marine engineering (DTCHull) are all updated to use the new rigid-body dynamics and mesh motion libraries. » more »
  • Sponsored by Carnegie Wave Energy Ltd.

Multiphase, Reacting Flows

  • Lift and drag models: new wallDampedLift model supporting near-wall damping for Euler-Euler multiphase solutions » more »; new TomiyamaKataokaZunSakaguchi drag model for bubbles in gas-liquid systems. » more »
  • Boundary conditions: new temperatureDependentAlphaContactAngle boundary condition » more »; new fixedMultiPhaseHeatFlux boundary condition to calculate a wall temperature for overall wall heat flux across multiple phases. » more »
  • Solvers: corrected pressure equations for transonic operation in Euler-Euler multiphase solvers » more »; vastly reduced scattering and churning behaviour in packed beds in MPPICFoam. » more »
  • Post-processing: new moleFractions function object to write mole fraction fields » more »

Other Modelling and Functionality

  • kOmegaSSTDES: new DES turbulence model based on the k-omega SST RAS model for incompressible and compressible flow. » more »
  • Turbulence model sources/constraints: can be plugged in at run-time using fvOptions. » more »
  • logPolynomial: new transport model for viscosity, thermal diffusivity, in the thermophysical modelling library, see OpenFOAM User Guide, section 7.1.
  • fireFoam: optional hydrostatic initialization of the pressure and density, used in conjunction with the prghTotalHydrostaticPressure boundary condition. » more »
  • Sources: new buoyancyForce and buoyancyEnergy sources, for compressible solvers » more »; redesigned fixedValueConstraint, to constrain field values within a specified region. » more »
  • Meshing: consistent face orientation in baffle interfaces created during meshing, e.g. to ensure correct flux calculations. » more »; removed zero sized patches from output of snappyHexMesh » more » and createBaffles. » more »
  • ACMI: removed major limitations, e.g. on mapping for partially overlapping faces. » more »

Software Management and Development

  • Rolling upgrade of OpenFOAM is faster and simpler with improvements to compilation scripts and environment settings, including Allwmake -update, as described in the Source Repository installation.
  • foamList: lists models within OpenFOAM, including turbulence models, function objects, fvOptions, switches and boundary conditions. » more »
  • Doxygen: simplified and updated the configuration for creation of C++ source guides, published the OpenFOAM v4 C++ Source Guide and OpenFOAM v3 C++ Source Guide.
  • User Guide: new and major rewrites of 4.4 Numerical Schemes, 4.5 Solution Control4.6 Case Management and 6 Post-processing; significant updates to 2 Tutorials, 3 Applications and 5 Mesh Generation and Conversion.
  • foamNewBC: script to create template code for a new boundary condition. » more »
  • foamNewApp: script to create template code for a new application. » more »
  • foamNewFunctionObject: script to create template code for a new function object. » more »
  • Messaging: new InfoInFunction, ErrorInFunction, DebugInFunction and DebugInfo for simpler Info, Error and Debug messaging in class code, e.g. debug messaging; new Log macro outputs to Info if log is true. » more »
  • Robust data handling: new convention for const and non-const reference functions of fields where the non-const function uses …Ref(); for example, where boundaryField() provides the const reference to the boundary field, boundaryFieldRef() provides a non-const reference. » more »; for tmp objects, non-const access uses a ref() function rather than the () dereferencing operator. » more »
  • API: new Zero static const variable for simple and efficient initialization and assignment of primitives to 0 » more »; new (i, j) addressing to the Matrix class, for better interoperability with other C++ libraries. » more »

Performance

  • Flux calculation: new fvc::flux(volField) function improves efficiency and cache coherency, and reduces peak storage » more », effective for new processor architectures; uses new dotInterpolate function which avoids storing an interpolated field in flux calculations. » more »
  • Matrices: reimplemented in the core OpenFOAM library » more »; replaced the row-start pointer array with computed offsets in the Matrix class, for 15% speed up in LUsolve. » more »
  • Parallel computation: improved parallel decomposition and reconstruction » more »; optimised data exchange » more »; and, improved the operation of the parallel field mapping utility mapFieldsPar. » more »

Contributors

OpenFOAM v4.0 was produced by:

  • Architect/Lead: Henry Weller
  • Management: Henry Weller, Chris Greenshields
  • Maintenance/Testing/Contributions: Henry Weller, Chris Greenshields, Bruno Santos, Mattijs Janssens.
  • Other Contributions: Will Bainbridge, Karl Meredith, Paul Edwards, Juho Peltola, Timo Niemi, Richard Jones, Daniel Jasinski, Hassan Kassem.

Thanks to the OpenFOAM enthusiasts who have contributed to a better code through the bug reporting system.

To download OpenFOAM 4.0, click here.