Close

9th July 2024

OpenFOAM 12 Released

The OpenFOAM Foundation is pleased to announce the release of version 12 of the OpenFOAM open source CFD toolbox. Version 12 takes advantage of modular solvers and non-conformal coupling (NCC) to improve simulations with multiple regions, including simplifying meshing and coupling.  Work has continued on the rewrite of particle code, e.g. injection and distribution, parallel decomposition, redistribution and load balancing.  There are some new, useful boundary conditions and the option  to include units, e.g. [bar], with input values, which are converted accordingly.  The installation of third party software is easier, with the openfoam12 package for Ubuntu 24.04 & 22.04 now using the standard paraview package.

OpenFOAM 12 includes the following highlights.

  • Modular Solvers: support source terms for one variable for equations of other variables.
  • Multiphase: improved models for mass, momentum and heat transfer, and solid phases.
  • Turbulence Modelling: robust limiting of fields simplified and corrected wall functions.
  • Heat: added viscous heating model and improved naming in thermodynamic properties.
  • Particle Tracking: generalised injection and particle distributions.
  • Meshes: upgraded mesh generation and coupling of multiple mesh regions.
  • Parallel Running: efficient options for load-balancing, decomposition and redistribution.
  • Function Objects: moved to a system/functions file, and added new function objects.
  • Models: added volume and mass sources which are added to mass continuity.
  • Boundary Conditions: new pressure, velocity and temperature boundary conditions.
  • Case Configuration: parameters can include units, e.g. [bar].
  • Programming: foamFind script to search source code; example coded function objects.
  • Other: Easier installation of ParaView and decomposition libraries.
  • 722 code commits, 100+ resolved issues.
  • ISO/IEC 14882:2011 (C++14): tested for GCC v5.5+, Clang v16+ (v10+ should also work).

OpenFOAM 12 is packaged for the following platforms:

The OpenFOAM 12 Source Pack can be compiled on suitable Linux platforms.

Modular Solvers

  • General: The re-reading of input parameters by solver modules is simpler and more efficient [ commit 6054b1 ]. Multi-region cases now include simpler controls to stop a solution when it reaches a particular tolerance [ commit 815f0b ].
  • Incompressible and compressible solvers: The dnsFoam solver is replaced by the incompressibleFluid solver module with the OUForce fvModel [ commit cf0610 ].
  • Solid solvers: Corrected the solid solver module by moving the thermophysical model corrector step inside the non-orthogonal corrector loop [ commit 3c347ca5 ].
  • Film solvers: The impingement pressure is corrected in the isothermalFilm solver module [ commit 0b321e ].
  • Numerics: Created a new sourceProxy() function for source terms for one variable which are applied to an equation for a different variable, e.g. volume/mass sources applied to a pressure equation (rather than density) [ commit a5ea0b ].

Multiphase

  • Momentum transfer: multiphaseEulerFoam includes a new implicit drag algorithm which significantly improves convergence for small particle and Euler-VoF high-drag cases [ commit 5fd304 ]. New implicit virtual-mass force implementation which significantly improves convergence for bubbly-flow cases [ commit 18200e ].
  • Mass transfer: multiphaseEulerFoam now includes homogeneous condensation and phase separation models [ commit 046680c4 ]. The coefficientMassTransfer fvModel is a prototype example that generates mass transfer between two phases [ commit 2f018f ].
  • Heat transfer: Added a simple Prandtl heat transfer model to the multiphaseEuler solver, which creates a heat transfer coefficient in proportion with the corresponding drag model’s momentum transfer coefficient [ commit 01d0af39  ].
  • Solid phases:  Added a new thermal phase model for solid phases [ commit 020463 ]. Improved support for stationary phases [ commits 9c3a40 ]. Updated to use the new phaseSolidThermophysicalTransportModel class, supporting anisotropic conduction in stationary solid phases [ commit 5e0387 ]. New IsothermalSolidPhaseModel for isothermal stationary solid phases [ commit ad3d25 ].
  • Boundary conditions: The multiphaseExternalTemperature boundary condition provides a version of externalTemperature for the multiphaseFluid solver module [ commit 6fce00 ].
  • Interface capturing: In multiphase solvers, made the compressive interface schemes, e.g. PLIC, MPLIC, more robust with the Crank-Nicolson time scheme [ commit 7ec1e2 ].
  • Surface waves: New irregular surface wave models [ commit c0da2a ]. The GodaJONSWAP wave spectrum provides an alternative, approximate parameterisation of the JONSWAP spectrum, in which the significant wave height and period are specified instead of the wind speed and fetch [ commit cbec0045 ].

Turbulence Modelling

  • RAS modelling: The lower limit in the bounding of turbulent dissipation epsilon is now based on a maximum turbulent viscosity nut rather than a minimum epsilon value which improves stability and robustness [ commit 854f4541 ] ; also the same for turbulent dissipation omega  [ commit 195dfbe1 ]
  • Wall functions: The alphatJayatillekeWallFunction thermal wall function uses yPlus from the respective nut momentum wall function to simplify the implementation and provide greater consistency [ commit 054a5206 ]. Reimplemented the corner weighting for omega and epsilon in turbulence wall functions  [ commit 1218bd08 ].  Corrected mapping of wall function boundary conditions for non-conformal multi-regions cases [ commit b6caf356 ].

Heat

  • Energy: New viscousHeating fvModel add the viscous heating source to the total energy equation [ commit bbc39318 ].
  • Thermodynamics: All property functions in thermodynamics are now consistent with energies and enthalpies using lower case character to denote that they are specific quantities [ commit abe43a95 ].

Particles and Tracking

  • Distributions: Generalised the code for distributions so they can be used more widely, including in the rewriting particle code [ commit e1e0e258 ].
  • Injection: In Lagrangian modelling, the U0 entry in the patch injection model can now specify a field name from which the initial velocity will be interpolated [ commit 96b61305 ].
  • Data processing: New volumeFraction function calculates the volume fraction of a particle cloud [ commit 31b096 ].

Meshes

  • General: The dynamicMesh library has been separated into the polyTopoChange and motionSolvers libraries following a major refactoring of code to improve maintainability [ commit b9fe7df3 ].
  • Generation: New cylindricalRadial extrusion method added to extrudeMesh [ commit e880ec ]. extrudeMesh can now allocate newly generated cells to one or more cellZones [ commit 33aa4496 ]. snappyHexMesh can now generate region meshes directly into a regions subdirectories using the -region option [ commit 9ace5366 ]. Corrected the use of the featureAngle parameter for layer insertion in snappyHexMesh [ commit 47fa9bc6 ].
  • Multiple regions: mergeMeshes can combine a list of separate meshes (separate polyMesh directories) into a single mesh (one polyMesh directory) [ commit f47e1b0b ]. Replaced the stitchMesh application to use the patch intersection functionality from the non-conformal coupled interface [ commit 69da8f3d ]
  • Non-Conformal Coupling: Making NCC compatible with mesh motion with parallel redistribution (load-balancing) and adaptive refinement [ commit 9af6bd ]. Improved robustness of the mesh stitcher, e.g. for NCC [ commit 2057174b ].
  • Boundary: New patchOrder utility allows users to reorder the patches of a mesh [ commit 4707bc91 ].
  • Other: Meshes can be checked with the checkMesh utility or checkMesh function object (the latter for moving mesh cases), which now have consistent controls and code [ commit 4ab997 ]. checkMesh includes a stopAt option which causes the code to solver if any mesh quality check fails (typically in a moving mesh case)  [ commit 06ecc011 ].
  • Motion: New fvMeshMover for multi-valve IC engine mesh motion [ commit 7d65e66b ].
  • Zones: Improved mesh zone handling [ commit ca2cae8c ] including reducing code duplication [ commit 4ad52ea1 ]

Parallel Running

  • Load-balancing: Particle cloud tracking and/or chemistry integration can use automatic load-balancing during a parallel simulation by switching on CPU load caching [ commit 41705e9e ].  The new parMETIS interface provided load-balancing with multi-constraints and redistribution using the ParMETIS distributor [ commit 40bcabf7 ].  The aachenBomb tutorial example demonstrates multi-constraint load-balancing with both Lagrangian and chemistry [ commit e727809b ].
  • Decomposition and redistribution: decomposePar now correctly creates nonConformalProcessorCyclic patches when using NCC [ commit 89c818 ]. Improved parallel robustness of dynamic mesh refinement [ commit cd133a28 ]Zoltan can now be used for mesh redistribution when some processors temporarily contain zero cells, which can occur especially when meshing in parallel with snappyHexMesh [ commit adfc80c4 ]; same for ParMETIS  [ commit 3cdec1dc ].

Function Objects

  • General: Function objects should be configured in a separate system/functions file, to avoid unnecessary reading and building of function objects when they are not required [ commit de363dde ]. New fluidMaxDelta function object can set the maximum time step and Courant number as a function of time [ commit 277944 ]. The writeObjects functionObject prints all the object names and their types from the object registry when the specified object is not found [ commit 5039aec6 ]. Function objects which operate on patches can read both the patch keyword for a single patch and patches for multiple patches [ commit e5f48bfc ]
  • Forces: New movingForces and rigidBodyForces function objects calculate and write the forces and moments on moving rigid bodies with specified or calculated centre of rotation [ commit 2daceb90 ]. The wallShearStress function object calculates on any type of wall patch, e.g. filmWall [ commit 898cb9b5 ].
  • Fields: The cylindrical packaged function object transforms a vector field into cylindrical co-ordinates [ commit 1622e190 ]. New specieFlux, specieAdvectiveFlux and specieDiffusiveFlux function objects calculate the fluxes of fluid species as a surfaceScalarField [ commit dab3104d ].
  • IC Engines: The new multiValveEngineState functionObject prints and logs piston and valve motion in IC engine calculations [ commit 9753b67f ].
  • Other: In the phaseScalarTransport function object, if the alphaPhi field is not present, it can be calculated by setting a new solveAlphaPhi switch [ commit 2bc91ecf ]

Models

  • General: MRF can work with adaptive mesh refinement [ commit cdef2003 ].
  • Fluid sources: The new volumeSource fvModel applies a volume source to the continuity equation for incompressible solvers, and an equivalent massSource fvModel for compressible solvers [ commit 9181a6 ].  Sources from fvModels, which introduce fluid to the domain, are now specified in the boundaryField section of field files [ commit 171101 ].
  • Momentum: New propellerDisk fvModel provides a disk momentum source which approximates a propeller, based on a propeller curve [ commit b3b1b5b6 ]
  • Other: A new OUForce fvModel calculates and applies a random Ornstein-Uhlenbeck process force to the momentum equation for direct numerical simulation of boxes of isotropic turbulence [ commit f0ee70 ].

General Boundary Conditions

  • Pressure: The entrainmentPressure boundary condition is recommended for pressure at open boundaries in the template case examples [ commit 2a9a2d0e ].
  • Velocity: The angular velocity can now be specified in rad/s or rpm in the cylindricalInletVelocity boundary condition, which describes an inlet velocity in cylindrical co-ordinates [ commit 755a3d ]. The movingMappedWallVelocity boundary condition can be used at an interface between two mesh regions to apply a no-slip condition from a wall on one side, to the fluid on the other [ commit 59ebac71 ].
  • Temperature: New lumpedMassTemperature boundary condition models temperature of a solid body bounded wholly or partially by the boundary patch [ commit 3ab0e63e ].
  • General: For a Function1 with table data, the interpolation scheme defaults to linear, but can now be set to step [ commit 50c053 ]. Simplified field mapping across all boundary conditions [ commit cef86f ]. The polynomial Function1 has a simpler input syntax [ commit c3f131e8 ].
  • Coupled: The nonConformalMappedWall patch type provides a flexible way of connecting meshes from separate regions, e.g. for CHT, without the need for faces to conform at the interface [ commit a3e38977 ].

Case Configuration

  • Data Visualisation: foamMonitor has new options to select columns of data, plot the independent variable on y-axis, and to display a single graph without refreshing periodically [ commit 9252d0c0 ].
  • Case Initialisation: deltaTFactor can be set in the controlDict file to limit the rate of adjustment in a variable time step, defaults to 1.2 [ commit 9aaf94 ]. Dimensionless parameters can be specified by dimensions []; [ commit 87ff44 ]foamDictionary now includes an -output option to write a modified dictionary to any specified file [ commit 6d9bc6 ]dimensioned parameters can now be specified with dimensions before or after the values [ commit 209a3756 ]. foamDictionary now includes an option to rename entries in input files [ commit b0dbdd4a ].
  • Units: Units, e.g. [bar] for pressure, can now be specified for input parameters, which are converted to conventional units, e.g. kg/(ms²) [ commit 476bb42b ]. New foamUnits script describes units (e.g. [cal], [J]) and their conversions, and dimensional units, for input parameters [ commit e4abe3d5 ].  Units can be included with input parameters that use tabulated data, e.g. for rotational speed omega specified as [rpm] [ commit 3928fbb8 ].

For information about units, see “OpenFOAM User Guide: 4.2.6. Dimensional units” and the following sub-sections; and, about the foamUnits script, see “OpenFOAM User Guide: 4.7.7 The foamUnits script”.

Programming

  • Coded Input: The #calc directive for input files is demonstrated by an example which finds the root of an equation using Newton-Raphson iteration [ commit cc9991 ]. The #codeStream directive for input files is demonstrated by an example which plots graph data [ commit fbc36b ]. The pitzDailySteady example case includes a coded function object which writes strain rate [ commit 58cb08 ]. Added some example coded function objects [ commit 811faaa0 ].
  • Code Searching: New foamFind script finds OpenFOAM files and optionally processes the contents by printing the entire file or lines which match a search string [ commit 1c6d785c ].

For further information about the foamFind script, see “OpenFOAM User Guide: 4.7.8 The foamFind script”.

Other

  • Other Numerics: Added a standardNormal function to general distributions [ commit d34d9b93 ].
  • Fields: Fields now construct patch fields in the order of patches in the mesh to improve robustness [ commit 16b8bf5e ].
  • Data Output: When time is used in I/O, its precision is adjusted automatically to ensure each value is unique [ commit d2817a0 ].
  • Installation: Added new environment variables to control the installation of ParaView and decomposition libraries [ commit 48fcb7f6 ]

Credits

OpenFOAM 12 was produced by:

Licence

OpenFOAM 12 is distributed under the General Public Licence v3 by the OpenFOAM Foundation.

Artwork