Abstract
Code verification plays a crucial role for all finite element applications, especially for non-standard ones, such as immersed boundary approaches, which are typically based on novel algorithms and often error-prone in-house implementations. Instead of relying on rarely available analytical solutions or overkill FEM simulations, in this article, the capabilities of the method of manufactured solutions (MoMS) are explored, enabling an easy and straightforward derivation of closed-form reference solutions. The focus is kept on immersed problems, in particular, on the finite cell method (FCM), and manufactured solutions are derived for 2D and 3D problems involving voids and single/multiple inclusions. We propose several approaches for the construction of the manufactured solutions, where zero traction conditions for void regions and continuous normal stresses along material interfaces are directly fulfilled. Thus, no weak boundary conditions are required for reproducing the manufactured solution via FCM. This not only enables code verification for FCM implementations that lack the option of applying weak boundary conditions, but also keeps the simulation complexity low, when testing other relevant features, e.g., different integration schemes or the implementation of enrichment functions. The flexibility and wide application range of the MoMS in the context of immersed boundary simulations is demonstrated using static, quasi-static, and transient problems in the context of linear elasticity. Finally, the analytical derivations of the manufactured solutions used in this paper are provided as supplementary material.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
The numerical implementation of mathematical models, just as every program code, is rarely error-free during development. This can often lead to wrong results, if the bug is undetected, or to long and tedious debugging sessions [1]. Thus, testing the code against existing solutions that are proven to be correct plays an important role in the field of computational mechanics [2]. For this purpose, often benchmark problems are used, which are either derived analytically, or solved numerically with exceptionally high accuracy. A recent collection of benchmark problems for structural mechanics can be found in Ref. [3]. In our contribution however, we focus on an alternative approach, i.e., the method of manufactured solutions (MoMS), which allows for testing codes against closed-form reference solutions derived by a simple, yet robust approach [4]. In particular, our main goal is the investigation of MoMS in the context of immersed boundary methods, where accurate code validation is of great importance due to the numerous special algorithms associated with these approaches. Despite its simplicity and capabilities, there is very little literature so far regarding the MoMS applied to immersed problems. Although it is mentioned briefly by some articles [5, 6], generally, no details on the derivation of the manufactured solution are given. In our opinion, the topic deserves more attention and therefore, in this contribution, some key insights and different strategies for manufacturing the displacement field are discussed, while also addressing some possible issues. While this work is concerned with static and transient problems of linear elasticity, for the application of our derived concepts to non-linear problems, we refer to our recent article [7].
The outline of the article is as follows: In the remainder of this section, first, the general concept of immersed boundary problems is presented in Sect. 1.1, then, the governing equations for the upcoming problems are given in Sect. 1.2, and finally, the MoMS is introduced briefly in Sect. . After the introduction, the FCM is discussed in Sect. 2. This is followed by the main part of the paper, Sect. 3, where manufactured solutions in the context of immersed boundary methods are derived for various structural mechanical problems with hole regions and material inclusions. In Sect. 3, the main focus is the derivation of carefully tailored manufactured solutions, whose simulation via unfitted meshes does not require weak boundary conditions. The derived approaches are based on different strategies and coordinate systems, and are demonstrated via several numerical examples.
1.1 Immersed boundary problems
In immersed boundary methods, such as the finite cell method (FCM) [8, 9], the spectral cell method (SCM) [10, 11], the cut finite element method (CutFEM) [12], and the extended finite element method (XFEM) [13], the considered domain generally has a complicated shape, such that a geometry-conforming spatial discretization is often cumbersome to achieve. Thus, the general approach of these methods is to embed the region of interest into a larger domain of simple shape, which is easy to discretize by Cartesian meshes. Beyond structures with highly complex outer boundaries, these methods also often deal with problems, where the material domain contains void regions and/or inclusions of additional materials,Footnote 1 as depicted in Fig. 1a. Here, \(\Omega _{\textrm{mat}}\) is the domain of the matrix material, \(\Omega _{\textrm{void}}\) of the void, and \(\Omega _{\textrm{inc}}\) of the inclusion, with their corresponding boundaries \(\partial \Omega _{\textrm{mat}}\), \(\partial \Omega _{\textrm{void}}\), and \(\partial \Omega _{{\textrm{inc}}}\), respectively. Finally, the unit normal vectors belonging to the different domain boundaries are denoted by \({\varvec{n}}\). The embedding of the original problem into the extended domain \(\Omega _{{\textrm{e}}}\) and the meshing of the new problem are depicted in Fig. 1b and c. Here, \(\Omega _{{\textrm{fict}}}\) is the fictitious domain with theoretically zero stiffness, which also includes all void regions within the physical domain \(\Omega _{\textrm{void}} \subseteq \Omega _{{\textrm{fict}}}\).
The numerical challenges faced in these methods are typically caused by the fact that elements are intersected by the boundaries (see Fig. 1c), leading to important simulation aspects, such as the
-
1.
Integration of discontinuous element matrices (FCM: [5, 14,15,16,17], XFEM: [18,19,20,21], CutFEM: [22]),
-
2.
Stabilization schemes for ill-conditioned problems (FCM: [23,24,25], XFEM: [13, 26, 27], CutFEM: [28, 29]),
-
3.
Implementation of weak boundary conditions on immersed boundaries (FCM: [30], XFEM: [13], CutFEM: [31]),
-
4.
Accurate capturing of weakly or strongly discontinuous displacement fields (FCM: [32], XFEM: [33, 34], CutFEM: [6]),
-
5.
Mass lumping and time integration schemes for transient problems (SCM: [10, 35]),
to just name a few. The list given above demonstrates the multitude of important topics related to immersed boundary methods, which are entire research areas on their own. Since the listed challenges are often tackled using novel algorithms and advanced computational concepts, reliable and easy testing of the different features used in these methods is of significant importance.
1.2 Governing equations
Let \(\Omega \in {\mathbb {R}}^d\) and \(\partial \Omega \in {\mathbb {R}}^d\) denote a material domain and its boundary in a d-dimensional space, respectively, while an arbitrary point space is denoted by \({\varvec{x}}\in {\mathbb {R}}^d\). Furthermore, \(T\in {\mathbb {R}}\) is the time domain in the interval \([t_0,\,t_{\textrm{end}}]\). Without derivation, the governing equations for structural linear elasto-dynamics read [36, 37]
where \({\varvec{u}}\) is the displacement, \(\dot{{\varvec{u}}}\) the velocity, \(\ddot{{\varvec{u}}}\) the acceleration, and \({\varvec{b}}\) the body force field. The parameter \(\rho \) denotes the mass density, while \(\kappa \) stands for the isotropic damping parameter. The boundary \(\partial \Omega \) is the disjoint set of Neumann \(\Gamma _{{\textrm{N}}}\) and Dirichlet boundaries \(\Gamma _{{\textrm{D}}}\), on which prescribed tractions \(\tilde{{\varvec{t}}}\) and displacements \(\tilde{{\varvec{u}}}\) are defined, respectively. Furthermore, \({\varvec{u}}_0\) and \(\dot{{\varvec{u}}}_0\) denote initial values for the time \(t=t_0\). Finally, \(\varvec{\sigma }\) is the symmetric Cauchy stress tensor resulting from Eq. (6), where \({\mathbb {C}}\) is the fourth-order constitutive tensor and \(\varvec{\varepsilon }\) the linearized (Cauchy–Green) strain tensor, defined as the symmetric gradient of \({\varvec{u}}\)
If the given problem contains material inclusions, i.e. \(\Omega = \Omega _{\textrm{mat}}\cup \Omega _{\textrm{inc}}\), the displacement field \({\varvec{u}}\) is generally only weakly continuous along the material interface \(\partial \Omega _{{\textrm{inc}}}\) and the stress and strain tensors obey certain jump conditions [13]. On the one hand, the continuity of the normal stress vectors is required
where \(\varvec{\sigma }_{\textrm{mat}}\) and \(\varvec{\sigma }_{\textrm{inc}}\) denote the stress fields in \(\Omega _{\textrm{mat}}\) and \(\Omega _{\textrm{inc}}\), respectively. On the other hand, the strain tensors must fulfill the Hadamard jump condition
where \({\varvec{a}}\) is the jump of the directional derivatives of \({\varvec{u}}\) with respect to \({\varvec{n}}_{\textrm{inc}}\) at the interface [38].
1.3 Method of manufactured solutions
A closed-form solution to the governing Eqs. (1)–(7) is generally not possible, and thus, for given external loads and boundary conditions, the problem is solved in a weak sense using different numerical methods [36, 37]. In the context of the MoMS, the problem is reversed: Instead of solving for \({\varvec{u}}\), one manufactures (assumes) \({\varvec{u}}\), whose spatial and time derivatives are known. This can be easily inserted in the strong form (1) to compute the body load analytically
Note that besides \({\varvec{b}}\), generally, other relevant quantities, such as stresses or the strain energy, can be computed analytically as well. For every partial differential equation (PDE), the solution fields should be constrained by suitable boundary conditions (BCs). For traditional problems where \({\varvec{u}}\) is sought, BCs are readily given on \(\Gamma _{{\textrm{N}}}\) and \(\Gamma _{{\textrm{D}}}\). On the contrary, in the manufactured solution, no BCs are given, but the manufactured solution yields the BCs. That is, when the manufactured problem is reproduced numerically, the BCs required for the numerical framework derive from manufactured solution itself as prescribed displacements or tractions. Depending on which option is chosen, the corresponding boundary pieces are classified as \(\Gamma _{{\textrm{N}}}\) or \(\Gamma _{{\textrm{D}}}\) for the simulation. It is clear that for the computed body load and appropriate BCs, the manufactured displacement field, in fact, satisfies Eqs. (1)–(7). Thus, in case of a correct implementation of the numerical approach, \({\varvec{b}}\) acting in the domain,Footnote 2 and appropriate BCs on its boundary should lead to an approximate solution \({\varvec{u}}^{\textrm{h}}\) that converges to the manufactured reference solution in a suitable error measure.
As pointed out in Ref. [4], it is important to realize that the manufactured solution does not necessarily have to be a physically realistic solution; the only requirement is that it satisfies the chosen PDE. In the simplest cases, manufactured solutions can be derived even by hand, however, for robust derivations of more complex problems, computer algebra systems (CAS) are favored, allowing a great flexibility when solving PDEs symbolically. For this purpose, all the manufactured solutions discussed in this paper are derived using Wolfram Mathematica [39]. The Mathematica notebooks used for the analytical derivations of the numerical examples in Sect. 3 can be found as supplementary material in Ref. [40].
Due to its simplicity and effectiveness, the MoMS is listed by the American Society of Mechanical Engineers as part of the Guide for verification and validation in computational solid mechanics [41, 42]. Additionally, it offers a convenient and more accurate approach for code verification, than testing against an overkill FEM solution, whose accuracy is limited, and derivation is not only often cumbersome and time consuming, but in some cases, simply not possible. For further reading on the topic, we refer to Refs. [4, 43].
Remark on immersed boundary methods: Note that when reproducing the manufactured solution in an immersed boundary framework, the numerical solution should be constrained on all boundaries, including \(\partial \Omega _{\textrm{void}}\) and \(\partial \Omega _{{\textrm{inc}}}\) as well. As it will be shown in Sect. 2.2, enforcement of field values at the immersed boundaries requires additional computational effort, which we seek to eliminate in this contribution.
2 Finite cell method
In this paper, we use the FCM [8, 9, 44] as a representative for immersed boundary problems, which is typically based on the discretization explained by Fig. 1 and high-order shape functions [45, 46], enabling an efficient and accurate simulation on coarse meshes. The FCM is covered in a wide range of contributions, which is why we only provide a brief introduction at this point. For more details, the interested reader is referred to Refs. [46, 47]. Without derivation, the weak formulation of the governing Eqs. (1)–(7) in the context of the FCM reads
where the bilinear and linear functionals are defined over the extended domain \( \Omega _{\textrm{e}} \) as
Above, \({\varvec{v}}\) denotes the test function, and \(\varvec{\varepsilon }[{\varvec{u}}]\) together with \(\varvec{\varepsilon }[{\varvec{v}}]\) are the strain tensors based on \({\varvec{u}}\) and \({\varvec{v}}\), respectively. Furthermore, \(\alpha \) is the indicator function
which penalizes the energy contribution of the fictitious domain. Considering a two-dimensional setting, in each finite cell, the displacement field \({\varvec{u}}^{(c)} = [u_1^{(c)}, u_2^{(c)}]^{\textrm{T}}\) is approximated using smooth shape functions
where \(N_{j}\) is the \(j^\text {th}\) shape function, \({\varvec{U}}^{\mathrm {(c)}}_{j}\) the displacement associated with the given shape function, and p the polynomial degree of the approximation.Footnote 3 The integration of the cell matrices is often performed using a local integration mesh (LIM) with \(n_{{\textrm{sc}}}\) sub-cells [5, 9, 14, 16]. Then, e.g., the cell-specific stiffness matrix is computed as
where \(\Omega _{}^{(c)}\) is the cell domain and \(\omega _k \subset \Omega _{}^{(c)}\) is the domain of the \(k^\text {th}\) sub-cell. Furthermore, \({\textrm{det}}({\varvec{J}}_{\eta \rightarrow \xi })\) and \({\textrm{det}}({\varvec{J}}_{\xi \rightarrow x})\) denote the Jacobi determinants of the mappings from the local space of the sub-cell to the local space of the cell, and from there to the global space, respectively [16]. Note that in Eq. (16), \({\varvec{C}}\) is the elasticity matrix in Voigt notation and \({\varvec{B}}\) contains the derivatives of the shape functions. Finally, assembling the cell matrices leads to the system of equations
where \({\varvec{K}}\), \({\varvec{D}}\), and \({\varvec{M}}\) are the global stiffness, damping, and mass matrices, respectively, and \({\varvec{F}}\) is the load vector. Furthermore, \({\varvec{U}}\), \(\dot{{\varvec{U}}}\), \(\ddot{{\varvec{U}}}\) denote the nodal unknowns, i.e., displacements, velocities, and accelerations, respectively.
2.1 Local enrichment
In case of multi-material problems, the \(C^0\)-continuous displacement field within a cell is poorly approximated by Eq. (15), leading to severe oscillations in the strain and stress fields, significantly deteriorated simulation accuracy, and finally, sub-optimal convergence rates [32]. Instead, for cells with material interfaces, \({\varvec{u}}^{(c)} \) is often approximated using a local enrichment approach originating from the XFEM [13, 19, 49], and applied in the context of FCM in Refs. [5, 15, 32]. The key idea is to compose \({\varvec{u}}\) by the smooth \({\varvec{u}}_{\textrm{s}}\) and enriched displacements \({\varvec{u}}_{\textrm{e}}\), such that \({\varvec{u}} = {\varvec{u}}_{\textrm{s}} + {\varvec{u}}_{\textrm{e}}\). Thus, Eq. (15) turns into [50]
where in the second term, \(n_{\textrm{inc}}^{(c)}\) is the number of inclusions present in the cell, \(\varvec{{\mathcal {E}}}_{m,j}^{\mathrm {(c)}}\) is the degree of freedom (DOF) associated with the enrichment of the \(m^\text {th}\) interface with its corresponding enrichment function \(\psi _m\). There are multiple ways how \(\psi _m\), which ensures the \(C^0\)-continuity of \({\varvec{u}}^{(c)} \), can be defined. In this contribution, we follow the modified-abs enrichment proposed by Moës et al. [49]
which by definition, vanishes at the uncut element boundaries and thus, parasitic terms and partially enriched transition elements can be avoided [34]. In Eq. (19), \(\varphi _m\) is the level-set function of the immersed inclusions, where the domain and its boundary are defined by
Furthermore, \(p_\psi \) is the polynomial degree for approximating \(\psi \). Thus, \(p_\psi \) is typically chosen based on the complexity of \(\partial \Omega _{{\textrm{inc}}}\) [32].
2.2 Boundary conditions
Due to the unfitted discretization used in the FCM, direct enforcement of the BCs on a set of boundary nodes is not an option. Since Neumann BCs are already included in the weak problem statement (second term on the right-hand side of Eq. (13)), they can be readily enforced by integrating over \(\Gamma _{{\textrm{N}}}\), which generally cuts through the finite cells. Dirichlet BCs require additional weak constraints to the system by using the penalty method [51, 52], Lagrange multiplier method [53, 54], or the Nitsche method [55, 56]. As mentioned before, in this contribution, the prime goal is to manufacture analytical solutions where weak boundary conditions are not necessary. However, for sake of completeness, in Sect. 3.1.1, one example is presented using the Nitsche method, which is typically favored in the context of FCM [24, 57,58,59]. Without derivation, in case of static problems, \({\mathcal {B}}_{\textrm{e}}\) and \({\mathcal {F}}_{\textrm{e}}\) for the symmetric Nitsche method read [60]
where \(\beta \) is a stability parameter, which should be high enough to ensure the coercivity of the weak form [61]. The value for \(\beta \) depends on multiple factors, such as mesh size, polynomial degree of the Ansatz space, and material properties [58]. The value for \(\beta \) can be estimated by solving a generalized eigenvalue problem globally [62], or locally in the individual elements [61, 63].
3 Manufactured solutions without weak boundary conditions
In this section, manufactured solutions are formulated, such that boundary conditions along the intersecting boundaries and interfaces are naturally fulfilled. This means zero tractions along free surfaces and continuous normal stresses along internal material interfaces are required. Since the BCs are already fulfilled, no weak enforcement of them is necessary. Such manufactured solutions are ideal for (i) the testing of codes which do not support weak BCs, or when (ii) the problem complexity should be purposely low while validating other features of the program. The numerical examples presented in this section are performed using our in-house Matlab code based on spectral cells with Lagrangian shape functions [35, 64, 65]. For the analytical derivation of the given examples, see the supplementary material in Sect. [40]
3.1 Void regions with radial displacements
For problems with void regions, the key idea is to assume a manufactured displacement \({\varvec{u}}\), which results in a stress field \(\varvec{\sigma }\) for which the tractions along the void’s boundary are vanishing
Then, \(\partial \Omega _{\textrm{void}}\) is treated as a Neumann BC in the FCM simulation, on which \({\varvec{t}}^{\textrm{h}} = {\varvec{t}}\) needs to be enforced. However, since \({\varvec{t}}\) is vanishing at hole’s boundary, \(\Omega _{\textrm{void}}\) is essentially a free boundary, and the BC is readily fulfilled. In the following, for problem with void regions, a circular/spherical geometry for \(\Omega _{\textrm{void}}\) is assumed and a radial displacement field is constructed defined in a polar/spherical coordinate system (see Appendix A.1.2 and A.2.2)
In this case, the zero traction condition involving tensor-valued variables reduces to a one-dimensional condition on a scalar field
where R is the circle’s/sphere’s radius. In 2D (plane stress state) for example, Eq. (26) reads
Zero tractions for the manufactured solution are obtained if the value within the brackets vanishes at the free boundary. This is possible in the following three cases:
-
1.
If \(\nu =0\) is assumed, the above expression reduces to the requirement of vanishing derivatives of \(u_{r}\) at \(r=R\), regardless of \(u_{\textrm{r}}(r=R)\).
-
2.
In case of \(E\ne 0\) and \(\nu \ne 0\), a simple approach is to construct \(u_{r}\), such that at \(r=R\), both the displacement and its first derivative with respect to r are zero, i.e., \(u_{r}(r=R)=0 \) and \(u_{{\textrm{r}},r}(r=R) = 0\).
-
3.
In the general case, where none of the material properties and field values are zero at \(r=R\), zero tractions can be achieved by fine tuning \(u_{r}\) and its derivative, such that Eq. (27) is fulfilled. This is typically achieved by introducing an additional parameter (see Sect. 3.1.1).
3.1.1 Plate with circular hole—static analysis
First, a static case featuring a rectangular plate \(\Omega _{{\textrm{phys}}}\) with a circular hole \(\Omega _{\textrm{void}}\) is investigated. Due to its symmetry, only a quarter of the problem is simulated, while appropriate symmetry BCs are applied, as depicted in Fig. 2a. For the material properties, \(E=1\) Pa and \(\nu = 0.3\) are chosen, while a plane stress state is considered. Furthermore, a radius of \(R=2\) m is chosen for the circular void and the manufactured displacement field is defined as
which will be prescribed to the numerical solution along the red boundaries, as indicated in Fig. 2a. In the static case of Eq. (10), Eq. (28) leads to the body load
In this sub-section, two values of c are investigated
leading to the radial field values depicted in Fig. 3. On the one hand, in case of a), c is chosen arbitrarily, leading to non-zero field values at \(r=R\), which need to be enforced in a weak sense. Here, we use the Nitsche method to prescribe the displacement value \(u_{r}(r=R) = 2\ln (2)\) (i.e., \(\partial \Omega _{\textrm{void}} \in \Gamma _{{\textrm{D}}}\) in Fig. 2a). On the other hand, in case of b), the parameter c is derived carefully (see Appendix B.1.1), such that \(\sigma _{\textrm{rr}}\) given by Eq. (27) vanishes at \(r=R\). Thus, \(\partial \Omega _{\textrm{void}}\) is a free boundary with readily fulfilled Neumann BC (i.e., \(\partial \Omega _{\textrm{void}} \in \Gamma _{{\textrm{N}}}\) in Fig. 2a). A numerical reproduction of the displacement field for case b) is depicted in Fig. 2b, where the simulation domain is discretized by \(13^2\) cells with \(p=5\). Note that the entirely fictitious cells are discarded, leading to 141 active finite cells. For more discussion regarding the numerical solution, see the end of this sub-section. The strain energy in the physical domain is computed analytically as (Appendix B.1.2)
where \(\Pi _{\Omega _{\textrm{e}}}\) is the strain energy in the square-shaped embedding domain
and \(\Pi _{\Omega _{\textrm{void}}}\) denotes the integral of the strain energy function over \(\Omega _{\textrm{void}}\), which is computed in polar coordinates (see Appendix A.1.3)
In the current example, various h-refinements are conducted using polynomial degrees of \(p=1,\ldots ,5\), and discretizations by 1, \(3^2\), \(7^2\), \(9^2\) and \(11^2\) finite cells. As of the numerical integration, an LIM with boundary aligned sub-cells based on the blending function method are used [14]. In the sub-cells, \((p+m)^2\) integration points are used, with \(m =\)1, 2, 2, 3, and 5 for \(p=\)1, 2, 3, 4 and 5, respectively.Footnote 4 In every simulation, for the uncut phyical cells, \(m=\)1 is chosen, and for integration points in \(\Omega _{\textrm{void}}\), \(\alpha = 10^{-12}\) is used.
Additional settings for the Nitsche method in case a): The curve integrals are computed directly on the circular arc with an exact mapping. For the integration along curve, \(p+k\) integration points are used with \(k=1\), 1, 2, 3, and 3 for the investigated polynomial degrees. Finally. the penalty parameter in Eqs. (22) and (23) is chosen as \(\beta = C E/h\).Footnote 5 Here, h is the edge length of the cells and C is chosen as \(C = 10^2\), \(10^3\), \(10^3\), \(10^3\), and \(10^5\) for \(p=1,\ldots ,5\).
The simulation quality is measured by the relative error in the energy norm
where \(\Pi ^{\textrm{h}}\) is the strain energy computed by FCM. The corresponding convergence curves over the degrees of freedom (DOF) are depicted in Fig. 4, where theoretical convergence rates with p/2 [37, 66], indicated by the black triangles, are obtained for both cases. Note that while the Nitsche method requires additional computational effort, Fig. 4b demonstrates that using the proposed approach (Eq. (31)), the manufactured solution can be reproduced with a really high accuracy without the need for a weak imposition of the boundary conditions. Here, we refer again to Fig. 2b, where the vanishing values of \(\sigma _{\textrm{rr}}\) on the circular boundary can be observed.
3.1.2 Plate with circular hole—undamped frequency domain analysis
In this section, a frequency domain analysis is conducted in order to verify the implementation of dynamic features such as the mass matrix. The manufactured solution in this example exhibits a harmonic time dependence
where \({\hat{u}}_{\textrm{r}}\) is the amplitude of the displacement field based on Eqs. (28) and (31),Footnote 6 and \(\Omega =2\pi f\) [Hz] is the circular frequency defined by the excitation frequency f [Hz]. Note that all other quantities, such as
are oscillating with the same harmonic function, or with the square of the harmonic function
Note that since \(\hat{{\varvec{u}}}\) equals \({\varvec{u}}\) from the previous example, and the material properties are also the same, \({\hat{\Pi }}\) is equal to the value defined in Eq. (32) for case b). Due to the same harmonic time dependence of the solution fields and body load, rather than solving Eq. (17) in space and time, the steady state problem
is solved. In the current case, the static body load of Eq. (29) is extended by an inertia term according to Eq. (10). Following from the accelerations given in Eq. (37), the magnitude of the harmonic radial body load is
Here, the second term should counteract the inertia effects, such that the manufactured displacement field is indeed reproduced by the numerical model. This is demonstrated in Fig. 5a, where a body load without the \(\rho \Omega ^2{\hat{u}}_{\textrm{r}}\) term results in a typical frequency plot with resonance amplitudes at the location of the system’s eigenfrequencies (red curve). However, counteracting the inertia forces enables an approximate reproduction of the manufactured displacement and strain energy regardless of \(\Omega \) (blue curve). Note that despite its constant appearance, the strain energy is not really constant, and the relative error in the energy norm reveals in Fig. 5b, that even with the presence of the \(\rho \Omega ^2{\hat{u}}_{\textrm{r}}\) term, excitation with a particular eigenfrequency leads to the decay of simulation accuracy.
For further analysis, the excitation frequencies \(f=1000\) Hz and \(f=3900\) Hz are selected (indicated in Fig. 5b) and the convergence results of the relative error in the energy norm are depicted in Fig. 6. For the h-refinement, the same settings are used as in the previous example. For an excitation frequency far away from an eigenfrequency (Fig. 6a), optimal convergence rates are obtained, demonstrating the capabilities of the current manufactured solution for verification of steady state FCM problems. However, a preliminary study should always be conducted, such that possible eigenfrequencies are avoided, since they spoil the convergence rates (Fig. 6b) and thus, the code verification.
3.1.3 Plate with circular hole—damped frequency domain analysis
In this section, the problem of Sect. 3.1.2 is extended by a velocity proportional damping term, for which, the body force vector is given in Eq. (10). Due to the presence of first time derivatives, Eqs. (36)–(37) are extended by
where, \(\hat{{\varvec{u}}}\) is the same as defined in Eqs. (28) and (31). Since the problem is solved in the frequency domain, only the spatial terms of Eq. (10) are of interest, thus, the magnitude of body load reads
For now, a stiffness proportional loss factor damping is used, which is typically defined for the global system of Eq. (17) as
By reverse engineering from Eq. (46), the closed-form expression for the manufactured body force reads
Note that Eq. (17) is a system of equations, where both the coefficient matrix and the right-hand side contain complex numbers, and thus, the global displacement vector \(\hat{{\varvec{U}}}\) is complex. Most solvers can handle complex inputs, however, if the used code does not provide this feature, the problem can be solved by separating the real and imaginary parts according to Ref. [67]. For the current example, all simulation settings are the same as before, with the exceptions, that \(f=100\,{\textrm{Hz}}\) is chosen, and additionally, a loss factor damping with \(\kappa =0.01\) is assumed. In Fig. 7a, the relative error in the energy norm \(e_{\textrm{E}}^{\textrm{rel}}\) is depicted, however, since the reference displacement field is known at every point, other standard error estimators can be used as well, such as the relative error of the displacement in the \(L_2\)-norm
as depicted in Fig. 7b. In Eq. (48), \({\varvec{e}} = {\varvec{u}}-{\varvec{u}}^{\textrm{h}}\), and for a given vector field \({\varvec{f}}\), and inner product defined as \(\langle \cdot , \cdot \rangle \), the \(L_2\)-norm reads
For both error measures, theoretical convergence rates are obtained, i.e., p/2 and \((p+1)/2\) for \(e_{\textrm{E}}^{rel}\) and \(e_{\textrm{L2}}^{rel}\) over DOF, respectively, as indicated by the black slopes. Thus, the verification of damped steady state problems in an embedded framework is also demonstrated. Note that for low levels of error, the integration accuracy and precision of the computational program and language can be limiting factors for the simulation quality, as seen by the plateau in the curve for \(p=5\).
3.1.4 Cube with spherical hole—static analysis
The manufactured solution given in Eq. (28) for the 2D case can be extended to 3D, however, in this case, the zero traction condition of Eq. (27) modifies to
leading to the c-parameter (cf. 2D case in Appendix B.1.1)
Finally, based on the chosen displacement field and constitutive law, the body load applied in the physical domain reads
The simulation domain for the current problem with a spherical void region is depicted in Fig. 8a. Note that for the current 3D case, the chosen displacement field leads to a strain energy, whose computation involves integrals of the form
which unfortunately, cannot be computed symbolically. Although, in a sense, this poses a limitation, a comparison of the numerical solution to the manufactured one is still possible, if e.g., the \(L_2\)-norm of the displacements is computed according to Eq. (48). For the current problem, h-refinements with \(p=1\), 2, and 3 are performed using discretizazions by 1, \(3^3\), \(7^3\), and \(11^3\) cells. The numerical integration is carried out using a novel integration scheme with merged octree sub-cells [16]. Here, the refinement level of the octree is set to \({\mathcal {R}}=p+2\), and in the physical cells as well as in the integration sub-cells, \((p+1)^3\) integration points are used. The corresponding results are depicted in Fig. 8b, where the black slopes indicate the theoretical convergence rates with \((p+1)/3\) for relative error in the \(L_2\)-norm \(e_{\textrm{L2}}^{\textrm{rel}}\) over DOF. The obtained excellent results indicate an error-free implementation and demonstrate the suitability of the MoMS in the context of 3D problems.
3.2 Inclusion regions with radial displacements
Manufactured radial displacement fields formulated in polar/spherical coordinate systems can be applied to problems with inclusions as well. In this case, the tensor-valued normal stress jump condition for the interface is reduced to the simple scalar condition
In particular, for a 2D case with a plane stress state, the above equation reads
where for the displacement field along the interface, the equality
must hold. Similar to Eq. (27), there exist multiple ways for choosing the material properties and manufacturing the displacement, such that the stress-continuity is fulfilled. For now,
is assumed. In this case, radial stress continuity is fulfilled if
where
3.2.1 Cube with spherical inclusion—static analysis
In this section, a 3D test is conducted involving a cube of side length \(a=4\) m (\(\Omega _{\textrm{mat}}\)) and a spherical inclusion with a radius of \(R=2\) m (\(\Omega _{\textrm{inc}}\)), as depicted in Fig. 9a. While on the three faces indicated by red, the manufactured displacement is prescribed, on the remaining faces, symmetry boundary conditions are used. For \(\Omega _{\textrm{mat}}\) in the given example, a radial displacement field defined in spherical coordinates is chosen
where s is a scaling factor chosen to be \(s=1/(1.6 \cdot 10^5)\). Furthermore, the displacement field in \(\Omega ^{\textrm{inc}}\) reads
Note that in this case, Eq. (58) holds, and c is defined based on Eq. (59). For \(u_{\textrm{r}}^{\textrm{mat}}(r=R) = 0\) and for any \(c\ne 1\), the manufactured displacement field exhibits a kink at the interface (Fig. 10b). In the current example, the material properties \(E_{\textrm{mat}} = 10\) Pa, \(E_{\textrm{inc}}=0.1\) Pa and \(\nu _{\textrm{mat}} = \nu _{\textrm{inc}} = 0.3\) are chosen, leading to \(c=100\). The deformed shape of the simulation domain is depicted in Fig. 9b. The body loads in spherical coordinate system read
for the inclusion and matrix, respectively, which are, in fact, equal due to the choice of c. The strain energy for the multi-material domain \(\Omega _{\textrm{mat}} \cup \Omega _{\textrm{inc}}\) reads
For the current example, the domain is discretized by a single cell only and a p-refinement is conducted with \(p=1,\,\ldots ,\, 6\). The computation of the enriched cell matrix is performed using a novel octree-based, Boolean integration approach (B-FCM) for multi-material problems [5]. The simulation accuracy is investigated in Fig. 10. Here, the global result is measured by the relative error in the energy norm \(e_{\textrm{E}}^{\textrm{rel}}\) in Fig. 10a, while in Fig. 10b–d, local results along the cut line B–B’ of Fig. 9a are depicted for \(p=6\), i.e., weakly continuous displacements, discontinuous strains, and continuous stresses. Both the global and local results indicate an accurate FCM approximation of the multi-material manufactured solution, even in the presence of embedded interfaces.
3.3 Multi-material manufactured solutions based on level-set functions
In this section, an alternative framework is introduced for deriving the manufactured solution, which is (i) based on Cartesian coordinates, (ii) ideal for problems with inclusions, and (iii) supports a much larger range of immersed geometries than the approach discussed so far. As point of departure,
is assumed, where \({\varvec{u}}_{\textrm{inc}}\) and \({\varvec{u}}_{\textrm{mat}}\) are the displacement fields on the two sides of the material interface \(\partial \Omega _{{\textrm{inc}}}\). A convenient way for introducing a kink in the displacement field along \(\partial \Omega _{{\textrm{inc}}}\) is where \({\varvec{u}}_{\textrm{inc}}\) is a uniformly scaled version of \({\varvec{u}}_{\textrm{mat}}\)
with vanishing displacements along the interface
Note that if Eq. (67) is violated, Eq. (66) would actually introduce a jump in the displacements, rather than a kink. Since level-set functions \(\varphi \) are, by definition, vanishing at \(\partial \Omega _{{\textrm{inc}}}\) (cf. Equation (21)), it is very convenient to manufacture \({\varvec{u}}\) using \(\varphi \). The parameter c in Eq. (66) will be defined soon, such that stress continuity along the interface normal \({\varvec{n}}_{\textrm{inc}}\) is fulfilled. As point of departure, instead of requiring the fulfillment of the original stress continuity condition given in Eq. (8), we rather seek a more general restriction in the whole domain
which naturally fulfills Eq. (8), yet it does not require specific knowledge of the interface normal \({\varvec{n}}_{\textrm{inc}}\). Thus, more general geometries can also be tested. From Eq. (66), it naturally follows that
and in case of a plane stress state in Cartesian coordinates, equality of the functions \(\sigma _{\textrm{xx}}^{\textrm{inc}}\) and \(\sigma _{\textrm{xx}}^{\textrm{mat}}\) implies
which is fulfilled for all values of \(\varepsilon _{\textrm{xx}}^{\textrm{mat}}\) and \(\varepsilon _{\textrm{yy}}^{\textrm{mat}}\) if
This condition also ensures the continuity of the stresses \(\sigma _{\textrm{yy}}^{\textrm{inc}} = \sigma _{\textrm{yy}}^{\textrm{mat}}\). Regarding the shear stresses, equality is fulfilled for
which is, if \(\nu ^{\textrm{inc}}=\nu ^{\textrm{mat}}\) is assumed, identical to Eq. (72). In the following sub-sections, the capabilities of this approach are presented for deriving closed-form reference solutions for inclusions of different geometries.
Remark on the assumption in Eq. (68): Note that the assumption is not valid for real physical problems, however, in the framework of MoMS, this issue does not constitute a problem. Despite the equality of the stress tensors, the (i) Young’s moduli in \(\Omega _{\textrm{mat}}\) and \(\Omega _{\textrm{inc}}\) are still different, and (ii) the displacement field is still \(C^0\)-continuous. Thus, the above introduced approach represents a legitimate inclusion and allows for validation of multi-material immersed boundary codes.
Remark on void regions: While the presented level-set-based approach is really convenient for problems with material interfaces, its application to problems with hole regions is more tedious. In the multi-material case, instead of requiring the stress fields to have a specific value along the material interface, only their continuity is required by the special case posed by Eq. (68). For hole regions, vanishing tractions have to be ensured, i.e., \(\varvec{\sigma }\) must take a specific value at the free boundary, such that
is fulfilled in a 2D setting. Note that when assuming a radial displacement field in polar/spherical coordinates with circular/spherical geometries (Sects. 3.1 and 3.2), the above system of equations reduces to Eqs. (26) and (54), and manufacturing \({\varvec{u}}\) for which Eq. (24) holds, is trivial. However, regardless of the chosen coordinate system, for hole regions with more complex shape, there is no way around taking \({\varvec{n}}_{\textrm{void}}\) into account.
Finally, we would like to point out, that these issues only arise if zero traction conditions should be naturally fulfilled by the manufactured displacement field. In case of weak boundary conditions (Sect. 2.2), no restrictions apply regarding the shape of the void region and the chosen coordinate system.
3.3.1 Plate with elliptic inclusion—static analysis
For demonstration of the methodology described above, a square domain with an elliptic inclusion is investigated (Fig. 11a), where the manufactured displacement field in \(\Omega _{\textrm{mat}}\)
is based on the level-set function of the ellipse
and \({\varvec{u}}_{\textrm{inc}}\) in \(\Omega _{\textrm{inc}}\) is computed based on Eq. (66). For the Young’s moduli, \(E_{\textrm{mat}}=1\) Pa and \(E_{\textrm{inc}}=10\) Pa are chosen, while in both domains, \(\nu _{\textrm{mat}} = \nu _{\textrm{inc}} = 0.3\) applies. Based on the chosen material parameters and Eq. (72), \(c=0.1\) holds for the current problem, and the corresponding \(C^0\)-continuous displacement field is depicted in Fig. 11b along the cut line C–C’ of Fig. 11a. Furthermore the body load vectors are defined as
which are for \({\varvec{b}} = -{\textrm{Div}}(\varvec{\sigma })\) in the static case, in fact, equalFootnote 7. Additionally, due to Eq. (78) being a second order polynomial in the current example, the body force field is constant. Finally, the closed-form expression for the strain energy reads
Since the manufactured solution is a quadratic polynomial and the elliptic interface can also be exactly approximated by 2\(^{\textrm{nd}}\) order polynomials, \(p = 2\) and \(p_\psi =2\) should yield basically exact results, provided that other numerical errors are also marginal. Indeed, a discretization of \(\Omega \) by \(2\times 2\) cells and numerical integration via sub-cells based on the blending function method yield practically exact results in the energy norm when compared to Eq. (81)
In Fig. 12a, the discontinuous strains are visualized for the chosen problem, where Eq. (69) holds, while Fig. 12b depicts a continuous stress field, which follows from the requirement posed in Eq. (68).
3.3.2 Plate with elliptic inclusion—damped frequency domain analysis
The previous example offers a great way for testing inclusions of more complex shapes in a single step. However, if a convergence analysis is desired, the initially polynomial displacement field can be multiplied by non-polynomial terms. For the current example, the same domain setup is used as in Fig. 11a, but Eq. (78) is extended by a trigonometric term
Furthermore, this time, a damped frequency domain analysis is conducted for \(f=100\) Hz, where the manufactured displacement is of the form
The material properties are chosen as \(E_{\textrm{mat}}=1.5\cdot 10^9\) Pa, \(\kappa _{\textrm{mat}}=1\) and \(\rho _{\textrm{mat}}=1\,{\textrm{kg}}/{\textrm{m}}^3\) in the matrix \(\Omega _{\textrm{mat}}\), and \(E_{\textrm{inc}}=6\cdot 10^9\) Pa, \(\kappa _{\textrm{inc}}=0.5\) and \(\rho _{\textrm{inc}}=2\,{\textrm{kg}}/{\textrm{m}}^3\) in the inclusion \(\Omega _{\textrm{inc}}\). In case of the current multi-material problem with loss factor damping, a complex c-parameter is used
leading to a displacement field, which has a real part over \(\Omega _{\textrm{mat}}\cup \Omega _{\textrm{inc}}\) and imaginary part over \(\Omega _{\textrm{inc}}\), as depicted in Fig. 13 for a discretization by \(4\times 4\) spectral cells with quintic shape functions. Note that unlike \(\mathfrak {Im}({\varvec{u}})\) in \(\Omega _{\textrm{mat}}\), \(\mathfrak {Re}({\varvec{u}})\) in \(\Omega _{\textrm{inc}}\) is not zero, it is only scaled down, similar to Fig. 11.
For multi-material problems in general, the damping parameter is yet another discontinuous material property. Thus, Eq. (46) cannot be applied globally to the assembled system matrices, but has to be realized on sub-cell-level during the numerical integration
where \(n_{\textrm{d}}\) is the number of material sub-domains in the cell c, while \(\kappa _i\) and \({\varvec{K}}^{(c)}_i\) are the damping parameter and stiffness matrix corresponding to the \(i^\text {th}\) material sub-domain, respectively. In the following, we perform h-refinements using discretization by \(2^2\), \(4^2\), \(8^2\), and \(15^2\) finite cells while approximating the displacements by polynomial degrees of \(p=1,2,\ldots ,5\). Due to the elliptic inclusion, the enrichment term is realized using \(p_\psi =2\) for all settings. The relative error in the \(L_2\)-norm indicates optimal convergence rates in Fig. 14 for the real and imaginary parts of \({\varvec{u}}\), which are both weakly continuous at the material interface, as depicted in Fig. 13.
3.3.3 Plate with elliptic inclusion—transient analysis
In the current example, a transient problem is considered by extending the manufactured solution of Sect. 3.3.1 by a time-dependent term
for which \(\tau (t) = \sin (\Omega \,t)\) is chosen with \(\Omega =10\,[{\textrm{Hz}}]\). The magnitude of the displacement field \(\hat{{\varvec{u}}}({\varvec{x}})\), the material properties, and the discretization are identical to those in Sect. 3.3.1. Additionally, in both domains, i.e., matrix and inclusion, \(\rho _{\textrm{mat}}=\rho _{\textrm{inc}}=1\) is chosen, and according to Eq. (10), the corresponding transient body forces read
Instead of solving the problem in the frequency domain, the Newmark time integration scheme is used in a time interval from \(t_0= 0\,[{\textrm{s}}]\) to \(t_{\textrm{end}}=1\,[{\textrm{s}}]\) using different numbers of time steps \(n_{\textrm{T}} = 2^m\), with \(m=3,4,\ldots ,12\)Footnote 8.
Initial conditions. For the transient solution, appropriate initial displacements and velocities are required according to Eqs. (4) and (5), respectively. These can be easily derived for the manufactured solution, where for the current case
Since the multi-material problem at hand is solved using the local enrichment approach, the mesh consists of a base mesh for the standard shape functions and an overlay mesh for the enrichment shape functions, with their associated DOFs \(\{{\varvec{U}}_{\alpha }\}_{\alpha =1}^{n_{\textrm{N}}}\) and \(\{\varvec{{\mathcal {E}}}_\alpha \}_{\alpha =1}^{n_{\textrm{N}}}\), respectively.Footnote 9 Consequently, initial values have to be assigned to both \({\varvec{U}}_{\alpha }\) and \(\varvec{{\mathcal {E}}}_\alpha \), such that \(\hat{{\varvec{u}}}^{\textrm{h}}\) is an appropriate approximation of \(\hat{{\varvec{u}}}\) in Eq. (91). Since it is not known a priori how the base and overlay meshes participate in the approximation of the \(C^0\)-continuous \(\hat{{\varvec{u}}}\), the direct assignment of initial values to \({\varvec{U}}_{\alpha }\) and \(\varvec{{\mathcal {E}}}_\alpha \) based on the known \(\hat{{\varvec{u}}}\) is not possible. As a solution to this problem, we propose the following approach: Prior to the transient analysis, a static manufactured problem is constructed with the displacement field \(\hat{{\varvec{u}}}\). For the current problem, the static analysis is nothing else than Sect. 3.3.1, where it was shown, that obtained nodal results yield the theoretically exact solution.Footnote 10 These nodal results, which include both \({\varvec{U}}_{\alpha }\) and \(\varvec{{\mathcal {E}}}_\alpha \), can be directly used for setting the initial conditions.
Remark. Note that the above mentioned issue only arises for numerical methods utilizing base and overlay meshes to account for material interfaces. For transient manufactured problems featuring only void regions, initial values only have to be assigned to \({\varvec{U}}_{\alpha }\). In this case, the known manufactured displacement field \(\hat{{\varvec{u}}}\) can be directly used to set
where \({\varvec{x}}_\alpha \) denotes the position of the node \(\alpha \).
Results. Let us evaluate the strain energy and displacement in x-direction at the point \({\varvec{p}}=[0,0]\) over the simulation time, denoted by \(\Pi ^{\textrm{h}}(t)\) and \(u_{\textrm{x}}^{\textrm{h}}({\varvec{p}},t)\), respectively, using different numbers of time steps (\(n_{\textrm{T}}=16\), 32 and 128), and compare them to the reference solutions \(\Pi (t)\) and \(u_{\textrm{x}}({\varvec{p}},t)\).
First, Fig. 15 demonstrates the necessity of the a priori static solution. Here, Eq. (92) is used for the initial values on the base mesh, while
is set on the overlay mesh. In addition to Fig. 15, the severely deteriorated results are also depicted in convergence analysis in Fig. 17, demonstrating how the wrong initial conditions can spoil the code verification of multi-material simulations in the context of the MoMS.
The correct results using the proposed approach for obtaining the initial conditions are depicted in Fig. 16. Already here, an increasing accuracy can be observed for finer time discretizations, reassuring about the code testing capabilities of the MoMS for enriched transient SCM simulations. That the numerical solution indeed converges to the manufactured one, is demonstrated in the remainder of this section.
For an arbitrary time-dependent function \(\chi (t)\), we denote the \(L_2\)-norm over the time domain \(T = [t_0,\, t_{\textrm{end}}]\) by
which can be simply computed for the discrete time data. Using Eq. (94), the relative error in the strain energy and displacement over time are computed as
and
The evaluation of Eqs. (95) and (96) for the investigated time discretization leads to quadratic convergence rates depicted in Fig. 17, as expected for the Newmark algorithm.
3.3.4 Plate with multiple inclusions—static analysis
In this section, the capabilities of the level-set-based approach are further demonstrated for the analysis of a problem involving multiple inclusions. In particular, a two-dimensional domain is considered including a matrix material \(\Omega _{\textrm{mat}}\) and four circular inclusions \(\{\Omega ^{(m)}_{\textrm{inc}}\}_{m=1}^4\), as depicted in Fig. 18a, where the level-set function
defines the \(m^\text {th}\) inclusion (Fig. 18b). The origins and radii of the inclusions are given in Table 1. The manufactured displacement field for the given problem is defined as
where \(\varphi ({\varvec{x}})\) is a common level-set function
which vanishes at all of the four interfaces (Fig. 18c)
Hence, the chosen manufactured displacement field fulfills Eq. (67). In our implementation, \(\varphi \) is only used for the manufactured displacement \({\varvec{u}}\); the geometry description and the construction of the enrichment functions are both based on the individual level-set functions \(\varphi _i\) (\(i = 1,2,3,4\)).Footnote 11 While in certain cases, the geometry description can be switched from \(\varphi _i\) to \(\varphi \), care must be taken when the geometries are overlapping,Footnote 12 as the resulting common \(\varphi \) can interfere with inside-outside tests and the definition of the manufactured solution. For the current example, the general case is investigated, where all inclusions have different material properties (Table 1), leading to scaling parameters unique to the individual material interfaces
Finally, the strain energy for the entire system is obtained by adding up the strain energies of the four quadrants indicated by the blue dashed lines in Fig. 18a, where for the \(i^\text {th}\) quadrant, the strain energy reads
Here, \(A_1\), \(A_2\), \(\ldots \), \(A_5\) are constants defined in Appendix B. For the current problem, a p-refinement with \(p=1\), 2, \(\ldots \), 8 is performed, while the domain is discretized by \(3^2\) and \(4^2\) finite cells according to Fig. 19. Although these meshes are almost identical, in the latter case, cells are exclusively cut by a single interface (light gray cells), in the former case, intersections by 2 (purple) and even 4 interfaces (yellow) per cell arise as well. Therefore, \(n_{\textrm{inc}}^{(c)}\) in Eq. (18) is either 1, 2, or 4, and the number of DOFs associated with the different cells is not uniform, which can be a potential source of error during code development. For both meshes, the numerical integration is carried out via sub-cells with blending geometry mapping and \((p+1)^2\) integration points are used. For the enrichment function defined in Eq. (19), \(p_\psi =2\) is used. According to Fig. 19, both of the investigated meshes lead to similar convergence curves and very low errors, reassuring about (i) the correct implementation of cells with multiple enrichment terms in the code and (ii) suitability of the current manufactured solution for problems with multiple inclusions. Additionally, the red curve, where no enrichment is used, demonstrates the results of an unsatisfactory simulation.
The local accuracy of the simulation is demonstrated below, where Fig. 20a depicts for \(3^2\) cells with \(p=8\) the accurately approximated \(C^0\)-continuous displacement field along the indicated two cut lines. Note that the different material properties (cf. Table 1) lead to displacement fields in the inclusions, which are only differing in their c-parameters. Finally, Fig. 20b depicts the continuous \(\sigma _{\textrm{xx}}\)-field for the correct results, and the typical oscillations when no enrichment is used, causing the sub-optimal convergence observed in Fig. 19. In conclusion, the current sub-section demonstrates that the MoMS can be simply applied to code verification even when simulating highly complex heterogeneous structures with multiple interfaces per cell.
4 Conclusion
The Method of Manufactured Solutions (MoMS) is a powerful tool for verifying the accuracy and correctness of numerical simulations based on carefully constructed reference solutions. In this contribution, the MoMS was successfully extended to immersed boundary methods, enabling an easy and robust testing of the advanced algorithms, typically used in such approaches. When deriving manufactured solutions for immersed problems, the unfitted nature of the mesh poses the need for additional considerations, such as whether the given problem should be reproduced with or without weak boundary conditions, and whether the immersed geometries are void regions or material inclusions. Our findings and conclusion regarding these topics and the derivation of more complex manufactured solutions are given below.
Boundary conditions: When reproducing the manufactured problem numerically, the required boundary conditions originate from the boundary values of the manufactured solution. Note that this not only includes the outer boundaries, but all immersed boundaries as well. The boundary values on these parts can be enforced in a weak sense, as demonstrated in Sect. 3.1.1, already enabling a verification of immersed simulation codes. However, in Sect. 3, the options for deriving manufactured solutions, which yield readily fulfilled boundary conditions for the immersed boundaries, are discussed. In this case, no weak boundary conditions are required, which decreases the simulation complexity by a considerable amount. On the other hand, however, more care is needed when deriving the manufactured solution. The workflow and characteristic features of this approach are thoroughly discussed in Sect. 3.1 for problems with void regions and in Sects. 3.2 and 3.3 for material inclusions. In all cases, the obtained theoretical convergence rates illustrate the capabilities of the proposed approach to be used in a robust code testing framework.
Void regions: If the immersed geometry represents a void region, weak boundary conditions can be avoided by manufacturing a displacement field resulting in zero tractions on the void’s boundary. According to our investigations, such displacement fields are best derived in cylindrichal/spherical coordinate systems, while assuming non-zero displacement components in the radial direction only. By additionally assuming a circular/spherical shape for the void, the necessary conditions for deriving the right displacement field reduce to an easily solvable single equation with only one unknown, as given in Eqs. (27) and (50).
Material interfaces: The above strategy (i.e., radial manufactured displacement field + circular/spherical geometry) is also applicable to problems with inclusions, as shown in Sect. 3.2. However, manufactured fields for multi-material problems are much more robustly derived by following the approach in Sect. 3.3, that features a carefully constructed \(C^0\)-continuous displacement field, which, together with the correct material properties, results in equal stress fields in the matrix and inclusion domains (remark in the next paragraph). A great advantage of this method is that the normal stress continuity is fulfilled regardless of the inclusion’s shape, thus, more complicated geometries can be considered. Finally, the problem can be easily stated in Cartesian coordinates, and a level-set function defining the inclusion can be directly used for constructing the displacement field. In Sect. 3.3.4, it is demonstrated that this approach can be even used for deriving manufactured analytical solutions involving multiple inclusions as well.
Physical nature of the manufactured solution: Working in the context of MoMS requires to think differently about solutions to PDEs. As long a manufactured solution satisfies the given mechanical governing equations, it can be tailored freely to exhibit certain properties. This freedom was exploited in Sect. 3.1 to achieve vanishing tractions for void regions. However, an even better example for this is the approach proposed in Sect. 3.3 for multi-material problems: While in reality, stress fields are hardly equal in the matrix and inclusion, the existence of such a case is not forbidden. Although common loading states usually do not cause such a behavior of the problem, via the carefully designed material properties, body loads and boundary conditions of a manufactured solution, the desired state can be achieved without violating the mechanical principles.
Extensions: Our investigations demonstrate that for both voids and inclusions, the static manufactured solutions can be easily extended to more complex mechanical frameworks, such as quasi-static problems without (Sect. 3.1.2) and with damping (Sects. 3.1.3 and 3.3.2), as well as to transient problems (Sect. 3.3.3). Furthermore, as shown in Sects. 3.1.2 and 3.1.4, the derived concepts for radial displacement fields can be also easily extended from 2D to 3D. Although not demonstrated in this paper, it is conjectured that the same applies to the multi-material manufactured solutions of Sect. 3.3 as well. Finally, as an extension to geometrically and physically non-linear problems, we refer to our recent article demonstrating the capabilities and robustness of our proposed code testing framework [7].
Using the introduced concepts, the paper demonstrates a wide application range of the MoMS in the context of immersed frameworks, that is easy to derive and to extend. We believe, that using the discussed techniques, the MoMS has a great potential when testing the desired parts of all immersed simulation tools.
Notes
Note that in the framework of XFEM, the problem formulation also often includes cracks.
At this point it is assumed, that the numerical code under investigation can handle distributed body loads.
Here, the same approximation is used for all components of the displacement field. However, it is also possible to use more advanced polynomial degree templates as shown in Ref. [48].
Due to the blending functions containing trigonometric terms in the current case, the often used \((p+1)^2\) integration points lead to observable integration errors. Thus, a slight increase of the number of integration points is necessary, to take the more complex geometry mapping of the sub-cells into account. Note that non-polynomial body loads can also increase the need for a more accurate numerical integration.
Note that robust implementation of the Nitsche method is based on a \(\beta \)-parameter which does not depend on a user input, as mentioned in Sect. 2.2. However, for the purpose of the current numerical example, this is not of importance, and instead, we rely on empirically chosen values.
This and the following sub-section are both based on case b) from Sect. 3.1.1.
Note that this is not the case, e.g., if inertia terms are also present. In that case, although \(\varvec{\sigma }_{\textrm{inc}}=\varvec{\sigma }_{\textrm{mat}}\) still holds, \({\varvec{b}}_{\textrm{mat}} = -{\textrm{Div}}(\varvec{\sigma }_{\textrm{mat}}) + \rho _{\textrm{mat}} \ddot{{\varvec{u}}}_{\textrm{mat}} \) and \({\varvec{b}}_{\textrm{inc}} = -{\textrm{Div}}(\varvec{\sigma }_{\textrm{mat}}) + \rho _{\textrm{inc}} c\ddot{{\varvec{u}}}_{\textrm{mat}}\).
The coarsest time discretization corresponds to \(2^3=8\) time steps with a step width of \(\Delta t = 1.25 \cdot 10^{-1}\,[{\textrm{s}}]\), while the finest discretization to \(2^{12}=4096\) time steps, with a step width of \(\Delta t \approx 2.44 \cdot 10^{-4}\,[{\textrm{s}}]\).
Here, \(\alpha \) is used for the global node numbering, and \(n_{\textrm{N}}\) stands for number of nodes in the mesh. Since for the current problem all 4 quadratic finite cells are enriched, \(n_{\textrm{N}}=25\) applies to both meshes.
Note that it is not a necessary requirement that the initial values are obtained with such extreme accuracy. In fact, the initial values need to be only as accurate as the spatial accuracy achievable by a given mesh. Thus, for any mesh and manufactured solution, the proposed approach yields the initial nodal values for the transient solution with sufficient accuracy.
See Ref. [68] for the discussion on unwanted artifacts associated with enrichment functions based on a common level-set functions.
In the current case, since the domains defined by \(\varphi _i < 0\) are not overlapping, the common level-set function (99) is negative only if a point is inside one of the circles, and positive otherwise, i.e., in the matrix material. Thus, an unaltered geometry description via \(\varphi \) is possible.
Here, the identity \(\exp ({\textrm{ln}}(c\,R)) = c\,R\) is exploited.
References
Comellas E, Pelteret J-P, Bangerth W (2023) I’m stuck! how to efficiently debug computational solid mechanics models so you can enjoy the beauty of simulations. Eur J Mech A Solids 97:104845
Babuška I, Nobile F, Tempone R (2007) Reliability of computational science. Numer Methods Partial Differ Equ 23(4):753–784
Schröder J, Wick T, Reese S, Wriggers P, Müller R, Kollmannsberger S, Kästner M, Schwarz A, Igelbüscher M, Viebahn N, Bayat HR, Wulfinghoff S, Mang K, Rank E, Bog T, D’Angella D, Elhaddad M, Hennig P, Düster A, Garhuom W, Hubrich S, Walloth M, Wollner W, Kuhn C, Heister T (2020) A selection of benchmark problems in solid mechanics and applied mathematics. Arch Comput Methods Eng 28:713–751
Salari K, Knupp P (2000) Code verification by the method of manufactured solutions. Technical report
Petö M, Eisenträger S, Duvigneau F, Juhre D (2023) Boolean finite cell method for multi-material problems including local enrichment of the ansatz space. Comput Mech 72:743–746
Burman E, Hansbo P, Larson MG (2022) CutFEM based on extended finite element spaces. Numer Math 152(2):331–369
Petö M, Juhre D, Eisenträger S (2023) Code verification of non-linear immersed boundary simulations using the method of manufactured solutions. Proc Appl Math Mech. https://doi.org/10.1002/pamm.202300068
Parvizian J, Düster A, Rank E (2007) Finite cell method - \(h\)- and \(p\)-extension for embedded domain problems in solid mechanics. Comput Mech 41:121–133
Düster A, Parvizian J, Yang Z, Rank E (2008) The finite cell method for three-dimensional problems of solid mechanics. Comput Methods Appl Mech Eng 197:3768–3782
Duczek S, Joulaian M, Düster A, Gabbert U (2014) Numerical analysis of Lamb waves using the finite and spectral cell methods. Int J Numer Meth Eng 99(1):26–53
Joulaian M, Duczek S, Gabbert U, Düster A (2014) Finite and spectral cell method for wave propagation in heterogeneous materials. Comput Mech 54(3):661–675
Burman E, Claus S, Hansbo P, Larson MG, Massing A (2014) CutFEM: discretizing geometry and partial differential equations. Int J Numer Meth Eng 104(7):472–501
Fries T-P, Belytschko T (2010) The extended/generalized finite element method: an overview of the method and its applications. Int J Numer Methods Eng 84:253–304
Kudela L, Zander N, Bog T, Kollmannsberger S, Rank E (2015) Efficient and accurate numerical quadrature for immersed boundary methods. Adv Model Simul Eng Sci 2(10):1–22
Düster A, Allix O (2019) Selective enrichment of moment fitting and application to cut finite elements and cells. Comput Mech 65(2):429–450
Petö M, Garhuom W, Duvigneau F, Eisenträger S, Düster A, Juhre D (2022) Octree-based integration scheme with merged sub-cells for the finite cell method: application to non-linear problems in 3D. Comput Methods Appl Mech Eng 401:115565
Garhuom W, Düster A (2022) Non-negative moment fitting quadrature for cut finite elements and cells undergoing large deformations. Comput Mech 80:1059–1081
Natarajan S, Mahapatra DRS, Bordas SPA (2010) Integrating strong and weak discontinuities without integration subcells and example applications in an XFEM/GFEM framework. Int J Numer Methods Eng 83:269–294
Chin EB, Sukumar N (2019) Modeling curved interfaces without element-partitioning in the extended finite element method. Int J Numer Meth Eng 120(5):607–649
Yu P, Hao Q, Wang X, Yu Y, Zhan Z (2022) Mixed integration scheme for embedded discontinuous interfaces by extended finite element method. Front Earth Sci 9:829203
Lee S, Kang T, Jung ID, Ji W, Chung H (2023) An ANN-assisted efficient enriched finite element method via the selective enrichment of moment fitting. Eng Comput. https://doi.org/10.1007/s00366-023-01785-z
Kadapa C, Wang X, Mei Y (2022) A comprehensive assessment of accuracy of adaptive integration of cut cells for laminar fluid-structure interaction problems. Comput Math Appl 122:1–18
de Prenter F, Verhoosel CV, van Zwieten GJ, van Brummelen EH (2017) Condition number analysis and preconditioning of the finite cell method. Comput Methods Appl Mech Eng 316:297–327
de Prenter F, Verhoosel CV, van Brummelen EH (2019) Preconditioning immersed Isogeometric finite element methods with application to flow problems. Comput Methods Appl Mech Eng 348:604–631
Garhuom W, Usman K, Düster A (2022) An eigenvalue stabilization technique to increase the robustness of the finite cell method for finite strain problems. Comput Mech 69(5):1225–1240
Sauerland H, Fries T-P (2013) The stable XFEM for two-phase flows. Comput Fluids 87:41–49
Loehnert S (2014) A stabilization technique for the regularization of nearly singular extended finite elements. Comput Mech 54(2):523–533
Burman E, Hansbo P (2010) Fictitious domain finite element methods using cut elements: I. a stabilized Lagrange multiplier method. Comput Methods Appl Mech Eng 199(41–44):2680–2686
Burman E, Hansbo P (2012) Fictitious domain finite element methods using cut elements: II. a stabilized Nitsche method. Appl Numer Math 62(4):328–341
Larsson K, Kollmannsberger S, Rank E, Larson MG (2022) The finite cell method with least squares stabilized Nitsche boundary conditions. Comput Methods Appl Mech Eng 393:114792
Pande S, Papadopoulos P, Babuška I (2021) A cut-cell finite element method for Poisson’s equation on arbitrary planar domains. Comput Methods Appl Mech Eng 383:113875
Joulaian M, Düster A (2013) Local enrichment of the finite cell method for problems with material interfaces. Comput Mech 52(4):741–762
Cheng KW, Fries T-P (2009) Higher-order XFEM for curved strong and weak discontinuities. Int J Numer Meth Eng 82:564–590
Khoei AR, Vahab M, Ehsani H, Rafieerad M (2015) X-FEM modeling of large plasticity deformation; a convergence study on various blending strategies for weak discontinuities. Eur J Comput Mech 24(3):79–106
Nicoli S, Agathos K, Chatzi E (2022) Moment fitted cut spectral elements for explicit analysis of guided wave propagation. Comput Methods Appl Mech Eng 398:115140
Hughes TJR (2000) The finite element method: linear static and dynamic finite element analysis. Dover Pubn Inc, New York
Szabó B, Babuška I (2011) Introduction to finite element analysis. John Wiley & Sons, New York
Kalisch J, Glüge R (2015) Analytical homogenization of linear elasticity based on the interface orientation distribution—a complement to the self-consistent approach. Compos Struct 126:398–416
Wolfram Research, Inc. Mathematica, Version 12.0. Champaign, Illinois, USA (2019)
Suplementary mathematica notebooks. https://github.com/marton-petoe/MoMS_Mathemtica_Notebooks. Date: 2023-10-16
ASME V &V 10-2006. Guide for verification and validation in computational solid mechanics. The American Society of Mechanical Engineers (2016)
Schwer LE (2007) An overview of the PTC 60/V &V 10: guide for verification and validation in computational solid mechanics. Eng Comput 23(4):245–252
Roache PJ (2001) Code verification by the method of manufactured solutions. J Fluids Eng 124(1):4–10
Dauge M, Düster A, Rank E (2015) Theoretical and numerical investigation of the finite cell method. J Sci Comput 65(3):1039–1064
Szabó B, Düster A, Rank E (2004) The \(p\)-version of the finite element method. In: Encyclopedia of computational mechanics, chapter 5
Düster A, Rank E, Szabó B (2017) The \(p\)-version of the finite element and finite cell methods. In: Encyclopedia of computational mechanics, pp 1–35
Schillinger D, Ruess M (2014) The finite cell method: a review in the context of higher-order structural analysis of CAD and image-based geometric models. Arch Comput Methods Eng 22(3):391–455
Düster A, Bröker H, Rank E (2001) The p-version of the finite element method for three-dimensional curved thin walled structures. Int J Numer Meth Eng 52:673–703
Moës N, Cloirec M, Cartraud P, Remacle J-F (2003) A computational approach to handle complex microstructure geometries. Comput Methods Appl Mech Eng 192(28–30):3163–3177
Fries T-P (2008) A corrected XFEM approximation without problems in blending elements. Int J Numer Meth Eng 75(5):503–532
Babuška I, Zlámal M (1973) Nonconforming elements in the finite element method with penalty. SIAM J Numer Anal 10(5):863–875
Babuska I (1973) The finite element method with penalty. Math Comput 27(122):221
Pino SD, Pironneau O (2003) A fictitious domain based general PDE solver. Numerical Methods for Scientific Computing Variational Pproblems and Applications
Zhuang X (2010) Meshless methods: theory and application in 3D fracture modelling with level sets. PhD thesis, University of Durham
Nitsche J (1971) über ein variationsprinzip zur lösung von dirichlet-problemen bei verwendung von teilräumen, die keinen randbedingungen unterworfen sind. Abh Math Semin Univ Hambg 36(1):9–15
Hansbo A, Hansbo P (2004) A finite element method for the simulation of strong and weak discontinuities in solid mechanics. Comput Methods Appl Mech Eng 193:3523–3540
Schillinger D, Ruess M, Zander N, Bazilevs Y, Düster A, Rank E (2012) Small and large deformation analysis with the \(p-\) and B-spline versions of the finite cell method. Comput Mech 50(4):445–478
Zander N, Kollmannsberger S, Ruess M, Yosibash Z, Rank E (2012) The finite cell method for linear thermoelasticity. Comput Math Appl 64(11):3527–3541
Schillinger D, Cai Q, Mundani R-P, Rank E (2013) A review of the finite cell method for nonlinear structural analysis of complex CAD and image-based geometric models. In: Lecture notes in computational science and engineering. Springer, Berlin Heidelberg, pp 1–23
Stavrev A, Nguyen LH, Shen R, Varduhn V, Behr M, Elgeti S, Schillinger D (2016) Geometrically accurate, efficient, and flexible quadrature techniques for the tetrahedral finite cell method. Comput Methods Appl Mech Eng 310:646–673
Ruess M, Schillinger D, Bazilevs Y, Varduhn V, Rank E (2013) Weakly enforced essential boundary conditions for NURBS-embedded and trimmed NURBS geometries on the basis of the finite cell method. Int J Numer Meth Eng 95(10):811–846
Griebel M, Schweitzer MA (2003) A particle-partition of unity method part V: boundary conditions. In: Geometric analysis and nonlinear partial differential equations. Springer, Berlin Heidelberg, pp. 519–542
Embar A, Dolbow J, Harari I (2010) Imposing Dirichlet boundary conditions with Nitsche’s method and spline-based finite elements. Int J Numer Meth Eng 83(7):877–898
Gopalakrishnan S, Chakraborty A, Mahapatra DR (2008) Spectral finite element method. Springer, Berlin
Duczek S (2014) Higher order finite elements and the fictitious domain concept for wave propagation analysis. PhD thesis, Otto von Guericke University Magdeburg
Zienkiewicz OC, Taylor RL, Zhu JZ (2005) The finite element method: its basis and fundamentals. Butterworth-Heinemann, Oxford
Zienkiewicz OC (2000) The finite element method, volume 1: the basis, 5th edn. Butterworth-Heinemann, Oxford
Tran AB, Yvonnet J, He Q-C, Toulemonde C, Sanahuja J (2010) A multiple level set approach to prevent numerical artefacts in complex microstructures with nearby inclusions within XFEM. Int J Numer Meth Eng 85(11):1436–1459
Acknowledgements
The authors thank the German Research Foundation (DFG) for its financial support under the Grant DU 1904/2-1, Project-Nr. 423317638. Furthermore, Márton Petö also acknowledges the German Academic Exchange Service (DAAD) for supporting his research abroad at University of New South Wales (UNSW) in Sydney, Australia, where the preliminary simulations for this article were conducted. Finally, Márton Petö would like to express his gratefulness to Simon Pfeil for the fruitful discussions about the topic of this article.
Funding
Open Access funding enabled and organized by Projekt DEAL.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendices
Curvilinear coordinate systems
In Sects. 3.1 and 3.2, instead of a Cartesian coordinate system, polar and spherical coordinate systems are used, for which the necessary relations are briefly elaborated below.
1.1 Polar coordinates
Here, a polar coordinate system is assumed with the coordinates \(r\ge 0\), and \(\theta \in [0,\,2\pi [\), measuring the distance from the origin, and the polar angle, respectively (Fig. 21a).
1.1.1 General displacement field
Assuming a polar displacement field in the plane \({\varvec{u}}(r,\theta ) = [u_{r}(r,\theta ),\, u_{\theta }(r,\theta )]\), the strain and stress relations in case of a plane stress state read
1.1.2 Radial displacement field
In this article, radial displacements are considered, i.e., \(u_{\textrm{r}}(r)\ne 0\), while \(u_\varphi =0\). In this special case, Eqs. (103)–(108) reduce to
Resulting from the divergence operator in a polar coordinate system, the body load vector for the static case reads
1.1.3 Integration
In polar coordinates, the indefinite double integral of a function f is written as
In case of computation of the strain energy \(\Pi \), f is the strain energy density function \({\tilde{\psi }}\), which is given for the radial strain and stress fields as
1.1.4 Conversion to Cartesian coordinates
For a given point \({\varvec{x}} = [x,\,y]\) in space, polar coordinates are computed as
and the projection of a vector pointing in radial direction \(v_{\textrm{r}}\) at \({\varvec{x}}\) to the Cartesian axes is realized by
1.2 Spherical coordinates
Here, a spherical coordinate system is assumed with the coordinates \(r\ge 0\), \(\theta \in [0,\,2\pi [\), and \(\phi \in [0,\,\pi [\), measuring the distance from the origin, the polar angle, and the azimuthal angle, respectively (Fig. 21b).
1.2.1 General displacement field
For a general displacement field in spherical coordinates \({\varvec{u}}(r,\theta ,\phi ) = [u_{r}(r,\theta ,\phi ),\, u_{\theta }(r,\theta ,\phi ),\,u_{\phi }(r,\theta ,\phi )]\), the strain relations read
while stresses are defined by
1.2.2 Radial displacement field
In this article, radial displacements are considered, i.e., \(u_{r}(r)\ne 0\), while \(u_{\theta }=u_{\phi }=0\). In this special case, Eqs.(121)–(132) reduce to
All other quantities are zero. Resulting from the divergence operator in a spherical coordinate system, the body load vector for the static case read
1.2.3 Integration
In spherical coordinates, the indefinite triple integral of a function f is written as
In case of computation of the strain energy \(\Pi \), f is the strain energy density function \({\tilde{\psi }}\), which is given for the radial strain and stress fields as
1.2.4 Conversion to Cartesian coordinates:
For a given point \({\varvec{x}} = [x,\,y,\,z]\) in space, spherical coordinates are computed as
and the projection of a radial vector component \(v_{\textrm{r}}\) at \({\varvec{x}}\) to the Cartesian axes is realized by
Supplementary data for the numerical examples
1.1 Plate with circular hole
1.1.1 Parameter c for the displacement field
For the manufactured displacement field in Eq. (28), the radial derivative reads
Inserting this and Eq. (28) into Eq. (27) yields
which is fulfilled in the general case, if the term inside the bracket vanishes. With minor algebraic manipulations and by taking the exponential function of both sides
the value of c, for which \(\sigma _{\textrm{rr}}(r=R)=0\), is found to beFootnote 13
1.1.2 Strain energy
The closed-form expression when integrating the strain energy density over a quarter of the square domain reads
where
Additionally, the strain energy function integrated over the quarter disk results in
1.2 Plate with multiple inclusions
Below, the constants used in Eq. (102) are given
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Petö, M., Gorji, M., Duvigneau, F. et al. Code verification of immersed boundary techniques using the method of manufactured solutions. Comput Mech 73, 1283–1309 (2024). https://doi.org/10.1007/s00466-023-02411-x
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00466-023-02411-x