OpenFOAM® v1912: New and improved numerics
New adjoint shape optimisation
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 OpenFOAMv1906 under OpenFOAM’s Governance framework.
A parameterisation scheme based on volumetric BSplines 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 BSplines 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 QuasiNewton 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
 $FOAM_TUTORIALS/incompressible/adjointOptimisationFoam
 Attribution
 The software was developed by PCOpt/NTUA and FOSS GP with
contributions from
 Dr Evangelos PapoutsisKiachagias,
 Konstantinos Gkaragounis,
 Professor Kyriakos Giannakoglou,
 Dr Andrew Heather
 References

 E.M. PapoutsisKiachagias, N. Magoulas, J. Mueller, C. Othmer, K.C. Giannakoglou: ’Noise Reduction in Car Aerodynamics using a Surrogate Objective Function and the Continuous Adjoint Method with Wall Functions’, Computers & Fluids, 122:223232, 2015
 E. M. PapoutsisKiachagias, V. G. Asouti, K. C. Giannakoglou, K. Gkagkas, S. Shimokawa, E. Itakura: Multipoint aerodynamic shape optimization of cars based on continuous adjoint, Structural and Multidisciplinary Optimization, 59(2):675694, 2019
 Integration
 The code has been integrated jointly by OpenCFD and NTUA
New weighted flux interpolation scheme
The new weightedFlux interpolation scheme is a linear scheme that employs a weighted flux.
For any general flux of the following form:
the gradient is calculated using Gauss theorem which requires face values of . This is calculated as:
where:
 is the cell value
 is the face value
 is the diffusivity coefficient
For the case where is discontinuous the linear interpolation produces an incorrect flux. The weightedFlux interpolation scheme is used as follows in conjunction with the harmonic interpolation for T.
{
laplacian(DT,T) Gauss harmonic corrected;
}
gradSchemes
{
grad(T) Gauss weightedFlux sigma;
}
The example above produces smooth temperature and heat flux profiles as seen below:
 Source code
 $FOAM_SRC/finiteVolume/interpolation/surfaceInterpolation/schemes/weightedFlux
 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.: Electrovortex flow simulation using coupled meshes, Computers and Fluids 168(2018) 101109
 For more details see the Issue tracker
Improved geometry handling in mixed precision mode
The mixed precision mode (SPDP) introduced in OpenFOAMv1906 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:
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: