Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

Several approaches to sensitivity analysis such as an overall finite difference scheme, a semi-analytical approach, a discrete analytical method, an automatic differentiation technique and some different flavours of the variational approach are well-known in structural optimisation. All mentioned techniques finally yield the correct gradient value up to some manageable approximation errors. Nevertheless, the methods differ significantly if not only the correctness of the resulting gradient value is considered.

This paper focuses on the authors’ variant of variational design sensitivity analysis which is based on an intrinsic presentation of continuum mechanics. The advantages of this viewpoint are described in comparison with the discrete analytical differentiation of the finite element equations. The later method is well-known and widely used in structural optimisation, see e.g. [11, 21] for details.

The central differences of both methods, i.e. an initial variation followed by the discretisation step in case of the variational approach and the discretisation of the continuous equations accompanied by the analytical differentiation of the resulting discrete equations, respectively, are highlighted in Fig. 1.

Fig. 1
figure 1

Different order of steps within variational and analytical sensitivity analysis

The overall scheme for variational design sensitivity analysis is outlined in Sect. 2 and the intrinsic presentation of continuum mechanics is summarised in Sect. 3. In Sect. 4, the discretisation of variational sensitivities is performed. Some remarks on its implementation follow in Sect. 5. The alternative differentiation approach is explained in Sect. 6. In Sect. 7, the computational performance of both approaches is compared. The most significant results are summarised in Sect. 8.

2 Outline of Variational Design Sensitivity Analysis

The layout of sensitivity analysis is described and its discrete formulation is derived.

2.1 Continuous Formulation of Sensitivity Analysis

In structural analysis, the displacements \(\mathbf {u} \in \mathcal {V}\) are computed for any given design \(\mathbf {X} \in \mathcal {S}\) by solving the weak form of equilibrium \(R (\mathbf {u},\mathbf {X};\mathbf {v}) = 0\) for any test function \(\mathbf {v}\in \mathcal {V}\). Here, \(\mathcal {V}\) and \(\mathcal {S}\) denote the spaces of admissible displacements and designs, which are parametrized by time t and design s, respectively, see Sect. 3. Thus, the partial variations of any function \((\cdot )\) are indicated by \(\delta _u (\cdot )\) and \(\delta _X (\cdot )\) with variations \(\delta \mathbf {u} \in \mathcal {V}\) and \(\delta \mathbf {X} \in \mathcal {S}\), respectively. But, no variation must violate equilibrium, i.e.

$$\begin{aligned} \delta {R} = \delta _X {R} + \delta _u {R} = p (\mathbf {u}, \mathbf {X}; \mathbf {v}, \delta \mathbf {X}) + k (\mathbf {u}, \mathbf {X}; \mathbf {v}, \delta \mathbf {u}) = 0 . \end{aligned}$$
(1)

Here, \(\delta _u {R} = k (\mathbf {u} , \mathbf {X}; \mathbf {v}, \delta \mathbf {u})\) is the tangent stiffness operator and \(\delta _X {R} = p (\mathbf {u} , \mathbf {X}; \mathbf {v}, \delta \mathbf {X})\) denotes the tangent pseudo load operator. We can solve the sensitivity equation for a given design variation \(\delta \mathbf {X}\) to obtain the displacement variation \(\delta \mathbf {u}\).

$$\begin{aligned} k (\mathbf {u} , \mathbf {X}; \mathbf {v}, \delta \mathbf {u}) = - Q (\mathbf {u} , \mathbf {X}; \mathbf {v})\qquad \forall \; \mathbf {v} \in \mathcal {V} \end{aligned}$$
(2)

Herein, \(\, Q (\mathbf {u} , \mathbf {X}; \mathbf {v}) := p (\mathbf {u} , \mathbf {X}; \mathbf {v} , \delta \mathbf {X})\, \) is the pseudo load which maps the (material) design variation \(\delta \mathbf {X}\) to a (physical) pseudo load Q. This observation motivates the term pseudo load operator for the operator p. Furthermore, a sensitivity equation for the material or inverse motion problem as well as for the dual or adjoint problem can be derived in the same manner, see [24] for details.

As a consequence, the existence of a (linear) sensitivity operator S, evaluated at the current equilibrium point \((\mathbf {u}, \mathbf {X})\), can be deduced from Eq. (1) with

$$\begin{aligned} \delta \mathbf {u}= S (\mathbf {u}, \mathbf {X}; \delta \mathbf {X}) . \end{aligned}$$
(3)

The optimisation model consists of objective and constraint functions \(f (\mathbf {u}, \mathbf {X})\). Therefore, \(\beta (\mathbf {u}, \mathbf {X}; \delta \mathbf {X})\) and \(\gamma (\mathbf {u}, \mathbf {X}; \delta \mathbf {u})\) denote linear forms obtained by varying f with respect to design or displacements. Thus, the total variation of the function f with respect to any design variation \(\delta \mathbf {X}\) yields the linear operator \(\alpha = \beta + \gamma \circ S\)

$$\begin{aligned} \delta f = \delta _X f + \delta _u f = \beta (\delta \mathbf {X}) + \gamma (\delta \mathbf {u}) = \left( \beta + \gamma \circ S \right) (\delta \mathbf {X}) = \alpha (\delta \mathbf {X}) . \end{aligned}$$
(4)

For a specific function \(f_i\) and any design variation \(\delta \mathbf {X}_j\), Eq. (4) transforms to

$$\begin{aligned} \delta f_{ij} = \alpha _i (\mathbf {u}, \mathbf {X}; \delta \mathbf {X}_j) . \end{aligned}$$
(5)

Remark 1

(Linear operators in sensitivity analysis) All variations of residuals, objectives and constraints can be obtained by a straightforward analysis on the continuum mechanical level. At any equilibrium point \((\mathbf {u}, \mathbf {X})\), the resulting linear operator \(S : \mathcal {S} \rightarrow \mathcal {V}\) and the linear form \(\alpha : \mathcal {S} \rightarrow \mathbb {R}\) describe the reaction of the mechanical systems in case of a design perturbation. The central sensitivity operator S is only implicitly known and further progress can only be achieved on the discrete level.

Special emphasis is given to a combined presentation of the tangent stiffness operator and the tangent pseudo load operator permitting a minimal overlay for performing the variational design sensitivity analysis, see Sect. 3.

2.2 Fundamentals of Discrete Approximations

The general idea of discretisation is outlined without referring to a specific method.

We introduce the discrete approximations for the state \(\mathbf {u}_h\) and the design \(\mathbf {X}_h\) to obtain a matrix description of the derived residual and tangent forms. These approximations depend on the displacement parameters \(\hat{\varvec{U}}\in \mathbb {R}^{ nu }\) and the design parameters \(\hat{\varvec{X}}\in \mathbb {R}^{ nx }\). Here, \( nu \) and \( nx \) are the dimensions of the introduced approximation spaces, i.e. \( nu \) denotes the number of the discrete state variables in \(\mathcal {V}_h \subset \mathcal {V}\) and \( nx \) the number of the discrete design variables in \(\mathcal {S}_h \subset \mathcal {S}\). We introduce in the same manner the discrete approximations for the corresponding variations, i.e. \(\delta \hat{\varvec{U}}\in \mathbb {R}^{ nu }\) and \(\delta \hat{\varvec{X}}\in \mathbb {R}^{ nx }\). Furthermore, the test function \(\mathbf {v}_h\) is given by \(\hat{\varvec{V}}\in \mathbb {R}^{ nu }\).

The continuous forms can be evaluated for any discrete design \(\mathbf {X}_h\) and the associated discrete displacements \(\mathbf {u}_h\), i.e. we obtain the functionals and bilinear forms

$$\begin{aligned} {R} (\mathbf {u}_h, \mathbf {X}_h; \mathbf {v}_h)&=\, \hat{\varvec{V}}^\text {T}\, \hat{\varvec{R}}\quad \text {with residual vector} \; \hat{\varvec{R}}\in \mathbb {R}^{ nu }, \end{aligned}$$
(6)
$$\begin{aligned} {k} (\mathbf {u}_h, \mathbf {X}_h; \mathbf {v}_h, \delta \mathbf {u}_h )&=\, \hat{\varvec{V}}^\text {T}\, \hat{\varvec{K}}\, \delta \hat{\varvec{U}}\quad \text {with stiffness matrix} \; \hat{\varvec{K}}\in \mathbb {R}^{ nu \times nu }, \end{aligned}$$
(7)
$$\begin{aligned} {p} (\mathbf {u}_h, \mathbf {X}_h; \mathbf {v}_h, \delta \mathbf {X}_h )&=\, \hat{\varvec{V}}^\text {T}\, \hat{\varvec{P}}\, \delta \hat{\varvec{X}}\quad \text {with pseudo load matrix} \; \hat{\varvec{P}}\in \mathbb {R}^{ nu \times nx }. \end{aligned}$$
(8)

The details in case of the finite element method are explained in Sect. 4.3.

2.3 Properties of Discrete Sensitivity Relations

The discrete version of Eq. (1) evaluated at \((\mathbf {u}_h, \mathbf {X}_h)\) reads

$$\begin{aligned} \delta R = \hat{\varvec{V}}^\mathrm{T}\, \delta \hat{\varvec{R}}= \hat{\varvec{V}}^\mathrm{T}\, \left[ \hat{\varvec{K}}\, \delta \hat{\varvec{U}}+ \hat{\varvec{P}}\, \delta \hat{\varvec{X}}\right] = 0 \end{aligned}$$
(9)

and we obtain the well-known discrete condition

$$\begin{aligned} \delta \hat{\varvec{R}}= \hat{\varvec{K}}\, \delta \hat{\varvec{U}}+\hat{\varvec{P}}\, \delta \hat{\varvec{X}}= \mathbf {0} . \end{aligned}$$
(10)

Additionally, the discrete version of Eq. (2) with \({\hat{\varvec{Q}}}\in \mathbb {R}^{nu}\) being the pseudo load vector of the physical residual problem associated to the functional \(Q (\mathbf {u}_h,\mathbf {X}_h;\cdot )\) is

$$\begin{aligned} \hat{\varvec{K}}\, \delta \hat{\varvec{U}}= - {\hat{\varvec{Q}}}\qquad \text {with}\qquad {\hat{\varvec{Q}}}:= \hat{\varvec{P}}\, \delta \hat{\varvec{X}}. \end{aligned}$$
(11)

Furthermore, the discrete version of Eq. (3) takes the form

$$\begin{aligned} \delta \hat{\varvec{U}}= \hat{\varvec{S}}\,\delta \hat{\varvec{X}}\qquad \text {with}\qquad \hat{\varvec{S}}:= -\hat{\varvec{K}}^{-1}\hat{\varvec{P}}, \end{aligned}$$
(12)

where \(\hat{\varvec{S}}\in \mathbb {R}^{nu\times nx}\) denotes the sensitivity operator matrix, i.e. we can evaluate the sensitivity equation for arbitrary admissible variations \(\delta \hat{\varvec{X}}\) in the material space.

Finally, the sensitivity of the function f with respect to design variations can be deduced from Eq. (4) to yield

$$\begin{aligned} \delta f = \hat{\varvec{b}}^\text {T}\, \delta {\hat{\varvec{X}}} + \hat{\varvec{c}}^\text {T}\, \delta {\hat{\varvec{U}}}, \end{aligned}$$
(13)

where \(\delta {\hat{\varvec{U}}}\) and \(\delta {\hat{\varvec{X}}}\) denote the variation of the discrete displacement and nodal coordinate vectors, respectively. The discretised variation of the displacements given in Eq. (12) can be inserted. Considering several objectives \(f_i\) with \( i=1, 2, \ldots , nf \) and several variations of design \(\delta {\hat{\varvec{X}}}_j\) with \(j=1, 2, \ldots , ndv \) yields

$$\begin{aligned} \delta f_{ij} = \left[ \; \hat{\varvec{b}}^\text {T}_i - \hat{\varvec{c}}^\text {T}_i \, \hat{\varvec{K}}^{-1} \; \hat{\varvec{P}}\; \right] \; \delta {\hat{\varvec{X}}}_j = \left[ \; \hat{\varvec{b}}^\text {T}_i + \hat{\varvec{c}}^\text {T}_i \, \hat{\varvec{S}}\; \right] \; \delta {\hat{\varvec{X}}}_j = \hat{\varvec{a}}_i^\text {T}\; \delta {\hat{\varvec{X}}}_j \, . \end{aligned}$$
(14)

Remark 2

(Discrete form of sensitivity analysis). The continuous linear mapping \(\delta \mathbf {u}= S ( \delta \mathbf {X})\) transfers to the computable discrete equation \(\delta \hat{\varvec{U}}= \hat{\varvec{S}}\, \delta \hat{\varvec{X}}\) and the linear form \(\delta f = \alpha (\delta \mathbf {X})\) transfers to the computable discrete equation \(\delta f = \hat{\varvec{a}}^\text {T}\, \delta \hat{\varvec{X}}\).

3 Basics on the Intrinsic Viewpoint of Continuum Mechanics

The authors’ viewpoint on variational design sensitivity analysis within a general continuum mechanical framework relies on a rigorous separation of physical quantities into geometry and displacement mappings, see [46] for further details. This viewpoint is based on intrinsic coordinates which have been introduced to mechanics in [30] advancing the traditional presentation [34]. The intrinsic coordinates are also named convected, curvilinear, local or natural coordinates depending on which feature should be highlighted in the specific setting. Unfortunately, the mathematical background, i.e. the body can be described as differentiable manifold, is not always present. However, all available knowledge should be explored to obtain general theoretical results and efficient numerical formulations, see Sect. 3.5.

The advocated integrated approach for deriving the variations within direct analysis and variational design sensitivity analysis based on intrinsic coordinates differs conceptually from the material derivative approach, see e.g. [2], and the domain parametrization approach, see e.g. [33], respectively. Furthermore, the relationship to configurational mechanics has been outlined in [24, 27]. These different approaches are briefly sketched in Sect. 3.6.

This section summarises the theoretical framework used for variational design sensitivity analysis. The results can be used to apply a subsequent discretisation step.

3.1 Separation of Point and Tangent Mappings

The separation approach yields a decomposition of the design (s) and time (t) dependent deformation mapping \(\mathbf {x}= \varvec{\upvarphi }_\mathrm{X}(\mathbf {X}(s),t)\) into two independent mappings, i.e. a design dependent geometry mapping \(\mathbf {X}= \varvec{\upkappa }_{{\Theta }}(\varvec{\Theta },s)\) and a time dependent motion mapping \(\mathbf {x}= {\varvec{\upmu }_{{\Theta }}}(\varvec{\Theta },t)\). Furthermore, an intrinsic displacement mapping \(\mathbf {u}=\varvec{v}_{{\Theta }}(\varvec{\Theta },s,t)= {\varvec{\upmu }_{{\Theta }}}(\varvec{\Theta },t) - \varvec{\upkappa }_{{\Theta }}(\varvec{\Theta },s)\) can be introduced. All intrinsic quantities are indicated using a subscript \({\Theta }\).

This viewpoint using intrinsic coordinates \(\varvec{\Theta }\in \varvec{\mathcal {B}}\) can be enhanced by the common Lagrangian viewpoint based on the reference coordinates \(\mathbf {X}\in \varvec{\mathcal {K}}\) and indicated by a subscript \(\mathrm{X}\). Furthermore, the Eulerian viewpoint is based on the current coordinates \(\mathbf {x}\in \varvec{\mathcal {M}}\) and is indicated by a subscript \(\mathrm{x}\). Consequently, the referential deformation mapping is given by the composition \(\varvec{\upvarphi }_\mathrm{X}= {\varvec{\upmu }_{{\Theta }}}\circ \varvec{\upkappa }_{{\Theta }}^{-1}\), see Fig. 2.

Fig. 2
figure 2

Configurations and mappings

Remark 3

(Design as part of mechanics) The most significant enhancement of the advocated approach over the traditional presentation of continuum mechanics is the introduction of the geometry mapping \(\varvec{\upkappa }_{{\Theta }}\). Thus, continuum mechanics is understood as a theory of two fundamental mappings, i.e. geometry \(\varvec{\upkappa }_{{\Theta }}: \varvec{\mathcal {B}}\rightarrow \varvec{\mathcal {K}}\) and motion \({\varvec{\upmu }_{{\Theta }}}: \varvec{\mathcal {B}}\rightarrow \varvec{\mathcal {M}}\), which decompose the deformation mapping \(\varvec{\upvarphi }_\mathrm{X}= {\varvec{\upmu }_{{\Theta }}}\circ \varvec{\upkappa }_{{\Theta }}^{-1}\). Therefore, the design of structures can be rigorously founded, see [46].

3.2 Gradients, Strains and Stresses

Different gradient operators \({\,\mathrm{grad}\,}\), \({\,\mathrm{Grad}\,}\) and \({\,\mathrm{GRAD}\,}\) corresponding to the variables \(\mathbf {x}, \mathbf {X}\) and \(\varvec{\Theta }\) of the considered domains \(\varvec{\mathcal {M}}, \varvec{\mathcal {K}}\) and \(\varvec{\mathcal {B}}\), respectively, can be defined. The intrinsic motion gradient \( {\mathbf {\mathsf{{M}}}}_{{\Theta }}= {\,\mathrm{GRAD}\,} {\varvec{\upmu }_{{\Theta }}}\) and the intrinsic geometry gradient \( {\mathbf {\mathsf{{K}}}}_{{\Theta }}= {\,\mathrm{GRAD}\,} \varvec{\upkappa }_{{\Theta }}\) are used to decompose the referential deformation gradient

$$\begin{aligned} {\mathbf {\mathsf{{F}}}}_\mathrm{X}= \,\mathrm{Grad}\,\varvec{\upvarphi }_\mathrm{X}= {\,\mathrm{GRAD}\,} {\varvec{\upmu }_{{\Theta }}}\; \left[ {\,\mathrm{GRAD}\,} \varvec{\upkappa }_{{\Theta }}\right] ^{-1} = {\mathbf {\mathsf{{M}}}}_{{\Theta }}\; {{\mathbf {\mathsf{{K}}}}}_{{\Theta }}^{-1}. \end{aligned}$$
(15)

The pull-back and push-forward transformation between the tangent spaces at the current placement \(\varvec{\mathcal {T}}_{\,\mathrm x}\varvec{\mathcal {M}}\), at the reference placement \(\varvec{\mathcal {T}}_{\,\mathrm X}\varvec{\mathcal {K}}\) and at the intrinsic parameter space \(\varvec{\mathcal {T}}_{\,{\Theta }}\varvec{\mathcal {B}}\), see Fig. 3, are based on \({\mathbf {\mathsf{{K}}}}_{{\Theta }}, {\mathbf {\mathsf{{M}}}}_{{\Theta }}, {\mathbf {\mathsf{{F}}}}_\mathrm{X}\) and on their determinants \({{\varvec{J}}}_{\mathrm{K}_{\Theta }}= \det {\mathbf {\mathsf{{K}}}}_{{\Theta }}, {{\varvec{J}}}_{\mathsf{M}_{\Theta }}= \det {\mathbf {\mathsf{{M}}}}_{{\Theta }}\) and \({{\varvec{J}}}_{\mathsf{F}_\mathrm{X}}= \det {\mathbf {\mathsf{{F}}}}_\mathrm{X}\).

Fig. 3
figure 3

Tangent mappings between tangent spaces

Similarly, the referential displacement gradient \({\mathbf {\mathsf{{H}}}}_\mathrm{X}= {\,\mathrm{Grad}\,} \varvec{v}_\mathrm{X}\) can be split into the intrinsic displacement gradient and the inverse intrinsic geometry gradient

$$\begin{aligned} {\mathbf {\mathsf{{H}}}}_\mathrm{X}= {\,\mathrm{Grad}\,} \varvec{v}_\mathrm{X}= {\,\mathrm{GRAD}\,} \varvec{v}_{{\Theta }}\; \left[ {\,\mathrm{GRAD}\,} \varvec{\upkappa }_{{\Theta }}\right] ^{-1} = {\mathbf {\mathsf{{H}}}}_{{\Theta }}\, {{\mathbf {\mathsf{{K}}}}}_{{\Theta }}^{-1}. \end{aligned}$$
(16)

Remark 4

(Decomposition of referential deformation and displacement gradients) The decomposition of referential gradients into two independent intrinsic gradients, see e.g. Eqs. (15) and (16), is a central prerequisite for efficiently deriving variations, see Sect. 3.3. Furthermore, it serves as a master copy for discrete computational methods, e.g. the technique to compute Cartesian derivatives in the finite element method, see Sect. 4.2.

The (referential) Green-Lagrange strain tensor \({\mathbf {\mathsf{{E}}}}\) and the linear strain tensor \(\varvec{\upvarepsilon }\) can be considered as functions of the (referential) displacement gradient

$$\begin{aligned} {\mathbf {\mathsf{{E}}}}= \frac{1}{2} \left( {\mathbf {\mathsf{{H}}}}_\mathrm{X}+ {\mathbf {\mathsf{{H}}}}_\mathrm{X}^\mathsf{T}+ {\mathbf {\mathsf{{H}}}}_\mathrm{X}^\mathsf{T}\, {\mathbf {\mathsf{{H}}}}_\mathrm{X}\right) \quad \text {and}\quad \varvec{\upvarepsilon }= \frac{1}{2} \left( {\mathbf {\mathsf{{H}}}}_\mathrm{X}+ {\mathbf {\mathsf{{H}}}}_\mathrm{X}^\mathsf{T}\right) . \end{aligned}$$
(17)

The Cauchy stress tensor \({\mathbf {\mathsf{{T}}}}\), the Kirchhoff stress tensor \(\varvec{\tau } = {{\varvec{J}}}_{\mathsf{F}_\mathrm{X}}\, {\mathbf {\mathsf{{T}}}}\), the (1) Piola-Kirchhoff stress tensor \({\mathbf {\mathsf{{P}}}}= \varvec{\tau }\, {\mathbf {\mathsf{{F}}}}_\mathrm{X}^{-\mathsf{T}}\) and the (2) Piola-Kirchhoff stress tensor \({\mathbf {\mathsf{{S}}}}= {\mathbf {\mathsf{{F}}}}_\mathrm{X}^{-1}\, {\mathbf {\mathsf{{P}}}}\) collapse to the linear stress tensor \(\varvec{\upsigma }\) in case of linearised elasticity.

3.3 Variations of Gradients, Strains and Stresses

The total variation of the deformation gradient \({\mathbf {\mathsf{{F}}}}_\mathrm{X}\) can be derived using the multiplicative decomposition \({\mathbf {\mathsf{{F}}}}_\mathrm{X}= {\mathbf {\mathsf{{M}}}}_{{\Theta }}\, {{\mathbf {\mathsf{{K}}}}}_{{\Theta }}^{-1}\) and the variations of the tangent mappings \(\delta {\mathbf {\mathsf{{K}}}}_{{\Theta }}= {\,\mathrm{GRAD}\,} \delta \mathbf {X}\) and \(\delta {\mathbf {\mathsf{{M}}}}_{{\Theta }}= {\,\mathrm{GRAD}\,} \delta \mathbf {x}\), i.e.

$$\begin{aligned} \delta {\mathbf {\mathsf{{F}}}}_\mathrm{X}= \delta {\mathbf {\mathsf{{M}}}}_{{\Theta }}\, {{\mathbf {\mathsf{{K}}}}}_{{\Theta }}^{-1}+ {\mathbf {\mathsf{{M}}}}_{{\Theta }}\, \delta {{\mathbf {\mathsf{{K}}}}}_{{\Theta }}^{-1}= \delta {\mathbf {\mathsf{{M}}}}_{{\Theta }}\, {{\mathbf {\mathsf{{K}}}}}_{{\Theta }}^{-1}- {\mathbf {\mathsf{{M}}}}_{{\Theta }}\, {{\mathbf {\mathsf{{K}}}}}_{{\Theta }}^{-1}\; \delta {\mathbf {\mathsf{{K}}}}_{{\Theta }}\, {{\mathbf {\mathsf{{K}}}}}_{{\Theta }}^{-1}, \end{aligned}$$
(18)

where \(\delta [{{\mathbf {\mathsf{{K}}}}}_{{\Theta }}^{-1}] = - {{\mathbf {\mathsf{{K}}}}}_{{\Theta }}^{-1}\, \delta {\mathbf {\mathsf{{K}}}}_{{\Theta }}\, {{\mathbf {\mathsf{{K}}}}}_{{\Theta }}^{-1}\) has been used. The total variation \( \delta {\mathbf {\mathsf{{F}}}}_\mathrm{X}\) can be split into partial variations \(\delta _u {\mathbf {\mathsf{{F}}}}_\mathrm{X}\) and \(\delta _X {\mathbf {\mathsf{{F}}}}_\mathrm{X}\), i.e. w.r.t. displacements \(\delta \mathbf{u}\) or geometry \(\delta \mathbf {X}\)

$$\begin{aligned} \delta {\mathbf {\mathsf{{F}}}}_\mathrm{X}= \delta _u {\mathbf {\mathsf{{F}}}}_\mathrm{X}+ \delta _X {\mathbf {\mathsf{{F}}}}_\mathrm{X}= \left[ {\mathbf {\mathsf{{F}}}}_\mathrm{X}\right] ^\prime _{u} + \left[ {\mathbf {\mathsf{{F}}}}_\mathrm{X}\right] ^\prime _{X} = {\,\mathrm{Grad}\,} \delta \mathbf{u}- {\,\mathrm{Grad}\,} \mathbf{u}\, {\,\mathrm{Grad}\,} \delta \mathbf {X}\end{aligned}$$
(19)

using the notation \( \left[ {\mathbf {\mathsf{{F}}}}_\mathrm{X}\right] ^\prime _u ( \mathbf{u}, \delta \mathbf{u}) \,{=}\, {\,\mathrm{Grad}\,} \delta \mathbf{u}\) and \( \left[ {\mathbf {\mathsf{{F}}}}_\mathrm{X}\right] ^\prime _X ( \mathbf{u}, \delta \mathbf {X}) \,{=}\, -{\,\mathrm{Grad}\,}\mathbf{u}{\,\mathrm{Grad}\,} \delta \mathbf {X}\). Furthermore, the variations of the Jacobians \({{\varvec{J}}}_{\mathrm{K}_{\Theta }}, {{\varvec{J}}}_{\mathsf{M}_{\Theta }}\) and \({{\varvec{J}}}_{\mathsf{F}_\mathrm{X}}\) can be performed based on \(\delta (\det {\mathbf {\mathsf{{B}}}}) = \det {\mathbf {\mathsf{{B}}}}\; {\mathbf {\mathsf{{B}}}}^{-\mathsf T} :\delta {\mathbf {\mathsf{{B}}}}\), where \({\mathbf {\mathsf{{B}}}}\) is either \({\mathbf {\mathsf{{K}}}}_{{\Theta }}, {\mathbf {\mathsf{{M}}}}_{{\Theta }}\) or \({\mathbf {\mathsf{{F}}}}_\mathrm{X}\).

The first partial variations of the Green-Lagrange strain tensor \({\mathbf {\mathsf{{E}}}}(\mathbf{u})\) yield

$$\begin{aligned} {\mathbf {\mathsf{{E}}}}^{\prime }_{u} (\mathbf{u}, \delta \mathbf{u})&= {\mathrm{sym}} \left( {{\mathbf {\mathsf{{A}}}}}_{ u}^{\mathsf{{T}}}\, {\,\mathrm{Grad}\,}\delta \mathbf{u}\right) = {\mathrm{sym}} \left( {\mathbf {\mathsf{{F}}}}_\mathrm{X}^\mathsf{T}\, {\,\mathrm{Grad}\,} \delta \mathbf{u}\right) \nonumber \\ {\mathbf {\mathsf{{E}}}}^{\prime }_{X} (\mathbf{u}, \delta \mathbf {X})&= {\mathrm{sym}} \left( {{\mathbf {\mathsf{{A}}}}}_{ X}^{\mathsf{{T}}}\, {\,\mathrm{Grad}\,}\delta \mathbf {X}\right) = - {\mathrm{sym}} \left( {\mathbf {\mathsf{{F}}}}_\mathrm{X}^\mathsf{T}\, {\,\mathrm{Grad}\,} \mathbf{u}\, {\,\mathrm{Grad}\,}\delta \mathbf {X}\right) , \end{aligned}$$
(20)

where the abbreviations \({\mathbf {\mathsf{{A}}}}_u = {\mathbf {\mathsf{{F}}}}_\mathrm{X}\) and \({\mathbf {\mathsf{{A}}}}_X = - {\,\mathrm{Grad}\,}^{\mathsf{{T}}} \mathbf {u}\, {\mathbf {\mathsf{{F}}}}_\mathrm{X}\) have been used. The second partial variations with additional variation of the displacements \(\Delta \mathbf{u}\) read

$$\begin{aligned} {\mathbf {\mathsf{{E}}}}^{\prime \prime }_{uX} (\mathbf{u}, \delta \mathbf{u},\delta \mathbf {X})&= - {\mathrm{sym}} (\!{\,\mathrm{Grad}\,}^{\mathsf{{T}}} \delta \mathbf {X}\, {\mathbf {\mathsf{{H}}}}_\mathrm{X}^\mathsf{T}\,{\,\mathrm{Grad}\,} \delta \mathbf{u}+ {\mathbf {\mathsf{{F}}}}_\mathrm{X}^\mathsf{T}\, {\,\mathrm{Grad}\,} \delta \mathbf{u}\, {\,\mathrm{Grad}\,} \delta \mathbf {X}) \nonumber \\ {\mathbf {\mathsf{{E}}}}^{\prime \prime }_{uu} (\mathbf{u}, \delta \mathbf{u},\Delta \mathbf{u})&= {\mathrm{sym}} (\!{\,\mathrm{Grad}\,}^{\mathsf{{T}}} \delta \mathbf{u}\, {\,\mathrm{Grad}\,} \Delta \mathbf{u}) . \end{aligned}$$
(21)

The variations of the linearised strain tensor \(\varvec{\upvarepsilon }\) are less complex, i.e.

$$\begin{aligned} \varvec{\upvarepsilon }^{\prime }_{u} (\delta \mathbf{u}) = {\mathrm{sym}}(\!{\,\mathrm{Grad}\,} \delta \mathbf{u}) \quad \text {and}\quad \varvec{\upvarepsilon }^{\prime }_{ X} (\mathbf{u}, \delta \mathbf {X}) = - {\mathrm{sym}} ({\mathbf {\mathsf{{H}}}}_\mathrm{X}\, {\,\mathrm{Grad}\,}\delta \mathbf {X}) , \end{aligned}$$
(22)

and the second partial variations are

$$\begin{aligned} \varvec{\upvarepsilon }^{\prime \prime }_{uu}= {\mathbf {\mathsf{{0}}}}\qquad \text {and}\qquad \varvec{\upvarepsilon }^{\prime \prime }_{uX} (\delta \mathbf{u},\delta \mathbf {X}) = - {\mathrm{sym}} (\!{\,\mathrm{Grad}\,} \delta \mathbf{u}\, {\,\mathrm{Grad}\,} \delta \mathbf {X}). \end{aligned}$$
(23)

The variation of stresses in case of hyperelastic material behaviour deliver the referential and linear elasticity tensors, i.e. \(\varvec{\mathbb {C}}\) and \(\varvec{\mathbb {E}}\), respectively, and the expressions

$$\begin{aligned} \delta {\mathbf {\mathsf{{S}}}}= \frac{\partial {\mathbf {\mathsf{{S}}}}}{\partial {\mathbf {\mathsf{{E}}}}} : \delta {\mathbf {\mathsf{{E}}}}= \varvec{\mathbb {C}}: \delta {\mathbf {\mathsf{{E}}}}\qquad \text {and}\qquad \delta \varvec{\upsigma }= \frac{\partial \varvec{\upsigma }}{\partial \varvec{\upvarepsilon }} : \delta \varvec{\upvarepsilon }= \varvec{\mathbb {E}}: \delta \varvec{\upvarepsilon }. \end{aligned}$$
(24)

3.4 Weak Form of Equilibrium and Its Variations

The weak form of equilibrium \({R} = {R}_{\mathrm {int}} - {R}_{\mathrm {ext}} = 0\) is a linear form of the test function \(\mathbf {v}\) evaluated for current geometry and displacement mappings, i.e.

$$\begin{aligned} {R}(\mathbf {u},\mathbf {X};\mathbf {v})= \int _{\varvec{\mathcal {K}}}{\mathbf {\mathsf{{S}}}}:{\mathbf {\mathsf{{E}}}}_u'(\mathbf {u},\mathbf {v})\,\mathrm{d}V_\mathrm{X} - F(\mathbf {X};\mathbf {v}) \end{aligned}$$
(25)

in case of a general nonlinear theory. We consider for physical body forces \(\mathbf {b}_{\text {X}}\)

$$\begin{aligned} {R}_{\mathrm {ext}} = F(\mathbf {X};\mathbf {v}) = \int _{\varvec{\mathcal {K}}}\mathbf {b}_{\text {X}} \cdot \mathbf {v}\,\mathrm{d}V_\mathrm{X} = \int _{\varvec{\mathcal {B}}}{\mathbf {b}_{\text {X}} \cdot \mathbf {v}\, {{\varvec{J}}}_{\mathrm{K}_{\Theta }}}\,\mathrm{d}V_{\Theta }, \end{aligned}$$
(26)

i.e. the external virtual work is deformation independent for notational simplicity.

An outline of the variational design sensitivity analysis is given in Sect. 2, and Eq. (1) needs two partial variations of the weak form. In the general nonlinear case, the tangent stiffness operator k is defined by \(k = \delta _u R \) with

$$\begin{aligned} k (\mathbf{u}, \mathbf {X}; \mathbf {v}, \delta \mathbf {u}) = \int _{\varvec{\mathcal {K}}} \left\{ {\mathbf {\mathsf{{E}}}}^\prime _{u} (\mathbf{u},\mathbf {v}) : \varvec{\mathbb {C}}: {\mathbf {\mathsf{{E}}}}^\prime _{u} (\mathbf{u}, \delta \mathbf{u}) + {\mathbf {\mathsf{{S}}}}: {\mathbf {\mathsf{{E}}}}^{\prime \prime }_{uu} (\mathbf {v}, \delta \mathbf{u}) \right\} \,\mathrm{d}V_\mathrm{X} \end{aligned}$$
(27)

with variations of the Green-Lagrange strain tensor \({\mathbf {\mathsf{{E}}}}\) given in Eqs. (20) and (21).

The corresponding variation \(\delta _X R\) leads to the pseudo load operator p,

$$\begin{aligned} p(\mathbf {u} ,\mathbf {X}; \mathbf {v}, \delta \mathbf {X} ) = \int _{\varvec{\mathcal {K}}}&\left\{ {\mathbf {\mathsf{{S}}}}: {\mathbf {\mathsf{{E}}}}_{uX}''(\mathbf {u} ,\mathbf {v},\delta \mathbf {X}) + {\mathbf {\mathsf{{E}}}}_u'(\mathbf {u} ,\mathbf {v}):\mathbb C:{\mathbf {\mathsf{{E}}}}_X'(\mathbf {u} , \delta \mathbf {X})\; \right. \nonumber \\ \quad&\left. +\, {\mathbf {\mathsf{{S}}}}:{\mathbf {\mathsf{{E}}}}_{u}'(\mathbf {u},\mathbf {v}) {\,\mathrm{Div}\,}\delta \mathbf {X} \right\} \,\mathrm{d}V_\mathrm{X} - F_{X}'(\mathbf {X};\mathbf {v},\delta \mathbf {X}) . \end{aligned}$$
(28)

The design variation of Eq. (26), to be used in Eqs. (28) and (32), leads to

$$\begin{aligned} F_{X}'(\mathbf {X};\mathbf {v},\delta \mathbf {X}) = \int _{\varvec{\mathcal {K}}} \mathbf {b}_{\text {X}} \cdot \mathbf {v} \, {\,\mathrm{Div}\,}\delta \mathbf {X}\,\mathrm{d}V_\mathrm{X}. \end{aligned}$$
(29)

The linearised version on the linear domain \(\Omega \) simplifies to the expression

$$\begin{aligned} {R}_\mathrm {lin} (\mathbf {u},\mathbf {X};\mathbf {v}) = \int _{\Omega }{{\,\mathrm{Grad}\,} \mathbf {v} : \varvec{\upsigma }}\,\mathrm{d}\Omega - F(\mathbf {X};\mathbf {v}) . \end{aligned}$$
(30)

Consequently, the linear stiffness operator of the linear theory is constant

$$\begin{aligned} k_\mathrm {lin} (\mathbf {X}; \mathbf {v}, \delta \mathbf {u}) = \int _{\Omega }{{\,\mathrm{Grad}\,} \mathbf {v} : \varvec{\mathbb {E}}: {\mathrm{sym}} \{{\,\mathrm{Grad}\,} \delta \mathbf {u} \}}\,\mathrm{d}\Omega , \end{aligned}$$
(31)

and the linear pseudo load operator depends linearly on the displacements

$$\begin{aligned} p_\mathrm {lin} (\mathbf {u}, \mathbf {X}; \mathbf {v}, \delta \mathbf {X})&= \int _{\Omega }{ {\,\mathrm{Grad}\,} \mathbf {v} : \varvec{\mathbb {E}}: {\mathrm{sym}} \{ - {\,\mathrm{Grad}\,} \mathbf {u}\, {\,\mathrm{Grad}\,} \delta \mathbf {X}\} }\,\mathrm{d}\Omega \nonumber \\&\quad - \int _{\Omega }{ \left\{ \varvec{\upsigma }: {\,\mathrm{Grad}\,} \mathbf {v}\, {\,\mathrm{Grad}\,} \delta \mathbf {X}- \varvec{\upsigma }: {\,\mathrm{Grad}\,} \mathbf {u}\, {\,\mathrm{Div}\,} \delta \mathbf {X}\right\} }\,\mathrm{d}\Omega \nonumber \\&\quad - F_{X}' (\mathbf {X};\mathbf {v},\delta \mathbf {X}) . \end{aligned}$$
(32)

Further equivalent formulations can be derived and the overall expression can be transformed onto the intrinsic parameter space \(\varvec{\mathcal {B}}\) using \(\mathrm{d}V_\mathrm{X}= {{\varvec{J}}}_{\mathrm{K}_{\Theta }}\, \mathrm{d}V_{\Theta }\).

To summarise, all continuous expressions needed for structural and sensitivity analysis have been derived on the continuous level using the intrinsic viewpoint.

Remark 5

(Efficiency of theoretical development) A significant advantage of the variational approach is the similarity of all variations in the physical space, i.e. with respect to displacements, with those in the material space or design space, i.e. with respect to geometry. The advocated intrinsic viewpoint offers the possibility to derive both variations in parallel (at the same time and done by the same researcher) minimising the overall effort.

3.5 Impact of Differential Geometry on Computations

Continuum mechanics is based on differential geometry and the obtainable results can be presented with different mathematical rigour due to the readers background. We report the most important features and refer to literature for further reading.

Manifolds can be characterised as sets which can be covered by a finite number of charts consisting of a subset and coordinate mapping. Thus, for any element of the set, there is at least one chart which describes the body in an open environment of the chosen element using a coordinate system. All those charts together build up an atlas. Importantly, the special choice of the atlas does not effect the properties of the set. The manifold is termed differentiable if the transformation between different coordinate descriptions is sufficiently smooth.

The manifold properties can be summarised as follows: The material bodies under consideration are described by numerous local coordinate systems. This property is valid on all levels, i.e. in theory as well as in computations. The consequences for the finite element method are outlined in Sect. 4.1.

Remark 6

(Efficiency of interaction between continuous and discrete formulations) The interaction between theoretical investigations on the continuous level and the computational strategies on the discrete level are organised consistently using the intrinsic viewpoint. This minimises the number of concepts used in theory and computations and increases the efficiency of the development. Thus, all theoretical results have a discrete representation. And conversely, any discrete technique has a continuous origin.

3.6 Comparison with Other Variational Approaches

Several continuous formulations of sensitivity analysis have been available since decades, see e.g. [3, 12, 18, 19, 31] among others for further details and references. Two concepts, namely the material derivative approach (MDA), see e.g. [2, 13, 29], and the domain parametrization approach (DPA), see e.g. [17, 33], respectively, which are based on the traditional viewpoint published in [34] attracted wide attention in literature. In MDA, the effect of a design variation is understood by using the analogy to a physical time derivative consisting of a local and a convective part. In DPA, an additional master reference placement is introduced to which the different designs are related. Both approaches are valuable and important results have been derived based on them, see e.g. [28].

Another concept of mechanics to which the presented approach can be compared with is Eshelbian mechanics or configurational mechanics, see [14, 16, 20]. The differences occur in the description of modifications in the material space, i.e. an inverse motion is considered from an artificially fixed current placement. Again, the traditional concept from [34] is used to model phenomena which are actual beyond the theoretical framework, see [24, 27] for further hints.

To summarise, none of the mentioned concepts use the manifold structure of continuum mechanics outlined in [30] in order to benefit from the decompositions outlined in Figs. 2 and 3. These elements are an significant improvement which eases the modelling of inverse geometry problems.

Besides these differences, all variational variants have the same strategy for sensitivity in common, see Fig. 1. Thus, most remarks highlighting the advantages of the variational approach over the discrete approach are valid for all variants. The computational methods are generated from a continuous theory, which requires an infinite dimensional space of admissible geometry mappings \(\mathcal {S}\) and an infinite dimensional space of admissible displacement mappings \(\mathcal {V}\), by a discretisation step. Hereby, the infinite dimensional function spaces \(\mathcal {S}\) and \(\mathcal {V}\) are substituted by finite dimensional subspaces, say \(\mathcal {S}_h \subset \mathcal {S}\) and \(\mathcal {V}_h \subset \mathcal {V}\).

Remark 7

Most properties of the discrete solution are already available and known for the original continuous problem. Thus, a thorough theoretical knowledge eases the interpretation of computational techniques as well as computational results.

4 FEM Discretisation of Continuous Sensitivity Expressions

In computations, the geometry \(\varvec{\upkappa }_{{\Theta }}\) is realised by computer aided geometric design (CAGD) using shape functions such as non-uniform rational B-splines (NURBS). The displacement \(\varvec{v}_{{\Theta }}\) is approximated by the finite element method (FEM) using Ansatz functions. In case of an isoparametric finite element method, both shape and Ansatz functions are low order polynomials, say (bi- or tri-) linear functions. The details for sensitivity expressions are outlined in this section.

Three steps must be performed to derive the finite element equations from the continuous setting. Firstly, the considered domain must be subdivided into elements and an efficient computational scheme must be set up, see Sect. 4.1. Secondly, the tensorial notation should be transformed into a matrix notation, see Sect. 4.2. Thirdly, the chosen approximations for geometry and displacements must be inserted into the matrix formulation, see Sect. 4.3.

4.1 Adaptation of the Manifold Properties to the FE Method

The material bodies are differentiable manifolds, see Sect. 3.5, i.e. any discretisation should not destroy this property. Therefore, all results quoted in Sect. 3 are independent from the choice of the intrinsic coordinates \(\{{\Theta }^1, {\Theta }^2, {\Theta }^3 \}\) and the intrinsic parameter domain \(\varvec{\mathcal {B}}\), i.e. both can be adopted to the special needs.

Within the finite element framework and without loss of generality, a suitable atlas is introduced by partitioning the placements \(\varvec{\mathcal {K}}\) and \(\varvec{\mathcal {M}}\) as well as the intrinsic parameter domain \(\varvec{\mathcal {B}}\) into a finite number of sub-domains \(\varvec{\mathcal {K}}_{e}, \varvec{\mathcal {M}}_{e}\) and \(\varvec{\mathcal {B}}_{e}\). These sub-domains are linked to the local parameter domain \(\varvec{\mathcal {R}}_{e}\equiv {\varvec{\mathcal {R}}} = [-1 , 1]^m\), where m refers to the dimension of the problem. The local parameter domain \(\varvec{\mathcal {R}}\) is unique and constant for all sub-domains and its local coordinates are labelled \(\varvec{\zeta }\). Furthermore, the point mappings \(\varvec{\upkappa }_{\zeta }: \varvec{\mathcal {R}}\rightarrow \varvec{\mathcal {K}}\) and \(\varvec{\upmu }_{\zeta }: \varvec{\mathcal {R}}\rightarrow \varvec{\mathcal {M}}\) as well as the tangent mappings \({\mathbf {\mathsf{{K}}}}_{\zeta }: \varvec{\mathcal {T}}_{\zeta }\varvec{\mathcal {R}}\rightarrow \varvec{\mathcal {T}}_{\,\mathrm X}\varvec{\mathcal {K}}\) and \({\mathbf {\mathsf{{M}}}}_{\zeta }: \varvec{\mathcal {T}}_{\zeta }\varvec{\mathcal {R}}\rightarrow \varvec{\mathcal {T}}_{\,\mathrm x}\varvec{\mathcal {M}}\), respectively, replace the mappings introduced in Sect. 3. We omit the index e in most cases to shorten the notation.

Remark 8

(Finite element mesh is a special atlas of the body) The above description characterises the finite element mesh and the mappings from the local parameter space onto each element. Thus, every modification so far is a direct consequence of the intrinsic presentation of continuum mechanics. The finite element mesh, i.e. the subdivision of the body and its placements in a finite number of subdomains, is a special atlas suitable for efficient computations. Thus, this adaptation to the finite element method is exact because no approximation has been introduced so far.

4.2 Matrix Representation of Gradients, Strains and Stresses

Using the introduced Cartesian basis systems \(\{\mathbf{Z}_i\}, \{{\mathbf{E}}_i\}, \{\mathbf{e}_i\}\), see Fig. 3, the displacement and reference placement vectors read

$$\begin{aligned} \mathbf{u}= \varvec{v}_\mathrm{X}(\mathbf {X}) = u^i\, {\mathbf{E}}_i\qquad \text {and}\qquad \mathbf {X}= \varvec{\upkappa }_{{\Theta }}(\varvec{\Theta }) = X^i\, {\mathbf{E}}_i . \end{aligned}$$
(33)

Here, the coefficients \(u^i\) can be considered either as functions of the referential coordinates \(X^i\) or of the intrinsic coordinates \({\Theta }^i\), i.e.

$$\begin{aligned} u^i = \upsilon _{\text {X}}^i (X^1, X^2, X^3) = \upsilon _{\Theta } ({\Theta }^1, {\Theta }^2, {\Theta }^3) \quad \text {and}\quad X^i = \kappa _{\Theta } ({\Theta }^1, {\Theta }^2, {\Theta }^3), \end{aligned}$$
(34)

respectively. The referential and intrinsic gradients of the displacement mapping as well as the intrinsic gradient of the reference mapping and its inverse are given by

$$\begin{aligned} \begin{array}{l} {\mathbf {\mathsf{{H}}}}_\mathrm{X}= {\,\mathrm{Grad}\,} \varvec{v}_\mathrm{X}= \frac{\partial v_{\text {X}}^{ i}}{\partial { X}^{ j}}\, {\mathbf{E}}_i \otimes {\mathbf{E}}^j , \qquad {\mathbf {\mathsf{{H}}}}_{{\Theta }}= {\,\mathrm{GRAD}\,} \varvec{v}_{{\Theta }}= \frac{\partial v_{\Theta }^i}{\partial {\Theta }^j}\, {\mathbf{E}}_i \otimes \mathbf{Z}^j \\ {\mathbf {\mathsf{{K}}}}_{{\Theta }}= {\,\mathrm{GRAD}\,} \varvec{\upkappa }_{{\Theta }}= \frac{\partial \kappa _{\Theta }^i}{\partial {\Theta }^j}\, {\mathbf{E}}_i \otimes \mathbf{Z}^j , \qquad {{\mathbf {\mathsf{{K}}}}}_{{\Theta }}^{-1}= {\,\mathrm{Grad}\,} \varvec{\upkappa }_{{\Theta }}^{-1}= \frac{\partial {\Theta }^i}{\partial {X}^j}\, \mathbf{Z}_i \otimes {\mathbf{E}}^j . \end{array} \end{aligned}$$
(35)

All quantities are depicted using bold letters in upright shape, i.e. serif type for vectors (e.g. \(\varvec{\Theta }, \mathbf {X}, \mathbf {x}, \mathbf {u}\)) and sans serif type for tensors of 2nd order (e.g. \({\mathbf {\mathsf{{K}}}}_{{\Theta }}, {\mathbf {\mathsf{{M}}}}_{{\Theta }}, {\mathbf {\mathsf{{F}}}}_\mathrm{X}\)).

The relationship between the referential gradient \({\,\mathrm{Grad}\,} {\mathbf {\mathsf{{H}}}}_\mathrm{X}\) and the intrinsic gradients \({\,\mathrm{GRAD}\,} {\mathbf {\mathsf{{H}}}}_{{\Theta }}\) and \({\,\mathrm{GRAD}\,}{\mathbf {\mathsf{{K}}}}_{{\Theta }}\) has been established in Sect. 3, see Eq. (16). Consequently, the matrix and coordinate versions can be derived yielding

$$\begin{aligned} \varvec{H}_{\text {X}} = \varvec{H}_{\Theta }\, \varvec{K}_{\Theta }^{-1}\quad \text {with}\quad \frac{\partial v_{\text {X}}^i}{\partial X^j} = \frac{\partial v_{\Theta }^i}{\partial {\Theta }^k} \; \frac{\partial {\Theta }^k}{\partial X^j} . \end{aligned}$$
(36)

Herein, the Jacobian matrix of the coordinate transformation is

$$\begin{aligned} \varvec{K}_{\Theta } \equiv {\varvec{J}}_{K_{\Theta }} = \left[ \frac{\partial \kappa _{\Theta }^i}{\partial {\Theta }^j} \right] \quad \text {with}\quad \varvec{K}^{-1}_{\Theta } \equiv {\varvec{J}}_{K_{\Theta }}^{-1} = \left[ \frac{\partial {\Theta }^i}{\partial X^j} \right] = \left[ \frac{\partial \kappa _{\Theta }^i}{\partial {\Theta }^j} \right] ^{-1} . \end{aligned}$$
(37)

The coefficient matrix \(\varvec{K}_{\Theta }\) of the tensorial geometry gradient \({\mathbf {\mathsf{{K}}}}_{{\Theta }}\) is labelled as Jacobian matrix \(\varvec{J}_{K_\Theta }\) of the coordinate transformation between intrinsic and referential coordinates. Here, \(\varvec{J}_{K_\Theta }\) is preferred over \(\varvec{K}_{\Theta }\) to distinguish it properly from the stiffness matrix \(\hat{\varvec{K}}\). Thus, Eq. (36) and a similar expression for local coordinates read

$$\begin{aligned} \varvec{H}_{\text {X}} = \varvec{H}_{\Theta }\, \varvec{K}_{\Theta }^{-1} = \varvec{H}_{\Theta }\, {\varvec{J}}_{K_{\Theta }}^{-1} \quad \text {and}\quad \varvec{H}_{\text {X}} = \varvec{H}_{\zeta }\, \varvec{K}_{\zeta }^{-1} = \varvec{H}_{\zeta }\, {\varvec{J}}_{K_{\zeta }}^{-1}\, . \end{aligned}$$
(38)

Similar results are available for the deformation gradient

$$\begin{aligned} \varvec{F}_{\text {X}} = \varvec{M}_{\Theta }\, \varvec{K}_{\Theta }^{-1} = \varvec{M}_{\Theta }\, {\varvec{J}}_{K_{\Theta }}^{-1} \quad \text {and}\quad \varvec{F}_{\text {X}} = \varvec{M}_{\zeta }\, \varvec{K}_{\zeta }^{-1} = \varvec{M}_{\zeta }\, {\varvec{J}}_{K_{\zeta }}^{-1}\, . \end{aligned}$$
(39)

The coefficient matrices \(\varvec{F}_\text {X}= [ x_{i,j} ] \) and \( \varvec{H}_\text {X}= [u_{i,j} ]\) are outlined above, where \(x_{i,j}\) and \(u_{i,j}\) denote derivatives of \(x_i\) and \(u_i\) with respect to \(X_j\), respectively. The unity matrix is \(\varvec{I} = [ \delta _{{ij}} ]\). The coefficient matrix of the 2. Piola-Kirchhoff stress tensor \(\varvec{S} = [S_{ij} ]\) can be written in Voigt notation \(\varvec{\bar{S}} = [ S_{11} , S_{22} ,S_{12} ]^\text {T}\). Similarly, \(\varvec{E} = [E_{ij} ]\) and \(\varvec{\bar{E}} = [ E_{11} , E_{22} , 2\, E_{12} ]^\text {T}\) are used for the Green-Lagrange strain tensor. Finally, \(\varvec{C} = [ C_{ij} ]\) is the corresponding Voigt matrix of a fourth-order elasticity tensor, i.e. either \(\mathbb C\) in the nonlinear case or \(\mathbb {E}\) in the linear case, respectively.

Remark 9

(From tensorial to matrix notation) The reduction of the general tensorial to a matrix notation with respect to Cartesian base vectors is a necessary step to obtain a numerical method. But, it is nearly impossible to generalise results obtained on the matrix level back to the more general tensorial theory.

4.3 Fundamentals of Finite Element Approximation

The finite element approximation is based on shape and Ansatz functions. Following the isoparametric concept, the state \(\varvec{u}\) and the geometry \(\varvec{X}\) are approximated by the same functions \(N_I(\varvec{\zeta })\) defined on a fixed (local) parameter space with (local) coordinates \((\zeta ^1,\zeta ^2,\zeta ^3)\). According to the classical Bubnov-Galerkin technique also the test functions are interpolated using the shape functions \(N_I(\zeta )\).

The state function \(\varvec{u}\), the test function \(\varvec{v}\) and the geometry \(\varvec{X}\) are approximated in every element \(\varvec{\mathcal {K}}_{e}\) in the form

$$\begin{aligned} \varvec{u}_{h}^e = \sum _{I=1}^n N_I\, \varvec{u}_I, \quad \varvec{v}_{h}^e = \sum _{I=1}^n N_I\, \varvec{v}_I \quad \text {and}\quad \varvec{X}_{h}^e = \sum _{I=1}^n N_I\, \varvec{X}_I \, . \end{aligned}$$
(40)

The corresponding displacement and design variations are

$$\begin{aligned} \delta \varvec{u}_h^e = \sum _{I=1}^n N_I\, \delta \varvec{u}_I \qquad \text {and}\qquad \delta \varvec{X}_{h}^e = \sum _{I=1}^n N_I\, \delta \varvec{X}_I \, , \end{aligned}$$
(41)

where n denotes the number of nodes per element. The vectors for nodal values read

$$\begin{aligned} \varvec{u}_I = \begin{bmatrix} u^1_I \\ u^2_I \end{bmatrix}, \; \varvec{v}_I = \begin{bmatrix} v^1_I \\ v^2_I \end{bmatrix}, \; \varvec{X}_I = \begin{bmatrix} X^1_I \\ X^2_I \end{bmatrix}, \; \delta \varvec{u}_I = \begin{bmatrix} \delta u^1_I \\ \delta u^2_I \end{bmatrix}, \; \delta \varvec{X}_I = \begin{bmatrix} \delta X^1_I \\ \delta X^2_I \end{bmatrix}. \end{aligned}$$
(42)

For notational simplicity, the explicit forms of all derived matrices are given for the two-dimensional case only.

The discrete residual and the tangent forms, see Sect. 2.2, can now be specified. The discrete element contributions \(R^e_h, k^e_h, p^e_h\) are collected over all elements and the element matrices \(\varvec{r}^e, \varvec{k}^e\) and \(\varvec{p}^e\) consists of all nodal contributions, i.e. overall

$$\begin{aligned} {R} (\varvec{u}_h, \varvec{X}_h;\varvec{v}_h)&= \sum _{e=1}^ nel \left[ \sum _{I=1}^n \varvec{v}_I^\text {T}\, \varvec{r}_I^e \right] = \hat{\varvec{V}}^\text {T}\, \hat{\varvec{R}}, \end{aligned}$$
(43)
$$\begin{aligned} k(\hat{\varvec{u}}_h ,\hat{\varvec{X}}_h; \varvec{v}_h, \delta \varvec{u}_h )&= \sum _{e=1}^ nel \left[ \sum _{I=1}^n \sum _{J=1}^n \varvec{v}_I^\text {T}\, \varvec{k}_{IJ}^e \, \delta \varvec{u}_J \right] = \hat{\varvec{V}}^\text {T}\, \hat{\varvec{K}}\, \delta \hat{\varvec{U}}, \end{aligned}$$
(44)
$$\begin{aligned} p(\hat{\varvec{u}}_h ,\hat{\varvec{X}}_h; \varvec{v}_h, \delta \varvec{X}_h )&= \sum _{e=1}^ nel \left[ \sum _{I=1}^n \sum _{J=1}^n \varvec{v}_I^\text {T}\, \varvec{p}_{IJ}^e \, \delta \varvec{X}_J \right] = \hat{\varvec{V}}^\text {T}\, \hat{\varvec{P}}\, \delta \hat{\varvec{X}}. \end{aligned}$$
(45)

The techniques to assemble the global quantities \(\hat{\varvec{U}}, \hat{\varvec{V}}, \hat{\varvec{X}}, \delta \hat{\varvec{U}}, \delta \hat{\varvec{X}}\) and \(\hat{\varvec{R}}, \hat{\varvec{K}}, \hat{\varvec{P}}\) are well-known, see Sect. 5 for hints on the implementation. Thus, the nodal contributions \(\varvec{r}^e_I, \varvec{k}^e_{IJ}\) and \(\varvec{p}^e_{IJ}\) still need to be specified.

Further details as well as the implementation of sensitivity relations of the material or inverse motion problem and for the dual or adjoint problem is given in [24].

4.4 FEM Approximations of Gradient and Divergence

The gradient and the divergence of any quantity \(\varvec{a}^e_h\), which is either \(\varvec{u}, \varvec{v}, \delta \varvec{u}\) or \(\delta \varvec{X}\), with respect to the approximation \(\varvec{X}^e_h\) of the referential geometry, defined on each element in form of Eq. (40), is given for

$$\begin{aligned} \varvec{a}^e_h = \sum _{I=1}^{ n } N_I\, \varvec{a}_I \quad \text {by}\quad {\,\mathrm{Grad}\,}\varvec{a}_h^e = \sum _{I=1}^n \varvec{a}_I\, \varvec{L}_I^\text {T}\quad \text {and}\quad {\,\mathrm{Div}\,} \varvec{a}_h^e = \sum _{I=1}^n \varvec{L}_I^\text {T}\, \varvec{a}_I , \end{aligned}$$
(46)

where \(\varvec{L}_I\) denotes the gradient of the shape function \(N_I\), i.e.

$$\begin{aligned} \varvec{L}_I := {\,\mathrm{Grad}\,} N_I = \begin{bmatrix} N_{I,1}&N_{I,2} \end{bmatrix}^\text {T}= \begin{bmatrix} N_{I,X}&N_{I,Y} \end{bmatrix}^\text {T}, \end{aligned}$$
(47)

where the notation (XY) can be used instead of \((X^1, X^2)\).

4.5 FEM Approximation of Variations of the Strain Tensor

The variation of the Green-Lagrange strain tensor \({\mathbf {\mathsf{{E}}}}\) with respect to the state \(\mathbf {u}\) is

$$\begin{aligned} {\mathbf {\mathsf{{E}}}}_{u}'(\mathbf {u},\delta \mathbf {u}) = {\mathrm{sym}} \left( {\mathbf {\mathsf{{A}}}}_{ u}^{\mathsf{{T}}}{\,\mathrm{Grad}\,}\delta \mathbf {u} \right) \quad \text {with}\quad {\mathbf {\mathsf{{A}}}}_{ u} := {\mathbf {\mathsf{{F}}}}_\mathrm{X}, \end{aligned}$$

see Eq. (20). The corresponding finite element approximation can be written as

$$\begin{aligned} \varvec{\bar{E}}_{u}'(\varvec{u}_h,\delta \varvec{u}_h) = \begin{bmatrix} (E_{u}')_{11}&(E_{u}')_{22}&2 \,(E_{u}')_{12} \end{bmatrix}^\text {T}= \sum _{I=1}^n \varvec{B}_{uI}\delta \varvec{u}_I \end{aligned}$$
(48)

with

$$\begin{aligned} \varvec{B}_{uI} = \begin{bmatrix} A_u^{11}\,N_{I,X}&A_u^{21}\,N_{I,X} \\ A_u^{12}\,N_{I,Y}&A_u^{22}\,N_{I,Y} \\ A_u^{11}\,N_{I,Y}+A_u^{12}\,N_{I,X} \;\;\;&A_u^{21}\,N_{I,Y}+A_u^{22}\,N_{I,X} \end{bmatrix}\, . \end{aligned}$$
(49)

Furthermore, the design variation of \({\mathbf {\mathsf{{E}}}}\) has been introduced in Eq. (20) too

The finite element approximation can be written in the same manner as above

$$\begin{aligned} \varvec{\bar{E}}_{X}'(\mathbf {u}_h,\delta \mathbf {X}_h) = \begin{bmatrix} (E_{X}')_{11}&(E_{X}')_{22}&2 \,(E_{X}')_{12} \end{bmatrix}^\text {T}= \sum _{I=1}^n \varvec{B}_{sI}\delta \varvec{X}_I \end{aligned}$$
(50)

with

$$\begin{aligned} \varvec{B}_{sI} = \left[ \begin{array}{cc} A_X^{11}\,N_{I,X} &{} A_X^{21}\,N_{I,X} \\ A_X^{12}\,N_{I,Y} &{} A_X^{22}\,N_{I,Y} \\ A_X^{11}\,N_{I,Y}+A_X^{12}\,N_{I,X} \;\;\; &{} A_X^{21}\,N_{I,Y}+A_X^{22}\,N_{I,X} \end{array}\right] . \end{aligned}$$
(51)

4.6 Approximation of Residual and Tangent Forms

Using the above introduced finite element approximations, the nodal contributions of the discrete element residual vector at node I is given by

$$\begin{aligned} \varvec{r}_I^e = \int _{\varvec{\mathcal {K}}^{e}} \varvec{B}_{uI}^\text {T}\, \varvec{\bar{S}} \,\mathrm{d}V_\mathrm{X} - \varvec{f}^e_I. \end{aligned}$$
(52)

The vector \(\varvec{f}^e_I\) is the standard nodal vector of the external forces. Furthermore, the nodal contributions of the element matrices \(\varvec{k}^e\) and \(\varvec{p}^e\) are obtained as

$$\begin{aligned} \varvec{k}^e_{IJ} =\int _{\varvec{\mathcal {K}}^{e}} \left\{ \, \varvec{B}_{uI}^\text {T}\varvec{C}\varvec{B}_{uJ} + \varvec{L}_I^\text {T}\varvec{S}\varvec{L}_J \varvec{I} \,\right\} \,\mathrm{d}V_\mathrm{X} , \end{aligned}$$
(53)
$$\begin{aligned} \varvec{p}^e_{IJ} =&\int _{\varvec{\mathcal {K}}^{e}} \left\{ \, \varvec{B}_{uI}^\text {T}\varvec{C} \varvec{B}_{sJ} - \varvec{L}_I^\text {T}\varvec{S}\varvec{L}_J \varvec{H} - \varvec{F}\varvec{S}\varvec{L}_J\varvec{L}_I^\text {T}+ \varvec{F}\varvec{S}\varvec{L}_I\varvec{L}_J^\text {T}\,\right\} \,\mathrm{d}V_\mathrm{X} \nonumber \\&-\int _{\varvec{\mathcal {K}}^{e}} N_I\,\varvec{b}_\text {X}\,\varvec{L}_J^\text {T}\,\mathrm{d}V_\mathrm{X} . \end{aligned}$$
(54)

Remark 10

(Similarity of stiffness and pseudo load matrix) It is important to observe that the structures of stiffness and pseudo load computations are fully similar. Thus, sensitivity information can be derived, implemented and computed on the element level with a small additional effort compared to ‘standard’ FEM computations.

4.7 Possible Fields of Application

There is a great number of fields where the presented sensitivity relations can be applied. All quantities are derived with respect to coordinates of FE-nodes. Parameter free shape optimisation can be performed based on these derivatives utilising some additional tools like filters and mesh control techniques. Recent works on this topic are [1, 9, 15, 22, 32]. Gradients for geometry based shape optimisation can be calculated extending the presented sensitivities by the corresponding design velocity fields. R-adaptivity is concerned with improvement of finite element solution on the same mesh. Here, the number of degrees of freedom and mesh topology are fixed. Only the mesh form is changed. A review, much more details and examples on this topic can be found in [26]. Fracture mechanics deals with the propagation of cracks in materials. Here, the strain energy release and the direction of crack growth can be directly derived from the material residuum, see [25] for details and examples. Furthermore, the technique was applied to history dependent problems, see [7].

Last but not least, the pseudo load and sensitivity matrices \(\hat{\varvec{P}}\) and \(\hat{\varvec{S}}\), respectively, can be decomposed using a singular value decomposition (SVD). The insight gained from the singular value structure and from the interpretation of the corresponding singular vectors can be used for model reduction, see [15].

5 Details on Numerical Implementation

In this section, we present a prototype implementation of the quantities and topics concerned with structural optimisation introduced in the previous chapters. Therefore, the well-known structure of the nonlinear finite element method is extended to sensitivity analysis, i.e. the pseudo load matrix \(\hat{\varvec{P}}\) from Eq. (54) is added. However, we do not focus on general details of FEM, see the standard literature on finite element analysis, for example [8, 10, 35, 36].

The presented Matlab code, i.e. the element routine, is part of an educational in-house finite element analysis environment for general nonlinear problems. We concentrate on the plane strain two-dimensional case using a quadrilateral four node element with bilinear shape functions, which is sufficient to explain the necessary steps for sensitivity analysis. The extension to three dimensions and to higher order elements is straightforward.

We slightly differ from the notation used in the previous sections in order to avoid super- and subindices, but the meaning of the variables in the code should be obvious. We abbreviate the Cartesian and local coordinates \((X^1, X^2)\) and \((\zeta ^1, \zeta ^2)\) with \((\mathtt {X}, \mathtt {Y})\) and \((\mathtt {a}, \mathtt {b})\), respectively.

We name the function containing the element matrices

figure a

for the referred plane, pure displacement formulation for nonlinear problems. The overall implementation can be found in the appendix. Its integration into an already existing environment for structural analysis is easy to handle by using the standard Matlab syntax for function calls

[Out1, Out2, ...] = FunctionName(In1, In2, ...).

The input quantities, namely \(\mathtt {coorde}, \mathtt {mate}, \mathtt {be}, \mathtt {Ue}\), contain the nodal coordinates of the current element, properties of the chosen material, information about body forces per unit volume acting on the system and the displacements for all degrees of freedom of the element, respectively. These details are specified below.

The discretisation of the domain delivers a matrix with the global \(\mathtt {X}\)- and \(\mathtt {Y}\)-coordinates of all nodes of the generated mesh. On element level, the necessary coordinate matrix for the plane two-dimensional case has the form

$$\begin{aligned} \mathtt {coorde} = \begin{bmatrix} \mathtt {X_1}&\ldots&\mathtt {X_n} \\ \mathtt {Y_1}&\ldots&\mathtt {Y_n} \\ \end{bmatrix}^\mathtt {T} = \begin{bmatrix} \mathtt {X_1}&\mathtt {X_2}&\mathtt {X_3}&\mathtt {X_4} \\ \mathtt {Y_1}&\mathtt {Y_2}&\mathtt {Y_3}&\mathtt {Y_4} \\ \end{bmatrix}^\mathtt {T} \, , \end{aligned}$$
(55)

where \(\mathtt {n}\) is the overall number of nodes of the element and in our case is \(\mathtt {n=4}\). Furthermore, the introduced matrix mate contains the material properties of the current element with the components mate(1) for the Young’s modulus, mate(2) for the Poisson’s ration and mate(3) for the thickness of the element. The matrix be represents the body forces per unit volume in the possible directions \(\mathtt {X}\) and \(\mathtt {Y}\), i.e. it contains the components \(\mathtt {be} = \begin{bmatrix} \mathtt {b_X}&\mathtt {b_Y} \end{bmatrix}^\mathtt {T}\). The last input value Ue includes the displacements of all nodes in the directions \(\mathtt {X}\) and \(\mathtt {Y}\). Therefore, its dimension is the number of degrees of freedom of the current element \(\mathtt {ndof \times 1}\) and in the referred case \(\mathtt {8 \times 1}\)

$$\begin{aligned} \mathtt {Ue} = \begin{bmatrix} \mathtt {U_1}&\ldots&\mathtt {U_{ndof}}\\ \end{bmatrix}^\mathtt {T} = \begin{bmatrix} \mathtt {U_1}&\mathtt {U_2}&\mathtt {U_3}&\mathtt {U_4}&\mathtt {U_5}&\mathtt {U_6}&\mathtt {U_7}&\mathtt {U_8}\\ \end{bmatrix}^\mathtt {T}. \end{aligned}$$
(56)

The output quantities \(\mathtt {Rint}\) for the internal residual, \(\mathtt {Fvol}\) for the contribution of body forces to the external residual, \(\mathtt {K}\) as the well known tangent stiffness matrix and the tangent pseudo load matrix \(\mathtt {P}\) were already introduced in the previous sections.

We apply Gauss quadrature with four Gauss points stored in matrix \(\mathtt {gpoints}\) with the four related weights in \({\texttt {weights}}\), which are organised within an external function

figure b

and provide the matrix representations for the chosen \(\mathtt {numgp=4}\) integration points

$$\begin{aligned} \mathtt {gpoints} = \begin{bmatrix} \mathtt {a_1}&\mathtt {a_2}&\mathtt {a_3}&\mathtt {a_4} \\ \mathtt {b_1}&\mathtt {b_2}&\mathtt {b_3}&\mathtt {b_4} \end{bmatrix}^\mathtt {T}, \qquad \texttt {weights} = \begin{bmatrix} \mathtt {w_1}&\mathtt {w_2}&\mathtt {w_3}&\mathtt {w_4} \end{bmatrix}^\mathtt {T}. \end{aligned}$$
(57)

The bilinear shape functions are delivered by an external function as well

figure c

and depend on the local coordinates \(\mathtt {a,b}\) of the integration points and the coordinates of the nodes of the element. The output matrices contain the shape functions, summarised in \(\mathtt {Nmat}\), the derivatives of the shape functions with respect to the global coordinates \(\mathtt {X}\) and \(\mathtt {Y}\), summarised in \(\mathtt {N\_X,N\_Y}\) and the determinant of the Jacobian \(\mathtt {detJ}\). The explicit forms of the matrices are as follows

$$\begin{aligned} \mathtt {Nmat} = \begin{bmatrix} \mathtt {N_1}&\mathtt {0}&\mathtt {N_2}&\mathtt {0}&\mathtt {N_3}&\mathtt {0}&\mathtt {N_4}&\mathtt {0} \\ \mathtt {0}&\mathtt {N_1}&\mathtt {0}&\mathtt {N_2}&\mathtt {0}&\mathtt {N_3}&\mathtt {0}&\mathtt {N_4} \\ \end{bmatrix} \end{aligned}$$
(58)

and

$$\begin{aligned} \mathtt {N\_X} = \begin{bmatrix} \mathtt {N_{1,X}}&\mathtt {N_{2,X}}&\mathtt {N_{3,X}}&\mathtt {N_{4,X}} \end{bmatrix}^\mathtt {T}, \qquad \mathtt {N\_Y} = \begin{bmatrix} \mathtt {N_{1,Y}}&\mathtt {N_{2,Y}}&\mathtt {N_{3,Y}}&\mathtt {N_{4,Y}} \end{bmatrix}^\mathtt {T}. \end{aligned}$$
(59)

The gradient of the displacements is performed by the function

figure d

and delivers a matrix

$$\begin{aligned} \mathtt {Grad u} = \begin{bmatrix} \mathtt {u_{1,X}}&\mathtt {u_{1,Y}} \\ \mathtt {u_{2,X}}&\mathtt {u_{2,Y}} \\ \end{bmatrix} . \end{aligned}$$
(60)

Different constitutive equations, for example St. Venant or Neo-Hooke, can be used. The \(\mathrm {(3 \times 3)}\) material matrix \(\mathtt {C}\) and the \(\mathrm {(2 \times 2)}\) matrix \(\mathtt {S}\) of the 2. Piola-Kirchhoff stresses are computed in the external function

figure e

The number of degrees of freedom \(\mathtt {dof}\) for the current node are computed using

figure f

Here, \(\mathtt {dof}\) is the number of overall degrees of freedom per node and \(\mathtt {ni}\) is the number of the current node of interest. Same holds true for the node \(\mathtt {nj}\).

Due to the fact, that the B-operator has a similar structure for each necessary case, we introduce the external function \(\mathtt {Bmat}\) for its computation

figure g

Here, the introduced derivatives of the shape functions \(\mathtt {N\_X,N\_Y}\) and a matrix \(\mathtt {A}\) are the required inputs. The matrix \(\mathtt {A}\) represents the matrix representation \(\mathtt {A\_u} = \mathtt {F}\) of the deformation gradient for the matrices for structural analysis or \(\mathtt {A\_X} = -\mathtt {Grad u}^\mathtt {T} \mathtt {F}\) for the contribution to the pseudo load matrix within sensitivity analysis

figure h
figure i

In the end and with all given hints the element matrices and simultaneously the outputs of the element function can be computed. All output quantities use the number of degrees of freedom for the determination of their dimensions. Therefore, the internal residual \(\mathtt {Rint}\) as well as the contribution of the body forces to the external residual \(\mathtt {Fvol}\) have the dimension \(\mathtt {ndof \times 1=8 \times 1}\) and are organised as follows

$$\begin{aligned} \mathtt {Rint} = \begin{bmatrix} \mathtt {R_1}&\mathtt {R_2}&\ldots&\mathtt {R_{ndof}} \end{bmatrix}^\mathtt {T} = \begin{bmatrix} \mathtt {R_1}&\mathtt {R_2}&\mathtt {R_3}&\mathtt {R_4}&\mathtt {R_5}&\mathtt {R_6}&\mathtt {R_7}&\mathtt {R_8} \end{bmatrix}^\mathtt {T} \end{aligned}$$
(61)

and

$$\begin{aligned} \mathtt {Fvol} = \begin{bmatrix} \mathtt {F_1}&\mathtt {F_2}&\ldots&\mathtt {F_{ndof}} \end{bmatrix}^\mathtt {T} = \begin{bmatrix} \mathtt {F_1}&\mathtt {F_2}&\mathtt {F_3}&\mathtt {F_4}&\mathtt {F_5}&\mathtt {F_6}&\mathtt {F_7}&\mathtt {F_8} \end{bmatrix}^\mathtt {T}. \end{aligned}$$
(62)

The computation of \(\mathtt {Fvol}\) for the contribution of body loads to external residual vector \(\mathtt {Rext}\) is realised in the following lines

figure j

where \(\mathtt {dV}\) results from the integration over the domain.

For the physical residual vector \(\mathtt {Rint}\) the B-operator \(\mathtt {Bui}\) as well as the vector representation of the 2. Piola-Kirchhoff stresses

figure k

is necessary and can be updated for each integration point as follows

figure l

The symmetric tangent stiffness matrix \(\mathtt {K}\) and the tangent pseudo load matrix \(\mathtt {P}\), which is not symmetric in general, have the same structure and are both of the dimension \(\mathtt {ndof} \times \mathtt {ndof = 8 \times 8}\). Their computation is pretty similar and can be organised even in the same loops over the nodes, due to similar dependencies

figure m
figure n

Section 7 shows a simple application of the presented approach for sensitivity analysis. It is useful to comprehend the mentioned aspects and can be easily realised within tutorials or lectures on structural optimisation using the presented element formulation.

6 Analytical Derivatives of Discrete Equations

The discrete differentiation approach focuses on the discrete matrix formulation which has been derived for the finite element method, see Fig. 1. In this approach, all derivatives of the discrete functions with respect to the discrete variables are computed based on standard calculus, i.e. using chain and product rules. The method is well-known with extensive discussion in literature, see e.g. [11, 21]. Nevertheless, a few details are presented to highlight essential differences. For simplicity, the design variable s represents any nodal coordinate \(X_I^i\) with \(i=1,2 \) and \(I=1,2,3,4\). Furthermore, we abbreviate the Jacobian matrix by \(\varvec{J}\) and its determinant by \(J = \det \varvec{J}\).

6.1 Design Derivatives of Shape Functions and Jacobians

The isoparametric concept is an important concept in FEM and the computation of the Cartesian derivatives of the shape functions and of the Jacobian determinant play a central role in the discrete differentiation approach.

Remark 11

(Isoparametric concept is derived from continuous theory) In teaching finite elements, the (iso-) parametric technique to compute the Cartesian derivatives of the shape functions is often argued to be a novel concept introduced by FEM. This is wrong, because the underlying structure of differential geometry has been ignored.

Thus, the analytical or numerical differentiation of discrete functions belonging to the (iso-) parametric technique re-compute those results which are already available in more general form on the continuous level. Instead of using results from Sect. 3.3, Eq. (16) applied to the displacement approximation (40) is differentiated again

$$\begin{aligned} \frac{\partial }{\partial s} \begin{bmatrix} N_{I,X}&N_{I,Y} \end{bmatrix} =\frac{\partial }{\partial s} \left( \begin{bmatrix} N_{I,a}&N_{I,b} \end{bmatrix} \varvec{J}^{-1}\right) = \begin{bmatrix} N_{I,a}&N_{I,b} \end{bmatrix} \frac{\partial }{\partial s}\varvec{J}^{-1}. \end{aligned}$$
(63)

The Jacobian \(\varvec{J}\) as discrete version of \({\mathbf {\mathsf{{K}}}}_{\zeta }\) or \(\varvec{K}_{\zeta } \equiv {\varvec{J}}_{K_{\zeta }}\), see Eq. (37), is given by

$$\begin{aligned} \varvec{J} = \begin{bmatrix} X_{,a}&X_{,b} \\ Y_{,a}&Y_{,b} \end{bmatrix} = \begin{bmatrix} X_1&X_2&X_3&X_4 \\ Y_1&Y_2&Y_3&Y_4 \end{bmatrix} \begin{bmatrix} N_{1,a}&N_{1,b} \\ N_{2,a}&N_{2,b} \\ N_{3,a}&N_{3,b} \\ N_{4,a}&N_{4,b} \end{bmatrix} . \end{aligned}$$
(64)

The derivative of the inverse of the Jacobian with respect to nodal coordinates or design variables can be obtained using the identity \(\varvec{I}=\varvec{J}^{-1}\varvec{J}\) which leads to

$$\begin{aligned} \frac{\partial \varvec{I}}{\partial s}= \frac{\partial \varvec{J}^{-1}}{\partial s}\varvec{J}+\varvec{J}^{-1}\frac{\partial \varvec{J}}{\partial s}=\varvec{0} \quad \text {and therefore to} \quad \frac{\partial \varvec{J}^{-1}}{\partial s}=-\varvec{J}^{-1}\frac{\partial \varvec{J}}{\partial s}\varvec{J}^{-1}. \end{aligned}$$
(65)

The design variable s is an abbreviation for the nodal coordinates \(X_I, Y_I\) of all nodes \(I=1,2,3,4\) of the element. Thus, the design derivative of Eq. (64) yields

$$\begin{aligned} \frac{\partial \varvec{J}}{\partial s} = {\left\{ \begin{array}{ll} \begin{array}{l} \begin{bmatrix} N_{I,a} &{} N_{I,b} \\ 0 &{} 0 \end{bmatrix} \quad \text {for}\quad s = X_I \\ \\ \begin{bmatrix} 0 &{} 0 \\ N_{I,a} &{} N_{I,b} \end{bmatrix} \quad \text {for}\quad s = Y_I \end{array} \end{array}\right. }. \end{aligned}$$
(66)

Further necessary quantity is the first derivative of the determinant of the Jacobian \(J = \det \varvec{J} = X_{,a}Y_{,b}-Y_{,a}X_{,b}\). It can be obtained by performing the product rule

$$\begin{aligned} \frac{\partial J}{\partial s} =\frac{\partial X_{,a}}{\partial s} Y_{,b} + X_{,a} \frac{\partial Y_{,b}}{\partial s} - \frac{\partial Y_{,a}}{\partial s} X_{,b} - Y_{,a} \frac{\partial X_{,b}}{\partial s}. \end{aligned}$$
(67)

The nonlinear B-operator \(\varvec{B}_{uI}\) is quoted in Eq. (49). In the framework of the discrete sensitivity analysis its derivative with respect to the design variables has to be provided, i.e. every element of \(\varvec{B}_{uI}\) must be differentiated. With the introduced quantity \(\varvec{A}_u=\varvec{F}_X = \varvec{I} + {\,\mathrm{Grad}\,} \varvec{u}\), see Sect. 4.5, its derivative corresponds to the derivative of the deformation gradient

$$\begin{aligned} \frac{\partial \varvec{A}_u}{\partial s} = \frac{\partial \varvec{F}_X}{\partial s} = \frac{\partial }{\partial s} (\varvec{I} + {\,\mathrm{Grad}\,} \varvec{u}) = \frac{\partial {\,\mathrm{Grad}\,} \varvec{u}}{\partial s}. \end{aligned}$$
(68)

The definition of the gradient in Eq. (46) allows the computation of the derivative with respect to the nodal coordinates or the design variables in the following way

$$\begin{aligned} \frac{\partial {\,\mathrm{Grad}\,} \varvec{u} }{\partial s} = \frac{\partial }{\partial s} \left( \sum _{I=1}^{n} \varvec{u}_I \varvec{L}_I^\text {T}\right) = \sum _{I=1}^{n} \varvec{u}_I \frac{\partial \varvec{L}_I^\text {T}}{\partial s} = \sum _{I=1}^{n} \varvec{u}_I \begin{bmatrix} \frac{\partial N_{I,X}}{\partial s}&\frac{\partial N_{I,Y}}{\partial s} \end{bmatrix}. \end{aligned}$$
(69)

6.2 Design Derivatives of the Linear Stiffness Matrix

In the framework of a static and linear finite element analysis, the discrete equilibrium condition is usually presented as \(\hat{\varvec{K}}\, \hat{\varvec{U}}= \hat{\varvec{F}}\). Thus, sensitivity analysis reads

$$\begin{aligned} \frac{\partial \hat{\varvec{K}}}{\partial s}\; \hat{\varvec{U}}+ \hat{\varvec{K}}\, \frac{\mathrm{d}\hat{\varvec{U}}}{\mathrm{d}s} = \frac{\partial \hat{\varvec{F}}}{\partial s}\quad \text {and therefore}\quad \frac{\mathrm{d}\,\hat{\varvec{U}}}{\mathrm{d}s} = \hat{\varvec{K}}^{-1}\, \left[ \frac{\partial \hat{\varvec{F}}}{\partial s} - \frac{\partial \hat{\varvec{K}}}{\partial s}\; \hat{\varvec{U}}\right] , \end{aligned}$$
(70)

where s is a scalar valued design variable. This approach suggests to differentiate the linear stiffness matrix by applying the chain rule to all element contributions \(\varvec{k}_e\)

$$\begin{aligned} \frac{\partial \varvec{k}_e}{\partial s}&= \frac{\partial }{\partial s}\left( \int _{\varvec{\mathcal {R}}^{e}}{\varvec{B}^\text {T}\varvec{C}\varvec{B}\, J\,\mathrm{d}V_{\zeta }}\right) = \int _{\varvec{\mathcal {R}}^{e}}{\frac{\partial }{\partial s}\left( \varvec{B}^\text {T}\varvec{C}\varvec{B}\, J\right) }\,\mathrm{d}V_{\zeta } \nonumber \\&= \int _{\varvec{\mathcal {R}}^{e}}{\left( \frac{\partial \varvec{B}^\text {T}}{\partial s}\varvec{C}\varvec{B}+\varvec{B}^\text {T}\varvec{C}\frac{\partial \varvec{B}}{\partial s}\right) \, J}\,\mathrm{d}V_{\zeta } + \int _{\varvec{\mathcal {R}}^{e}}{\varvec{B}^\text {T}\varvec{C}\varvec{B}\frac{\partial J}{\partial s}} \, \mathrm{d}V_{\zeta }, \end{aligned}$$
(71)

where the analytical derivatives of \(\varvec{B}\) and J are discussed above.

Remark 12

(No derivative of the stiffness matrix is necessary) The variational sensitivity analysis emphasises that the continuous residuum (weak form) must be varied or alternatively, that the discrete residual vector must be differentiated. The special form \(\hat{\varvec{K}}\, \hat{\varvec{U}}= \hat{\varvec{F}}\) is irritating and leads to a higher effort than needed, i.e. additional analytical derivatives must be derived and must be implemented. Last but not least, the computational performance is less efficient as outlined in Sect. 7.

6.3 Design Derivatives of Nonlinear Residual Vectors

Referring Remark 12, the design sensitivity analysis for the static nonlinear case has to be performed starting with the discrete equilibrium condition for finite element analysis introduced in Eq. (52). In detail, the derivative with respect to the scalar valued design variable s can be evaluated by

$$\begin{aligned} \frac{\partial \varvec{r}_I^e}{\partial s} = \frac{\partial }{\partial s} \left( \int _{\varvec{\mathcal {K}}^{e}} { \varvec{B}_{uI}^\text {T}\varvec{{\bar{S}}}}\,\mathrm{d}V_{\mathrm{X}} - \varvec{f}_I^e\right) . \end{aligned}$$
(72)

For the internal part of the residual the derivative reads

$$\begin{aligned} \frac{\partial }{\partial s}\int _{\varvec{\mathcal {K}}^{e}}{\varvec{B}_{uI}^\text {T}\varvec{{\bar{S}}} }\,\mathrm{d}V_\mathrm{X}&= \frac{\partial }{\partial s} \int _{\varvec{\mathcal {R}}^{e}}{\varvec{B}_{uI}^\text {T}\varvec{{\bar{S}}} \, J}\,\mathrm{d}V_{\zeta } = \int _{\varvec{\mathcal {R}}^{e}}{ \frac{\partial }{\partial s} \left( \varvec{B}_{uI}^\text {T}\varvec{{\bar{S}}} J \right) }\,\mathrm{d}V_{\zeta } \nonumber \\&= \int _{\varvec{\mathcal {R}}^{e}}{ \left( \frac{\partial \varvec{B}_{uI}^\text {T}}{\partial s} \varvec{{\bar{S}}} + \varvec{B}_{uI}^\text {T}\frac{\partial \varvec{\bar{S}}}{\partial s} \right) \, J }\,\mathrm{d}V_{\zeta } + \int _{\varvec{\mathcal {R}}^{e}}{\varvec{B}_{uI}^\text {T}\varvec{{\bar{S}}} \frac{\partial J}{\partial s} }\,\mathrm{d}V_{\zeta } \end{aligned}$$
(73)

and similar for the external part

$$\begin{aligned} \frac{\partial \varvec{f}_I^e}{\partial s} = \frac{\partial }{\partial s}\int _{\varvec{\mathcal {K}}^{e}}{ N_I \varvec{b}_I }\,\mathrm{d}V_\mathrm{X} = \frac{\partial }{\partial s} \int _{\varvec{\mathcal {R}}^{e}}{ N_I \varvec{b}_I \, J }\,\mathrm{d}V_{\zeta } = \int _{\varvec{\mathcal {R}}^{e}}{ N_I \varvec{b}_I \frac{\partial J}{\partial s} }\,\mathrm{d}V_{\zeta } . \end{aligned}$$
(74)

The essential steps for the derivative of the nonlinear B-operator and of the Jacobian determinant are already detailed in Sect. 6.1. For the derivative of stresses \(\varvec{S}\) the derivative of strains \(\varvec{E}=\frac{1}{2}(\varvec{F}^\text {T}\varvec{F} - \varvec{I}) = \frac{1}{2}\left( \varvec{H}^\text {T}+ \varvec{H} + \varvec{H}^\text {T}\varvec{H}\right) \) with \(\varvec{H} = {\,\mathrm{Grad}\,} \varvec{u}\) has to be discussed. The derivative of \(\varvec{H}\) can be found in Eq. (69). A lot of further aspects and details concerning sensitivity analysis of nonlinear systems are discussed and presented in [21] as well.

Remark 13

(Comparable quantities should not be treated differently) It has been shown, that the stiffness matrix and pseudo load matrix originate from partial variations of the residual with respect to displacements or design, respectively. It is common and good practice in computational mechanics, to perform all variations with respect to the state variables on the continuous level before applying a subsequent discretisation step. But it is a strong discrepancy, if the differentiation of the discrete residual vector is advocated for deriving the pseudo load matrix.

7 Numerical Example

The example illustrates the usage of the variational design sensitivity analysis and should serve as a benchmark problem suitable for comparing different sensitivity analysis techniques. It is equally applicable for linear and nonlinear problems.

7.1 Structural Optimisation Problem

The dimensions of the structure (height and width) are \(h=2\) and \(w=6\). The geometry is defined by a Bézier patch with 8 control points and the corresponding control polygon is pictured in Fig. 4b. The material properties are Young’s modulus \(E=21000\) and Poisson’s ratio \(\nu =0.3\). The constitutive model is either the classical Hooke’s law in the linear case or the Neo-Hooke’s law in the nonlinear case. The load \(\bar{q}=3\) is a line load. The applied boundary conditions are pictured in Fig. 4a. The FE-mesh consists of 675 elements and 736 nodes with 1472 degrees of freedom.

Fig. 4
figure 4

Cantilever beam: initial structure. a Mechanical system. b Optimisation model

Vertical positions (y coordinates) of 4 lower control points are used as design variables. The vertical displacement \(u_l\) of the upper right corner is to be minimised taking into account a constant volume constraint \(V=V_0\). Here, V and \(V_0\) denote the current and initial volumes. The resulting force Q of the line load \(\overline{q}\) is kept constant.

Fig. 5
figure 5

Cantilever beam: optimisation results. a Displacement history. b Optimised design

Sequential quadratic programming (SQP) is utilised to solve the optimisation problem. The algorithm converges after sixteen iterations. The corresponding iteration history (steps 0–15) for the objective function is pictured in Fig. 5a. The displacement \(u_l\) is decreased to about two-thirds of its initial value. The optimised design in terms of nonlinear structural analysis is presented in Fig. 5b. The structure is stiffened with respect to bending stress.

7.2 Performance Comparison of Different Strategies

Performance tests have been run for linear and nonlinear structural analysis. In each case, the computation of the pseudo load matrix using either the variational formulation \(\varvec{\hat{P}}_{\mathrm {var}}\), see Sect. 4, or the discrete formulation \(\varvec{\hat{P}}_{\mathrm {dis}}\), see Sect. 6, have been performed. The absolute as well as the relative computation times for assembling the pseudo load matrices referred to the computation time for assembling the stiffness matrix \(\varvec{\hat{K}}\) are presented in Table 1.

Table 1 Computation times for pseudo load matrices

Referring this times, the usage of the variational formulation provides a speed up of 2.5 for the linear and of 2.9 for the nonlinear computations in contrast to the discrete formulation. Beyond that, the times prove that the effort for the provision of the (nonlinear) pseudo load matrix using the variational formulation is in the same range as for the stiffness matrix. Due to the fact, that the linear stiffness matrix is constant and independent of displacements, the factors differ bit more than for the nonlinear case. Regarding the overall computation time for the presented example in the previous section, one ends up at least with a speed up of 1.3 for the nonlinear and of 1.7 for the linear case.

Remark 14

(Variational technique shows superior computational performance) The invested effort into a rigorous theoretical development and its careful implementation yields a minimal number of floating-point operations compared to the discrete differentiation approach. This advantage remains for all advanced computational techniques such as High Performance Computing (HPC) on all available hardware. Thus, in a long term run, there is no alternative to an investment in theoretical rigour.

8 Conclusions

The proposed variational design sensitivity analysis is considered to be the most efficient technique to determine the gradients of objective or constraint functions with respect to design variables in structural optimisation. The effort of a rigorous separation of physical quantities into geometry and displacement mappings based on an intrinsic presentation of continuum mechanics pays off with fundamental insight.

Moreover, the quote There’s nothing more practical than a good theory, see [23], perfectly characterises the outlined benefits of a thorough theoretical investigation for the subsequent discretisation, implementation and computation of design sensitivity analysis in structural optimisation. Overall fourteen remarks, embedded in the text, substantiate the correctness of this statement.