# Code verification examples based on the method of manufactured solutions for Kirchhoff–Love and Reissner–Mindlin shell analysis

## Abstract

We propose code verification examples based on the method of manufactured solutions (MMS) for Kirchhoff–Love and Reissner–Mindlin shell analysis. In order to ensure the credibility of numerical simulations reliable software has to be provided. Code verification is the process of ensuring that there are no coding mistakes in the implementation and that the algorithms work properly. The MMS is an elegant method to derive exact solutions to boundary value problems which can be used for rigorous order of accuracy tests within the code verification process. We apply the proposed tests to an in-house developed finite element research code implementing elements for Kirchhoff–Love and Reissner–Mindlin shell analysis.

## Introduction

In order to ensure the reliability of complex computational models, verification and validation ($$V \& V$$) are unavoidable tasks [1, 2]. In the present paper, we follow the concepts on $$V \& V$$of The American Society of Mechanical Engineers guideline [3]. The process of validation determines how accurate the model represents the real situation. The aim of verification is to show that the simulation results are able to represent accurately the solution of the underlying mathematical model. Thus, one is interested in the numerical error, which is the difference between the simulation results and the exact solution of the mathematical model. The comparison of simulation results with experimental data is only feasible if the results are not significantly influenced by the numerical error. Therefore, the process of verification has to precede the validation process. Verification activities can be split into code verification and calculation verification. Code verification represents the process of demonstrating that the governing equations, as implemented in the code, are solved consistently. Calculation verification is the assessment (estimation) of the numerical error in situations where no exact solution is known [4].

According to [5], the most rigorous tests for code verification are the order-of-accuracy tests. For any discretization method, we expect that the discretization error decreases as the mesh is refined. Within an order-of-accuracy test, the observed rate of decrease in the discretization error is compared with the theoretical rate. In order to evaluate the discretization error exact solutions are needed. These exact solutions can be constructed by the method of manufactured solutions (MMS) [1, 5,6,7,8]. Its central idea is to prescribe a solution and to determine an artificial source term which is added to the governing equations, such that the modified equations are fulfilled for the prescribed solution. The MMS can be applied to a wide range of problems. It has been applied to Reynolds-averaged Navier–Stokes solvers [9], nonlinear membrane elements [10], within fluid structure interaction [11, 12], conjugate heat transfer solvers [13], Cahn–Hilliard equation [14], and others.

Within shell analysis, the task is to predict the mechanical response of a thin curved structure. A structure is characterized as thin if one space dimension has a much smaller extension than the other two. Within this geometric setting, a direct solution of the three-dimensional problem is difficult. Therefore, many different shell models exist (see [15] for an overview). In a number of recent papers [16,17,18,19,20,21] advanced numerical approaches for shell analysis have been developed. In these contributions, order-of-accuracy tests were presented only for special cases. For more general cases, benchmark examples from the shell obstacle course [22] were used. This set of problems consists of the Scordelis-Lo roof problem, the pinched cylinder with a diaphragm, and the hemispherical shell problem. This problem set was introduced in order to compare the performance of different finite elements with respect to locking and accurate representation of rigid body motions. Using this set for code verification one shortcoming is the lack of generality in geometry, since only cylindrical and spherical geometries are taken into consideration. Another drawback is that there are only reference displacement values available, which are obtained by numerical simulation. Therefore, no order-of-accuracy tests are possible.

In the present paper, we investigate code verification of finite element codes for shell analysis based on the MMS. Thus, an exact solution is available and an order of accuracy test can be applied. We propose a series of verification examples with increasing complexity. We apply each test to a research code, which implements high order finite elements for Kirchhoff–Love and Reissner–Mindlin shells.

## Shell models and finite element method

In this section, the Kirchhoff–Love and the Reissner–Mindlin shell theory is recalled and the finite element formulation is given briefly.

### The 3D shell problem

We start with the statement of the 3D shell problem, which is a 3D problem of linearized elasticity on special domains $$\varOmega$$.

Find $${\tilde{{\mathbf u}}}: \varOmega \subset {\mathbb{R}}^3 \rightarrow {\mathbb{R}}^3$$:

\begin{aligned} \begin{aligned} \nabla \cdot ({\tilde{\pmb {\sigma }}})+{\tilde{{\mathbf b}}}&=0 \quad&\text {in}\quad \varOmega ,\\ {\tilde{\pmb {\sigma }}}&= {\tilde{\mathbb {C}}} : {\tilde{\pmb {\epsilon }}}\quad&\text {in}\quad \varOmega , \\ {\tilde{\pmb {\epsilon }}}&= \frac{1}{2}\left( {\mathrm {grad}}( {\tilde{{\mathbf u}}})+{\mathrm {grad}}( {\tilde{{\mathbf u}}})^\top \right) \quad&\text {in}\quad \varOmega , \\ {\tilde{{\mathbf u}}}&= {\tilde{{\mathbf u}}}_D \quad&\text {on}\quad \varGamma _D, \\ {\tilde{{\mathbf t}}}&= {\tilde{{\mathbf t}}}_N \quad&\text {on}\quad \varGamma _N. \end{aligned} \end{aligned}
(1)

We assume that the domain $$\varOmega$$ is defined through a parametrization $$\overline{\mathfrak {g}}$$ of a reference surface $$\bar{\varOmega }$$ (see Fig. 1).

\begin{aligned} \begin{aligned} \overline{\mathfrak {g}}:\;{\bar{U}}\subset {\mathbb{R}}^2&\rightarrow {\bar{\varOmega }}\subset {\mathbb{R}}^3 \\ (\theta ^1,\theta ^2)&\mapsto \overline{\mathfrak {g}}(\theta ^1,\theta ^2) .\end{aligned}\end{aligned}
(2)

In the present paper, we restrict us to the case of rectangular parameter domains $$\bar{\varOmega }$$. Then the parametrization of $$\varOmega$$ is given by

\begin{aligned} \begin{aligned} \mathfrak {g}:\; ( {{\bar{U}}\times T} ) \subset {\mathbb{R}}^3&\rightarrow \varOmega \subset {\mathbb{R}}^3 \\ (\theta ^1,\theta ^2)\times \theta ^3&\mapsto \mathfrak {g}(\theta ^1,\theta ^2,\theta ^3) = \overline{\mathfrak {g}}(\theta ^1,\theta ^2) + \theta ^3 \; \mathbf {n},\end{aligned}\end{aligned}
(3)

with the unit normal vector $$\mathbf {n}$$ and the thickness interval $$T=\left[-\frac{t}{2},\frac{t}{2}\right]$$, where t is the thickness of the shell. In the rest of the paper, Latin indices $$i,j,\ldots$$ take the values 1, 2, 3 whereas Greek indices $$\alpha , \beta$$ take the values 1, 2. Furthermore, Einstein summation convention applies. In the following, we need the covariant base vectors $$\mathbf {\overline{G}}_{\alpha }= \frac{\partial \bar{g} }{\partial \theta ^\alpha }$$, $$\mathbf {G}_{\alpha }= \frac{\partial g }{\partial \theta ^\alpha }$$, the covariant coefficients of the metric $$\overline{G}_{\alpha \beta } = \mathbf {\overline{G}}_{\alpha }\cdot \mathbf {\overline{G}}_{\beta }$$, $$\mathrm G_{ij} = \mathbf {G}_{i} \cdot \mathbf {G}_{j}$$, the contravariant coefficients of the metric $$\overline{G}^{\alpha \beta }=[\overline{G}_{\alpha \beta }]^{-1}$$, $$\mathrm G^{\alpha \beta }=[\mathrm G_{\alpha \beta }]^{-1}$$, and the contravariant base vectors $$\mathbf {\overline{G}}^{\alpha }= \overline{G}^{\alpha \beta } \mathbf {\overline{G}}_{\beta }$$, $$\mathbf {G}^{i}= \mathrm G^{ij} \mathbf {G}_{j}$$. Note that all quantities with a bar are defined on the reference surface and are, therefore, independent of $$\theta ^3$$. Whereas quantities with no bar are defined on the three-dimensional shell volume. Instead of solving for $${\tilde{{\mathbf u}}}(\mathbf x),\mathbf x \in \varOmega$$, we seek the displacement field $${\mathbf u}(\theta ^1,\theta ^2,\theta ^3) = {\tilde{{\mathbf u}}}(\mathfrak {g}(\theta ^1,\theta ^2,\theta ^3))$$ defined on the parametric space. We assume that the bodyforce $${\mathbf b}$$ is given with respect to a fixed Cartesian frame $${\mathbf {e}_{i}}$$. Thus, $${\mathbf b}=b^i\mathbf {e}_{i}$$ holds. Then, the balance of momentum in (1) in parametric coordinates reads

\begin{aligned} \left( \sigma ^{jl}_{,j} + \sigma ^{kl} \varGamma _{kj}^{\;\;\;\; j} + \sigma ^{jk} \varGamma _{kj}^{\;\;\;\; l} \right) J_l^i + b^i = 0, \end{aligned}
(4)

with the contravariant components of the stress tensor $$\pmb {\sigma }= \sigma ^{ij}\; \mathbf {G}_{i} \otimes \mathbf {G}_{j}$$, the Christoffel symbols of second kind $$\varGamma _{ij}^{\;\;\;\; k} = \mathbf {G}^{k} _{\;,i} \cdot \mathbf {G}_{j}$$, and $$J_l^i = \mathbf {G}_{l} \cdot \mathbf {e}^{i}$$. Here and in the following the notation $$()_{,j}=\frac{\partial () }{\partial \theta ^i}$$ applies. In the present paper, we employ a linear isotropic material law, where the contravariant components of the elasticity tensor $$\mathbb {C}=\mathbb {C}^{ijkl}\;\mathbf {G}_{i} \otimes \mathbf {G}_{j} \otimes \mathbf {G}_{k} \otimes \mathbf {G}_{l}$$ are given by

\begin{aligned} \begin{aligned} \mathbb {C}^{\alpha \beta \gamma \varphi }&=\lambda \mathrm G^{\alpha \beta }\mathrm G^{\gamma \varphi }+\mu \left( \mathrm G^{\alpha \gamma }\mathrm G^{\beta \varphi }+\mathrm G^{\alpha \varphi }\mathrm G^{\beta \gamma }\right) ,\\ \mathbb {C}^{\alpha \beta 33}&= \mathbb {C}^{33\alpha \beta }= \lambda \mathrm G^{\alpha \beta },\\ \mathbb {C}^{3\alpha 3\beta }&=\mathbb {C}^{3\alpha \beta 3} =\mathbb {C}^{\alpha 33\beta }=\mathbb {C}^{\alpha 3\beta 3} = \mu \mathrm G^{\alpha \beta },\\ \mathbb {C}^{3\alpha \beta \gamma }&= \mathbb {C}^{\alpha 3 \beta \gamma } = \mathbb {C}^{\alpha \beta 3\gamma }=\mathbb {C}^{\alpha \beta \gamma 3}=0, \\ \mathbb {C}^{333\alpha }&= \mathbb {C}^{3 3 \alpha 3} = \mathbb {C}^{3 \alpha 33}=\mathbb {C}^{\alpha 333}=0,\\ \mathbb {C}^{3333}&= \lambda +2\mu , \end{aligned} \end{aligned}
(5)

with $$\lambda$$ and $$\mu$$ denoting the Lamé constants. For a given displacement field $${\mathbf u}$$ the covariant components of the linearized strain $$\pmb {\epsilon }= \epsilon _{ij} \; \mathbf {G}^{i} \otimes \mathbf {G}^{j}$$ are

\begin{aligned} \begin{aligned} \epsilon _{\alpha \beta }&= \frac{1}{2}\left( \mu _{\alpha }^{\varsigma } \mathbf {\overline{G}}_{\varsigma } \cdot \frac{\partial {\mathbf u}(\theta ^j) }{\partial \theta ^\beta } + \mu _{\beta }^{\varsigma } \mathbf {\overline{G}}_{\varsigma } \cdot \frac{\partial {\mathbf u}(\theta ^j) }{\partial \theta ^\alpha } \right) , \\ \epsilon _{\alpha 3}&= \frac{1}{2}\left( \mu _{\alpha }^{\varsigma } \mathbf {\overline{G}}_{\varsigma } \cdot \frac{\partial {\mathbf u}(\theta ^j) }{\partial \theta ^3} + \mathbf {n}\cdot \frac{\partial {\mathbf u}(\theta ^j) }{\partial \theta ^\alpha } \right) ,\\ \epsilon _{33}&= \frac{\partial {\mathbf u}(\theta ^j) }{\partial \theta ^3} \cdot \mathbf {n}, \end{aligned} \end{aligned}
(6)

with the components of the shifter tensor $$\mu _{\alpha }^{\beta } =\left( \delta _{\alpha }^{\beta } - \theta ^3 h_{\alpha }^{\beta } \right)$$, where $$h^\beta _\alpha = G^{\beta \gamma }\, \mathbf {G}_{\alpha ,\gamma }\cdot \mathbf {n}$$.

One common assumption in shell theories is that strait fibers normal to the mid-surface remain strait after deformation. Therefore, we assume a displacement field of the form

\begin{aligned} \bar{{\mathbf u}}(\theta ^1,\theta ^2,\theta ^3) = u^i(\theta ^1,\theta ^2) \mathbf {e}_{i} + \theta ^3 v^\alpha (\theta ^1,\theta ^2) \mathbf {\overline{G}}_{\alpha }. \end{aligned}
(7)

### Kirchhoff–Love model

In the Kirchhoff–Love model $$v^\alpha (\theta ^1,\theta ^2)$$ are no independent parameters. The assumption that normals to the undeformed surface remain normal to the deformed surface and remain unstreched leads to

\begin{aligned} v^\alpha = -\overline{G}^{\alpha \gamma } {\mathbf u}_{,\gamma } \cdot \mathbf {n}\end{aligned}
(8)

and

\begin{aligned} \bar{{\mathbf u}}(\theta ^1,\theta ^2,\theta ^3) = u^i(\theta ^1,\theta ^2) \mathbf {e}_{i} - \theta ^3 \overline{G}^{\alpha \gamma } ({\mathbf u}_{,\gamma } \cdot \mathbf {n}) \mathbf {\overline{G}}_{\alpha }. \end{aligned}
(9)

Therefore, the components of the consistent strain tensor (6) can be computed

\begin{aligned} \begin{aligned} \epsilon _{11} =\,&\mu _{1}^{\varsigma } u^i_{,1} \overline{J}_{\varsigma i} - \theta ^3 \mu _{1}^{\varsigma } \left( u^i_{,\varsigma 1} \overline{J}_{3 i} - u^i_{,\varsigma }\overline{J}_{\beta i} h_1^\beta - u^i_{,\gamma } \overline{J}_{3 i}\overline{\varGamma }_{1\varsigma }^{\;\;\;\; \gamma } \right) , \\ 2\epsilon _{12} =\,&\mu _{2}^{\varsigma } u^i_{,1} \overline{J}_{\varsigma i}+\mu _{1}^{\varsigma } u^i_{,2} \overline{J}_{\varsigma i} - \theta ^3 \mu _{2}^{\varsigma } \left( u^i_{,\varsigma 1} \overline{J}_{3 i} - u^i_{,\varsigma }\overline{J}_{\beta i} h_1^\beta - u^i_{,\gamma } \overline{J}_{3 i}\overline{\varGamma }_{1\varsigma }^{\;\;\;\; \gamma } \right) \\&-\,\theta ^3 \mu _{1}^{\varsigma } \left( u^i_{,\varsigma 2} \overline{J}_{3 i} - u^i_{,\varsigma }\overline{J}_{\beta i} h_2^\beta - u^i_{,\gamma } \overline{J}_{3 i}\overline{\varGamma }_{2\varsigma }^{\;\;\;\; \gamma } \right) ,\\ \epsilon _{22} =\,&\mu _{2}^{\varsigma } u^i_{,2} \overline{J}_{\varsigma i} - \theta ^3 \mu _{2}^{\varsigma } \left( u^i_{,\varsigma 2} \overline{J}_{3 i} - u^i_{,\varsigma }\overline{J}_{\beta i} h_2^\beta - u^i_{,\gamma } \overline{J}_{3 i}\overline{\varGamma }_{2\varsigma }^{\;\;\;\; \gamma } \right) ,\\ \epsilon _{\alpha 3} =\,&0, \\ \epsilon _{33} =\,&0. \end{aligned} \end{aligned}
(10)

In order to avoid Poisson thickness locking the zero transverse normal stress assumption ($$\sigma _{33} = 0$$) has to be included. Enforcing the condition leads to the expression

\begin{aligned} \epsilon _{33} = \frac{\lambda }{\lambda +2\mu }\left( \mathrm G^{11}\epsilon _{11}+2\mathrm G^{12}\epsilon _{12} + \mathrm G^{22}\epsilon _{22}\right) \end{aligned}
(11)

for the modified transverse normal strain. Within the finite element code this results in a modification in the material law, i.e. in all equations $$\lambda$$ has to be replaced with $$\frac{2\mu \lambda }{2\mu +\lambda }$$.

### Reissner–Mindlin model

In the Reissner–Mindlin model $$v^\alpha (\theta ^1,\theta ^2)$$ are two additional independent unknown fields. The components of the strain tensor (6) are now

\begin{aligned} \begin{aligned} \epsilon _{11}&= \mu _{1}^{\varsigma } \overline{J}_{\varsigma i} u^i_{\,,1} + \theta ^3 \mu _{1}^{\varsigma } \left( v^\gamma _{\,,1} \overline{G}_{\varsigma \gamma }+ v^\gamma \overline{\varGamma }_{\gamma 1 \varsigma } \right) , \\ 2\epsilon _{12}&= \mu _{1}^{\varsigma } \overline{J}_{\varsigma i} u^i_{\,,2}+\mu _{2}^{\varsigma } \overline{J}_{\varsigma i} u^i_{\,,1}+ \theta ^3 \mu _{1}^{\varsigma } \left( v^\gamma _{\,,2} \overline{G}_{\varsigma \gamma }+ v^\gamma \overline{\varGamma }_{\gamma 2 \varsigma } \right) + \theta ^3 \mu _{2}^{\varsigma } \left( v^\gamma _{\,,1} \overline{G}_{\varsigma \gamma }+ v^\gamma \overline{\varGamma }_{\gamma 1 \varsigma } \right) , \\ \epsilon _{22}&=\mu _{2}^{\varsigma } \overline{J}_{\varsigma i} u^i_{\,,2} + \theta ^3 \mu _{2}^{\varsigma } \left( v^\gamma _{\,,2} \overline{G}_{\varsigma \gamma }+ v^\gamma \overline{\varGamma }_{\gamma 2 \varsigma } \right) ,\\ 2\epsilon _{\alpha 3}&= \mu _{\alpha }^{\varsigma } \overline{G}_{\varsigma \gamma } v^\gamma + u^i_{\,,\alpha } J_{3i} + v^\gamma h_{\gamma \alpha }, \\ \epsilon _{33}&= 0. \end{aligned} \end{aligned}
(12)

Again the zero transverse normal stress condition has to be enforced in order to avoid Poisson thickness locking.

### Finite element method

In this section, we describe the used finite element approach briefly. We have the following variational formulation of (1):

Find $${\tilde{{\mathbf u}}}\in V$$ such that

\begin{aligned} \int _{\varOmega } {\tilde{\pmb {\epsilon }}}({\tilde{\mathbf{v}}}) : {\tilde{\mathbb {C}}} : {\tilde{\pmb {\epsilon }}}({\tilde{{\mathbf u}}}) \;{\mathrm{d}}{\mathbf{x}} = \int _{\varOmega } {\tilde{\mathbf{v}}} \cdot {\tilde{{\mathbf b}}} \;{\mathrm {d}}{\mathbf{x}} + \int _{\varGamma _N} {\tilde{\mathbf{v}}} \cdot {\tilde{{\mathbf t}}} \;{\mathrm {d}}s_{\mathbf{x}} \quad \forall \,{\tilde{\mathbf{v}}} \in V_0. \end{aligned}
(13)

Here, $$V=\{{\tilde{{\mathbf u}}} \in [H^1(\varOmega )]^3\;|\;{\tilde{{\mathbf u}}}={\tilde{{\mathbf u}}} \;\text {on}\; \varGamma _D \}$$ and $$V_0=\{{\tilde{{\mathbf u}}} \in [H^1(\varOmega )]^3\;|\;{\tilde{{\mathbf u}}} = 0 \;\text {on}\; \varGamma _D \}$$. We consider the change of variables according to $${\mathbf u}(\theta ^1,\theta ^2,\theta ^3) = {\tilde{{\mathbf u}}}(\mathfrak {g}(\theta ^1,\theta ^2,\theta ^3))$$ for all quantities in (13). Thus, the integrals in (13) are evaluated on the parametric domain utilizing a quadrature rule. In particular, we use a tensor product quadrature rule composed of one-dimensional Gauss–Legendre quadratures for the volume integrals. Therefore, we have for a generic integrand $${\mathcal{A}}(\theta ^1,\theta ^2,\theta ^3) = {\mathcal {{\tilde{A}}}}(x)$$,

\begin{aligned} \begin{aligned} \int _{\varOmega } {\mathcal {{\tilde{A}}}}(x) \;{\mathrm {d}}{\mathbf{x}}&=\int _{{\bar{U}}\times T} {\mathcal{A}}(\theta ^1,\theta ^2,\theta ^3) (1-\theta ^32H+(\theta ^3)^2 K ) \sqrt{\det \bar{G}_{\alpha \beta }} \;{\mathrm {d}}\theta ^1 \;{\mathrm {d}}\theta ^2 \;{\mathrm {d}}\theta ^3 \\&\approx \sum _{i=1}^{n_1} \sum _{j=1}^{n_2}\sum _{k=1}^{n_3} {\mathcal{A}}(\theta ^1_i,\theta ^2_j,\theta ^3_k) (1-\theta ^3_k \, 2H+(\theta ^3_k)^2 K ) \sqrt{\det \bar{G}_{\alpha \beta }}\;\omega _i\omega _j\omega _k, \end{aligned} \end{aligned}
(14)

where $$H=\frac {1}{2}(h_\alpha ^\alpha )$$ is the mean curvature and $$K=\det (h_\alpha ^\beta )$$ is the Gaussian curvature. For $$a=1,2,3$$, $$n_a$$ is the number of quadrature points $$\theta ^a_i$$ and quadrature weights $$\omega _i$$.

In order to discretize the sought field $${\mathbf u}$$ we apply two steps. First, we resolve the trough-the-thickness variation (the dependency on $$\theta ^3$$) of $${\mathbf u}$$ either by the Kirchhoff–Love kinematics (9) or the Reissner–Mindlin kinematics (7). The model decision has great impact on the subsequent discretization done in a second step. In the case of the Reissner–Mindlin shell only first order derivatives appear in (12). Therefore, we can use $$H^1$$ hierarchical shape functions on quadrilaterals [23] for the discretization of the five components $$u^i$$ and $$v^\alpha$$. Due to the second derivatives in (10) this approach is not feasible for the Kirchhoff–Love model. In order to have a $$H^2$$ conforming method we use the Bogner–Fox–Schmidt quadrilateral [24] to discretize the three components $$u^i$$. Dirichlet boundary conditions are incorporated in the ansatz space in the case of the Reissner–Mindlin model or enforced by a penalty technique in the case of the Kirchhoff–Love model (cf. [25]).

## Code verification

In the present paper, we apply code verification based on order-of-accuracy tests and the MMS to a code for solving the shell formulations given in Sect. 2. The necessary prerequisite to apply it to a numerical schema is the knowledge of a formal order of convergence and exact solutions. Thus, an estimate of the type

\begin{aligned} ||u^\mathrm{exact}- u^\mathrm{numerical}|| \le C \, h^q \,||u^\mathrm{exact}||, \end{aligned}
(15)

where C is a constant and h is a characteristic element size, has to be known. Then q is called the formal order of convergence with respect to the norm $$||\cdot ||$$. For two meshes with characteristic element sizes $$h_1$$ and $$h_2$$, the experimental order of convergence (eoc) is defined as

\begin{aligned} \text{eoc} = \frac{\log (e_1)- \log (e_2)}{\log (h_1)- \log (h_2)}, \end{aligned}
(16)

where

\begin{aligned} e_i = ||u^\mathrm{exact}- u_{h_i}^\mathrm{numerical}|| \end{aligned}
(17)

is the numerical error corresponding to the discretization $$h_i$$. The code is verified, if the eoc matches the formal order of convergence within the asymptotic range. For the finite element method applied in this paper, we expect $$q=p+1$$ for the error in the $$L_2$$ norm for smooth solutions for the Reissner–Mindlin shell. In the case of the Kirchhoff–Love shell no theoretical error estimates are known to the authors.

In order to evaluate (17), an exact solution has to be available. Within the MMS, such a solution is prescribed. Then, the source term is determined such that the chosen solution fulfills the governing equations. In particular, we perform the following steps:

1. 1.

Choose the form of the problem domain, i.e. specify the surface parametrization (2) and the thickness t

2. 2.

Choose the form of the manufactured solution $${\mathbf u}^M$$, i.e. specify the independent parameters in (7)

3. 3.

Derive the modified governing equations, i.e. compute an artificial source term $${\mathbf b}^M = - \nabla \cdot (\mathbb {C}: \epsilon ( {\mathbf u}^M))$$ and derive the boundary conditions

4. 4.

Solve the discrete form of the modified governing equations on multiple meshes, i.e. solve (13) with $${\mathbf b}= {\mathbf b}^M$$

5. 5.

Evaluate the numerical error (17) and the eoc (16)

6. 6.

Apply the order of convergence test

Additionally to [26], we added the first point. The finite element code needs the components $$b^i$$ of the source term $${\mathbf b}=b^i\mathbf {e}_{i}$$ with respect to the global Cartesian frame. They are given by

\begin{aligned} b^i = -\left( \sigma ^{jl}_{,j} + \sigma ^{kl} \varGamma _{kj}^{\;\;\;\; j} + \sigma ^{jk} \varGamma _{kj}^{\;\;\;\; l} \right) J_l^i. \end{aligned}
(18)

As noted in [27], an arbitrary choice of manufactured solution leads easily to a very long computer code for the source term. We have observed this for general complex curved surfaces too. We use the computer algebra system Mathematica$$^{\text {TM}}$$ [28] to derive the source terms in an automated way. Nevertheless, a general verification example assessing all features of the code results in a source code with more than $$10^6$$ characters, where simplifications are prohibitively time-consuming. Therefore, we compute only the derivatives analytically and the algebraic operations are performed numerically. Instead of exporting a function for $$b^i$$, we export functions taking the spatial position as input argument for

• strain tensor $$\epsilon _{ij}$$,

• derivatives of the strain tensor $$\epsilon _{ij,k}$$,

• covariant base vectors $$\mathbf {G}_{i}$$,

• derivatives of the covariant base vectors $$\mathbf {G}_{i,j}$$.

We evaluate these quantities at the needed spatial position and compute

\begin{aligned} \begin{aligned} G_{ij}=&\mathbf {G}_{i}\cdot \mathbf {G}_{j}, \\ [G^{ij}] =&[G_{ij}]^{-1},\\ J_l^i =&\mathbf {G}_{l} \cdot \mathbf {e}^{i},\\ \varGamma _{kj}^{\;\;\;\; l}=&\mathbf {G}_{k,j}\cdot \mathbf {G}_{i} G^{il},\\ G^{ij}_{,k}=&- \varGamma _{kl}^{\;\;\;\; j} G^{li}- \varGamma _{kl}^{\;\;\;\; i}G^{lj}, \\ \sigma ^{jl} =&\lambda \left( G^{ij}G^{kl}\epsilon _{kl}+ 2 \mu G^{ik}G^{jl}\epsilon _{kl}\right) ,\\ \sigma ^{jl}_{,j} =&\lambda \left( G^{ij}_{,j}G^{kl}\epsilon _{kl}+G^{ij}G^{kl}_{,j} \epsilon _{kl}+G^{ij}G^{kl}\epsilon _{kl,j} \right) \\&+ \mu \left( G^{ik}_{,j}G^{jl}\epsilon _{kl}+G^{ik}G^{jl}_{,j}\epsilon _{kl} +G^{ik}G^{jl}\epsilon _{kl,j} \right) . \end{aligned} \end{aligned}
(19)

Then the source term is obtained with (18).

Remark In the present implementation, we keep the exact surface parametrization during the whole computation. Therefore, we are able to evaluate the error in a continuous norm. In case of an approximation of the surface, one has to use the discrete norm [12]

\begin{aligned} e = \sqrt{\frac{1}{N}\sum _{n=1}^N\bigg (u^\mathrm{exact}(x_n) - u^\mathrm{numerical}(x_n)\bigg )^2}. \end{aligned}
(20)

Furthermore, the influence of geometry approximation on the formal order of convergence has to be considered. For a discussion of this ‘variational crime’, we refer to [29]. We remark that in the present approach this is not an issue.

## Verification examples

In the following, we provide a set of verification examples with increasing complexity. In principle, it would be sufficient to consider only the most general case in order to verify the code, since the special cases are included in the general case [30]. However, in order to have confirmation exercises, we suggest special cases where parts of the code can be tested.

In all examples, we use the parameter space $$(\theta ^1,\theta ^2) \in [0,0.56]\times [0,0.65]$$ and the thickness $$t=0.07\,\hbox {m}$$. The material parameters $$\lambda = \mu = 4000\,\hbox {N}\,\hbox {m}^{-2}$$ are used, which corresponds to Young’s modulus $$E=1000\,\hbox {N}\,\hbox {m}^{-2}$$ and Poisson’s ratio of $$\nu =0.25$$. An additional confirmation exercises is obtained through setting $$\nu =0$$.

In the verification examples for the Reissner–Mindlin model, we use the two types of displacement fields given in Table 1. Displacement field A is chosen such that it can be represented exactly with each discretization. Displacement field B is chosen to be general to assess all features of the code. For the Kirchhoff–Love model we present three types of displacement fields, which are given in Table 2. Again field A can be exactly discretized and field C is chosen to be general. The field B is constructed such that it vanishes up to the second derivatives on the boundary. Therefore, one can test simple supported boundary conditions without the need of considering external moments along the boundary. Additional displacement fields for confirmation exercises can be obtained through setting only individual parameters. Different surface parametrizations are given in Table 3. The parametrization $$\overline{\mathfrak {g}}_1$$ is the identity map yielding a plane rectangular mid-surface. With $$\overline{\mathfrak {g}}_2$$ we have a plane mid-surface with curved boundaries. A cylindirical geometry and, therefore, curved (constant curvature) surface is given by $$\overline{\mathfrak {g}}_3$$. The parametrization $$\overline{\mathfrak {g}}_4$$ defines a general curved surface.

In all examples, we consider all lateral sides as Dirichlet boundary and the top and bottom surfaces as Neumann boundary.

### Example 1

Plane geometry, exact representation of solution. The goal of the first example is to determine the influence of round-off errors. To this end, we have chosen the plane geometry given by the parametrization $$\overline{\mathfrak {g}}_1$$ from Table 3 and displacement field A from Table 1. In Fig. 2a the reference surface with the body force is depicted. The displacement field can be exactly represented in the discrete system. Therefore, the remaining error is due to round-off errors. We have executed the code for ansatz orders up to order three for single precision, as well as for double precision. The distribution of the error for a coarse and a fine mesh over the parameter domain is depicted in Fig. 2b, c, respectively. In Fig. 3, the errors for different discretization levels are shown. We observe constant error levels around $$10^{-15}$$ for double precision. This agrees with the expected accuracy. The errors for single precision arithmetics are as expected about $$10^{-7}$$. However, using more elements raises the error. The conditioning of the discrete system might be the reason for this.

### Example 2

Plane geometry, general solution. In the second example, the discretization error at a plane geometry is assessed. Therefore, we use the parametrization $$\overline{\mathfrak {g}}_1$$ with displacement field B. The obtained distribution of the body force at the reference surface is shown in Fig. 4a. For ansatz order $$p=3$$ the distributions of the errors is displayed in Fig. 4b, c. We observe oscillations in the errors. Such phenomena were also observed in [20] for a benchmark example in the case of elements showing locking. Since in the present element formulation no special method to alleviate locking has been applied, the present oscillations are expected. However, the locking does not deteriorate the convergence of the method. The development of the errors and the eoc for ansatz orders up to order six are shown in Fig. 5. For the ansatz orders one to four the eoc tends to the respective formal order of convergence. However, for ansatz orders five and six, the eoc does not agree with the formal order of convergence. In these cases, the numerical error is dominated by the error introduced due to round-off and not by the discretization error. This effect is also visible in the subsequent examples. The results verify the tested capabilities of the code.

### Example 3

General geometry, exact representation of solution. In the third example, a general geometry with displacement field A is considered. For the reference surface parametrization $$\overline{\mathfrak {g}}_4$$ from Table 3 is taken. The necessary body force for equilibrium is depicted in Fig. 6a at the reference surface. The distribution of the numerical error obtained with a coarse and a fine mesh is shown in Fig. 6b, c. Again, we observe strong oscillations in the numerical error in case of the fine mesh. The development of the errors and the eoc for ansatz orders up to order six are shown in Fig. 7. The numerical error present in the example stems from the numerical integration of the integrals in (13) and round-off since displacement field A can be exactly discretized. We have set the number of quadrature points in both in-plane directions to the ansatz order. However, as long as the numerical error is dominated by the integration error, the eoc is higher or equal as the formal order of convergence regarding the discretization of the displacement field. Therefore, the integration error will not hamper the overall convergence rate. Note, with more quadrature points the eoc can be increased in this example.

### Example 4

General geometry, general solution. The fourth example consists of the general surface parametrization $$\overline{\mathfrak {g}}_4$$ and the general displacement field B. Thus, this example assesses all features of the code. The reference surface and the body force are illustrated in Fig. 8a. In Fig. 8b, c, the distribution of the numerical error is depicted for a coarse and a fine mesh. Again, we observe oscillations of the error. However, the eoc is not deteriorated due to this effects. The development of the errors and the eoc for ansatz orders up to order six are shown in Fig. 9. Again, the error corresponding to ansatz orders five and six is limited by the round-off error. Thus, the eoc drops. For all other ansatz orders the eoc tend to the formal order of convergence. Thus, the code passes this verification example.

### Example 5

Plane geometry, exact representation of solution. The goal of this example is to determine the influence of round-off errors for the implementation of the FEM for the Kirchhoff–Love model. To this end, we have chosen the plane geometry given by the parametrization $$\overline{\mathfrak {g}}_1$$ from Table 3 and displacement field A from Table 2, which can be exactly represented in the discrete system. Due to this setting the body force vanishes for the Kirchhoff–Love model. The distribution of the numerical error for a coarse and a fine mesh is given in Fig. 10. For the coarse mesh we observe that the error is concentrated at the boundary. Due to the use of a penalty method this is reasonable. In contrast to this, for the fine mesh the error is concentrated in the interior. This is in agreement with the results obtained in Example 1. In Fig. 11, the error and eoc for different discretization levels and single as well as double precision arithmetics are shown. From Fig. 11a it can be seen that the error increases with refinement. Furthermore, in Fig. 11b the eoc is at around minus four for single and double precision arithmetics. This is in agreement with the estimated condition number of the stiffness matrix, which raises at the same rate. Thus, we conclude that the numerical error is due to round-off errors and the penalty method used.

### Example 6

General geometry, general solution. In this last example we use the parametrization $$\overline{\mathfrak {g}}_4$$ and displacement field C from Table 2. The reference surface and the body force obtained by the MMS is depicted in Fig. 12a. The distribution of the numerical error for a coarse and a fine mesh are illustrated in Fig. 12b, c. For the coarse mesh we observe oscillations as in the examples for the Reissner–Mindlin model. The results of the performed convergence study are shown in Fig. 13. In Fig. 13a, we observe the convergence of the method up to an error level of about $$10^{-8}$$. This final error level is in accordance with the results from Example 5. The eoc given in Fig. 13b tends to 4 apart for the last considered mesh refinement. Due to the use of third-order ansatz functions this convergence rate is optimal. Based on these results, we conclude that the code passes this general verification example.

## Conclusion

Code verification of simulation tools is a necessary procedure in order to ensure the reliability. Especially in shell analysis complicated expressions arise which have to be coded. Thus, the error-proneness is high. During the preparation of the present paper, we found that performing order of accuracy tests is a code verification procedure with high rigor.

In order to derive exact solutions we applied the MMS to the strong form of the 3D elasticity equations in curvilinear coordinates. We have used the computer algebra system Mathematica$$^{\text {TM}}$$ for the derivation of the source term function. In order to avoid long codes for this function we compute only the necessary derivatives analytically.

For code verification in the context of shell analysis we proposed different verification examples. We apply the proposed tests to an in-house developed finite element research code for Kirchhoff–Love and Reissner–Mindlin shell analysis. The examples are designed such that in some examples some parts of the code are not assessed consciously. This can help to identify coding faults. Furthermore, we have seen that not in all cases the optimal order of convergence has to show up. In cases where the discretization error is zero we observe the error due to round-off errors or if existing due to numerical integration.

## References

1. Oberkampf WL, Roy CJ (2010) Verification and validation in scientific computing. Cambridge University Press, Cambridge

2. Oden JT, Belytschko T, Fish J, Hughes T, Johnson C, Keyes D, Laub A, Petzold L, Srolovitz D, Yip S (2006) Revolutionizing engineering science through simulation. National Science Foundation Blue Ribbon Panel Report 65

3. ASME V&V 10-2006 (2006) Guide for verification and validation in computational solid mechanics. The American Society of Mechanical Engineers, New York

4. Oberkampf WL, Trucano TG, Hirsch C (2004) Verification, validation, and predictive capability in computational engineering and physics. Appl Mech Rev 57(5):345–384

5. Roy CJ, Nelson C, Smith T, Ober C (2004) Verification of Euler/Navier–Stokes codes using the method of manufactured solutions. Int J Numer Methods Fluids 44(6):599–620

6. Steinberg S, Roache PJ (1985) Symbolic manipulation and computational fluid dynamics. J Comput Phys 57(2):251–284

7. Shih T (1985) A procedure to debug computer programs. Int J Numer Methods Eng 21(6):1027–1037

8. Roache PJ (1998) Verification and validation in computational science and engineering. Hermosa, Albuquerque

9. Eça L, Hoekstra M, Hay A, Pelletier D (2007) Verification of RANS solvers with manufactured solutions. Eng Comput 23(4):253–270

10. Fisch R, Franke J, Wüchner R, Bletzinger KU (2013) Code verification examples of a fully geometrical nonlinear membrane element using the method of manufactured solutions. In: Bletzinger KU, Kröplin B, Oñate E (eds) Proceedings structural membranes, Munich

11. Fisch R, Franke J, Wüchner R, Bletzinger KU (2014) Code verification of a partitioned FSI environment for wind engineering applications using the method of manufactured solutions. In: Oñate E, Oliver J, Huerta A (eds) 5th European conference on computational mechanics (ECCM V), Barcelona

12. Fisch R (2014) Code verification of partitioned FSI environments for lightweight structures, Schriftenreihe des Lehrstuhls für Statik der Technischen Universität München, vol 23. Lehrstuhl für Statik, Technische Universität München

13. Veeraragavan A, Beri J, Gollan R (2016) Use of the method of manufactured solutions for the verification of conjugate heat transfer solvers. J Comput Phys 307:308–320

14. Kästner M, Metsch P, De Borst R (2016) Isogeometric analysis of the Cahn–Hilliard equation—a convergence study. J Comput Phys 305:360–371

15. Bischoff M, Bletzinger KU, Wall W, Ramm E (2004) Models and finite elements for thin-walled structures. In: Stein E, de Borst R, Hughes T (eds) Encyclopedia of computational mechanics, vol 2. Wiley, Amsterdam, pp 59–137

16. Benson D, Bazilevs Y, Hsu MC, Hughes T (2010) Isogeometric shell analysis: the Reissner–Mindlin shell. Comput Methods Appl Mech Eng 199(5):276–289

17. Dornisch W, Müller R, Klinkel S (2016) An efficient and robust rotational formulation for isogeometric Reissner–Mindlin shell elements. Comput Methods Appl Mech Eng 303:1–34

18. Hosseini S, Remmers JJ, Verhoosel CV, De Borst R (2014) An isogeometric continuum shell element for non-linear analysis. Comput Methods Appl Mech Eng 271:1–22

19. Kiendl J, Bletzinger KU, Linhard J, Wüchner R (2009) Isogeometric shell analysis with Kirchhoff–Love elements. Comput Methods Appl Mech Eng 198(49):3902–3914

20. Oesterle B, Ramm E, Bischoff M (2016) A shear deformable, rotation-free isogeometric shell formulation. Comput Methods Appl Mech Eng 307:235–255

21. Guo Y, Ruess M (2015) Nitsches method for a coupling of isogeometric thin shells and blended shell structures. Comput Methods Appl Mech Eng 284:881–905

22. Belytschko T, Stolarski H, Liu WK, Carpenter N, Ong JS (1985) Stress projection for membrane and shear locking in shell finite elements. Comput Methods Appl Mech Eng 51(1):221–258

23. Szabo BA, Babuška I (1991) Finite element analysis. Wiley, Amsterdam

24. Bogner F, Fox R, Schmit L (1965) The generation of inter-element-compatible stiffness and mass matrices by the use of interpolation formulas. In: Proceedings of the conference on matrix methods in structural mechanics, Wright-Patterson Air Force Base, Ohio

25. Barrett JW, Elliott CM (1986) Finite element approximation of the dirichlet problem using the boundary penalty method. Numer Math 49(4):343–366

26. Roy CJ (2005) Review of code and solution verification procedures for computational simulation. J Comput Phys 205(1):131–156

27. Malaya N, Estacio-Hiroms KC, Stogner RH, Schulz KW, Bauman PT, Carey GF (2013) Masa: a library for verification using manufactured and analytical solutions. Eng Comput 29(4):487–496

28. Wolfram Research Inc (2017) Mathematica, Version 11.1. Champaign, Illinios

29. Strang G, Fix GJ (1973) An analysis of the finite element method, vol 212. Prentice-Hall, Englewood Cliffs

30. Roache PJ (2002) Code verification by the method of manufactured solutions. J Fluids Eng 124(1):4–10

## Acknowledgements

Open access funding provided by Graz University of Technology.

## Author information

Authors

### Corresponding author

Correspondence to M. Schanz.

## Rights and permissions

Reprints and Permissions

Gfrerer, M.H., Schanz, M. Code verification examples based on the method of manufactured solutions for Kirchhoff–Love and Reissner–Mindlin shell analysis. Engineering with Computers 34, 775–785 (2018). https://doi.org/10.1007/s00366-017-0572-4

• Accepted:

• Published:

• Issue Date:

• DOI: https://doi.org/10.1007/s00366-017-0572-4

### Keywords

• Code verification
• Method of manufactured solutions
• Shell analysis
• Kirchhoff–Love
• Reissner–Mindlin