# Cathode Shape Design for Steady-State Electrochemical Machining
## 3 Results and Discussion
### Perimeter Regularization for Cathode Shape Design  
Stable approximate solutions to ill-posed problems can be constructed using regularization methods. In the context of the cathode shape design problem in ECM, the solution would be stable if small (nonanalytic) perturbations of the anode data, which are caused by, e.g., spline interpolation of an analytic shape, still resulted in smooth cathode shapes, which is not the case in the example shown in the previous section. Smooth cathode shapes, in spite of nonanalytic perturbations, could be obtained by choosing a coarse mesh (cf. Figure 8), which is indeed a regularization method known as projection method [51]. However, the disadvantage of using a coarse mesh is the limited accuracy of the numerically computed physical fields. To decouple the stability of the solution from the size of the mesh used in computations, the cathode shape design procedure by continuous adjoint-based shape optimization was extended by including the technique of _perimeter regularization_, which was used to stabilize ill-posed geometric inverse problems and shape optimization problems [52; 53]. In the cathode shape design problem, the objective function (Equation (6)) was extended by an additional integral term that penalizes the total surface area of the unknown cathode, \(|\Gamma_{\mathrm{C}}|\), i.e.,  
\[j_{\mathrm{reg}}(\Omega)=J_{\mathrm{reg}}(\Omega,\Phi)=J(\Omega,\Phi)+\alpha \int_{\Gamma_{\mathrm{C}}}1\,\mathrm{d}S, \tag{32}\]  
Figure 9: Cathode shape design for an anode interpolated by cubic splines (spatial dimensions are normalized to the width of the standard equilibrium front gap). The exact surface profile of the anode (dashed curve) in Panel (**a**) is defined by Equation (17) with \(A=8\) and \(\sigma=4\); the surface profile of the “perturbed” anode (solid curve) is obtained by a cubic spline interpolation connecting 13 control points on the exact anode. The numerically calculated cathode to “perturbed” anode is obtained after 800 iterations at step length \(\tau=0.4\). The interelectrode gap is discretized by a \(200\times 20\) mesh. Panel (**b**) shows the deviation of the “perturbed” electrode shapes from the exact shapes in surface normal direction. where \(\alpha\) is the regularization parameter. To derive the reduced gradient of Equation (32), Theorem 4 in [PERSON] and [PERSON] [54] for the shape derivative of surface objectives applies, resulting in (cf. Equation (11))  
\[\mathrm{D}_{\Omega}j_{\mathrm{reg}}(\Omega)[\underline{v}]=\int_{\Gamma_{C}}( \underline{v}\cdot\underline{n})\left(\frac{\partial\lambda_{\Omega}}{ \partial n}\frac{\partial\Phi}{\partial n}+\alpha H\right)\mathrm{d}S, \tag{33}\]  
where \(H\) is the sum of principal curvatures. The optimal shape variation direction field is then given by (cf. Equation (12) for the unregularized case)  
\[\underline{x}\to\underline{x}-\tau\left(\frac{\partial\lambda_{\Omega}( \underline{x})}{\partial n}\frac{\partial\Phi(\underline{x})}{\partial n}+ \alpha H(\underline{x})\right)\underline{n}(\underline{x}). \tag{34}\]  
The second integral term in the objective function (32) can be interpreted as the surface energy of \(\Gamma_{C}\) that tends to a minimum. Figure 10 illustrates the contribution of the term \(-\alpha H\underline{n}\) to the optimal shape variation direction field (34), where \(\underline{n}\) is the outer unit surface normal of the gap domain \(\Omega\) (and points into the cathode). For boundary regions in which the electrode is locally convex and the gap domain \(\Omega\) is locally concave (see Figure 10a), \(H\) is negative; hence, the vector \(-\alpha H\underline{n}\) points towards the exterior of \(\Omega\). For boundary regions in which the cathode is locally concave and the gap domain \(\Omega\) is locally convex (see Figure 10b), the vector \(-\alpha H\underline{n}\) points towards the interior of \(\Omega\). In both cases, the regularization term smooths the boundary \(\Gamma_{C}\).