Abstract: In order to optimise the shape of a three-dimensional CAD-based model using the computationally efficient adjoint methods, the calculation of shape sensitivities—the derivatives of the surface position with respect to the design parameters—is required. This sensitivity is usually not available with CAD systems but can be obtained by applying the Finite Difference method or part-analytic differentiation, both of which have significant drawbacks. This paper proposes the differentiation of the open-source CAD kernel, OpenCascade Technology (OCCT), using the automatic differentiation (AD) software tool ADOL-C. As a case study, we consider the optimisation of pressure loss in a U-bend pipe. The geometry is parametrised in OCCT with cross-sections lofted along a guiding path. The resulting geometric derivatives are used in CFD optimisation loops, yielding a shape that outperforms the initial design.
Introduction
In aerodynamic and hydrodynamic design, achieving an optimal shape to minimize drag or pressure loss is a primary objective. Adjoint-based optimization has emerged as the gold standard for such tasks due to its ability to handle thousands of design variables with high computational efficiency. However, a critical bottleneck remains: the "geometric sensitivity" link. To automate the design loop, the system must precisely understand how a marginal change in a CAD parameter (e.g., a curve's radius) influences the position of every point on the computational mesh.
Historically, engineers have relied on CAD-free methods, which deform the mesh directly but produce non-manufacturable "jagged" outputs, or Finite Difference methods, which are computationally expensive and prone to numerical instability. This research bridges the gap by differentiating the CAD kernel itself, ensuring the optimization math is as precise as the geometry it generates.
Methodology
Automatic Differentiation of the CAD Kernel
The researchers targeted OpenCascade Technology (OCCT), a comprehensive open-source C++ CAD kernel. To calculate exact sensitivities, they employed Automatic Differentiation (AD) via the ADOL-C tool.
Rather than manual derivation, they utilized a "typedef" approach, replacing standard double precision variables within the OCCT source code with a custom "active" type (adouble). This transformation enables the kernel to track mathematical operations through operator overloading, effectively teaching the CAD engine to calculate its own derivatives to machine precision.
Adjoint Coupling and Parametrization
The geometric sensitivities derived from OCCT were coupled with flow sensitivities from an in-house CFD solver, mgopt. This creates a seamless mathematical chain from fluid physics back to the original CAD parameters.
For the case study, a 3D U-bend pipe—a common geometry in turbine blade cooling channels—was used. The model was parametrised using 12 cross-sectional slices lofted along a path. As shown in Figure 1, each slice was defined by four Bezier curves controlled by 12 points, resulting in a total of 96 design parameters.
Key Results and Insights
The optimization loop successfully reduced total pressure loss in the U-bend by approximately 4%. This performance gain was achieved through specific physical modifications: the optimizer suppressed a "separation bubble" (a region of energy loss) by automatically increasing the hydraulic diameter of the outer U-turn while slightly decreasing the inner circular surface diameter.
Several key insights emerged from this study:
- Mathematical Exactness: AD-generated sensitivities eliminate the numerical "noise" typical of finite-difference approximations, leading to more stable optimization.
- Topological Stability: Because AD does not require a physical "step" to calculate derivatives, the system avoids the common "patch re-numbering" errors that often crash automated CAD loops.
- Manufacture-Ready Output: Unlike mesh-deformation methods, the final output of this process is a set of updated CAD parameters, ready for immediate use in standard engineering and manufacturing workflows.
Conclusion and Future Work
While this study demonstrates a successful proof-of-concept using laminar flow, several challenges remain. The current "forward-mode" AD is efficient for limited parameters, but "reverse-mode" AD will be necessary to scale to thousands of variables. Additionally, the high memory consumption of the "active" variable approach suggests a need for more selective differentiation in future iterations. Future work will focus on applying this method to high-speed turbulent flows and refining the OCCT differentiation to improve run-time performance and robustness.
Summary updated