Numerical optimization studies the effects of multiple design parameters,
\({\varvec{p}} =[p_1,...,p_j,...,p_{N_\text {P}}]\), on the (QoIs),
\(G_k(\phi , {\varvec{p}})\),
\(k = 1,...,N_\text {QoI}\). In each FE simulation, one parameter combination
\({\varvec{p}}_0\) is adopted, and the (QoIs) are analyzed by post processing the electric scalar potential. Common design parameters are, in particular, material parameters and the dimensions of the geometry. Taking the cable joint of Sect.
4.2 as an example, possible (QoIs) are, e.g., the maximum tangential field stress at material interfaces, or the electric losses during impulse operation [
11,
22].
The AVM is a method for gradient or sensitivity calculation, which is particularly efficient when the number of parameters,
\(N_\text {P}\), is significantly larger than the number of QoIs,
\(N_\text {QoI}\) [
3,
16]. Sensitivities describe how and how strong a given QoI
\(G_k\) is affected by a design parameter
\(p_j\), i.e.
$$\begin{aligned} \frac{\text{ d } G_k}{\text{ d }p_j}({\varvec{p}}_0) = \frac{\partial G_k}{\partial p_j}({\varvec{p}}_0) + \frac{\partial G_k}{\partial \phi }\frac{\text{ d } \phi }{\text{ d }p_j}({\varvec{p}}_0)\,{,}\end{aligned}$$
(5)
where
\({\varvec{p}}_0\) is the active parameter configuration. In case of nonlinear media, the sensitivity of the electric potential with respect to the parameter,
\(\frac{\text{ d } \phi }{\text{ d }p_j}\), is typically unknown. The idea of the AVM is to avoid the computation of
\(\frac{\text{ d } \phi }{\text{ d }p_j}\) by a clever modification of the (QoIs) [
3,
16]: The (QoIs) are expressed in terms of a functional
\(g_k\), which is integrated over the temporal and spatial computational domain,
\(\left[ 0,T \right] \times \Omega \). Additionally, the nonlinear EQS problem (1) is embedded, multiplied by a test function
\(w_k({\varvec{r}}, t)\), i.e.
$$\begin{aligned} G_k(\phi ,{\varvec{p}})&= \int _0^T\int _\Omega g_k(\phi ,{\varvec{r}},t,{\varvec{p}})\,\text {d}\Omega \,\text {d}t \nonumber \\&\quad - \int _0^T\int _\Omega w_k({\varvec{r}}, t)\cdot \nonumber \\&\underbrace{\left( -\,\text {div}\left( \sigma \,\text {grad}\left( \phi \right) \right) - \,\text {div}\left( \partial _t\left( \varepsilon \,\text {grad}\left( \phi \right) \right) \right) \right) }_{= 0}\,\text {d}\Omega \,\text {d}t\,{.}\end{aligned}$$
(6)
For any
\(\phi \) solving (1), the additional term is zero and the test function can be chosen freely. The goal of the AVM is to choose the test function in such a way, that the sensitivity of the extended QoI no longer contains the unknown term
\(\frac{\phi }{p_{j}}\). After a lengthy derivation, it can be shown that the unknown term is eliminated if the test function is chosen as the so-called adjoint variable, i.e. the solution of the adjoint problem [
3,
16]. The adjoint problem for EQS problems with nonlinear materials reads
$$\begin{aligned}&-\,\text {div}\left( {{\varvec{\sigma }}_d} \,\text {grad}\left( w_k\right) \right) + \,\text {div}\left( {{\varvec{\varepsilon }}_d}\, \partial _t\left( \,\text {grad}\left( {w_k} \right) \right) \right) =\frac{\text{ d } g_k}{\text{ d }\phi }\,{,}\nonumber \\&\quad t \in [0,T],\,\, {\varvec{r}}\in \Omega \,{;}\end{aligned}$$
(7a)
$$\begin{aligned}&{w_k} =0\,{,}\quad t \in [0,T],\,\, {\varvec{r}}\in \Gamma _\text {e}\,{;}\end{aligned}$$
(7b)
$$\begin{aligned}&-({\varvec{\sigma }}_d \,\text {grad}\left( w_k\right) - {\varvec{\varepsilon }}_d \partial _t\left( \,\text {grad}\left( w_k\right) \right) \cdot {\varvec{n}}=0\,{,}\nonumber \\&\quad t \in [0,T],\,\, {\varvec{r}}\in \Gamma _\text {m}\,{;}\end{aligned}$$
(7c)
$$\begin{aligned}&{w_k}=0\,{,}\quad t = T , \,\,{\varvec{r}}\in \Omega \,{,}\end{aligned}$$
(7d)
where all quantities are evaluated at the active parameter configuration
\({\varvec{p}}_0\). Note the plus sign in front of the term with the time derivative in (
7a) instead of the minus sign in (
1a) and the terminal condition (
7d) instead of the initial condition (
1d), which indicate that the adjoint problem needs to be integrated backwards in time or the time reversing variable transformation
\({{\tilde{t}}} = T - t\) must be applied [
2].
The adjoint problem is a linear partial differential equation (PDE) that naturally includes the tensorial material linearizations
\( {\varvec{\sigma }}_\text {d} = \frac{\text{ d } {\varvec{J}}}{\text{ d }{\varvec{E}}}\) and
\({\varvec{\varepsilon }}_\text {d} =\frac{\text{ d } {\varvec{D}}}{\text{ d }{\varvec{E}}}\) [
7]. Through that, it implicitly depends on the solution of the EQS problem, i.e.,
\( {\varvec{\sigma }}_\text {d}(E)\) and
\( {\varvec{\varepsilon }}_\text {d}(E)\). Therefore, in order to so solve the adjoint problem in backward mode, the EQS problem must first be solved conventionally, i.e., in forward mode, and its solution stored for all time steps. In case of FE simulations, this can lead to a significant memory overhead [
2,
6]. For strategies on how to reduce the memory requirement, see for example [
2,
6].
Once the solution of the electric potential and all adjoint variables,
\(w_k\), are available, all sensitivities can be computed directly by
$$\begin{aligned} \begin{aligned} \frac{\text{ d } G_k}{\text{ d }p_j}({\varvec{p}}_0)&= \int _0^T\int _\Omega \frac{\partial g}{\partial p_j} + \,\text {grad}\left( w_k\right) \cdot \\&\quad \frac{\partial \sigma }{\partial p_j} {\varvec{E}} - \partial _t \,\text {grad}\left( {w_k}\right) \cdot \frac{\partial \varepsilon }{\partial p_j} {\varvec{E}} \,\text {d}\Omega \text {d}t\\&- \int _\Omega \,\text {grad}\left( w_k\right) \cdot { \frac{\text{ d } {\varvec{D}}}{\text{ d }p_j}} \,\text {d}\Omega \bigg \vert _{t = 0}\,{,}\end{aligned} \end{aligned}$$
(8)
where the derivative
\({\frac{\text{ d } {\varvec{D}}}{\text{ d }p_j}}({t = 0}) \) is obtained by differentiating the initial condition (
1d). Again, all quantities are evaluated for the active parameter configuration
\({\varvec{p}}_0\).
3.2 Treatment of pointwise QoIs
As can be seen from (
6), the AVM is naturally suited for integrated (QoIs). Often, however, it is desired to analyze (QoIs) that are evaluated at certain points in space or time. The evaluation at a certain position or time can be expressed by Dirac delta functions inside the functional
\(g_k\). To illustrate the effects this has on the AVM, the electric potential evaluated at a specified position
\({\varvec{r}}_\text {ref}\) and time
\(t_\text {ref}\) is considered as an example, i.e.
$$\begin{aligned}{} & {} G_k= \int _0^T\int _\Omega g_k\,\text {d}\Omega \text {d}t = \int _0^T\int _\Omega \delta ({\varvec{r}}- {\varvec{r}}_\text {ref}) \nonumber \\{} & {} \quad \delta (t - t_\text {ref}) \phi \,\text {d}\Omega \text {d}t \,{,}\end{aligned}$$
(17)
where
\(\delta \) is the Dirac delta function. The right-hand side of the adjoint problem is then given by
$$\begin{aligned} \frac{\text{ d } g}{\text{ d }\phi }&= \delta ({\varvec{r}}-{\varvec{r}}_0) \delta (t - t_\text {QoI})\,{,}\end{aligned}$$
(18)
and after discretization in space one finds
$$\begin{aligned} {\varvec{q}}(t)&=\left[ \begin{array}{ccccccc} 0&\ldots&0&1&0&\ldots&0 \end{array}\right] ^T \delta (t - t_\text {QoI}) \,{.}\end{aligned}$$
(19)
In (
19), the spatial integration during the derivation of the FE formulation has converted
\(\delta ({\varvec{r}}-{\varvec{r}}_0) \) into a unit excitation at the corresponding node. The temporal Dirac function
\(\delta (t-t_\text {QoI})\) on the other hand must be approximated during numeric integration. In the context of this work, this is done by hat functions with an area of one, i.e.,
$$\begin{aligned} {\varvec{q}}(t_n) =\left[ \begin{array}{ccccccc} 0&\ldots&0&1&0&\ldots&0 \end{array}\right] ^T \,\frac{1}{\Delta _\text {imp}}\delta _{n_\text {ref}}^n\,{,}\end{aligned}$$
(20)
where
\(\Delta _\text {imp}\) denotes the time step size right before and after
\(t_\text {ref}\). The approximation of the Dirac impulse with the help of other functions, e.g., a normal distribution, led to similar results. However, the approximation by a hat function is easy to implement and has the clear advantage of a compact support.