# OpenFOAM® v1912: New and improved numerics

23/12/2019

The adjoint library is enhanced with new functionality enabling automated shape optimisation loops.

This is a continuation of the adjoint optimisation tools that were released in OpenFOAM-v1906 under OpenFOAM’s Governance framework.

A parameterisation scheme based on volumetric B-Splines is introduced, the control points of which act as the design variables in the optimisation loop (see references below). The control points of the volumetric B-Splines boxes can be defined in either Cartesian or cylindrical coordinates.

The entire loop (solution of the flow and adjoint equations, computation of sensitivity derivatives, update of the design variables and mesh) is run within the adjointOptimisationFoam solver. A number of methods to update the design variables are implemented, including popular Quasi-Newton methods like BFGS and methods capable of handling constraints like SQP or constraint projection.

Source code
$FOAM_SOLVERS/incompressible/adjointOptimisationFoam$FOAM_SRC/optimisation/adjointOptimisation/adjoint
Examples
Tutorial
$FOAM_TUTORIALS/verificationAndValidation/schemes/weigthedFluxExample Attribution This scheme was contributed by Norbert Weber References • Weber, N.; Beckstein, P.; Galindo, V.; Starace, M.; Weier, T.: Electro-vortex flow simulation using coupled meshes, Computers and Fluids 168(2018) 101-109 • For more details see the Issue tracker ## Improved geometry handling in mixed precision mode The mixed precision mode (SPDP) introduced in OpenFOAM-v1906 enables significant speed up and reduced memory requirement compared to running in double precision where applicable. In mixed precision mode only the linear solver operates in double precision. All other functionality is still performed using single precision. This might report perfectly valid closed cells to be seen as open, e.g. using checkMesh. A single precision (SP) run may report: ***Boundary openness (3.77976e-07 3.97566e-06 -2.26237e-08) possible hole in boundary description. In this version the double precision calculation has been extended to • face centres and areas and cell centres and volumes calculations. Note that the actual result is still stored in single precision. • most checkMesh summations, e.g. above open cells • all field based summations (sum). Note that these changes only affect the SPDP mode. The previous example now reports: Boundary openness (-6.31099e-11 -3.99859e-11 -3.747e-10) OK. Source code$FOAM_SRC/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCentresAndVols.C
\$FOAM_SRC/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshFaceCentresAndAreas.C