v2312: New and improved numerics

Community contribution: Improved adjoint shape optimisation

TOP

Improved consistency between the E-SI and FI formulations for computing sensitivity derivatives for shape optimisation. An example of the code behavior before and after the changes is given below, obtained from the naca0012/laminar/moment/primalAdjoint tutorial:

NACA0012 CM sensitivities, v2306 NACA0012 CM sensitivities, v2312

Consistent point/face sensitivity maps

DrivAer drag sensitivity map computed on boundary faces, v2306 DrivAer drag sensitivity map computed on boundary faces, v2312

By comparing the drag sensitivity maps computed with v2306 and v2312, it can be observed that: a) the new point-to-face interpolation produces smoother results, even for the raw, i.e. non-smoothed sensitivities and b) artifacts close to the symmetry plane of the car have disappeared.

Further improvements include:

  • A new adjoint solver (null) and objective function (geometric) type, for defining geometric constraints without unnecessarily allocating new adjoint fields
  • Three new update methods (ISQP, nullSpace, MMA) for tackling optimisation problems with inequality constraints
  • Introduction of bounds for the design variables; for volumetric B-Splines this can help better preserve the quality of the mesh throughout the optimisation
  • Introduction of convergence criteria for the optimisation loop.

Tutorials

Guide

  • The updated user guide for v2312 can be found here

Source code

  • Merge request MR!649
  • Overhaul of the adjoint library to ease extension to flow physics other than incompressible flows - see Commit 9a89fcc0 for details;
  • Corrections/improvements to shape optimisation - see Commit 9a89fcc0 for details.

Attribution

  • The software was developed by PCOpt/NTUA and FOSS GP
  • Integration in collaboration with OpenCFD

Community contribution: New topology-based adjoint optimisation

TOP

OpenFOAM v2312 adds new topology optimisation capabilities, using either a porosity-based or a level-set approach. Both include the capability of exporting the designed geometry as an STL, for production and/or re-evaluation with a body-fitted grid.

The porosity-based approach relies on a field of design variables (artificial porosities, α) that block the counter-productive parts of the computational domain by solidifying them. To increase the smoothness of the obtained solutions, a regularisation equation is solved computing the intermediate field α̃, followed by a sharpening/projection step to compute the almost binary field β. The latter is then used to introduce sources terms to the flow equations that drive the flow solution to zero in the solidified areas (i.e., areas with β ≈ 1). The steps of the above-mentioned process are showcased below.

α α̃ β

The following table shows the results of topology optimisation for three different variants of the same case, namely the minimization of total pressure losses (Jpt) (left), minimization of Jpt with a constraint on equally distributing the volume flow rate between the bottom and right outlets (Jm) (center) and maximization of the flow uniformity (Jun), under the Jpt < Jpttarget constraint (right).

The cases can be found under adjointOptimisationFoam/topologyOptimisation/monoFluidAero/turbulent/1_Inlet_2_Outlet/porosityBased/BP.

min. losses min. losses
flow-rate constr.
max. uniformity,
losses constr.

The next table showcases the outcome of topology optimisation for a 3D manifold, with similar objective and constraint functions. The first row depicts the progression of the boundary between the fluid and solid parts of the computational domain during the optimisation cycles and the last row illustrates the STL files of the three optimised geometries. The process of generating the latter is automatic and executed at the end of each optimisation cycle. These STL files can then be used for performing body-fitted simulations with proper boundary condition or subsequent shape optimisations or even for manufacturing.

The cases can be found under topologyOptimisation/monoFluidAero/laminar/3DBox.

min. losses min. losses
flow-rate constr.
max. uniformity,
losses constr., flow-rate constr.

Backwards compatibility

The entries of optimisationDict.optimisation have slightly changed, arguably towards something more intuitive. The changes can be observed by comparing, for instance, the optimisationDict of $FOAM_TUTORIALS/incompressible/adjointOptimisationFoam/shapeOptimisation/motorBike with its previous variant.

Tutorials

Guide

  • The updated user guide for v2312 can be found here

Source code

  • Merge request MR!649
  • Overhaul of the adjoint library to ease extension to flow physics other than incompressible flows - see Commit 9a89fcc0 for details;
  • Corrections/improvements to shape optimisation - see Commit 9a89fcc0 for details.

Attribution

  • The software was developed by PCOpt/NTUA and FOSS GP
  • Integration in collaboration with OpenCFD