1 Introduction

The peridynamic theory provides a nonlocal reformulation of classical continuum mechanics: the internal forces are evaluated with integral equations, which are valid regardless of the presence of discontinuities in the displacement field. Hence, peridynamics can naturally model crack initiation, propagation and branching in solids. The first formulation of the peridynamic theory was the bond-based version [1], in which the Poisson’s ratio is restricted to a fixed value. Subsequently, state-based peridynamics was developed [2], introducing the possibility of varying the Poisson’s ratio. In the literature, there are many examples of applications [3, 4], ranging from complex crack patterns, such as spontaneous branching [5], to multi-physics problems involving fracture [6, 7].

Peridynamic points interact with each other up to a finite distance \(\delta\), called “horizon”. The “neighborhood” of a point is the set of all the points interacting with that point. Therefore, the neighborhood has a circular shape in 2D problems and a spherical shape in 3D problems. The peridynamic equation of motion is based on the spatial integration over the neighborhood of the internal forces, which are generated by the interactions between neighboring points. In practice, the integration of the peridynamic equation of motion is carried out by means of numerical tools. The body can be discretized by a uniform or non-uniform grid (see for instance [8,9,10]). Various methods have been utilized to integrate numerically peridynamic equations: meshfree method with composite midpoint quadrature [11,12,13,14], Gauss-Hermite quadrature [12], finite element method [12, 15, 16], collocation method [17, 18] and an adaptive integration method with error control [19]. Thanks to its simplicity of implementation and relatively low computational cost compared to other approaches, the meshfree method with a uniform grid is the most commonly used for peridynamic simulations. In this method, the body is discretized in volume cells with a square shape in 2D problems and cubic in 3D, and the nodes lie at the center of the corresponding cells. The spatial integration over the neighborhood is transformed into a summation of integrals over cells and the midpoint quadrature rule is then applied in each cell, in which the nodes are employed as quadrature points.

However, near the boundary of the neighborhood, some cells are only partially within the neighborhood itself. Therefore, the quadrature weights related to those cells are computed as the fraction of cell volume which actually lies inside the neighborhood. The intersection area or volume of those cells with the neighborhood is also referred to as “partial area” in 2D and “partial volume” in 3D. The accuracy and convergence of the peridynamic results depend on the algorithm to compute the quadrature weights, i.e., the partial areas or volumes [13, 14, 20].

The first algorithm proposed in [11] considers the nodes within the neighborhood with their entire cell (even if a part of the volume is partially outside the neighborhood) and neglects the nodes outside the neighborhood (even if their cell is partially inside the neighborhood). This approach, under grid refinement, leads to an oscillatory convergence behavior in which the fluctuations seem rather random [13]. Many other algorithms to approximate the partial volumes have been proposed since then. An approximation based on the distance between neighboring nodes is proposed in [21], which improves the computation of the partial volumes of nodes within the neighborhood. A similar approximation is used in [22, 23] to include the previously neglected partial volumes of nodes outside the neighborhood but with a part of the cell inside it. These algorithms reduce, but never eliminate, the seemingly random fluctuations of the convergence behavior. Subsequently, the algorithm to compute analytically the partial areas has been developed in [13]: the types of intersection between the neighborhood and the cells are rigorously categorized and then subdivided into domains of basic geometry (triangles, rectangles and circular segments), for which the analytical computation of the area is straightforward. Using this algorithm, the convergence behavior is smoothly oscillatory and the simulations yield results affected by a smaller error, on average, compared to the previously mentioned algorithms. In [13], it is also suggested to use the centroids of the partial areas as quadrature points, but this significantly increases the complexity of the computational model. The analytical computation of the partial volumes in 3D problems is much more complex and no algorithm is currently available for such purpose. The partial volumes can be computed numerically by two proposed algorithms, one based on the trapezoidal rule [19] and one based on a process of recursive subdivisions and sampling [14]. However, to reach the desired accuracy the computational cost may be very high. Other algorithms, specialized for non-uniform grids, are presented in [9, 22, 24, 25].

The aim of this paper is to simplify the implementation of the algorithm to compute analytically the partial areas presented in [13] by skipping the step of subdivision of the intersection area in basic geometries, and to develop an algorithm for the analytical computation of the partial volumes. In order to achieve this, we solve directly the integrals which describe all the possible intersection areas or volumes. Actually, some integrals involved in the computation of the partial volumes are not explicitly solvable. Hence, we perform a Taylor series expansion of those functions and integrate the polynomials. The computation of the partial volumes converges to the analytical solution if the sum of infinite terms is not truncated. This, clearly, is not possible in a numerical model, but we will show that the algorithm is able to reach values of the error very close to machine precision with little computational effort. The numerical results obtained with the new algorithm show an evident improvement in the accuracy and in the convergence behavior when compared to the results obtained by the algorithm based on the approximation proposed by [22], which is arguably the most commonly used in engineering applications. We compared the numerical results by using the ordinary state-based version of the peridynamic theory, but the algorithm can be used with the bond-based version as well.

The paper is divided as follows. Section 2 reviews the basics of the state-based peridynamic theory and its discretized formulation. Section 3 presents the innovative algorithms for the computation of the partial areas and partial volumes. Section 4 contains several numerical examples that show the improvements provided by the proposed algorithm for the computation of the partial volumes with respect to the most commonly used algorithm. Section 5 draws the conclusions of the work.

2 Peridynamic theory

The peridynamic theory is a continuum theory based on nonlocal interactions between material points [1]. The derived numerical formulation is a very useful tool for simulating crack propagation in solid bodies. In the following, we present the fundamentals of the ordinary state-based peridynamics and the discretized formulae which could be implemented in a computational code.

2.1 Continuum model

The nonlocal interaction between two points, \({\mathbf {x}}\) and \({\mathbf {x}}'\), in a peridynamic body \(\mathcal {B}\) is described by a quantity named “bond”:

$$\begin{aligned} {\varvec{\xi }} := {\mathbf {x}}' - {\mathbf {x}} \, , \end{aligned}$$
(1)

where the point \({\mathbf {x}}'\) is contained in the neighborhood \(\mathcal {H}_{{\mathbf {x}}} := \big \{ \, {\mathbf {x}}' \in \mathcal {B}: \Vert {\varvec{\xi }}\Vert \le \delta \, \big \}\). The relative displacement vector \({\varvec{\eta }}\) is defined as

$$\begin{aligned} {\varvec{\eta }} := {\mathbf {u}}({\mathbf {x}}',t) - {\mathbf {u}}({\mathbf {x}},t) \, , \end{aligned}$$
(2)

where \({\mathbf {u}}\) is the displacement field. Note that \({\varvec{\xi }} + {\varvec{\eta }}\) is the relative position of points \({\mathbf {x}}\) and \({\mathbf {x}}'\) after the deformation occurred.

The state-based peridynamic equation of motion of a point \({\mathbf {x}}\) within the body \(\mathcal {B}\) is given by [2]

$$\begin{aligned} \rho ({\mathbf {x}}) \, \ddot{{\mathbf {u}}}({\mathbf {x}},t) = \int _{\mathcal {H}_{{\mathbf {x}}}} \big ( \, \underline{{\mathbf {T}}} [{\mathbf {x}},t] \langle {\varvec{\xi }} \rangle - \underline{{\mathbf {T}}} [{\mathbf {x}}',t] \langle -{\varvec{\xi }} \rangle \, \big ) {\mathrm {d}} {V}_{{\mathbf {x}}'} + {\mathbf {b}}({\mathbf {x}},t) \, , \end{aligned}$$
(3)

where \(\rho\) is the material density, \(\ddot{{\mathbf {u}}}\) is the acceleration field, \(\underline{{\mathbf {T}}}\) is the force state, \({\mathrm {d}} {V}_{{\mathbf {x}}'}\) is the differential volume of a point \({\mathbf {x}}'\) within the neighborhood \(\mathcal {H}_{{\mathbf {x}}}\) and \({\mathbf {b}}\) is the external force density field. The notation \(\underline{{\mathbf {T}}} [{\mathbf {x}},t] \langle {\varvec{\xi }} \rangle\) means that the state \(\underline{{\mathbf {T}}}\) depends on the position of the point \({\mathbf {x}}\) and on the time t, and operates on the bond \({\varvec{\xi }}\). In an ordinary state-based peridynamic model, the force state is aligned with the corresponding bond for any deformation, as depicted in Fig. 1. For the purposes of the paper, it suffices to limit the study to quasi-static problems [26,27,28]. Hence, the peridynamic equilibrium equation is derived from Eq. (3) by dropping the dependence on time:

$$\begin{aligned} - \int _{\mathcal {H}_{{\mathbf {x}}}} \big ( \, \underline{{\mathbf {T}}} [{\mathbf {x}}] \langle {\varvec{\xi }} \rangle - \underline{{\mathbf {T}}} [{\mathbf {x}}'] \langle -{\varvec{\xi }} \rangle \, \big ) {\mathrm {d}} {V}_{{\mathbf {x}}'} = {\mathbf {b}} ({\mathbf {x}}) \, . \end{aligned}$$
(4)
Fig. 1
figure 1

Body \(\mathcal {B}\) modelled with ordinary state-based peridynamics: the force states \(\underline{{\mathbf {T}}} [{\mathbf {x}}] \langle {\varvec{\xi }} \rangle\) and \(\underline{{\mathbf {T}}} [{\mathbf {x}}'] \langle -{\varvec{\xi }} \rangle\) arise in the bond \({\varvec{\xi }}\) due to the deformation of the body

The reference position scalar state \(\underline{x}\), representing the bond length, the extension scalar state \(\underline{e}\), describing the elongation (or contraction) of the bond in the deformed body, and the deformed direction vector state \(\underline{{\mathbf {M}}}\), the unit vector in the direction of \(\underline{{\mathbf {T}}}\), are, respectively, defined as

$$\begin{aligned} \underline{x} \langle {\varvec{\xi }} \rangle&:= \Vert {\varvec{\xi }} \Vert \, , \end{aligned}$$
(5)
$$\begin{aligned} \underline{e} \langle {\varvec{\xi }} \rangle&:= \Vert {\varvec{\xi }} + {\varvec{\eta }} \Vert - \Vert {\varvec{\xi }} \Vert \, , \end{aligned}$$
(6)
$$\begin{aligned} \underline{{\mathbf {M}}} \langle {\varvec{\xi }} \rangle&:= \frac{{\varvec{\xi }} + {\varvec{\eta }}}{\Vert {\varvec{\xi }} + {\varvec{\eta }} \Vert } \, . \end{aligned}$$
(7)

The weighted volume m and the dilatation \(\theta\) of a point \({\mathbf {x}}\) are defined as

$$\begin{aligned} m_{{\mathbf {x}}}&:= \int _{\mathcal {H}_{{\mathbf {x}}}} \underline{\omega } \langle {\varvec{\xi }} \rangle \left( \underline{x} \langle {\varvec{\xi }} \rangle \right) ^2 {\mathrm {d}} {V}_{{\mathbf {x}}'} \, , \end{aligned}$$
(8)
$$\begin{aligned} \theta _{{\mathbf {x}}}&:= \frac{3}{m_{{\mathbf {x}}}} \int _{\mathcal {H}_{{\mathbf {x}}}} \underline{\omega } \langle {\varvec{\xi }} \rangle \, \underline{x} \langle {\varvec{\xi }} \rangle \, \underline{e} \langle {\varvec{\xi }} \rangle {\mathrm {d}} {V}_{{\mathbf {x}}'} \, , \end{aligned}$$
(9)

where \(\underline{\omega }\) is a prescribed spherical influence function [29]. We adopt the Gaussian influence function

$$\begin{aligned} \underline{\omega } \langle {\varvec{\xi }} \rangle := \exp \left( -\frac{\Vert {\varvec{\xi }} \Vert ^2}{\delta ^2} \right) \, . \end{aligned}$$
(10)

Adopting the linear peridynamic solid model [2], the force state is computed as

$$\begin{aligned} \underline{{\mathbf {T}}} [{\mathbf {x}}] \langle {\varvec{\xi }} \rangle = \left[ \left( 3K - 5 \mu \right) \, \frac{\underline{\omega } \langle {\varvec{\xi }} \rangle \, \underline{x} \langle {\varvec{\xi }} \rangle }{m_{{\mathbf {x}}}} \, \theta _{{\mathbf {x}}} + 15 \mu \, \frac{\underline{\omega } \langle {\varvec{\xi }} \rangle \, \underline{e} \langle {\varvec{\xi }} \rangle }{m_{{\mathbf {x}}}} \right] \underline{{\mathbf {M}}} \langle {\varvec{\xi }} \rangle \, , \end{aligned}$$
(11)

where K is the bulk modulus and \(\mu\) is the shear modulus. Since \(\underline{{\mathbf {M}}} \langle {\varvec{\xi }} \rangle = -\underline{{\mathbf {M}}} \langle -{\varvec{\xi }} \rangle\), the ordinary state-based peridynamic equilibrium equation becomes [2, 30, 31]

$$\begin{aligned} \begin{aligned}&- \int _{\mathcal {H}_{{\mathbf {x}}}} \left[ \left( 3K - 5 \mu \right) \left( \frac{\theta _{{\mathbf {x}}}}{m_{{\mathbf {x}}}} + \frac{\theta _{{\mathbf {x}}'}}{m_{{\mathbf {x}}'}} \right) \underline{\omega } \langle {\varvec{\xi }} \rangle \, \underline{x} \langle {\varvec{\xi }} \rangle \right. \\&\quad \left. + 15 \mu \left( \frac{1}{m_{{\mathbf {x}}}} + \frac{1}{m_{{\mathbf {x}}'}} \right) \underline{\omega } \langle {\varvec{\xi }} \rangle \, \underline{e} \langle {\varvec{\xi }} \rangle \right] \underline{{\mathbf {M}}} \langle {\varvec{\xi }} \rangle {\mathrm {d}} {V}_{{\mathbf {x}}'} = {\mathbf {b}} ({\mathbf {x}}) \, . \end{aligned} \end{aligned}$$
(12)

Equation (12) relates the external forces to the displacement field, which might be a discontinuous function with respect to the spatial coordinates.

2.2 Discretized model

We adopt a meshfree method with a uniform grid spacing h to discretize the body domain (see, for instance, the discretization of a neighborhood in Fig. 2). Therefore, the cells surrounding each node are squares in 2D and cubes in 3D, respectively, with an area \(A=h^2\) and a volume \(V=h^3\).

Fig. 2
figure 2

In the continuum model of the neighborhood \(\mathcal {H}_{{\mathbf {x}}}\) of a given point \({\mathbf {x}}\), some points (as point \({\mathbf {x}}'\)) lie inside the neighborhood and some other (as point \({\mathbf {x}}''\)) lie outside. Similarly, in the discretized model of the neighborhood \(\mathcal {H}_{i}\) of a given node i, there are some nodes (solid circles) whose cell lies completely or partially inside the neighborhood and other nodes (empty circles) whose cell lies completely outside the neighborhood

Consider a node i as the node at which the peridynamic equilibrium equation should be computed and a node j with a portion of its cell inside the neighborhood \(\mathcal {H}_i\) of node i. The bond connecting node i to node j is described by

$$\begin{aligned} {\varvec{\xi }}_{ij} = {\mathbf {x}}_j - {\mathbf {x}}_i \, . \end{aligned}$$
(13)

Analogously, the relative displacement vector after the deformation of the body is defined as

$$\begin{aligned} {\varvec{\eta }}_{ij} = {\mathbf {u}}_j - {\mathbf {u}}_i \, , \end{aligned}$$
(14)

where \({\mathbf {u}}_i\) and \({\mathbf {u}}_j\) are the displacement vectors of nodes i and j, respectively.

Hence, the reference position scalar state and the influence function of bond ij can be computed as follows:

$$\begin{aligned} \underline{x}_{ij}= & {} \Vert {\varvec{\xi }}_{ij} \Vert \, , \end{aligned}$$
(15)
$$\begin{aligned} \underline{\omega }_{ij}= & {} \exp \left( -\frac{\Vert {\varvec{\xi }}_{ij} \Vert ^2}{\delta ^2} \right) \, . \end{aligned}$$
(16)

Under the assumption of small displacements, the extension scalar state of bond ij is given as

$$\begin{aligned} \begin{aligned} \underline{e}_{ij}&= \Vert {\varvec{\xi }}_{ij} + {\varvec{\eta }}_{ij} \Vert - \Vert {\varvec{\xi }}_{ij} \Vert \\&{\mathop {\approx }\limits ^{ \Vert {\varvec{\eta }}_{ij} \Vert \ll \Vert {\varvec{\xi }}_{ij} \Vert }} {\varvec{\eta }}_{ij} \cdot \frac{{\varvec{\xi }}_{ij}}{\Vert {\varvec{\xi }}_{ij} \Vert } \, . \end{aligned} \end{aligned}$$
(17)

The non-local properties of node i, i.e., the weighted volume \(m_i\) and the dilatation \(\theta _i\), are determined numerically by transforming the integrals in Eqs. (8) and (9) into a summation of integrals over cells and applying a midpoint quadrature rule in each cell:

$$\begin{aligned} m_i= & {} \sum _{j \in \mathcal {H}_i} \underline{\omega }_{ij} \, \underline{x}_{ij}^2 \, \beta _{ij} \, V \, , \end{aligned}$$
(18)
$$\begin{aligned} \theta _i= & {} \frac{c_{\theta }}{m_i} \sum _{j \in \mathcal {H}_i} \underline{\omega }_{ij} \, \underline{x}_{ij} \, \underline{e}_{ij} \, \beta _{ij} \, V \, , \end{aligned}$$
(19)

where \(\beta _{ij} V\) represents the quadrature weight of the contribution of node j in the integral over the neighborhood of node i. The accurate computation of coefficients \(\beta _{ij}\) is the main result of the paper, which is presented in Sect. 3. In 2D problems under plane stress conditions, the volume of the cell is given as \(V=A \, t\), where t is the constant thickness of the plate.

Under the assumption of small displacements (\(\underline{{\mathbf {M}}} \langle {\varvec{\xi }}_{ij} \rangle \approx {\varvec{\xi }}_{ij} / \Vert {\varvec{\xi }}_{ij} \Vert\)), the peridynamic equilibrium equation in the discretized form is computed by using the quadrature scheme previously described as

$$\begin{aligned}&- \sum _{j \in \mathcal {H}_i} \left[ \left( 3K - 5 \mu \right) \left( \frac{\theta _i}{m_i} + \frac{\theta _j}{m_j} \right) \underline{\omega }_{ij} \, \underline{x}_{ij} \right. \nonumber \\&\quad \left. + 15 \mu \left( \frac{1}{m_i} + \frac{1}{m_j} \right) \underline{\omega }_{ij} \, \underline{e}_{ij} \right] \frac{{\varvec{\xi }}_{ij}}{\Vert {\varvec{\xi }}_{ij} \Vert } \, \beta _{ij} \, V = {\mathbf {b}}_i \, , \end{aligned}$$
(20)

where \(m_j\) and \(\theta _j\) are, respectively, the weighted volume and the dilatation of node j computed with Eqs. (18) and (19), and \({\mathbf {b}}_i\) is the external force density vector applied to node i.

3 Algorithms for the computation of the quadrature weights

The quadrature coefficient \(\beta _{ij}\) is the dimensionless factor defined as

$$\begin{aligned} \beta _{ij} := {\left\{ \begin{array}{ll} \frac{\, \widetilde{V} \,}{V} &{} \text {in 3D,} \\ \frac{\, \widetilde{A} \,}{A} &{} \text {in 2D,} \\ \end{array}\right. } \end{aligned}$$
(21)

where \(\widetilde{V}\) and \(\widetilde{A}\) are, respectively, the partial volume and partial area of the cell, which should be computed from the intersection between the neighborhood \(\mathcal {H}_i\) and the cell itself. In particular, \(\beta _{ij}=1\) if the cell is completely inside \(\mathcal {H}_i\), \(\beta _{ij}=0\) if the cell is completely outside \(\mathcal {H}_i\) and \(0< \beta _{ij} < 1\) if the cell is partially inside \(\mathcal {H}_i\). The set of nodes which constitutes \(\mathcal {H}_i := \big \{ \, j \in \mathcal {B}: \beta _{ij} > 0 \, \big \}\) depends on the algorithm used to compute \(\beta _{ij}\).

We present one of the algorithms based on the approximation of the partial volume [22], used as a reference to compare our results. To compute analitycally \(\beta _{ij}\) in a convenient framework, we define a new reference system and exploit the cell–neighborhood symmetries. Then, we improve the algorithm for the analytical computation of partial areas by employing a simpler scheme and we use the same scheme to compute quasi-analytically the partial volumes. We utilize the expression “quasi-analytical” because the algorithm includes the truncation of the Taylor series expansions, but it is able to attain accurate results with a relatively small truncation order.

3.1 Approximated computation of partial areas or volumes

In the literature there are many algorithms that compute the partial areas or volumes as an approximation based on the distance between neighboring nodes [13]. The algorithm presented in [22] (see Algorithm 1) is arguably the most commonly used to date. This algorithm is based on the analytical computation of partial lengths in 1D problems, as shown in Fig. 3. If the distance between node i and the farthest side of the cell of node j is smaller than the horizon size, namely \(\Vert {\varvec{\xi }}_{ij} \Vert +\frac{h}{2} < \delta\) where h is the grid spacing, then \(\beta _{ij}=1\) (see Fig. 3a). If the distance between node i and the closest side of the cell of node j is greater than the horizon size, namely \(\Vert {\varvec{\xi }}_{ij} \Vert -\frac{h}{2} > \delta\), then \(\beta _{ij}=0\) (see Fig. 3c). Otherwise, \(\beta _{ij}\) is computed as the difference between the horizon size and the distance of the closest side of the cell of node j from node i, divided by the grid spacing h (see Fig. 3b).

figure a
Fig. 3
figure 3

Possible cases of intersections between neighborhood and cell considered by Algorithm 1: the gray area represents the quadrature weight of the corresponding cell

Algorithm 1 is applied without modifications to 2D and 3D problems. If the direction of \({\varvec{\xi }}_{ij}\) lies along one of the axis, as for instance in Fig. 3b, the approximation is quite accurate. However, Fig. 4 shows other examples in which the computation of the quadrature weights with Algorithm 1 can be rather inaccurate. As a result, even if this algorithm is very simple, it leads to convergence issues [13, 14]: for small variations of the grid spacing (considering fixed the horizon size) there are considerable variations of the computed mechanical properties, as the numerical results of Sects. 4.2 and 4.3 show.

Fig. 4
figure 4

Some examples in which the quadrature weights computed with Algorithm 1 are rather different from their analytical values: the gray area represents the quadrature weight of the corresponding cell computed with Algorithm 1

3.2 Change of reference system

For simplicity sake, the concepts are hereinafter explained in the 2D case, but the generalization to a 3D case is straightforward. Since the focus is on the neighborhood of a node i, we adopt a new system of reference \((\overline{x},\overline{y})\) with the origin at \((x_i,y_i)\) and the distances scaled by a factor 1/h, as shown in Fig. 5. Note that, since the quadrature coefficient \(\beta _{ij}\) is normalized with the area or volume of the cell (see Eq. 21), its value is not affected by the scaling of the distances. The coordinates of a node j in the new reference system are given as

$$\begin{aligned} \left( \overline{x}_j, \overline{y}_j \right) = \left( \frac{x_j-x_i}{h} , \frac{y_j-y_i}{h} \right) . \end{aligned}$$
(22)

Since the grid is uniform, \(\overline{x}_j\) and \(\overline{y}_j\) are integer numbers.

Fig. 5
figure 5

a \(\mathcal {H}_i\) is the neighborhood of node i in a general reference system and b \(\overline{\mathcal {H}}_i\) in the scaled reference system: the origin of the new reference system is centered at node i and the distances are scaled by a uniform factor 1/h in all directions, where h is the grid spacing. The coordinates of a node j in the new reference system are given as \(\overline{x}_j = (x_j-x_i)/h\) and \(\overline{y}_j = (y_j-y_i)/h\), and the horizon size of the neighborhood becomes \(\overline{m} = \delta /h\)

As shown in Fig. 5b, the grid spacing in the new reference system is equal to 1, so that the area or the volume of each cell are \(A=1\) and \(V=1\), respectively. Therefore, \(\beta _{ij}\) is simply computed as the area or volume of the intersection between the neighborhood of node i and the cell of node j: \(\beta _{ij} = \widetilde{A}/A = \widetilde{A}\) or \(\beta _{ij} = \widetilde{V}/V = \widetilde{V}\). Furthermore, the only parameter which can change the values of the quadrature coefficients is the \(\overline{m}\)-ratio, given as

$$\begin{aligned} \overline{m} := \frac{\delta }{h} \, . \end{aligned}$$
(23)

If \(\overline{m}\) is unique for the whole peridynamic body (as it is often the case), then the values of \(\beta _{ij}\) can be computed only once and used for the neighborhoods of all the nodes.

3.3 Cell–neighborhood symmetries

The symmetries of the neighborhood with respect to the nodal grid, named “cell–neighborhood symmetries”, can be exploited to reduce the number of cases to be considered. In [13] the symmetries with respect to the axes were used to compute the quadrature weights only in the first quadrant. On the other hand, we use four lines of symmetry for a 2D neighborhood (both the axes and the bisectors of the quadrants), as shown in Fig. 6. Therefore, the computation of the partial area can be carried out only for the nodes satisfying the following conditions: \(M \ge \overline{y}_j \ge \overline{x}_j \ge 0\), where \(M:=\lfloor \overline{m}+0.5 \rfloor\) (\(\lfloor \cdot \rfloor\) stands for the floor function and finds the greatest integer smaller than or equal to the input), and \(\overline{y}_j \ne 0\). The latter condition is given by the fact that the central node does not interact with itself. On the other hand, the value M is used to provide an upper limit to the search for possible nodes inside the neighborhood. These nodes are enclosed by a red line in Fig. 6. Thanks to the cell–neighborhood symmetries, \(\beta _{ij}\) of the other nodes have the same values. For instance, the computation of the partial area for the node \((\overline{x}_j=2, \overline{y}_j=3)\) is the same for nodes (3, 2), \((3,-2)\), \((2,-3)\), \((-2,-3)\), \((-3,-2)\), \((-3,2)\) and \((-2,3)\).

Fig. 6
figure 6

Dashed lines represent the lines of the cell–neighborhood symmetries and the nodes enclosed by the red line are the only ones that are considered by the proposed algorithm

Analogously, we exploit six planes of symmetry for a neighborhood in a 3D model (planes containing two axes or one axis and one bisector of the octants). Therefore, in this case, we consider only nodes that satisfy the following conditions: \(M \ge \overline{z}_j \ge \overline{y}_j \ge \overline{x}_j \ge 0\) and \(\overline{z}_j \ne 0\). The nodes considered in the proposed algorithm for the computation of the partial volumes for \(\overline{m} = 3.2\) are represented in Fig. 7.

Fig. 7
figure 7

Thanks to the cell–neighborhood symmetries, the nodes enclosed by the surfaces represented by red lines are the only ones that are considered by the proposed algorithm. The six planes of symmetry are not represented for image clarity

Cell–neighborhood symmetries come into play also during the computation of some partial areas and volumes, as shown in Fig. 8. In 2D problems, the intersections between the neighborhood and cells of nodes with \(\overline{x}_j = 0\) (see Fig. 8a) are symmetric with respect to the \(\overline{y}\)-axis. Similarly, in 3D problems, the intersections between the neighborhood and cells of nodes with \(\overline{x}_j = 0\) and \(\overline{y}_j \ne 0\) or \(\overline{x}_j = \overline{y}_j = 0\) (see Fig. 8b, c) are symmetric with respect to the planes perpendicular, respectively, to the \(\overline{x}\)-axis or both the \(\overline{x}\)- and \(\overline{y}\)-axis. These symmetries will be exploited in Appendix A and Sect. 3.5.

Fig. 8
figure 8

Examples of nodes for which the cell–neighborhood symmetry can be exploited within the cell in the computation of the partial areas or volumes

3.4 Computation of partial areas

The first algorithm proposing the analytical computation of partial areas can be found in [13]: the area of intersection between the neighborhood and the cells is subdivided into domains of basic geometry (triangles, rectangles and circular segments), for which the analytical computation of the area is straightforward. Reference [13] proposes 8 different cases of cell–neighborhood intersection. In Appendix A, we propose a novel approach to compute analytically the partial areas, which is based on the definition of the quadrature coefficient in an integral form. The integrals are then solved by distinguishing only 5 possible cases of cell–neighborhood intersections, for each of which an explicit analytical expression for the value of the quadrature coefficient is obtained.

Algorithm 2 shows how to compute analytically the quadrature coefficients in 2D with the proposed approach. Function 1 is used to solve the only non-trivial integral derived from the computation of the quadrature coefficient. Please refer to Appendix A for the details of the analytical derivation, which is also very useful to better understand the extension of the formulae from 2D to 3D for the computation of the partial volumes shown in the next section.

figure b
figure c

3.5 Computation of partial volumes

We show hereinafter how to compute quasi-analytically the quadrature weights in 3D problems. The partial volumes are computed with the same approach explained in Appendix A for the partial areas. Therefore, the quadrature coefficients are computed as

$$\begin{aligned} \beta _{ij}= & {} 2^s \int _{a_x}^{b_x} \int _{a_y}^{\min \left( \overline{y}_2, \sqrt{\overline{m}^2-\overline{x}^2 - \overline{z}_1^{\, 2}} \right) }\nonumber \times \int _{\overline{z}_1}^{\min \left( \overline{z}_2, \sqrt{\overline{m}^2-\overline{x}^2-\overline{y}^2} \right) } {\mathrm {d}} {\overline{z}} {\mathrm {d}} {\overline{y}} {\mathrm {d}} {\overline{x}} \, , \end{aligned}$$
(24)

where \(\overline{x}_1=\overline{x}_j-0.5\), \(\overline{x}_2=\overline{x}_j+0.5\), \(\overline{y}_1=\overline{y}_j-0.5\), \(\overline{y}_2=\overline{y}_j+0.5\), \(\overline{z}_1=\overline{z}_j-0.5\) and \(\overline{z}_2=\overline{z}_j+0.5\) are the coordinates of the faces of the cubic cell and s is the number of symmetries of the cell with respect to the neighborhood (\(s=2\) if \(\overline{y}_j=\overline{x}_j=0\), \(s=1\) if \(\overline{x}_j=0\) and \(\overline{y}_j\ne 0\) and \(s=0\) if \(\overline{x}_j\ne 0\) and \(\overline{y}_j\ne 0\), see Fig. 8b, c). The integration limits \(a_x\), \(b_x\) and \(a_y\) are scalar values that can be computed at the beginning of the algorithm. Similarly to what described in Appendix A, the lower limits are defined to exploit the cell–neighborhood symmetry, or symmetries, shown in Fig. 8b or c:

$$\begin{aligned} a_x = \max \left( 0,\overline{x}_1 \right) , \qquad a_y = \max \left( 0,\overline{y}_1 \right) . \end{aligned}$$
(25)

Figure 9 shows all the possible cases of intersection between the spherical neighborhood and a cubic cell. Note that in Fig. 9 only cells with no symmetries are illustrated, but the portions of the symmetric cell–neighborhood intersections that are used in the computation of the quadrature weights, i.e., the portions in the first octant of Fig. 8b, c, belong to one of those cases. The upper limit of the integral in \(\overline{x}\) direction of Eq. (24) is the greatest \(\overline{x}\) coordinate of the cell–neighborhood intersection, and it can be computed as

$$\begin{aligned} b_x = \min \left( \overline{x}_2, \sqrt{\overline{m}^2-a_y^{\, 2}-\overline{z}_1^{\, 2}} \right) . \end{aligned}$$
(26)

Therefore, \(b_x\) is equal to \(\overline{x}_2\) from case-2 to case-8, and to \(\sqrt{\overline{m}^2-a_y^{\, 2}-\overline{z}_1^{\, 2}}\) in case-9. The computation of Eq. (26) at the beginning of the algorithm allows to compute case-8 and case-9 with the same formulae.

Fig. 9
figure 9

Possible cases of intersections between neighborhood and cell in 3D. Symmetric cell–neighborhood intersections are not shown here, but the unsymmetric portions of those intersections belong to one of the shown cases. Since the true origin of the reference system lies outside the images, it has been translated to one of the vertices of the cube for visualization clarity

Similarly to Eq. (A1) in Appendix A, Eq. (24) can be solved for each case by splitting the integrals in correspondence of the intersections between the boundary of the neighborhood and the edges parallel to the \(\overline{x}\)-axis and the faces parallel to the \(\overline{x}\)-\(\overline{y}\) plane (for details refer to Appendix B). There are 3 types of non-trivial integrals that derive from the previous step:

$$\begin{aligned}&\int \sqrt{\overline{m}^2-\overline{x}^2-k_1^{\, 2}} {\mathrm {d}} {\overline{x}} \nonumber \\&\quad = \frac{1}{2} \, \left( \overline{m}^2 - k_1^{\, 2} \right) \, \arcsin \left( \frac{\overline{x}}{\sqrt{\overline{m}^2-k_1^{\, 2}}} \right) \nonumber \\&\qquad + \frac{1}{2} \, \overline{x} \, \sqrt{\overline{m}^2-\overline{x}^2-k_1^{\, 2}} + \text {const.} \, , \end{aligned}$$
(27)
$$\begin{aligned}&\int \left( \overline{m}^2-\overline{x}^2 \right) \arcsin \left( \frac{k_2}{ \sqrt{ \overline{m}^2-\overline{x}^2 } } \right) {\mathrm {d}} {\overline{x}} \, , \end{aligned}$$
(28)
$$\begin{aligned}&\int \left( \overline{m}^2-\overline{x}^2 \right) \arcsin \left( \frac{ \sqrt{ \overline{m}^2-\overline{x}^2-k_3^{\, 2} } }{ \sqrt{ \overline{m}^2-\overline{x}^2 } } \right) {\mathrm {d}} {\overline{x}} \, , \end{aligned}$$
(29)

where \(k_1\) can be equal to \(a_y\), \(\overline{y}_2\), \(\overline{z}_1\) or \(\overline{z}_2\), \(k_2\) to \(a_y\) or \(\overline{y}_2\), and \(k_3\) to \(\overline{z}_1\) or \(\overline{z}_2\). The parameters \(k_1\), \(k_2\) and \(k_3\) are defined in these ways to group the same types of integrals derived from Eq. (24). The explicit solution given in Eq. (27) is used in Function 2 to compute the integral in a general interval [ab].

On the other hand, integrals in Eqs. (28) and (29) do not have an explicit solution. Therefore, we perform a Taylor series expansion centered at \(\overline{x}_0\) of the following functions:

$$\begin{aligned}&\arcsin \left( \frac{k_2}{ \sqrt{ \overline{m}^2-\overline{x}^2 } } \right) \nonumber \\&\quad = \arcsin \left( \frac{k_2}{ \sqrt{ \overline{m}^2-\overline{x}_0^{\, 2} } }\right) \nonumber \\&\qquad + \sum _{n=1}^{N} \frac{ \sum \nolimits _{p=1}^{\lfloor 3n/2 \rfloor } \left( \sum \nolimits _{q=1}^{p} c(n,p,q) \, \overline{m}^{2(p-q)} \, k_2^{\, 2q-1} \right) \overline{x}_0^{\, 3n-2p} }{ \left( \overline{m}^2 - \overline{x}_0^{\, 2} \right) ^n \left( \overline{m}^2 - \overline{x}_0^{\, 2} - k_2^{\, 2} \right) ^{n-1/2} }\nonumber \\&\qquad \cdot \frac{ \left( \overline{x}-\overline{x}_0 \right) ^n }{n!} \, , \end{aligned}$$
(30)
$$\begin{aligned}&\arcsin \left( \frac{ \sqrt{ \overline{m}^2-\overline{x}^2-k_3^{\, 2} } }{ \sqrt{ \overline{m}^2-\overline{x}^2 } } \right) \nonumber \\&\quad = \arcsin \left( \frac{ \sqrt{ \overline{m}^2-\overline{x}_0^{\, 2}-k_3^{\, 2} } }{ \sqrt{ \overline{m}^2-\overline{x}_0^{\, 2} } } \right) \nonumber \\&\qquad - \sum _{n=1}^{N} \frac{ \sum \limits _{p=1}^{\lfloor 3n/2 \rfloor } \left( \sum \limits _{q=1}^{p} c(n,p,q) \, \overline{m}^{2(p-q)} \, k_3^{\, 2q-1} \right) \overline{x}_0^{\, 3n-2p} }{ \left( \overline{m}^2 - \overline{x}_0^{\, 2} \right) ^n \left( \overline{m}^2 - \overline{x}_0^{\, 2} - k_3^{\, 2} \right) ^{n-1/2} } \nonumber \\&\qquad \cdot \frac{ \left( \overline{x}-\overline{x}_0 \right) ^n }{n!} \, , \end{aligned}$$
(31)

where c is a coefficient depending on the order n of the corresponding derivative and the indices p and q. For more details about the computation of the derivatives of a general order n (and the corresponding coefficients c(npq)), please refer to Appendix C. The matrix \({\mathbf {c}}\) containing all the coefficients c is obtained with Algorithm 3. If the order N of truncation of the Taylor series expansion tends to infinity (\(N \rightarrow \infty\)), then the solution of the integral is exact. Clearly, in a numerical algorithm N must be a finite number, but we will show that our approach is able to attain accurate results with little computational effort (i.e., with N relatively low). Hence, we substitute Eqs. (30) and (31), respectively, in Eqs. (28) and (29) and solve the indefinite integrals:

$$\begin{aligned}&\int \left( \overline{m}^2-\overline{x}^2 \right) f (\overline{x}) {\mathrm {d}} {\overline{x}} \nonumber \\&\quad = \int \left( \overline{m}^2-\overline{x}^2 \right) \left[ f (\overline{x}_0) + \sum _{n=1}^{N} \frac{ f^{(n)} (\overline{x}_0) }{n!} \left( \overline{x}-\overline{x}_0 \right) ^n \right] {\mathrm {d}} {\overline{x}} \nonumber \\&\quad = f (\overline{x}_0) \left( \overline{m}^2 \, \overline{x} - \frac{\overline{x}^3}{3} \right) \nonumber \\&\qquad + \sum _{n=1}^{N} \frac{ f^{(n)} (\overline{x}_0) }{n!} \left[ \frac{\overline{m}^2 - \overline{x}_0^{\, 2}}{n+1} \left( \overline{x}-\overline{x}_0\right) ^{n+1} \right. \nonumber \\&\qquad \left. - \frac{2 \overline{x}_0}{n+2} \left( \overline{x} - \overline{x}_0 \right) ^{n+2} - \frac{1}{n+3} \left( \overline{x}-\overline{x}_0\right) ^{n+3} \right] \nonumber \\&\qquad + \text {const.} \, , \end{aligned}$$
(32)
$$\begin{aligned}&\int \left( \overline{m}^2-\overline{x}^2 \right) g (\overline{x}) {\mathrm {d}} {\overline{x}} \nonumber \\&\quad = \int \left( \overline{m}^2-\overline{x}^2 \right) \left[ g (\overline{x}_0) + \sum _{n=1}^{N} \frac{ g^{(n)} (\overline{x}_0) }{n!} \left( \overline{x}-\overline{x}_0 \right) ^n \right] {\mathrm {d}} {\overline{x}} \nonumber \\&\quad = g (\overline{x}_0) \left( \overline{m}^2 \, \overline{x} - \frac{\overline{x}^3}{3} \right) \nonumber \\&\qquad + \sum _{n=1}^{N} \frac{ g^{(n)} (\overline{x}_0) }{n!} \left[ \frac{\overline{m}^2 - \overline{x}_0^{\, 2}}{n+1} \left( \overline{x}-\overline{x}_0\right) ^{n+1} \right. \nonumber \\&\qquad \left. - \frac{2 \overline{x}_0}{n+2} \left( \overline{x} - \overline{x}_0 \right) ^{n+2} - \frac{1}{n+3} \left( \overline{x}-\overline{x}_0\right) ^{n+3} \right] \nonumber \\&\qquad + \text {const.} \, , \end{aligned}$$
(33)

where \(f (\overline{x})\) and \(g (\overline{x})\) are the arcsin functions (see Eqs. C1 and C6) and \(f^{(n)} (\overline{x})\) and \(g^{(n)} (\overline{x})\) are the corresponding n-th derivatives (see Eqs. C2 and C7). Functions 3 and 4 show the computation of the integrals in Eqs. (32) and (33) in a general interval [ab]. In order to improve the accuracy of the algorithm, we choose \(\overline{x}_0\) to be the middle point of the interval [ab].

The integrals of Eq. (24) can be solved for each case by following the procedure described above (for details refer to Appendix B). Algorithm 4 illustrates how to compute the quadrature coefficients with this procedure. At the beginning of the algorithm, the coordinates of node j are considered only in their absolute value and sorted in ascending order to comply with the conditions imposed for symmetry: \(0 \le \overline{x}_j \le \overline{y}_j \le \overline{z}_j\). The quadrature coefficients \(\beta _{ij}\) computed for \(\overline{m} = 3,4,6\) are reported in Appendix D.

figure d
figure e
figure f
figure g
figure h
figure i

4 Numerical results

To assess the accuracy of the computation of the partial volumes with respect to the order N of truncation of the Taylor series expansions, we compute the relative error on the total volume of the spherical neighborhood:

$$\begin{aligned} \epsilon _{ V } = \Bigg \Vert \frac{\sum \limits _{j \in \overline{\mathcal {H}}_i} \beta _{ij} +1}{\frac{4}{3} \pi \, \overline{m}^3} - 1 \Bigg \Vert \, . \end{aligned}$$
(34)

The sum of all the quadrature coefficients \(\beta _{ij}\) and the volume \(V_i = 1\) of node i is the numerical value of the sphere volume, whereas \((4/3) \pi \overline{m}^3\) is its analytical value. As shown in Fig. 10, the accuracy in the computation of the partial volumes is improved by increasing the value of N. Furthermore, the proposed algorithm reaches values of the errors very close to machine precision with \(\overline{m} \ge 3\) and \(N=20\).

Fig. 10
figure 10

Relative errors on the computation of the total volume of the neighborhood obtained with Algorithm 4 with different order N of truncation of the Taylor series expansions. The values of \(\overline{m}\) vary by \(\Delta \overline{m} = 0.5\)

We show hereinafter several numerical results that confirm the improvements in the peridynamic integration in 3D problems. In particular, we compare the numerical results of Algorithm 1, arguably the most commonly used, with those of the new algorithm (Algorithm 4). We use \(N=4\) as the order of truncation for the Taylor series in Algorithm 4 since this value assures accurate results with low computational cost.

4.1 Geometrical quantities

To assess the performance of the proposed algorithm, we compute two geometrical quantities that reflect the accuracy in the computation of the partial volumes. The first one is the neighborhood volume, computed as:

$$\begin{aligned} V_{ \mathcal {H} } = 1+ \sum \limits _{j \in \overline{\mathcal {H}}_i} \beta _{ij} \, . \end{aligned}$$
(35)

The analytical value of the neighborhood volume is equal to the volume of a sphere: \(V_{an} = (4/3) \pi \overline{m}^3\). The relative error on the neighborhood volume can be computed as in Eq. (34). The improvements obtained by the novel algorithm are evident in Fig. 11a, b.

The second geometrical quantity for the comparison of the algorithms is the weighted volume m (Eq. (18)). The analytical computation of the weighted volume is carried out using spherical coordinated (\(\phi\) is the azimuthal angle and \(\varphi\) is the polar angle):

$$\begin{aligned} \begin{aligned} m_{an}&= \int _{\mathcal {H}_{{\mathbf {x}}}} \exp \left( -\frac{\Vert {\varvec{\xi }} \Vert ^2}{\delta ^2} \right) \, \Vert {\varvec{\xi }} \Vert ^2 {\mathrm {d}} {V}_{{\mathbf {x}}'} = \int _{0}^{\delta } \int _{0}^{2 \pi } \int _{0}^{\pi } \exp \left( -\frac{r^2}{\delta ^2} \right) \, r^2 \cdot r^2 \sin \varphi {\mathrm {d}} {\varphi } {\mathrm {d}} {\phi } {\mathrm {d}} {r} \\&= \left( \frac{3}{2} \sqrt{\pi } \, \text{ erf } (1) - 5 \exp (-1) \right) \pi \delta ^5 \, , \end{aligned} \end{aligned}$$
(36)

where \(r = \Vert {\varvec{\xi }} \Vert\) and \(\text{ erf } (\cdot )\) is the Gaussian error function. The relative error on the weighted volume can be computed as:

$$\begin{aligned} \epsilon _{ m } = \Bigg \Vert \frac{m}{m_{ an }}-1 \Bigg \Vert \, . \end{aligned}$$
(37)

Figure 11c, d show the comparison between Algorithms 1 and 4, with a significant improvement of the accuracy in the latter one.

Fig. 11
figure 11

Geometrical quantities (neighborhood volume and weighted volume) and their relative errors computed with Algorithm 1 and Algorithm 4. The plot is realized with values of \(\overline{m}\) varying by \(\Delta \overline{m} = 0.05\)

4.2 Coefficients of the elasticity tensor

The mechanical properties of isotropic linearly elastic materials are described by the \(4^{\text{ th }}\)-order elasticity tensor \({\mathbf {C}}\). As in [13], we investigate the convergence behavior of the coefficients of the elasticity tensor. In state-based peridynamics, the elasticity tensor of a point in the bulk is given as [32]

$$\begin{aligned} C_{pqrs} ({\mathbf {x}}) = \int _{\mathcal {H}_{{\mathbf {x}}}} \int _{\mathcal {H}_{{\mathbf {x}}}} \underline{\mathbb {K}}_{pr} [{\mathbf {x}}] \langle {\varvec{\xi }}, {\varvec{\zeta }} \rangle \, \xi _q \, \zeta _s {\mathrm {d}} {V}_{{\mathbf {x}}''} {\mathrm {d}} {V}_{{\mathbf {x}}'} \, , \end{aligned}$$
(38)

where \(\underline{\mathbb {K}}\) is the modulus state which operates on two bonds, \({\varvec{\xi }} = {\mathbf {x}}' - {\mathbf {x}}\) and \({\varvec{\zeta }} = {\mathbf {x}}'' - {\mathbf {x}}\). The modulus state in a linear peridynamic solid model [2, 32] is derived as

$$\begin{aligned} \underline{\mathbb {K}}_{pr} [{\mathbf {x}}] \langle {\varvec{\xi }}, {\varvec{\zeta }} \rangle= & {} \frac{\underline{\omega } \langle {\varvec{\xi }} \rangle }{m_{{\mathbf {x}}}} \left( \frac{3 \left( 3K - 5 \mu \right) }{m_{{\mathbf {x}}}} \, \underline{\omega } \langle {\varvec{\zeta }} \rangle \, \underline{x} \langle {\varvec{\xi }} \rangle \, \underline{x} \langle {\varvec{\zeta }} \rangle \right. \nonumber \\&\left. + 15 \mu \, {\varvec{\Delta }} ({\varvec{\zeta }} - {\varvec{\xi }}) \right) \frac{\xi _{p}}{\Vert {\varvec{\xi }} \Vert } \, \frac{\zeta _{r}}{\Vert {\varvec{\zeta }} \Vert } \, , \end{aligned}$$
(39)

where \({\varvec{\Delta }}\) is the Dirac delta function defined as

$$\begin{aligned} {\varvec{\Delta }} ({\varvec{\zeta }} - {\varvec{\xi }}) := {\left\{ \begin{array}{ll} 1 &{} \text {if } {\varvec{\zeta }}={\varvec{\xi }} \, , \\ 0 &{} \text {otherwise.} \end{array}\right. } \end{aligned}$$
(40)

A component of the tensor \({\mathbf {C}}\) is therefore computed as [32]

$$\begin{aligned} \begin{aligned} C_{pqrs}&= \int _{\mathcal {H}_{{\mathbf {x}}}} \int _{\mathcal {H}_{{\mathbf {x}}}} \frac{\underline{\omega } \langle {\varvec{\xi }} \rangle }{m_{{\mathbf {x}}}} \left( \frac{3 \left( 3K - 5 \mu \right) }{m_{{\mathbf {x}}}} \, \underline{\omega } \langle {\varvec{\zeta }} \rangle \, \underline{x} \langle {\varvec{\xi }} \rangle \, \underline{x} \langle {\varvec{\zeta }} \rangle \right. \\&\quad \left. + 15 \mu \, {\varvec{\Delta }} ({\varvec{\zeta }} - {\varvec{\xi }}) \right) \frac{\xi _p \xi _q}{\Vert {\varvec{\xi }} \Vert } \, \frac{\zeta _r \zeta _s}{\Vert {\varvec{\zeta }} \Vert } {\mathrm {d}} {V}_{{\mathbf {x}}''} {\mathrm {d}} {V}_{{\mathbf {x}}'} \\&= \int _{\mathcal {H}_{{\mathbf {x}}}} \underline{\omega } \langle {\varvec{\xi }} \rangle \xi _p \xi _q \left( \frac{3 \left( 3K - 5 \mu \right) }{ \left( m_{{\mathbf {x}}} \right) ^2} \int _{\mathcal {H}_{{\mathbf {x}}}} \underline{\omega } \langle {\varvec{\zeta }} \rangle \, \zeta _r \zeta _s {\mathrm {d}} {V}_{{\mathbf {x}}''} \right. \\&\quad \left. + \frac{15 \mu }{m_{{\mathbf {x}}}} \int _{\mathcal {H}_{{\mathbf {x}}}} {\varvec{\Delta }} ({\varvec{\zeta }} - {\varvec{\xi }}) \frac{\zeta _r \zeta _s}{\Vert {\varvec{\xi }} \Vert \Vert {\varvec{\zeta }} \Vert } {\mathrm {d}} {V}_{{\mathbf {x}}''} \right) {\mathrm {d}} {V}_{{\mathbf {x}}'} \\&= \frac{3 \left( 3K - 5 \mu \right) }{ \left( m_{{\mathbf {x}}} \right) ^2} \int _{\mathcal {H}_{{\mathbf {x}}}} \underline{\omega } \langle {\varvec{\xi }} \rangle \, \xi _p \xi _q {\mathrm {d}} {V}_{{\mathbf {x}}'} \int _{\mathcal {H}_{{\mathbf {x}}}} \underline{\omega } \langle {\varvec{\zeta }} \rangle \, \zeta _r \zeta _s {\mathrm {d}} {V}_{{\mathbf {x}}''} \\&\quad + \frac{15 \mu }{m_{{\mathbf {x}}}} \int _{\mathcal {H}_{{\mathbf {x}}}} \underline{\omega } \langle {\varvec{\xi }} \rangle \frac{\xi _p \xi _q \xi _r \xi _s}{\Vert {\varvec{\xi }} \Vert ^2} {\mathrm {d}} {V}_{{\mathbf {x}}'} \, . \end{aligned} \end{aligned}$$
(41)

For isotropic linearly elastic materials, there are only two coefficients of the tensor \({\mathbf {C}}\) which are independent from the others. The analytical value of the coefficients, for instance, \(C_{1111}\) and \(C_{1122}\) are

$$\begin{aligned} C_{1111}^{an} = K + \frac{4}{3} \mu \, , \qquad C_{1122}^{an} = K - \frac{2}{3} \mu \, . \end{aligned}$$
(42)

Any component of the tensor \({\mathbf {C}}\) in a node i can be computed numerically from Eq. (41) as

$$\begin{aligned} \begin{aligned} C_{pqrs}&= \frac{3 \left( 3K - 5 \mu \right) }{ \left( m_i \right) ^2} \left( \sum _{j \in \mathcal {H}_i} \underline{\omega }_{ij} \, \xi _p \, \xi _q \, \beta _{ij} V \right) \\&\quad \times \left( \sum _{k \in \mathcal {H}_i} \underline{\omega }_{ik} \, \zeta _r \, \zeta _s \, \beta _{ik} V \right) \\&\quad + \frac{15 \mu }{m_i} \sum _{j \in \mathcal {H}_i} \underline{\omega }_{ij} \frac{\xi _p \xi _q \xi _r \xi _s}{\Vert {\varvec{\xi }} \Vert ^2} \beta _{ij} V \, , \end{aligned} \end{aligned}$$
(43)

where \({\varvec{\xi }} = {\mathbf {x}}_j - {\mathbf {x}}_i\) and \({\varvec{\zeta }} = {\mathbf {x}}_k - {\mathbf {x}}_i\). The values of the Young’s modulus \(E = 1 \,\text {GPa}\) and of the Poisson’s ratio \(\nu = 0.2\) are chosen, which yield the following bulk and shear moduli: \(K=555.56 \,\text {MPa}\) and \(\mu =416.67 \,\text {MPa}\). Figure 12a, c show the results of these computation, respectively, for the components \(C_{1111}\) and \(C_{1122}\). The relative errors on these coefficients are computed as

$$\begin{aligned} \epsilon _{ 1111 } = \Bigg \Vert \frac{C_{1111}}{C_{1111}^{ an }}-1 \Bigg \Vert \, , \qquad \epsilon _{ 1122 } = \Bigg \Vert \frac{C_{1122}}{C_{1122}^{ an }}-1 \Bigg \Vert \, , \end{aligned}$$
(44)

and are shown in Fig. 12b, d. It is evident that the proposed algorithm provides, on average, smaller errors. Furthermore, the oscillatory behavior as \(\overline{m}\) increases is much smoother than that of Algorithm 1.

Fig. 12
figure 12

Coefficients of the \(4^{\text{ th }}\)-order elasticity tensor and their relative errors computed with Algorithms 1 and 4. The values of \(\overline{m}\) vary by \(\Delta \overline{m} = 0.05\)

4.3 Manufactured problem

A “manufactured” problem, which consists in determining the force density distribution in a body under a prescribed displacement field, is solved analytically and numerically. Following what was shown in [14] for a 2D problem, a body is subjected to the displacements

$$\begin{aligned} {\left\{ \begin{array}{ll} u = c_{u 1} \, x^2 + c_{u 2} \, y^2 + c_{u 3} \, z^2 + c_{u 4} \, x y + c_{u 5} \, y z + c_{u 6} \, x z \, , \\ v = c_{v 1} \, x^2 + c_{v 2} \, y^2 + c_{v 3} \, z^2 + c_{v 4} \, x y + c_{v 5} \, y z + c_{v 6} \, x z \, , \\ w = c_{w 1} \, x^2 + c_{w 2} \, y^2 + c_{w 3} \, z^2 + c_{w 4} \, x y + c_{w 5} \, y z + c_{w 6} \, x z \, , \end{array}\right. } \end{aligned}$$
(45)

where there are 18 independent coefficients for the quadratic terms. The force density derived from this displacement field is given as [14]

$$\begin{aligned} {\left\{ \begin{array}{ll} b_1^{an} = - \frac{3K - 5 \mu }{3} \left( 2 c_{u 1} + c_{v 4} + c_{w 6} \right) - 2 \mu \left( 3 c_{u 1} + c_{u 2} + c_{u 3} + c_{v 4} + c_{w 6} \right) , \\ b_2^{an} = - \frac{3K - 5 \mu }{3} \left( c_{u 4} + 2 c_{v 2} + c_{w 5} \right) - 2 \mu \left( c_{u 4} + c_{v 1} + 3 c_{v 2} + c_{v 3} + c_{w 5} \right) , \\ b_3^{an} = - \frac{3K - 5 \mu }{3} \left( c_{u 6} + c_{v 5} + 2 c_{w 3} \right) - 2 \mu \left( c_{u 6} + c_{v 5} + c_{w 1} + c_{w 2} + 3 c_{w 3} \right) , \end{array}\right. } \end{aligned}$$
(46)

where \(K=555.56 \,\text {MPa}\) and \(\mu =416.67 \,\text {MPa}\). Note that the force density vector \({\mathbf {b}}^{an}\) is constant for all the points in the bulk of the material, i.e., in all points that have a distance from the boundary of the body greater than or equal to \(2\delta\). Since \(c_{u 5}\), \(c_{v 6}\) and \(c_{w 4}\) do not contribute to \({\mathbf {b}}^{an}\), these coefficients are considered to be equal to 0. The values of the other coefficients are chosen randomly as follows: \(c_{u 1} = 0.6\), \(c_{u 2} = 1.3\), \(c_{u 3} = 0.8\), \(c_{u 4} = 0.5\), \(c_{u 6} = 1.8\), \(c_{v 1} = 1.1\), \(c_{v 2} = 1.6\), \(c_{v 3} = 0.7\), \(c_{v 4} = 1\), \(c_{v 5} = 1.2\), \(c_{w 1} = 0.3\), \(c_{w 2} = 1.2\), \(c_{w 3} = 0.1\), \(c_{w 5} = 1.7\) and \(c_{w 6} = 0.6\).

We consider only one node in the bulk of a body at which the force density vector \({\mathbf {b}}\) is computed with Eq. (20). The relative errors on the components of \({\mathbf {b}}\) are given as

$$\begin{aligned} \epsilon _{ b_p } = \Bigg \Vert \frac{b_p}{b_p^{ an }}-1 \Bigg \Vert \quad \text {with } p = 1,2,3 \, . \end{aligned}$$
(47)

Figure 13 shows the results of the numerical computation. Algorithm 4 allows to obtain, on average, smaller relative errors and a smoother convergence behavior also in this case.

Fig. 13
figure 13

Components of the force density vector and their relative errors computed with Algorithms 1 and 4. The values of \(\overline{m}\) vary by \(\Delta \overline{m} = 0.1\)

5 Conclusions

The peridynamic theory is a nonlocal reformulation of classical continuum mechanics based on integrals over the neighborhoods of nodes. Therefore, the numerical integration of peridynamic equations determines to a great extent the accuracy of the results. In particular, the quadrature weights, i.e., the partial areas in 2D (intersections between the circular neighborhood and the square cells) and the partial volumes in 3D (intersections between the spherical neighborhood and the cubic cells), should be computed accurately.

We developed an innovative algorithm able to compute quasi-analytically the partial volumes. We use the expression “quasi-analytical” because a truncated Taylor series expansion of some functions, whose integrals are not explicitly solvable, is performed to carry out the integration. However, the new algorithm computes accurately the quadrature weights with very little computational effort, i.e., with a relatively low order of truncation of the Taylor series. The computational time required by the proposed algorithm is negligible compared to the time required to compute the bond forces and the peridynamic equilibrium equation. In particular, if \(\overline{m}\) is constant in the whole domain, the same quadrature weights can be computed only once and used for every neighborhood in the body. A similar approach is also used to simplify the algorithm for the analytical computation of the partial areas, which was already developed in the literature.

Several examples have been presented to show the capabilities of the newly proposed algorithm. The numerical values of the geometrical quantities (volume of the neighborhood and weighted volume), of the coefficients of the elasticity tensor and of the manufactured problem obtained with the new algorithm are compared with those obtained with the most commonly used algorithm for the computation of the partial volumes. As the \(\overline{m}\)-ratio increases, the proposed algorithm provides, on average, smaller errors and a smoother convergence behavior. For the sake of convenience, the quadrature coefficients for \(\overline{m} = 3, 4, 6\) are reported in Appendix D.