2.1. Optimization Method
In general, let
$\Omega \subset {\mathbb{R}}^{d}$,
$d=2$ or
$d=3$, be a domain with Lipschitz boundary
$\Gamma $, and
y be a physical state defined on
$\Omega $. In the context of the application studied in this paper, we consider
$\Gamma $ to be the union of an inlet (
${\Gamma}_{\mathrm{I}}$), outlet (
${\Gamma}_{\mathrm{O}}$), and wall (
${\Gamma}_{\mathrm{W}}$) boundary, that is
$\Gamma ={\Gamma}_{\mathrm{I}}\cup {\Gamma}_{\mathrm{O}}\cup {\Gamma}_{\mathrm{W}}$. We consider shape optimization problems of the general form
where
$e(\Omega ,y)$ denotes the PDE constraints on the state
y, which in our case correspond to the Navier–Stokes equations and
$J(\Omega ,y)$ is a shape function. We assume that the state is unique on
$\Omega $, and thus the control to state mapping
$\Omega \mapsto y(\Omega )$ exists [
22]. Therewith we obtain the reduced objective function
$J(\Omega ,y(\Omega \left)\right)=:j(\Omega )$ and in order to compute shape sensitivities for
$j(\Omega )$ the domain has to be made variable. We follow the standard ansatz with a perturbation of the identity
$\mathrm{id}+tu$ where the descent direction is given by the vector field
$u:\Omega \to {\mathbb{R}}^{d}$ with
$u\in {W}^{1,\infty}(\Omega )$, cf. [
23] (Section 2.8) and [
24] (Chapter 2, Section 2.6). Then the transformed domain reads
With a suitable displacement field
u and a sufficiently small step size
$t>0$, the perturbation of the identity is invertible with bounded inverse [
23]. The shape derivative of the reduced cost function
$j(\Omega )$ is denoted by
${j}^{\prime}(\Omega )u$ and fulfills the approximation condition [
25]
In the following, we describe methods of how to obtain a descent direction
u such that
holds.
2.2. Descent Approaches to Simultaneously Update the Mesh and the Shape
First we consider a SteklovPoincarétype method which has been introduced in [
26]. Therein the descent direction is obtained by solving a linear elasticitylike problem from structural mechanics where the shape sensitivity enters as right hand side as forcing term. The method is similar to the
Hilbertian extension and regularization in [
27] and [
28] (Section 5.2). In a Hilbert space setting the gradient of
$j(\Omega )$ gives a descent direction. Consider the Hilbert space
H with the inner product
$a(\xb7,\xb7):H\times H\to \mathbb{R}$. Then we obtain a descent direction
$u\in H$ defined as the solution of the variational form
Of course, the direction depends on the choice of
$a(\xb7,\xb7)$. The Hilbert space approach leads to regular vector fields which are defined on the whole computational domain. However, the obtained transformations might not give ’good’ deformations of the internal mesh; that is, the resulting displacement fields do not sufficiently preserve mesh quality, regarding e.g., changes to the level of orthogonality or the aspect ratio. This is only a technical issue but it has a significant influence on the implementation and algorithmic realization of the approach. We therefore suggest to compute a
pharmonic domain extension of the resulting shape deformations by solving a nonlinear elliptic equation containing the
pLaplace operator. This second approach builds on the idea proposed in [
21] where the extension of the boundary deformation is extended via a nonlinear convection diffusion problem into the domain. Here, we compute a descent direction and the domain extension in a two step process. First, the shape gradient is given by the solution of (
5), and second, the movement of the discrete nodes within the domain is given by the solution of the Dirichlet problem
for
$p>2$ in a weak sense. Because the solution of (
5) enters as Dirichlet data, the shape itself still is deformed by
$u\in H$ and only the internal nodes of the mesh are affected. For the inner product in (
5) we consider
with the diffusivity [
9]
For now, we neglect the fact that in general
$H\not\subset {W}^{1,\infty}(\Omega ,{\mathbb{R}}^{d})$ when considering (
5) with the inner product (
7). However, the obtained solutions give regular deformations and are applicable for practical use. In [
15], this method is associated with applying the DirichelttoNeumann map or Steklov–Poincaré operator for the case in which
${j}^{\prime}(\Omega )u$ has a boundary formulation of the form
where
$\sigma :\Gamma \to \mathbb{R}$ depends on the state and the adjoint state and thus it is specific to the problem. Note that the formulation in (
5) is rather general and does not necessarily require the boundary formulation of the shape derivative.
Third, we consider the
pLaplace relaxation of the steepest descent direction in
${W}^{1,\infty}$topology [
16,
17]. The direction of steepest descent in
${W}^{1,\infty}(\Omega ,{\mathbb{R}}^{d})$ is defined by
where
$\parallel \xb7\parallel $ is the operator (spectral) norm. Following [
29] (Proposition 5.1 and 5.3) the minimizer of
tends to the solution of (
10) for
$p\to \infty $ and thus the desired direction of steepest descent. The approximation is obtained by solving the boundary value problem
In practice, this means that we are interested in solutions of (
11) for
p as large as possible. This involves at least two difficulties for the practical application. On the one hand, the numerical computation of solutions of (
11) requires higher computational effort the higher the value of
p is [
30,
31]. On the other hand, the order of integrability
p depends on the spatial dimension; that is,
$p>d$ has to be fulfilled, which directly follows from the Sobolev imbedding theorem [
32] (Theorem 4.12). Additionally, when considering a second order method for solving (
11) the second derivative of
$I\left(u\right)$ does not exist where
$\nabla u=0$ for
$p\le 4$, regardless of the spatial dimension. Thus a solution strategy as described in [
33] may be considered.
The shape optimization procedure is summarized in Algorithm 1, where we follow a standard approach via the Lagrange multiplier rule.
Algorithm 1 Shape Optimization Procedure 
 1:
${\Omega}_{0}\subset {\mathbb{R}}^{d}$  2:
$k\leftarrow 0$  3:
repeat  4:
Compute state ${y}^{k}$  5:
Compute adjoint variables ${\widehat{y}}^{k}$  6:
Compute descent direction ${u}^{k}$ such that ${j}^{\prime}(\Omega ){u}^{k}<0$  7:
Choose ${t}_{k}>0$ such that $j\left((\mathrm{id}+{t}_{k}{u}^{k})(\Omega )\right)<j(\Omega )$  8:
Set ${\Omega}_{k+1}=(\mathrm{id}+{t}_{k}{u}^{k})(\Omega )$  9:
$k\leftarrow k+1$  10:
until $j\left({\Omega}_{k+1}\right)\le j\left({\Omega}_{k}\right)\phantom{\rule{0.166667em}{0ex}}tol$

In a first step, the state
y is computed by solving the underlying boundary value problem which, in the present study, is given by the steadystate Navier–Stokes (
16) below. In a second step the adjoint state
$\widehat{y}$ is computed which is associated with the Lagrange multipliers and given by the solution of the adjoint equations in (
19). For the shape derivative
${j}^{\prime}(\Omega )u$ we consider the boundary formulation (
9) from which the descent direction
u is obtained by applying one of the three different strategies. The process to determine the modified shape deformation with
pLaplace extension is summarized in Algorithm 2.
A full nonlinear approach is to solve the
pLaplace problem, that is, to solve (
12). Algorithm 3 schematically illustrates the realization of this approach.
A rigorous comparison of the descent direction influence on the shape optimization procedure would require the determination of an optimal step size for each direction. However, the identification of the optimal step size is computationally demanding when the state is defined by the solution of a PDE, and thus this might be unfeasible. Nevertheless, we control the sequence of successive shape updates
k by applying
where
${\alpha}_{k}$ is chosen such that the
Armijo condition is fulfilled.
Algorithm 2 Steklov–Poincaré with pLaplace domain extension (SP+p) 
Require: ${p}_{max}$, ${p}_{inc}$, ${\u03f5}_{1}$, ${\u03f5}_{2}$ 1:
Compute the boundary deformation u according to ( 5)  2:
${\overline{u}}_{0}\leftarrow u$ ▷ Use the solution from 5 as initial guess.  3:
$p\leftarrow 2$  4:
repeat  5:
if $p<{p}_{max}$ then  6:
$\u03f5\leftarrow {\u03f5}_{1}$  7:
else  8:
$\u03f5\leftarrow {\u03f5}_{2}$ ▷ Where ${\u03f5}_{2}<<{\u03f5}_{1}$  9:
end if  10:
Compute the dom. extension according to ( 6) with initial guess ${\overline{u}}_{0}$ and tolerance $\u03f5$.  11:
$p\leftarrow p+{p}_{inc}$  12:
${\overline{u}}_{0}\leftarrow \overline{u}$ ▷ Set the initial guess for the next p.  13:
until
$p>{p}_{max}$  14:
$u\leftarrow \overline{u}$ ▷ Set the deformation for the whole domain.

Algorithm 3 pLaplace relaxed steepest descent direction 
Require: ${p}_{max}$, ${p}_{inc}$, ${\u03f5}_{1}$, ${\u03f5}_{2}$ 1:
${u}_{0}\leftarrow 0$  2:
$p\leftarrow 2$  3:
repeat  4:
if $p<{p}_{max}$ then  5:
$\u03f5\leftarrow {\u03f5}_{1}$  6:
else  7:
$\u03f5\leftarrow {\u03f5}_{2}$ ▷ Where ${\u03f5}_{2}<<{\u03f5}_{1}$  8:
end if  9:
Compute the deformation field according to ( 12), initial guess ${u}_{0}$ and tolerance $\u03f5$.  10:
$p\leftarrow p+{p}_{inc}$  11:
${u}_{0}\leftarrow u$ ▷ Set the initial guess for the next p.  12:
until
$p>{p}_{max}$

Furthermore, an additional issue that one might face in CADfree shape optimization relates to the construction of the problem. In general but most frequently in internal flow shape optimization problems, such as the ones studied in this paper, we are interested in optimizing a certain Section of the wall, namely
${\Gamma}_{\mathrm{D}}\subset {\Gamma}_{\mathrm{W}}$. We thus define
${\Gamma}_{\mathrm{W}}:={\Gamma}_{\mathrm{D}}\cup {\Gamma}_{\mathrm{B}}$ as the union of the nonintersecting sets of design and nondesign (bound to their initial configuration) points, respectively. The construction of the optimization problem results in a change of the boundary condition of
u in
${\Gamma}_{\mathrm{W}}$. A common problem that might arise, is that the sudden change of boundary conditions and displacement leads to distorted computational grids, as shown in
Figure 1 (right). To ensure compatibility, we apply a filtering approach in a close neighborhood around the connection of
${\Gamma}_{\mathrm{D}}$ and
${\Gamma}_{\mathrm{B}}$, that reads
where
${r}_{0}$ controls the filtering radius with
For the application studied herein,
$\overline{x}=({\overline{x}}_{1},{\overline{x}}_{2})$ corresponds to the position vector of a node connecting
${\Gamma}_{\mathrm{D}}$ and
${\Gamma}_{\mathrm{B}}$.
Figure 1 schematically shows the impact of the filter for the same 2D case. As shown in
Figure 1 (left), the optimizer has managed to update the shape while maintaining its grid quality. In contrast, when the solution
u is directly applied, the grid quality is rapidly deteriorated, leading to even intersecting faces as shown in
Figure 1 (right), making the numerical solution of the PDE constraints unfeasible.