1 Introduction

Many kinds of materials are heterogeneous in microscopical scale. For example, composite materials combine the advantages of each phase and improve performance such as the strength and fracture toughness. The specified-functional materials could be manufactured artificially by changing the microscopical structure of the materials. Numerical simulations are preferred ways to analyze and design such kinds of materials, which are promising to be a substitution of costly field tests.

However, highly efficient and reliable numerical methods remain a challenge. As pointed out in [15], an extremely fine spatial discretization mesh is necessary for the direct numerical simulation of heterogeneous materials to capture the effects of microscale heterogeneities, and the computation quantity exceeds the ability of a general computer, even for the supercomputer. As indicated by Zohdi [3], solutions to a small elastic model with a few heterogeneities at the infinitesimal strains are still open questions. In short, complete solutions are virtually impossible. Multiscale modeling, with such features as high efficiency of macroscopical models and considerable accuracy of microscopical models, is a promising method to overcome the difficulty [5]. Other advantages of multiscale modeling on science and engineering are summarized in the review paper by Horstemeyer [6].

Nowadays, many kinds of multiscale methods are developed, which can be, on the whole, classified by hierarchical methods and concurrent methods [58]. For the hierarchical multiscale methods, the mechanical information is passed from microscopical to macroscopical scale. This kind of methods include homogenization method [3], the second order homogenization method [9], multilevel multiscale method [10, 11], mean field approaches [1, 12], statistical homogenization [13] and so on. Multiscale methods based on the homogenization technique have been extended to multi-physical field problems (such as electroactive [4] and thermal elasticity materials [14, 15]) and all kinds of nonlinear problems (such as elasto-plastic problem [10, 11], finite deformation [16, 17] and material instability [18]). Readers could refer to [19] for a comprehensive summary of the homogenization method. Meanwhile, some drawbacks of the homogenization methods arise in simulations. As indicated by Unger and Eckardt [7], after the homogenization process of the fine scale model, the essential properties are averaged and the actual failure state is only captured in a homogeneous way. However, fracture or electric breakdown will depend on specific detail in the microstructure and the averaging is not acceptable [20]. For the concurrent multiscale methods, the domain is decomposed into fine-scale and coarse-scale models, which could be considered as one of the DDMs [8, 21]. Different models are solved concurrently and the informations between the subdomains are passed on by strongly coupling. Typical examples of the concurrent multiscale models include atomistic/continuum multiscale methods [22, 23] and quantum/atomistic/continuum multiscale methods [24, 25]. A comprehensive summary on Atomistic/continuum multiscale methods can be found in the review article by Miller and Tadmore [26]. A general framework for designing multiscale algorithms is reviewed in a recent paper by Abdulle et al. [27] and the references therein.

Extended multiscale finite element method (EMsFEM) is a new multiscale method proposed by Zhang et al. [28, 29] in recent years, which aims to deal with the mechanical analysis for heterogeneous materials. The idea of EMsFEM could be traced back to the work presented by Babuška and coworkers [30, 31], in which the concepts of NBF is proposed. Afterwards, a multiscale finite element method (MsFEM) is developed and push forward further by the work of Hou et al. [2, 32], in which the convergence of the method is discussed comprehensively. A recently published monograph by Efendiev and Hou [33] makes an extensive theoretical discussion on the MsFEM with many applications, such as transport equations, Richards’ equations and fluid-structure interactions. In comparison with the method developed by Babuška and Hou, EMsFEM extends the elliptical problems of scalar field to vector field. Moreover, the solution accuracy is improved by introducing coupling terms to NBFs and developing new boundary conditions for constructing NBFs. The microscopical stress could be obtained by the downscale calculation, which is essential for the nonlinear mechanical analysis. The basic principles of EMsFEM are explained in details in [28] and the applications of the method to mechanical problems, such static and dynamic analysis [28, 34], elasto-plastic analysis [29, 35], and strain localization analysis [36], are also investigated.

The core technique of EMsFEM is the construction of NBFs, which shows great influence on the accuracy of the results. The assumptions that are central to the homogenization theory, such as periodicity and separation of length scales [19], are no longer necessary for EMsFEM. Analogous to analytical base functions, the necessary conditions of NBFs are the rigid displacement properties (RDPs). Many kinds of construction modes, such as linear or periodic boundary conditions and oversampling technique, have been investigated [28]. However, verifications of the RDPs of NBFs depend only on the numerical tests and, especially, the rotational RDP has not been explained yet. It is no doubt that investigations on the NBFs in the theoretical aspect are of great significance to avoid heavy labor of trial and error. Thus, the paper makes a detailed discussion on the RDPs of NBFs and the principles for constructing NBFs for the first time, which aims to provide a rational construction scheme for NBFs. All kinds of boundary conditions are investigated, among which, a new one with rotational angle DOFs on the coarse mesh is proposed based on the proposed principles, which seems to be helpful for improving accuracy without increasing computational costs. As pointed out above, the aim of EMsFEM is to overcome the shortages of computational resource in the numerical simulations of heterogeneous materials. In this context, the algorithm complexity of EMsFEM is analyzed in both theoretical and numerical aspects and a theoretical formulation for determining the optimal size of coarse mesh approximately is proposed to minimize the computational time.

The paper is organized as follows. In Sect. 2, the basic principle of EMsFEM is reviewed simply. In Sect. 3, the conditions ensuring the RDPs of NBFs are deduced in the two-dimensional case, of which, the rotational RDP is newly proposed. Moreover, the general construction modes of NBFs are discussed and the properties of additional terms are also investigated. In Sect. 4, the construction methods and properties of NBFs for all kinds of boundary conditions, such as linear, periodic and rotational angle boundary conditions, are discussed and extended to more general geometries and material distributions. Oversampling technique for constructing oscillating NBFs is explored thoroughly in Sect. 5. Section 6 makes a discussion on algorithm complexity of EMsFEM and corresponding numerical examples are given. As for Sect. 7, some numerical examples concerning the heterogeneous materials with random holes or impurities are considered. Finally, some conclusions are presented in Sect. 8.

2 Principle of EMsFEM

The direct discretization and solution of heterogeneous materials which contain many micro structures at the mesoscopic scale as shown in Fig. 1, lead to enormous DOFs of the fine mesh model. The basic idea of EMsFEM is to convert the boundary value problems (BVPs) of the fine mesh model to the coarse mesh one by constructing the NBFs of UCs, which act as the bridges of different scales. The UC with a specific size contains some microscopical structures for heterogeneous materials and the NBFs are obtained by solving a group of BVPs of the UC. The displacement field of the UC is expressed by linear combination of the NBFs whose coefficients correspond to the DOFs of the coarse-mesh nodes, as depicted in Fig. 1. Afterwards, the principle of EMsFEM would be reviewed following the work in [28].

Fig. 1
figure 1

The basic idea of EMsFEM

The microscopical displacement field of a two-dimensional UC is defined by

$$\begin{aligned} {{\varvec{u}}} = \sum \limits _{{i = 1}}^{n} {{\varvec{N}}}_{{xi}} \hat{{\varvec{u}}}_{{xi}} + \sum \limits _{{i = 1}}^{n} {{\varvec{N}}}_{{yi}} \hat{{\varvec{u}}}_{{yi}} \end{aligned}$$
(1)

where \(\hat{u}_{{xi}}\) and \(\hat{u}_{{xi}}\) denote the displacement of the coarse-mesh nodes, \(\hat{A}_{{i}}, i=1,\ldots ,n\), in the x and y directions, respectively. Here, n is the number of coarse-mesh nodes (macroscopical nodes). The displacement vector of the UC, u, could be expressed as \({\varvec{u}}=\left\{ {{\varvec{u}}_1^T ,{\varvec{u}}_2^T ,\ldots ,{\varvec{u}}_N^T } \right\} ^{T}\), where \({\varvec{u}}_k =\left\{ {u_{xk} ,u_{yk} } \right\} ^{T}\) are assumed to be the displacement vector of the microscopical node, \(B_k , k=1,\ldots ,N\). Here, \(N\) is the total amount of the microscopical nodes within the UC. The NBFs, \({\varvec{N}}_{xi} \) and \({\varvec{N}}_{yi} \), could be obtained by applying some specific boundary conditions on the UC and solving the BVPs. The coupling terms are included in \({\varvec{N}}_{xi} \) and \({\varvec{N}}_{yi} \) comparing with the traditional analytical base function. For example, the value of \({\varvec{N}}_{xi} \) on \({B}_k \) is

$$\begin{aligned} {\varvec{N}}_{xi} \left( k \right) =\left[ {N_{xxi} \left( k \right) ,\;N_{yxi} \left( k \right) } \right] ^{T} \end{aligned}$$

where the coupling terms \(N_{yxi} \left( k \right) \) reflect the influence of the unit displacement of \(\hat{A}_{{i}}\) in the \(x\) direction on the NBF of \(B_k \) in the \(y\) direction.

The simplified form of Eq. (1) could be expressed as

$$\begin{aligned} {\varvec{u}}={\varvec{N}}\hat{{\varvec{u}}} \end{aligned}$$
(2)

where \(N=\left[ {{\varvec{N}}_1 ,\ldots ,{\varvec{N}}_n } \right] \), \({\varvec{N}}_i =\left[ {{\varvec{N}}_{xi} ,{\varvec{N}}_{yi} } \right] ,\) \(\hat{{\varvec{u}}} = \left\{ {\hat{{\varvec{u}}}_{1}^{T}, \hat{{\varvec{u}}}_{2}^{T} , \ldots ,\hat{{\varvec{u}}}_{n}^{T} } \right\} ^{T}\), \(\hat{{\varvec{u}}}_{i} = \left\{ {\hat{u}_{{xi}}, \hat{u}_{{yi}} } \right\} ^{T}\). The equivalent stiffness matrix and external force at the macroscopical level are computed using the NBFs. The UC is assumed to be discretized by four-node elements (microscopical elements), whose energy functional and stiffness matrix are

$$\begin{aligned} \Pi _e =\frac{1}{2}{\varvec{u}}_e^T {\varvec{K}}_e {\varvec{u}}_e ,\quad {\varvec{K}}_e =\int \limits _{\Omega _e } {\varvec{B}}_e^T {\varvec{D}}_e {\varvec{B}}_e d\Omega _e \end{aligned}$$
(3)

where \({\varvec{u}}_e \) is the element displacement vector, \({\varvec{B}}_e \) and \({\varvec{D}}_\varepsilon {\varvec{D}}_e \) are the strain matrix and constitutive matrix, respectively. Subsequently, from Eq. (2), the equation which relates the displacement of the microscopical element and that of the UC can be defined by

$$\begin{aligned} {\varvec{u}}_e ={\varvec{N}}_e \hat{{\varvec{u}}} \end{aligned}$$
(4)

where

$$\begin{aligned}&{\varvec{N}}_e =\left[ {{\varvec{R}}_{e1}^T ,\ldots ,{\varvec{R}}_{e4}^T } \right] ^{T},\nonumber \\&{\varvec{R}}_{ei} =\left[ \begin{array}{l@{\quad }l@{\quad }l@{\quad }l} {N_{xx1} \left( i \right) }&{} {N_{xy1} \left( i \right) }&{} \ldots &{} {N_{xyn} \left( i \right) } \\ {N_{yx1} \left( i \right) }&{} {N_{yy1} \left( i \right) }&{} \ldots &{} {N_{yyn} \left( i \right) } \\ \end{array} \right] \end{aligned}$$
(5)

The energy functional of the microscopical element and UC, expressed by the macroscopical variable, are as follows

$$\begin{aligned} {\Pi }_{e}&= \frac{1}{2}{\hat{{\varvec{u}}}}^{T} {{\varvec{N}}}_{e}^{T} {{\varvec{K}}}_{e} {{\varvec{N}}}_{e} \hat{{\varvec{u}}},\nonumber \\ {\Pi }_{E}&= \sum \limits _{{i = 1}}^{{n_{e} }} {\Pi }_{{ei}} = \frac{1}{2}\hat{{\varvec{u}}}^{T} \left( {\sum \limits _{{i = 1}}^{{n_{e} }} {{\varvec{N}}}_{{ei}}^{T} {{\varvec{K}}}_{{ei}} {{\varvec{N}}}_{{ei}} } \right) \hat{{\varvec{u}}} \end{aligned}$$
(6)

where \(n_e \) is the number of the microscopical element in the UC. Thus, we obain the equivalent stiffness matrix of the UC and the assembled global one at the macroscopical level

$$\begin{aligned} {\varvec{K}}_E =\left( {\sum \limits _{\,e=1}^{N_e } {\varvec{N}}_e^T {\varvec{K}}_e {\varvec{N}}_e } \right) , \quad {\varvec{K}}=\mathbf{A}_{i=1}^{N_E } {\varvec{K}}_{Ei} \end{aligned}$$
(7)

where \(N_E \) is the number of coarse mesh and \(\mathbf{A}\) is the stiffness matrix assembly operator. Thus, the final problem is transformed into the macroscopical level equation

$$\begin{aligned} {{\varvec{KU}}}={\varvec{F}}_{ext} \end{aligned}$$
(8)

where \({\varvec{F}}_{ext} \) is the external force vector [29]. The displacement at microscopical level can be obtained by downscale calculation using Eq. (4) and the element strain and stress could be achieved by the displacement results, similar to the traditional finite element analysis. One could refer to [28] for the details.

It could be found that the informations between the macroscopical and microscopical level are passed on by the NBFs, and the constitutive equation in the macroscopical level is not necessary. Thus, the scale separation assumption is of no necessity to be taken into consideration for EMsFEM, which differs significantly from the other multiscale methods based on the homogenization. One of superiorities of NBFs is to implement the downscale calculation and obtain the strain and stress in the microscopical level, which provide convenience for nonlinear analyses. Meanwhile, as the whole solution domain is divided into several UCs, the parallel computing could be implemented without hard work, which is similar to the famous domain decomposition method (DDM) [21]. However, the NBFs is not introduced for DDM, without considering the deformation features of heterogeneous materials, and the equilibrium iterations are always needed at the interfaces of subdomains, which may be negative for the computation efficiency.

3 Basic properties of numerical base function

3.1 Rigid displacement properties

Similar to the analytical base function, \({\varvec{N}}_{xxi} \) and \( {\varvec{N}}_{yyi} \) should be able to describe the rigid displacement mode of UC and satisfy the Kronecker delta property at the coarse-mesh node,  \( \hat{A}_{j} \):

$$\begin{aligned} {{{\varvec{N}}}_{{xxi}} } \big |_{{\hat{A}_{j} }} = \delta _{{ij}},\quad {{{\varvec{N}}}_{{yyi}} } \big |_{{\hat{A}_{j} }} = \delta _{{ij}} \end{aligned}$$
(9)

which is satisfied automatically after applying the boundary conditions on a UC. The rigid displacements of NBFs include two translational modes and a rotational one for the plane problems. In this part, we will discuss the property in details.

  1. 1.

    Translational RDP

The property demands that, given a rigid translational displacement of the coarse-mesh node in the \(x\) direction: \( \hat{u}_{{xi}} = 1 , \hat{u}_{{yi}} = 0, i=1,2,\ldots ,n\) or \( \hat{{\varvec{u}}} = {\hat{\mathbf{1}}}_{x} \), displacement of microscopical nodes in the UC should be \(u_{xk} =1, u_{yk} =0, k=1,2,\ldots ,N\) or \({\varvec{u}}=\mathbf{1}_x \). Substitution of \( \hat{{\varvec{u}}} \) and \({\varvec{u}}\) into Eq. (2) yields

$$\begin{aligned} \mathbf{1}_{x} = {{\varvec{N}}}{\hat{\mathbf{1}}}_{x} ~{\text {or}}\,\sum \limits _{i} {{\varvec{N}}}_{{xi}} = \mathbf{1}_{x} \end{aligned}$$
(10)

which ensure the RDP of NBFs in the \(x\) direction. Equation (10) could be expressed as a more specified form [28]

$$\begin{aligned} \sum \limits _i {\varvec{N}}_{xxi} =\mathbf{1}, \sum \limits _i {\varvec{N}}_{yxi} =\mathbf{0} \end{aligned}$$
(11)

In analogy to the RDP in the \(x\) direction, the following equation ensures the RDP in the \(y\) direction

$$\begin{aligned} \mathbf{1}_{y} = {{\varvec{N}}}{\hat{\mathbf{1}}}_{y} ~{\text {or}}\,~\sum \limits _{i} {{\varvec{N}}}_{{yi}} = \mathbf{1}_{y} \end{aligned}$$
(12)
  1. 2.

    Rotational RDP

This property requires that, given a small rigid rotational displacement of the coarse-mesh node at the vicinity of initial configuration, the displacements of the microscopical nodes in the UC should be the same rotational rigid displacement. As depicted in Fig. 2, after a small rigid rotation \(\varphi \), the displacement vector of the coarse-mesh node, \( \hat{A}_{i} \left( {\hat{x}_{i} ,\hat{y}_{i} } \right) \), is

$$\begin{aligned} \hat{{\varvec{u}}}_{i}&= \varphi \left| {\hat{{\varvec{r}}}_{i} } \right| \hat{{\varvec{t}}}_{i} = \varphi \hat{r}_{i} \left\{ { - \sin \theta _{i} ,\cos \theta _{i} } \right\} ^{T} = \varphi \left\{ { - \hat{y}_{i} ,~\hat{x}_{i} } \right\} ^{T}\nonumber \\&= \varphi \hat{{\varvec{r}}}_{{wi}} \end{aligned}$$
(13)
Fig. 2
figure 2

A small rigid rotation of a UC at the vicinity of the initial configuration

where \( \hat{{\varvec{t}}}_{i} \) is orthogonal to \( \hat{{\varvec{r}}}_{i} \) and \( \left| {\hat{{\varvec{r}}}_{i} } \right| ^{2} = \hat{x}_{i}^{2} + \hat{y}_{i}^{2}\). Similarly, the displacement of the microscopical node, \(B_k \left( {x_k ,y_k } \right) \), is \({\varvec{u}}_k =\varphi \left\{ {-y_k ,\;x_k } \right\} ^{T}=\varphi {\varvec{r}}_{wk} \). Thus, the rotational rigid displacement vector of macroscopical and microscopical nodes could be expressed as, respectively,

$$\begin{aligned} \hat{{\varvec{u}}} = \varphi \hat{{\varvec{r}}}_{w} ,\,~{{\varvec{u}}} = \varphi {{\varvec{r}}}_{w} \end{aligned}$$
(14)

Here, \( \hat{{\varvec{r}}}_{w} = \left\{ {\hat{{\varvec{r}}}_{{w1}}^{T} ,\hat{{\varvec{r}}}_{{w2}}^{T} , \ldots ,\hat{{\varvec{r}}}_{{wn}}^{T} } \right\} ^{T} \)and \({\varvec{r}}_w =\left\{ {\varvec{r}}_{w1}^T ,{\varvec{r}}_{w2}^T ,\right. \left. \ldots ,{\varvec{r}}_{wN}^T \right\} ^{T}\). Substituting Eq. (14) into Eq. (2), one obtains

$$\begin{aligned} {{\varvec{r}}}_{w} = {\varvec{N}}{\hat{{\varvec{r}}}}_{w} \end{aligned}$$
(15)

which could be written as a more detailed form

$$\begin{aligned} {{\varvec{r}}}_{w} = - \sum \limits _{i} {{\varvec{N}}}_{{xi}} \hat{y}_{i} + \sum \limits _{i} {{\varvec{N}}}_{{yi}} \hat{x}_{i} \end{aligned}$$
(16)

or

$$\begin{aligned} {{\varvec{y}}}&= \sum \limits _{i} {{\varvec{N}}}_{{xxi}} \hat{y}_{i} - \sum \limits _{i} {{\varvec{N}}}_{{xyi}} \hat{x}_{i} , {{\varvec{x}}} \nonumber \\&= - \sum \limits _{i} {{\varvec{N}}}_{{yxi}} \hat{y}_{i} + \sum \limits _{i} {{\varvec{N}}}_{{yyi}} \hat{x}_{i} \end{aligned}$$
(17)

where \({\varvec{y}}\) and \({\varvec{x}}\) are composed by the coordinates of microscopical nodes in the UC. Supposing that \({\varvec{N}}_{xyi} ={\varvec{N}}_{yxi} =0\) and \({\varvec{N}}_{xxi} ={\varvec{N}}_{yyi} \) in Eq. (17), then we obtain the isoparametric interpolations

$$\begin{aligned} {{\varvec{y}}} = \sum \limits _{i} {{\varvec{N}}}_{{yyi}} \hat{y}_{{\text {i}}} ,\quad {{\varvec{x}}} = \sum \limits _{i} {{\varvec{N}}}_{{xxi}} \hat{x}_{{\text {i}}} \end{aligned}$$
(18)

Therefore, the above isoparametric interpolation, degenerated from Eq. (17), fulfills the rotational RDP automatically. Hence, the rotational RDP of NBFs could be considered as an extension of the traditional isoparametric interpolations. It should be noted that for scalar field problems, such as heat conduction and seepage analysis, no coupling terms appear in the NBFs, which means that the rotational RDP is not necessary and only the translational RDPs, shown in Eq. (10) or Eq. (12), is indispensable [2]. Thus, it is much easier to construct NBFs for scalar fields than that for vector fields.

The analytical base functions with coupling terms are also constructed by Zhang et al. [37]. The proposed element is called the generalized isoparametric element, which adds coupling terms to the traditional bilinear isoparametric element. The displacement interpolations of the element are

$$\begin{aligned}&u = \sum \limits _{{i = 1}}^{4} {N_{{i\xi }} \left( {\xi ,\eta } \right) u_{i} } + \sum \limits _{{i = 1}}^{4} {N_{{i\xi \eta }} \left( {\xi ,\eta } \right) \nu _{i} } ,\nonumber \\&\nu = \sum \limits _{{i = 1}}^{4} {N_{{i\eta }} \left( {\xi ,\eta } \right) \nu _{i} } + \sum \limits _{{i = 1}}^{4} {N_{{i\eta \xi }} \left( {\xi ,\eta } \right) u_{i} } \end{aligned}$$
(19)

where

$$\begin{aligned}&N_{i\xi } =N_{i\eta } =\frac{1}{4}\left( {1+\xi _i \xi } \right) \left( {1+\eta _i \eta } \right) ,\nonumber \\&N_{i\xi \eta } =N_{i\eta \xi }\frac{5\left( {1+\mu } \right) }{32\left( {3-\mu } \right) }\beta _i \xi _i \eta _i \left( {1-\xi ^{2}} \right) \left( {1-\eta ^{2}} \right) \end{aligned}$$
(20)

Here, \(N_{i\xi \eta } \) and \(N_{i\eta \xi } \) are the coupling base functions, \(\mu \) is the Poisson’s ratio and \(\beta _i =\frac{2S_{\Delta pqr} }{S}\) with \(p=\hbox { mod }\left( {i,4} \right) +1, q=\hbox { mod }\left( {i+1,4} \right) +1, r=\hbox { mod }\left( {i+2,4} \right) +1\). The symbol \(\hbox { mod }\left( {\cdot ,\cdot } \right) \) denotes the remainder after division. The DOF of the element doesn’t increase, while the accuracy is promoted a lot by the coupling terms. The translational RDPs are verified easily by the equations: \(\sum \limits _{i=1}^4 N_{i\xi } \left( {\xi ,\eta } \right) =\sum \limits _{i=1}^4 N_{i\eta } \left( {\xi ,\eta } \right) =1\) and \(\sum \limits _{i=1}^4 N_{i\xi \eta } \left( {\xi ,\eta } \right) =\sum \limits _{i=1}^4 N_{i\eta \xi } \left( {\xi ,\eta } \right) =0\). Due to the determinants

$$\begin{aligned} \det \left| \begin{array}{c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c} {x_1 }&{} {x_2 }&{} {x_3 }&{} {x_4 } \\ 1&{} 1&{} 1&{} 1 \\ {x_1 }&{} {x_2 }&{} {x_3 }&{} {x_4 } \\ {y_1 }&{} {y_2 }&{} {y_3 }&{} {y_4 } \\ \end{array} \right| \!=0 \hbox { and } \det \left| \begin{array}{c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c} {y_1 }&{} {y_2 }&{} {y_3 }&{} {y_4 } \\ 1&{} 1&{} 1&{} 1 \\ {x_1 }&{} {x_2 }&{} {x_3 }&{} {x_4 } \\ {y_1 }&{} {y_2 }&{} {y_3 }&{} {y_4 } \\ \end{array} \right| \!=0\nonumber \\ \end{aligned}$$
(21)

we have \(\sum \limits _{i=1}^4 {\beta _i \xi _i \eta _i x_i } =0\) and \(\sum \limits _{i=1}^4 {\beta _i \xi _i \eta _i y_i } =0\), and then,

$$\begin{aligned}&- y = - \sum \limits _{{i = 1}}^{4} {N_{{i\xi }} \left( {\xi ,\eta } \right) y_{i} } + \sum \limits _{{i = 1}}^{4} {N_{{i\xi \eta }} \left( {\xi ,\eta } \right) x_{i} } ,\nonumber \\&x = \sum \limits _{{i = 1}}^{4} {N_{{i\eta }} \left( {\xi ,\eta } \right) x_{i} } - \sum \limits _{{i = 1}}^{4} {N_{{i\eta \xi }} \left( {\xi ,\eta } \right) y_{i} } \end{aligned}$$
(22)

Consequently, the base functions of the generalized isoparametric element satisfy the rotational RDP, which are also verified by the numerical tests in [34].

Equations (10), (12) and (15) are the necessary and sufficient conditions for the RDPs of NBFs in two-dimensional cases, which could be used to illustrate feasibilities of the NBFs on the boundary or interior of UCs.

3.2 Construction theory of NBFs

In this section, we will prove that if the NBFs on the boundary of a UC satisfy the RDPs, then so will the NBFs inside the UC.

The BVPs for solving two-dimensional NBFs of a UC could be expressed as

$$\begin{aligned} \left\{ \begin{array}{l@{\quad }l} L{{\varvec{N}}}_{i} = \mathbf{0} &{} in\;K \\ {{{\varvec{N}}}_{i} } \big |_{\Gamma } = \hat{{\varvec{N}}},&{} i = 1,2, \ldots ,n \end{array} \right. \end{aligned}$$
(23)

where \(\mathbf{L}\) is the elasticity operator satisfying \(\mathbf{L}{\varvec{u}}=\hbox {div}\left( {\varvec{D}}:\frac{1}{2}\right. \left. \left( {\nabla {\varvec{u}}+\left( {\nabla {\varvec{u}}} \right) ^{T}} \right) \right) \) and \(\Gamma \) is the boundary of the domain \(K\). The above BVPs come down to the block equation

$$\begin{aligned} \left[ \begin{array}{l@{\quad }l} {{\varvec{K}}_{bb} }&{} {{\varvec{K}}_{bs} } \\ {{\varvec{K}}_{sb} }&{} {{\varvec{K}}_{ss} } \\ \end{array} \right] \left\{ \begin{array}{l} {{\varvec{N}}_b } \\ {{\varvec{N}}_s } \\ \end{array} \right\} =\left\{ \begin{array}{l} {{\varvec{f}}_b } \\ \mathbf{0} \\ \end{array} \right\} \end{aligned}$$
(24)

where the subscripts, \(b\) and \(s\) , denote the terms related to the boundary and interior of the UC, respectively. The interior NBFs could be solved from the second equation of Eq. (24):

$$\begin{aligned} {\varvec{N}}_{si} =-{\varvec{K}}_{ss}^{-1} {\varvec{K}}_{sb} {\varvec{N}}_{bi} \end{aligned}$$
(25)

There are three multiple zero eigenvalues of the coefficient matrix in Eq. (24) for plane problems. The eigenvalues correspond to three orthogonal eigenvectors: \(\overline{{\varvec{N}}}_{i} = \left\{ {\overline{{\varvec{N}}}_{{bi}}^{{\text {T}}} ~~\overline{{\varvec{N}}}_{{si}}^{{\text {T}}} ~} \right\} ^{{\text {T}}} , i\!=\!1,2,3\), which satisfy \( \overline{{\varvec{N}}}_{{si}} \!=\! - {{\varvec{K}}}_{{ss}}^{{ - 1}} {{\varvec{K}}}_{{sb}} \overline{{\varvec{N}}}_{{bi}} \). The arbitrary rigid displacement \({\varvec{G}}\) could be expressed as the linear combination of \( \overline{{\varvec{N}}}_{i} \):

$$\begin{aligned} \sum \limits _{{i = 1}}^{3} a_{i} \overline{{\varvec{N}}}_{i} = {{\varvec{G}}} \end{aligned}$$
(26)

Here, \({\varvec{G}}=\left\{ {{\varvec{G}}_b^T ,{\varvec{G}}_s^T } \right\} ^{T}\) and \( a_{i} = \overline{{\varvec{N}}}_{i}^{T} {{\varvec{G}}} \). Provided the RDPs of \({\varvec{N}}_{bi} \), there are three coefficients \(c_i \) which make the equation established

$$\begin{aligned} \sum \limits _{i=1}^3 c_i {\varvec{N}}_{bi} ={\varvec{G}}_b \end{aligned}$$
(27)

Subsequently, utilizing Eqs. (25)-(27), we have

$$\begin{aligned} \sum \limits _{{i = 1}}^{3} c_{i} {{\varvec{N}}}_{{si}}&= - {{\varvec{K}}}_{{ss}}^{{ - 1}} {{\varvec{K}}}_{{sb}} {{\varvec{G}}}_{b} = - {{\varvec{K}}}_{{ss}}^{{ - 1}} {{\varvec{K}}}_{{sb}} \sum \limits _{{i = 1}}^{3} a_{i} \overline{{\varvec{N}}}_{{bi}}\nonumber \\&= \sum \limits _{{i = 1}}^{3} a_{i} \overline{{\varvec{N}}}_{{si}} = ~{{\varvec{G}}}_{s} \end{aligned}$$
(28)

which indicates that \({\varvec{G}}_s \) could be composed by \({\varvec{N}}_{si} \) with the same coefficients \(c_i \). Equations (27) and (28) illustrate the conclusion made in the start of this section, which implies the principle for constructing NBFs by solving the BVPs of a UC and for determining whether the NBFs satisfy RDPs or not. Although the shapes and material distributions of a UC have influence on a single NBF, the RDPs of NBFs just depend on that of UC’s boundary. Moreover, the constructions of NBFs in two-dimensional domains are transformed into one-dimensional UC’s edges and the difficulties for achieving reasonable NBFs are alleviated a lot.

3.3 Additional terms of NBFs and its properties

3.3.1 Additional terms of NBFs

The performance of NBFs, such as the one constructed by periodic boundary condition (PBC) in Sect. 4.2, could be improved by superposing the additional terms \( \tilde{{\varvec{N}}}_{{xi}} \) and \( \tilde{{\varvec{N}}}_{{yi}} \) to the original ones \( \hat{{\varvec{N}}}_{{xi}} \) and \( \hat{{\varvec{N}}}_{{yi}} \):

$$\begin{aligned} {{\varvec{N}}}_{{xi}} = \hat{{\varvec{N}}}_{{xi}} + \tilde{{\varvec{N}}}_{{xi}} ,\,{{\varvec{N}}}_{{yi}} = \hat{{\varvec{N}}}_{{yi}} + \tilde{{\varvec{N}}}_{{yi}} \end{aligned}$$
(29)

where the original NBFs are assumed to satisfy the RDPs. The translational RDPs of \({\varvec{N}}_{xi} \) and \({\varvec{N}}_{yi} \) lead to the equations \(\sum \limits _i {\varvec{N}}_{xi} =\mathbf{1}_x \) and \(\sum \limits _i {\varvec{N}}_{yi} =\mathbf{1}_y \), which could deduce the relations about the additional terms

$$\begin{aligned} \sum \limits _{i} \tilde{{\varvec{N}}}_{{xi}} = \mathbf{0},\,\sum \limits _{i} \tilde{{\varvec{N}}}_{{yi}} = \mathbf{0} \end{aligned}$$
(30)

Then, substituting Eq. (29) into the condition about the rotational RDPs of the new NBFs, Eq. (16), the additional terms are found to follow

$$\begin{aligned} \sum \limits _{i} \tilde{{\varvec{N}}}_{{xi}} \hat{y}_{i} - \sum \limits _{i} \tilde{{\varvec{N}}}_{{yi}} \hat{x}_{i} = 0 \end{aligned}$$
(31)

Thus, the additional terms meeting Eqs. (30) and (31) could certify the RDPs of the final NBFs. One could calculate the additional terms directly by Eqs. (30) and (31). However, the equations are overdetermined in general, which is an unrealistic way to construct NBFs.

Afterwards, two possible construction methods for the NBFs with additional terms will be discussed: (1) applying external force on the interior DOF of a UC; (2) introducing multipoint constraints on the boundary DOF of a UC.

3.3.2 Method I: applying external force

Introducing an external force \({\varvec{f}}_s \) on the interior DOF of a UC, the second equation in Eq. (24) becomes

$$\begin{aligned} {\varvec{K}}_{sb} {\varvec{N}}_b +{\varvec{K}}_{ss} {\varvec{N}}_s ={\varvec{f}}_s \end{aligned}$$
(32)

Given \({\varvec{N}}_{bi} \) and \({\varvec{f}}_{si} \), the displacement of the interior DOF could be deduced as

$$\begin{aligned} {{\varvec{N}}}_{{si}} = - {{\varvec{K}}}_{{ss}}^{{ - 1}} {{\varvec{K}}}_{{sb}} {{\varvec{N}}}_{{bi}} + {{\varvec{K}}}_{{ss}}^{{ - 1}} {{\varvec{f}}}_{{si}} = \hat{{\varvec{N}}}_{{si}} + \tilde{{\varvec{N}}}_{{si}} \end{aligned}$$
(33)

In the above equation, if \({\varvec{N}}_{bi} \) meets the RDPs, then so will \(\hat{{{\varvec{N}}}}_{si} \), due to the conclusions in Sect. 3.2, and \( \tilde{{\varvec{N}}}_{{si}} \) could be treated as the additional term, which should satisfy Eqs. (30) and (31). Thus, the properties about the external force are

$$\begin{aligned}&\sum _i {{\varvec{f}}_{sxi} } =\mathbf{0}, \sum _i {{\varvec{f}}_{syi} } =\mathbf{0} \end{aligned}$$
(34)
$$\begin{aligned}&\sum _i {{\varvec{f}}_{sxi} } \hat{{y}}_i -\sum _i {{\varvec{f}}_{syi} } \hat{{x}}_i =\mathbf{0} \end{aligned}$$
(35)

Equations (34) and (35) guarantee the translational and rotational RDPs, respectively.

3.3.3 Method II: introducing multipoint constraints

The new NBFs on the UC’s boundary could be expressed, similar to Eq. (29), as

$$\begin{aligned} {{\varvec{N}}}_{{bi}} = \hat{{\varvec{N}}}_{{bi}} + \tilde{{\varvec{N}}}_{{bi}} \end{aligned}$$
(36)

where \( \hat{{\varvec{N}}}_{{bi}} \) and \( \tilde{{\varvec{N}}}_{{bi}} \) denote the original NBF and its additional term, respectively. It could be verified that, if appropriate multipoint constraints are applied on the boundary of the UC, the RDPs of \({\varvec{N}}_{bi} \) could be guaranteed. The multipoint constraints of \({\varvec{N}}_{bi} \) could be expressed as a general form

$$\begin{aligned} {{\varvec{N}}}_{{bi}} = \hat{{\varvec{N}}}_{{bi}} + \tilde{{\varvec{N}}}_{{bi}} = \hat{{\varvec{N}}}_{{bi}} + {{\varvec{T}}}{\tilde{{\varvec{N}}}}_{{bi}}^{'} \end{aligned}$$
(37)

where \( \tilde{{\varvec{N}}}_{{bi}}^{'} \) is the independent DOF after the constraints are introduced, \({\varvec{T}}\) is a constant matrix, the element of which is related to the type of constraint. For example, applying fixed constraints on the \(p\hbox {th}\) DOF of \( \tilde{{\varvec{N}}}_{{bi}} \), then, we have \(T\left( {p,:} \right) =0\), which means that the elements at the \(p\hbox {th}\) row are zero. If the \(p\hbox {th}\) DOF of \( \tilde{{\varvec{N}}}_{{bi}} \) is equal to that of the \(q\hbox {th}\) and the \(q\hbox {th}\) DOF is retained in \(\tilde{{\varvec{N}}}_{{bi}}^{'} \), then, \(T\left( {p,q} \right) =1\) and other elements at the \(p\hbox {th}\) row are zero accordingly.

Introducing Eq. (37) into the energy functional, concerned with the boundary DOF, by the Lagrange multiplier, it yields

$$\begin{aligned} \Pi = \frac{1}{2}{{\varvec{N}}}_{{bi}}^{T} {{\varvec{K}}}_{{bb}} {{\varvec{N}}}_{{bi}} - \left( {{{\varvec{N}}}_{{bi}} - \hat{{\varvec{N}}}_{{bi}} - {{\varvec{T}}}{\tilde{{\varvec{N}}}}_{{bi}}^{'} } \right) ^{T} {\varvec{\lambda }} \end{aligned}$$
(38)

There are three independent variables in the above equation, i.e., \({\varvec{N}}_{bi} , \tilde{{\varvec{N}}}_{{bi}}^{'} \) and \(\varvec{\lambda } \). Utilizing the variational equation, \(\delta \Pi =0\), we get the equilibrium and constraint equations

$$\begin{aligned} \left\{ \begin{array}{l} {{\varvec{K}}}_{{bb}} {{\varvec{N}}}_{{bi}} - {\varvec{\lambda }} = \mathbf{0} \\ {{\varvec{N}}}_{{bi}} - \hat{{\varvec{N}}}_{{bi}} - {{\varvec{T}}}{\tilde{{\varvec{N}}}}_{{bi}}^{'} = \mathbf{0} \\ {{\varvec{T}}}^{T} {\varvec{\lambda }} = \mathbf{0} \\ \end{array} \right. \end{aligned}$$
(39)

where \(\varvec{\lambda }\) is the constraint force and the third equation represents the relation of constraint forces induced by the constraints. From the above equations, the final equation with respect to the independent DOF could be obtained by

$$\begin{aligned} {{\varvec{K}}}_{{bb}}^{'} \tilde{{\varvec{N}}}_{{bi}}^{'} = - {{\varvec{T}}}^{T} {{\varvec{K}}}_{{bb}} \hat{{\varvec{N}}}_{{bi}} \end{aligned}$$
(40)

where \({\varvec{K}}_{bb}^{\prime } ={\varvec{T}}^{T}{\varvec{K}}_{bb} {\varvec{T}}\). Therefore, the independent variable becomes

$$\begin{aligned} \tilde{{\varvec{N}}}_{{bi}}^{'} = - \left( {{{\varvec{K}}}_{{bb}}^{'} } \right) ^{{ - 1}} {{\varvec{T}}}^{T} {{\varvec{K}}}_{{bb}} \hat{{\varvec{N}}}_{{bi}} \end{aligned}$$
(41)

Then, \( \tilde{{\varvec{N}}}_{{bi}} \) and \({\varvec{N}}_{bi} \) are derived by substituting the above equation into Eq. (37). For the additional NBFs in the \(x\) direction, \( \tilde{{\varvec{N}}}_{{bxi}}^{'} \), one could obtain

$$\begin{aligned} \sum \limits _{i} \tilde{{\varvec{N}}}_{{bxi}}^{'} = - \left( {{{\varvec{K}}}_{{bb}}^{'} } \right) ^{{ - 1}} {{\varvec{T}}}^{T} {{\varvec{K}}}_{{bb}} \sum \limits _{i} \hat{{\varvec{N}}}_{{bxi}} = 0 \end{aligned}$$
(42)

which could be deduced by summing Eq. (41) with respect to index \(i\) and utilizing the equation \( {{\varvec{K}}}_{{bb}} \sum \limits _{i} \hat{{\varvec{N}}}_{{bxi}} = {{\varvec{K}}}_{{bb}} \mathbf{1}_{x} = \mathbf{0} \). Due to Eqs. (37) and (42), the additional terms satisfy

$$\begin{aligned} \sum \limits _{i} \tilde{{\varvec{N}}}_{{bxi}} = {{\varvec{T}}}\sum \limits _{i} \tilde{{\varvec{N}}}_{{bxi}}^{'} = \mathbf{0} \end{aligned}$$
(43)

For the additional terms, \( \tilde{{\varvec{N}}}_{{byi}} \), the equation could be similarly given by

$$\begin{aligned} \sum \limits _{i} \tilde{{\varvec{N}}}_{{byi}} = {{\varvec{T}}}\sum \limits _{i} \tilde{{\varvec{N}}}_{{byi}}^{'} = \mathbf{0} \end{aligned}$$
(44)

Subsequently, one could deduce the equation about rotational rigid displacement

$$\begin{aligned}&\sum \limits _{i} \tilde{{\varvec{N}}}_{{bxi}}^{'} \hat{y}_{i} - \sum \limits _{i} \tilde{{\varvec{N}}}_{{byi}}^{'} \hat{x}_{i} = \left( {{{\varvec{K}}}_{{bb}}^{'} } \right) ^{{ - 1}} {{\varvec{T}}}^{T} {{\varvec{K}}}_{{bb}} \nonumber \\&\quad \times \left( \sum \limits _{i} \hat{{\varvec{N}}}_{{bxi}} \hat{y}_{i}- \sum \limits _{i} \hat{{\varvec{N}}}_{{byi}} \hat{x}_{i} \right) = \mathbf{0} \end{aligned}$$
(45)

which employs \( {{\varvec{K}}}_{{bb}} \left( {\sum \limits _{i} \hat{{\varvec{N}}}_{{bxi}} \hat{y}_{i} - \sum \limits _{i} \hat{{\varvec{N}}}_{{byi}} \hat{x}_{i} } \right) = 0 \), on the basis of the fact that \( \sum \limits _{i} {{\varvec{N}}}_{{bxi}} \hat{y}_{i} - \sum \limits _{i} {{\varvec{N}}}_{{byi}} \hat{x}_{i} \) represents the rotational rigid displacement mode on the UC’s boundary. Thus, utilizing Eqs. (37) and (45) leads to the condition concerning the additional terms

$$\begin{aligned} \sum \limits _{i} \tilde{{\varvec{N}}}_{{bxi}} \hat{y}_{i} - \sum \limits _{i} \tilde{{\varvec{N}}}_{{byi}} \hat{x}_{i}&= {{\varvec{T}}}\left( {\sum \limits _{i} \tilde{{\varvec{N}}}_{{bxi}}^{'} \hat{y}_{i} - \sum \limits _{i} \tilde{{\varvec{N}}}_{{byi}}^{'} \hat{x}_{i} } \right) \nonumber \\&= \mathbf{0} \end{aligned}$$
(46)

As a result, the additional terms, deduced from the multipoint constraints, satisfy Eqs. (43), (44) and (46), thus, the RDPs of the new NBFs in Eq. (37) are guaranteed due to the conclusions in Sect. 3.3.1.

It seems that the form of \({\varvec{T}}\) have no influence on the RDPs of the new NBFs, which means that the RDPs are not restricted by some specified form of multipoint constraints; it is reasonable that only the singularity of \({\varvec{K}}_{bb} \) is eliminated. Thus, all kinds of multipoint constraints could be developed to construct suitable NBFs. The conclusions in this section will be used to discuss the RDPs of the NBFs for periodic boundary condition (NBFs-PBC).

4 Some construction modes of NBFs

4.1 Linear boundary condition

In this section, the construction of NBFs for linear boundary condition (NBFs-LBC) will be discussed in the theoretical aspect on the basis of reference [28]. As the UC depicted in Fig. 3, the edge is discretized by \(\Gamma =\Gamma _{12} \cup \Gamma _{23} \cup \cdots \cup \Gamma _{n1} \), where \(\Gamma _{ij} \) denotes the directional edge with the macroscopical nodes \( \hat{A}_{i} \) and \(\hat{A}_{j}\). \(\Gamma _{ij} \) is counter-clockwise as \(j=\hbox { mod }\left( {i,n} \right) +1\), and clockwise as \(j=n-\hbox { mod }\left( {n-i+1,n} \right) \), where \(n\) is the number of the macroscopical node and \(\hbox {mod}\left( {\cdot ,\cdot } \right) \) denotes the modulus operator after division. Considering the BVPs corresponding to \(\hat{A}_{i}\), the prescribed NBFs on the UC’s boundary are assumed to be \({\varvec{N}}_{bi} =\left[ {{\varvec{N}}_{bxi} ,{\varvec{N}}_{byi} } \right] \), where \({\varvec{N}}_{bxi} \) and \({\varvec{N}}_{byi} \) correspond to the DOFs of \(\hat{A}_{i}\), i.e., \(\hat{u}_{xi}\) and \(\hat{u}_{yi}\), respectively. \({\varvec{N}}_{bxi} \) is set to be \({\varvec{u}}_{xij} \) and \({\varvec{u}}_{xik} \) in the \(x\) direction and to be zero in the \(y\) direction on \(\Gamma _{ij} \) and \(\Gamma _{ik} \). Here, \({\varvec{u}}_{xij} \) is distributed linearly along \(\Gamma _{ij} \), which is equal to one at \(\hat{A}_{i}\) and zero at \(\hat{A}_{j}\) and \({\varvec{u}}_{xik} \) conforms to the similar distribution. On the other boundaries, both displacements in the \(x\) and \(y\) directions are set to be zero. In the case of \(\hat{A}_{2}\), the NBFs on \(\Gamma _{21} \) and \(\Gamma _{23} \) are shown in Fig. 3, corresponding to \( \hat{u}_{{x2}} \) or \( \hat{u}_{{y2}} \).

Fig. 3
figure 3

LBC for the UC with an arbitrary shape

The BVP corresponding to \( \hat{u}_{{xi}} \) could be defined by

$$\begin{aligned} \left\{ {\begin{array}{l} {\varvec{L}}{{\varvec{N}}}_{xi} =0\quad in\;K \\ {{{\varvec{N}}}_{xi} } \big |_{\Gamma _{ij} } ={{\varvec{u}}}_{xij} ,\quad {{{\varvec{N}}}_{xi} } \big |_{\Gamma _{ik} } ={{\varvec{u}}}_{xik} \\ {{{\varvec{N}}}_{xi} } \big |_{\Gamma _b \backslash \left( {\Gamma _{ij} \cup \Gamma _{ik} } \right) } =0 \\ \end{array}} \right. \end{aligned}$$
(47)

The prescribed displacement on \(\Gamma _{ij} \) and \(\Gamma _{ji} \) satisfies \({\varvec{u}}_{xij} +{\varvec{u}}_{xji} =\mathbf{1}_{xij} \) due to the above discussions on LBC, where \(\mathbf{1}_{xij} \) denotes the rigid displacement of \(\Gamma _{ij} \) in the \(x\) direction. The above BVP comes down to the equation as Eq. (24). There are no coupling terms within the NBFs-LBC on the UC’s boundary, thus, the corresponding RDPs could be verified as follows

$$\begin{aligned}&\sum \limits _i {\varvec{N}}_{bxi} =\mathbf{1}_{bx} \end{aligned}$$
(48)
$$\begin{aligned}&\sum \limits _i {\varvec{N}}_{byi} =\mathbf{1}_{by}\end{aligned}$$
(49)
$$\begin{aligned}&{{\varvec{y}}}_{b} = \sum \limits _{i} {{\varvec{N}}}_{{byi}} \hat{y}_{i} ,~~{{\varvec{x}}}_{b} = \sum \limits _{i} {{\varvec{N}}}_{{bxi}} \hat{x}_{i} \end{aligned}$$
(50)

Here, \({\varvec{x}}_b \) and \({\varvec{y}}_b \) are composed by the coordinates of microscopical nodes on the UC’s boundary. It can be inferred from the conclusions in Sect. 3.2 that, the NBFs-LBC satisfy the RDPs. Some conclusions could be drawn about the NBFs-LBC.

  1. 1.

    The RDPs have nothing to do with the shape and material distribution of the UC.

  2. 2.

    The macroscopical DOFs, \(\hat{u}_{{xi}}\) and \(\hat{u}_{{yi}}\), which correspond to \({\varvec{N}}_{xi} \) and \({\varvec{N}}_{yi} \), are meaningful in physics, so the method is of convenience for the assembly of the global stiffness matrix on the coarse mesh and applying boundary conditions.

  3. 3.

    Only one decomposition process of \({\varvec{K}}_{ss} \) is needed for solving all BVPs, which is helpful for improving computational efficiency. In the previous work for the MsFEM or EMsFEM, the times for solving the linear equations about the UC are almost equal to amount of NBFs. For example, in the work of Hou et al. [2], three BVPs need to be solved in each rectangular UC to obtain three NBFs for scalar-field problems (the fourth one is computed by the RDPs). Thus, the simple technique would make a significant improvement on computation efficiency.

  4. 4.

    High order boundary conditions could also be constructed by introducing middle points on the edge of the UC, similar to the serendipity element, and this is a promising way to improve the accuracy of NBFs.

4.2 Periodic boundary condition

The construction of NBFs-PBC is explained detailedly in [28]. The displacements at the macroscopical nodes are specified, while the NBFs on the edges need to be solved by the multipoint constraints. The RDPs with respect to the NBFs obtained by the multipoint constraints are discussed in Sect. 3.3.3. Here, we just need to find a multipoint constraints equation for PBC similar to Eq. (37). The boundary NBF is partitioned into the block form

$$\begin{aligned} {\varvec{N}}_b =\left\{ {{\varvec{N}}_p^T ,{\varvec{N}}_q^T ,{\varvec{N}}_r^T } \right\} ^{T} \end{aligned}$$
(51)

The node location corresponding to each block could be found in Fig. 4, in which \({\varvec{N}}_p \) is related to the macroscopical nodes and highlighted with the solid dots and the nodes corresponding to \({\varvec{N}}_q \) and \({\varvec{N}}_r \) are represented by the shadow and blank dots, respectively. \({\varvec{N}}_p \) is known in advance as a macroscopical node is constrained as shown in Fig. 4, while \({\varvec{N}}_q \) and \({\varvec{N}}_r \) satisfy the multipoint constraint equations.

Fig. 4
figure 4

PBC for the rectangular UC and the boundary DOF blocks

Incorporating the features of PBC, the NBFs in Eq. (51) could be decomposed as

$$\begin{aligned} \left\{ \begin{array}{l} {{{\varvec{N}}}_{{pi}} } \\ {{{\varvec{N}}}_{{qi}} } \\ {{{\varvec{N}}}_{{ri}} } \\ \end{array} \right\} = \left\{ \begin{array}{l} {\hat{{\varvec{N}}}_{{pi}} } \\ {\hat{{\varvec{N}}}_{{qi}} } \\ {\hat{{\varvec{N}}}_{{ri}} } \\ \end{array} \right\} + \left\{ \begin{array}{l} {\tilde{{\varvec{N}}}_{{pi}} } \\ {\tilde{{\varvec{N}}}_{{qi}} } \\ {\tilde{{\varvec{N}}}_{{ri}} } \\ \end{array} \right\} \end{aligned}$$
(52)

which could be simplified as \( {{\varvec{N}}}_{{bi}} = \hat{{\varvec{N}}}_{{bi}} + \tilde{{\varvec{N}}}_{{bi}} \). The original NBFs, \( \hat{{\varvec{N}}}_{{bi}}\), with respect to the \(\Delta x\) and \(\Delta y\) in Fig. 4, distribute linearly along the two boundaries next to the node, \(\hat{A}_{i}\), thus, the RDPs of \(\hat{{\varvec{N}}}_{{bi}}\) are guaranteed. The additional terms, \( \tilde{{\varvec{N}}}_{{bi}} \), corresponding to \(u^{\hbox {B}^{-}}, u^{\hbox {A}^{-}}\) etc. need to be calculated. The multipoint constraints in Fig. 4 lead to \( \tilde{{\varvec{N}}}_{{pi}} = \mathbf{0} \) and \( \tilde{{\varvec{N}}}_{{qi}} = \tilde{{\varvec{N}}}_{{ri}} \). Then, the additional terms of the NBFs could be expressed as

$$\begin{aligned} \left\{ {\begin{array}{l} {\tilde{{\varvec{N}}}_{{pi}} } \\ {\tilde{{\varvec{N}}}_{{qi}} } \\ {\tilde{{\varvec{N}}}_{{ri}} } \\ \end{array} } \right\} = \left[ {\begin{array}{l} \mathbf{0} \\ {{\varvec{I}}} \\ {{\varvec{I}}} \\ \end{array} } \right] \tilde{{\varvec{N}}}_{{qi}} = {{\varvec{T}}}{\tilde{{\varvec{N}}}}_{{qi}} \end{aligned}$$
(53)

Thus, Eq. (52) could be rewritten as \( {{\varvec{N}}}_{{bi}} = \hat{{\varvec{N}}}_{{bi}} + {{\varvec{T}}}{\tilde{{\varvec{N}}}}_{{qi}} \), where \( \tilde{{\varvec{N}}}_{{qi}} \) is the independent unknown. It could be found that the construction of NBFs-PBC coincides with the framework in Sect. 3.3.3. Consequently, from Eqs. (41) and (53), one could obtain the solution of the independent variable

$$\begin{aligned} \tilde{{\varvec{N}}}_{{bi}} = - {{\varvec{T}}}\left( {\hat{{\varvec{K}}}_{{bb}}^{'} } \right) ^{{ - 1}} {{\varvec{T}}}^{T} \hat{{\varvec{K}}}_{{bb}} \hat{{\varvec{N}}}_{{bi}} \end{aligned}$$
(54)

where \( \hat{{\varvec{K}}}_{{bb}}^{'} = {{\varvec{T}}}^{T} \hat{{\varvec{K}}}_{{bb}} {{\varvec{T}}} \) and from Eqs. (43), (44) and (46), it follows that

$$\begin{aligned}&\sum \limits _{i} \tilde{{\varvec{N}}}_{{bxi}} = \mathbf{0}, \quad \sum \limits _{i} \tilde{{\varvec{N}}}_{{byi}} = \mathbf{0}, \nonumber \\&\sum \limits _{i} \tilde{{\varvec{N}}}_{{bxi}} y_{i} - \sum \limits _{i} \tilde{{\varvec{N}}}_{{byi}} x_{i} = \mathbf{0} \end{aligned}$$
(55)

The above equatio2ns ensure the RDPs of the boundary NBFs, so the NBFs inside the UC also meet the RDPs. Thus, PBC could be treated as a combination of LBC and periodic additional terms.

The above analysis indicates that, only one decomposition process of stiffness matrix is required for all BVPs, which is beneficial for the efficiency and storage space of mechanical analyses. In addition, PBC could be extended to the UCs with even edges and arbitrary material distributions. We have to point out that the node number on a pair of opposite edges should be the same, so as to apply multipoint constraints.

4.3 Rotational angle boundary condition

The idea for constructing the NBFs of Rotational Angle Boundary Condition (NBFs-RABC) could be traced down to the membrane element with a drilling DOF. Introducing the drilling DOF to a membrane element is beneficial not only for improving the element’s accuracy, but also for constructing the plane shell element by combining with a suitable plate element. The first membrane element with the drilling DOF is proposed by Allman [38]; soon afterwards, many famous works on this topic appear, such as Hughes and Brezzi [39] and Ibrahimbegovic et al. [40]. The study makes use of the membrane with the drilling DOF by Hughes and Brezzi [39], where the independent rotational field is defined as

$$\begin{aligned} {\varvec{\psi }} =\frac{1}{2}\left( {\nabla {\varvec{u}}-\nabla {\varvec{u}}^{T}} \right) \end{aligned}$$
(56)

where \({\varvec{u}}\) is the displacement field and \(\nabla =\frac{\partial }{\partial x}{\varvec{i}}+\frac{\partial }{\partial y}{\varvec{j}}\) represents the two-dimensional gradient operator. The above constraint equation is realized by introducing a penalty function into the original energy functional. On the basis of this theory, Ibrahimbegovic et al. [40] presents the quadrilateral element with a drilling DOF. The rotational field of the element is interpolated by a bilinear function; meanwhile, the displacement along the element edge is linear and vertical to the edge quadratic. In the light of this theory, this section presents a boundary condition with a rotational angle DOF on the coarse mesh.

Each macroscopical node, \( \hat{A}_{i} \), contains three DOFs for RABC, i.e., \( \hat{{\varvec{u}}}_{i} = \left\{ {\hat{u}_{{xi}} ,\hat{u}_{{yi}} ,\hat{\varphi }_{i} } \right\} ^{T} \), in which \(\hat{u}_{xi}, \hat{u}_{yi}\) are the translational DOFs and \( \hat{\varphi }_{i} \) the rotational angle DOF. There are \(3n\) groups of BVPs to be solved to obtain all the NBFs, where \(n\) denotes the number of coarse-mesh nodes. As depicted in Fig. 5, there are six groups of BVPs related to the prescriptions of the nonzero displacement on \(\Gamma _{ij} \), corresponding to the six DOFs of \(\hat{A}_{i}\) and \(\hat{A}_{j}\). The parallel and vertical directions of \(\Gamma _{ij} \) are assumed to be \({\varvec{s}}_{ij} \) and \({\varvec{n}}_{ij} \), then, the displacements of the two directions are supposed to be

$$\begin{aligned} \left\{ {\begin{array}{l} u_s =\mathcal{L }_1 u_{si} +\mathcal{L }_2 u_{sj} \\ u_n =\mathcal{H }_1 u_{ni} +\mathcal{H }_2 u_{nj} +\mathcal{H }_3 l_{ij} \phi _i +\mathcal{H }_4 l_{ij} \phi _j \\ \end{array}} \right. \end{aligned}$$
(57)

or a more concise form

$$\begin{aligned} {{\varvec{u}}}_{l} = \sum \limits _{{i = 1}}^{2} {{\varvec{N}}}_{{ui}} \hat{{\varvec{u}}}_{{li}} + {{\varvec{N}}}_{\phi } \hat{{\varvec{u}}}_{\phi } \end{aligned}$$
(58)

where \( \hat{{\varvec{u}}}_{{li}} = \left\{ {u_{{si}} ,u_{{ni}} } \right\} ^{T} \) denotes the translational DOFs referred to the local coordinate of the edge, i.e., \({\varvec{s}}_{ij} \) and \({\varvec{n}}_{ij} \), and \( \hat{{\varvec{u}}}_{\phi } = \left\{ {\phi _{i}, \phi _{j} } \right\} ^{T}\) is the rotational DOF. \(\mathcal{L }_i \) and \(\mathcal{H }_i \) belong to the function collections of linear interpolation and Hermite interpolation

$$\begin{aligned}&{\varvec{\mathcal{L }}}=\left[ {1-\xi ,\;\xi } \right] \end{aligned}$$
(59)
$$\begin{aligned}&{\varvec{\mathcal{H }}}=\left[ {1\!-\!3\xi ^{2}\!+\!2\xi ^{3},3\xi ^{2}\!-\!2\xi ^{3},\xi \!-2\xi ^{2}\!+\xi ^{3},\xi ^{3}-\xi ^{2}} \right] \nonumber \\ \end{aligned}$$
(60)

the distributions of which on the UC’s edge are shown in Fig. 5b, c. Here, \(\xi =l/l_{ij} \in \left[ {0,1} \right] \) and \(l\) is the distance from a point on \(\Gamma _{ij} \) to \(\hat{A}_{i}\), as shown in Fig. 5a. The normal and length of \(\Gamma _{ij} \) could be represented by

$$\begin{aligned}&{\varvec{n}}_{ij} =\left\{ {{\begin{array}{l} {\sin \alpha _{ij} } \\ {-\cos \alpha _{ij} } \\ \end{array} }} \right\} =\left\{ {{\begin{array}{l} s \\ {-c} \\ \end{array} }} \right\} ,\nonumber \\&l_{ij} =\sqrt{\left( {x_i -x_j } \right) ^{2}+\left( {y_i -y_j } \right) ^{2}} \end{aligned}$$
(61)

It could be indicated that the boundary displacement is linear in \({\varvec{s}}_{ij} \), and Hermite cubic polynomial in \({\varvec{n}}_{ij} \). The linear displacement fields could be reconstructed in both directions \({\varvec{s}}_{ij} \) and \({\varvec{n}}_{ij} \).

Fig. 5
figure 5

RABC for the UC with an arbitrary shape and its boundary NBFs. a shows the sketch of RABC and the meaning of the drilling DOF on \( \hat{A}_{n} \); b and c are the linear and Hermitian NBFs prescribed on the UC’s edges, respectively

It could be verified that, conforming to the process in Sect. 3.1, the displacement interpolations in Eq. (58) satisfy the RDPs, i.e., Eqs. (10), (12) and (17). However, the DOF of the same node would be different on two neighboring edges, since the interpolations in Eq. (57) are referred to the local coordinate system. The displacement interpolations could be transformed into the global coordinate system, \(xoy\), after applying the rotational transformation to Eq. (58):

$$\begin{aligned} {{\varvec{u}}}_{g} = \sum \limits _{{i = 1}}^{2} {{\varvec{RN}}}_{{ui}} \hat{{\varvec{u}}}_{{li}} + {{\varvec{RN}}}_{\phi } {{\varvec{u}}}_{\phi } = \sum \limits _{{i = 1}}^{2} {{\varvec{N}}}_{{ui}}^{'} {{\varvec{u}}}_{{gi}} + {{\varvec{N}}}_{\phi }^{'} {{\varvec{u}}}_{\phi } \end{aligned}$$
(62)

where \({\varvec{u}}_g ={{\varvec{Ru}}}_l \) denotes the displacement in global coordinate system, and \( \hat{{\varvec{u}}}_{{li}} = {{\varvec{R}}}^{T} {{\varvec{u}}}_{{gi}} \) suggests the relation of node displacement vector between the local and global coordinate systems. Substitution of \({\varvec{R}}=\left[ \begin{array}{cc} c&{} {-s} \\ s&{} c \\ \end{array} \right] \) into Eq. (62) yields the new interpolation function matrices

$$\begin{aligned}&{\varvec{N}}_{ui}^{\prime } ={{\varvec{RN}}}_{ui} {\varvec{R}}^{T}=\left[ \begin{array}{c@{\quad }c} {\mathcal{L }_i c^{2}+\mathcal{H }_i s^{2}}&{} {\mathcal{L }_i sc-\mathcal{H }_i sc} \\ {\mathcal{L }_i sc-\mathcal{H }_i sc}&{} {\mathcal{L }_i s^{2}+\mathcal{H }_i c^{2}} \\ \end{array} \right] ,\nonumber \\&\quad i=1,2 \end{aligned}$$
(63)
$$\begin{aligned}&{\varvec{N}}_\phi ^{\prime } ={\varvec{RN}}_\phi =l_{ij} \left[ \begin{array}{c@{\quad }c} {-s\mathcal{H }_3 }&{} {-s\mathcal{H }_4 } \\ {c\mathcal{H }_3 }&{} {c\mathcal{H }_4 } \\ \end{array} \right] \end{aligned}$$
(64)

The above equations are the NBFs on the UC’s boundary, which infer that the coupling terms of the NBFs are not zero. Table 1 shows the NBFs on \(\Gamma _{ij} \) corresponding to the DOF of \(\hat{{A}}_i \) and \(\hat{{A}}_j \).

Table 1 The NBFs on \(\Gamma _{ij} \) corresponding to six groups of BVPs concerning to \(\hat{{A}}_i \) and \(\hat{{A}}_j \)

It should be noted that there are no rotational angle DOFs in the microscopical level which only exist in the macroscopical scale. The rotational DOF represents the rigid rotation of the corresponding node in physics. As shown in the magnification of \(\hat{{A}}_n \) in Fig. 5a, the macroscopical node, \( \hat{A}_{n} \), is assumed to be shared by four UCs, \(C_1 -C_4 \), and a rigid rotation with an angle, \(\varphi _0 \), takes place at \( \hat{A}_{n} \). Then, each edge next to \( \hat{A}_{n} \) rotates \(\varphi _0 \). Consequently, the same rotation would take place at the material point of \( \hat{A}_{n} \), due to the microscopical elements next to \( \hat{A}_{n} \). Since each microscopical element is interpolated by the analytical base function, which satisfies the rotational RDP automatically.

We can show that the boundary NBFs in Eq. (62) satisfy the RDPs. For example, substituting the rotational rigid displacement of node \( \hat{A}_{i} \) and \( \hat{A}_{j} \), i.e., \( \varphi \left[ - \hat{y}_{i} ,\;\hat{x}_{i} ,1, - \hat{y}_{j} ,\right. \left. \hat{x}_{j} ,1 \right] ^{T} \), into Eq. (62) and taking advantage of the geometrical relation \(l_{ij} =c\Delta x_{ij} +s\Delta y_{ij} \), the displacement of an arbitrary point \(\left( {x,y} \right) \) on \(\Gamma _{ij} \) could be deduced as \(\varphi \left( {-y,x} \right) \). Thus, the rotational RDP is satisfied. For the translational RDPs, interested readers could verify that Eqs. (10) and (12) similarly.

In the numerical aspect, all BVPs result in the solution of Eq. (24). The boundary NBFs, listed in Table 1, are prescribed in advance, and the interior NBFs could be solved by Eq. (25). Only one decomposition process of stiffness matrix is needed for RABC, similar to the solutions of the NBFs-LBC. Therefore, the computation quantity is of almost no difference from LBC. RABC has no constrictions on the geometries and material distributions of the UCs, which is superior to PBC. One could refer to Sect. 4.4 for more details.

4.4 Numerical examples

The indicators below are introduced to verify the RDPs of NBFs:

$$\begin{aligned}&e_x ={\left\| {\sum \limits _i {\varvec{N}}_{xi} -\mathbf{1}_x } \right\| }\Big /{\left\| {\mathbf{1}_x } \right\| }\nonumber \\&e_y ={\left\| {\sum \limits _i {\varvec{N}}_{yi} -\mathbf{1}_y } \right\| }\Big /{\left\| {\mathbf{1}_y } \right\| }\nonumber \\&e_{{rot}} = {{\left\| {{{\varvec{r}}}_{w} + \sum \limits _{i} {{\varvec{N}}}_{{xi}} \hat{y}_{{\text {i}}} - \sum \limits _{i} {{\varvec{N}}}_{{yi}} \hat{x}_{{\text {i}}} } \right\| } \Big / {\left\| {{{\varvec{r}}}_{w} } \right\| }} \end{aligned}$$
(65)

which denote the errors for the translational and rotational RDPs, respectively. \(\left\| \cdot \right\| \) represents the second type norm of a matrix. Theoretically, three zero eigenvalues \(\lambda _i \) should exist for \({\varvec{K}}_E \) as shown in Eq. (7), thus, the following indicators are also considered:

$$\begin{aligned} \hat{\lambda }_{i} = \left| {\lambda _{i} } \right| /\lambda _{m} ,\;i = 1,2,3 \end{aligned}$$
(66)

where \(\lambda _m \) is the smallest theoretical nonzero eigenvalue of \({\varvec{K}}_E \).

The NBFs-LBC for several types of UCs are depicted in Fig. 6. The mesh and material information are referred to the descriptions below the UC, in which \(N_E \) and \(N_N \) denote the number of the element and node, \(E\) and \(\nu \) represent elastic modulus and Poisson’s ratio. The same variables in Figs. 7 and 8 will not be explained again. The NBFs with respect to the macroscopical DOF, \( \hat{u}_{{x1}} \) and \( \hat{u}_{{y1}} \), are shown in the figure, in which the length and orientation of the red arrows represent the size and direction of displacement vector, respectively. For the NBFs of the rectangular UC, shown in the Fig. 6a, the coupling terms of NBF on the boundary are zero, while that inside the UC are not. The coupling terms inside the UC reflect the influence of the macroscopical DOF, \( \hat{u}_{{x1}} \), on the NBFs in the \(y\) direction and such effects are not included for the traditional analytical base function. In addition, the NBFs for the other UCs, such as the irregular quadrilateral and irregular hexagon, show the similar characteristic with the rectangular one.

Fig. 6
figure 6

Distributions of the NBFs and the error indicators for LBC

Fig. 7
figure 7

Distributions of the NBFs and the error indicators for PBC

Fig. 8
figure 8

Distributions of the NBFs and the error indicators for RABC

The six error indicators in Eqs. (65) and (66) are listed on the right side of each UC. As one might expect, all the values are small, thus, the NBFs-LBC satisfy the RDPs. Moreover, the RDPs have nothing to do with the geometries and material distributions of the UCs. Thus, the application scope for LBC has been extended a lot relative to the previous work [28]. The displacement on the UC’s edge varies linearly, which maybe a little rigid in some cases.

As shown in Fig. 7, the NBFs-PBC for all kinds of UCs, including the rectangular, regular hexagon, diamond and so on, are depicted. The NBFs corresponding to the coarse-mesh DOF \( \hat{u}_{{x1}} \) and \( \hat{u}_{{y1}} \) are plotted. The coupling terms exist not only inside the UC, but also on the edge, comparing with that of LBC. Just as the NBFs of the rectangular UC shown in Figs. 6a and 7a, the deformed edges for PBC become curved, while that for LBC keep straight. The flexibility of boundary may decide the higher accuracy of PBC in most cases [28]. The error indicators are all small, which suggest the RDPs of NBFs-PBC. Total amount of UC’s edge for PBC should be even and the node number on the two opposite edges should be the same, thus, the periodic multipoint constraints could be applied.

The NBFs-RABC are shown in Fig. 8, enumerating the UCs such as the rectangular, irregular quadrilateral and irregular hexagon. The vector diagram of the NBFs with respect to \( \hat{u}_{{x1}} , \hat{u}_{{x1}} \) and \( \hat{\varphi }_{1} \) are depicted. Taking the rectangular UC shown in Fig. 8a as an example, the displacement along the UC’s edge varies linearly and that perpendicular to the edge Hermite cubic polynomial. As for the rotational angle, \( \hat{\varphi }_{1} \), the displacement vertical to the adjacent edges is stimulated. It could be found that the NBFs-RABC are more flexible than the NBFs-LBC concerning the deformation vertical to the UC’s edge. Thus, the NBFs-RABC could be more suitable to describe the bending deformation of the UC.

The error indicators of Eqs. (65) and (66) are all small, which suggest the RDPs of the NBFs-RABC. The displacement on the UC’s edge is conforming, so no averaging operations are needed on the UC’s edge.

Some features of NBFs could be summarized based on theoretical analyses in Sect. 4.14.3 and above numerical examples: (1) the NBFs of vector fields contain coupling terms, which take the mutual influence of different directions into consideration and should be beneficial for the accuracy of the results. (2) The NBFs are obtained by the solution of BVPs, which represent the typical deformations of the UC. (3) The NBFs are discretized inside the UC in nature, so that there are no difficulties for NBFs to adapt to the UCs with intricate geometries and material distributions. Even for the polygonal UC, the construction of NBFs wouldn’t generate essential difficulties. On the contrary, it may be hard for analytical base functions to extend shape of element to arbitrary polygons. (4) Each NBF corresponds to a macroscopical physical DOF on coarse mesh, which is convenient for assembling stiffness matrix and applying boundary condition.

5 Oversampling technique

Oversampling technique is first proposed by Hou et al. [2] to overcome the difficulty due to scale resonance between the grid scale and the scales of continuous problem. The technique is further developed by Zhang et al. [28] for the vector field analyses, with the aim to gain the oscillating NBFs on the UC’s edge. In this section, the mechanism of the RDPs for the NBFs of oversampling technique will be investigated in theory, which provides some illuminations for constructing new NBFs with oversampling technique. The numerical examples on oversampling technique are not given in this paper, and one could refer to [28, 34].

5.1 Basic properties of oversampling technique

In this section, general properties about the oversampling technique are discussed. To construct the oscillating NBFs on the boundary of the Original UC (OrgUC), \(K\), an oversampling unit cell (OsUC) overlapping the OrgUC, \(K^{{\prime }}\), is introduced, as shown in Fig. 9. For the most common rectangular UC, as shown in Fig. 9, the NBF, \({\varvec{\phi }} _{xx1}^{\prime } \), corresponding to the DOF, \( \hat{u}_{1}^{'}\), of \( \hat{A}_{i}^{'} \), is prescribed on \(\Gamma ^{\prime }\). \({\varvec{\phi }}_{xx1}^{\prime } \) is equal to one at \(\hat{A}_{1}^{'}\) and varies linearly along the two boundaries connected by \(\hat{A}_{1}^{'}\). A displacement constraint in the \(y\) direction is applied on \(\hat{A}_{3}^{'}\) to avoid rigid displacements as shown in Fig. 9, which will be the same for different prescribed boundary displacements, i.e., \({\varvec{\phi }} _{xxi}^{\prime } , i=1,\ldots ,4\), so that only one decomposition of the OsUC’s stiffness matrix is involved for solving four NBFs in the \(x\) direction. The coupling NBFs on the boundary of the OsUC, \({\varvec{\phi }}_{yxi}^{\prime } , i=1,\ldots ,4\), should be solved by Eq. (97). Such BVPs lead to the Eq. (97) with the boundary condition similar to Eq. (100) and the NBFs in the \(x\) direction will not be affected due to the discussions in Appendix 1.

Fig. 9
figure 9

Oversampling technique for the rectangular UC

The NBFs on \(\Gamma \) are assumed to be \({\varvec{\phi }}_x =\left[ {{\varvec{\phi }} _{xx1} ,\ldots ,{\varvec{\phi }}_{xx4} } \right] \), which are solved and extracted from the above BVPs. However, the Kronecker delta property of \({\varvec{\phi }}_{xxi} \) shown in Eq. (9) is not satisfied on \(\hat{A}_{j}\). Thus, it is not convenient to apply \({\varvec{\phi }}_{xxi} \) directly on the boundary of the OrgUC. Consequently, the new boundary NBFs are introduced by a linear combination of \({\varvec{\phi }}_x \):

$$\begin{aligned} {\varvec{\psi }} _{xxi} =\sum \limits _{j=1}^4 {\varvec{C}}_{xij} {\varvec{\phi }}_{xxj} \hbox { or }{\varvec{\psi }} _x ={\varvec{\phi }} _x {\varvec{C}}_x \end{aligned}$$
(67)

which is forced to satisfy the Kronecker delta property on \( \hat{A}_{j} \):

$$\begin{aligned} {\varvec{\psi }}_{{xxi}} {\vert }_{{\hat{A}_{j} }} = \delta _{{ij}} \end{aligned}$$
(68)

Thus, the above NBFs could be exerted on \(\Gamma \) directly. The coefficient matrix, \({\varvec{C}}_x \), in Eq. (67) can be solved by the following equation deduced from the Kronecker delta property

$$\begin{aligned} {\varvec{T}}_x {\varvec{C}}_x ={\varvec{I}} \end{aligned}$$
(69)

where \({\varvec{T}}_x \) is a \(4\times 4\) matrix constructed by the value of \({\varvec{\phi }}_x \) at \( \hat{A}_{i} \) and \({\varvec{I}}\) is a diagonal unit matrix. The NBFs, \({\varvec{\psi }} _y \), could also be constructed similarly. The new NBFs calculated by Eq. (67) keep some properties of \({\varvec{\phi }}_x \) below.

Property 5.1

Suppose that \({\varvec{\phi }}_x \) satisfies the translational RDPs, so will \({\varvec{\psi }} _x.\)

Proof

Due to the translational RDPs of \({\varvec{\phi }}_x \), one could obtain

$$\begin{aligned} \sum \limits _{i=1}^4 {\varvec{\phi }}_{xxi} =\mathbf{1}\hbox { or }{\varvec{\phi }}_x \mathbf{1}=\mathbf{1} \end{aligned}$$
(70)

where 1 denotes a vector whose element are all one and its dimensionality is determined as appropriate. The dimensionality of left vector \('\mathbf{1}'\) is four and the right one is the same as that of \( \hat{{\varvec{\phi }}}_{x} \). The provision will not be emphasized hereinafter. Since \({\varvec{T}}_x \) is composed by the value of \({\varvec{\phi }}_x \) at \( \hat{A}_{j} \), one could obtain the unit decomposition of \({\varvec{T}}_x \) as follows

$$\begin{aligned} \sum \limits _{i=1}^4 {\varvec{T}}_{xi} =\mathbf{1} \hbox { or } {\varvec{T}}_x \mathbf{1}=\mathbf{1} \end{aligned}$$
(71)

and then

$$\begin{aligned} {\varvec{C}}_x \mathbf{1}={\varvec{C}}_x {\varvec{T}}_x \mathbf{1}={\varvec{I}}\mathbf{1}=\mathbf{1} \end{aligned}$$
(72)

Equation (72) indicates that the coefficient matrix, \({\varvec{C}}_x \), also satisfies the unit decomposition. Thus, utilizing Eqs. (67), (70) and (72), we obtain the the translational RDPs of \({\varvec{\psi }} _x \)

$$\begin{aligned} {\varvec{\psi }} _x \mathbf{1}={\varvec{\phi }}_x {\varvec{C}}_x \mathbf{1}={\varvec{\phi }} _x \mathbf{1}=\mathbf{1} \end{aligned}$$
(73)

Property 5.2

Suppose that \({\varvec{\phi }}_x \) satisfies the rotational RDP, so will \({\varvec{\psi }} _x.\)

Proof

From Eq. (17), the rotational RDP of \({\varvec{\phi }}_x \) degenerates into

$$\begin{aligned} \hat{{\varvec{y}}} = {{\varvec{T}}}_{x} \hat{{\varvec{y}}}^{'}, \quad {{\varvec{y}}} = {\varvec{\phi }} _{x} \hat{{\varvec{y}}}^{'} \end{aligned}$$
(74)

since the coupling terms of \({\varvec{\phi }}_x \) are zero. Here, \( {\hat{{\varvec{y}}}} = \left( {\hat{y}_{i} } \right) _{{4 \times 1}} \) and \( \hat{{\varvec{y}}}^{'} = \left( {\hat{y}_{i}^{'} } \right) _{{4 \times 1}} \) denote the \(y\) coordinate vector of \( \hat{A}_{i} \) and \( \hat{A}_{i}^{'} \), respectively, \({\varvec{y}}\) is composed by \(y\) coordinates of microscopic nodes on \(\Gamma \). Due to Eqs. (67), (69) and (74), the equation, implying the rotational RDPs of \({\varvec{\psi }} _x \), could be obtained

$$\begin{aligned} {{\varvec{y}}} = {\varvec{\phi }}_{x} \hat{{\varvec{y}}}^{'} = {\varvec{\psi }}_{x} {{\varvec{T}}}_{x} \hat{{\varvec{y}}}^{'} = {\varvec{\psi }}_{x} \hat{{\varvec{y}}} \end{aligned}$$
(75)

The similar method could be employed to deduce \({\varvec{\psi }}_y \), which also satisfies the properties similar to Properties 5.1 and 5.2.

5.2 Rigid displacement properties

The NBFs on \(\Gamma ^{\prime }\) are assumed to be \(\left\{ {{\varvec{\phi }} _{xxi}^{{\prime }T} ,\;{\varvec{\phi }}_{yxi}^{{\prime }T} } \right\} ^{T}\), in which \({\varvec{\phi }}_{xxi}^{\prime } \) are the prescribed NBFs in the \(x\) direction and \({\varvec{\phi }} _{yxi}^{\prime } \) are solved from Eq. (97). Thus, one could obtain an equation similar to Eq. (101)

$$\begin{aligned} \left[ \begin{array}{l@{\quad }l} {\hat{{\varvec{K}}}_{{xx}} } &{} {\hat{{\varvec{K}}}_{{xy}} } \\ {\hat{{\varvec{K}}}_{{yx}} } &{} {\hat{{\varvec{K}}}_{{yy}} } \\ \end{array} \right] \left\{ {\begin{array}{l} {{\varvec{\phi }} _{{xxi}}^{{\prime }} } \\ {{\varvec{\phi }}_{{yxi}}^{{\prime }} } \\ \end{array} } \right\} = \left\{ {\begin{array}{l} {\hat{{\varvec{f}}}_{{xi}} } \\ \mathbf{0} \\ \end{array} } \right\} \end{aligned}$$
(76)

where, \( \hat{{\varvec{K}}} = \left[ \begin{array}{ll} {\hat{{\varvec{K}}}_{{xx}} } &{} {\hat{{\varvec{K}}}_{{xy}} } \\ {\hat{{\varvec{K}}}_{{yx}} } &{} {\hat{{\varvec{K}}}_{{yy}} } \\ \end{array} \right] \) denotes the stiffness matrix corresponding to the DOF on \(\Gamma ^{\prime }\) and \( \hat{{\varvec{f}}}_{{xi}} \) is the constraint reaction in the \(x\) direction. It could be inferred from the last section that \(\sum \limits _{i=1}^4 {\varvec{\phi }} _{xxi}^{\prime } =\mathbf{1}\). Thus, summing Eq. (76) over index \(i\) leads to

$$\begin{aligned} \left[ \begin{array}{l@{\quad }l} {\hat{{\varvec{K}}}_{{xx}} } &{} {\hat{{\varvec{K}}}_{{xy}} } \\ {\hat{{\varvec{K}}}_{{yx}} } &{} {\hat{{\varvec{K}}}_{{yy}} } \\ \end{array} \right] \left\{ {\begin{array}{l} \mathbf{1} \\ {\sum \limits _{{i = 1}}^{4} {\varvec{\phi }}_{{yxi}}^{{\text {'}}} } \\ \end{array} } \right\} = \sum \limits _{{i = 1}}^{4} \left\{ {\begin{array}{l} {\hat{{\varvec{f}}}_{{xi}} } \\ \mathbf{0} \\ \end{array} } \right\} \end{aligned}$$
(77)

Then, combining Properties A.1 and A.3, an equation about the coupling terms could be obtained

$$\begin{aligned} \sum \limits _{i=1}^4 {\varvec{\phi }}_{yxi}^{\prime } =\alpha \mathbf{1} \end{aligned}$$
(78)

where \(\alpha \) is determined by the constraint value \(\tilde{v}_m \) in the \(y\) direction (see Appendix 1), which we need not to care about. In conclusion, the boundary NBFs obtained by the oversampling technique satisfy the equation

$$\begin{aligned} \sum \limits _{i=1}^4 \left\{ {{\begin{array}{l} {{\varvec{\phi }}_{xxi}^{\prime } } \\ {{\varvec{\phi }}_{yxi}^{\prime } } \\ \end{array} }} \right\} =\left\{ {{\begin{array}{l} \mathbf{1} \\ {\alpha \mathbf{1}} \\ \end{array} }} \right\} \end{aligned}$$
(79)

which denotes a translational rigid displacement. Subsequently, the NBFs on \(\Gamma , \left\{ {{\varvec{\phi }}_{xxi}^T ,\;{\varvec{\phi }}_{yxi}^T } \right\} ^{T}\), could be obtained by Eq. (24), and \({\varvec{\phi }} _{xxi} \) should satisfy the unit decomposition due to the discussions in Sect. 3.2:

$$\begin{aligned} \sum \limits _{i=1}^4 {\varvec{\phi }}_{xxi} =\mathbf{1} \end{aligned}$$
(80)

Therefore, \({\varvec{\psi }} _{xxi} \) deduced from Eq. (67) satisfies the translational RDPs as a result of the Property 5.1. The same process could be adopted to prove the translational RDPs of \({\varvec{\psi }} _y \).

The rotational RDP for the oversampling technique in Eq. (17) degenerates into

$$\begin{aligned} {{\varvec{x}}} = \sum \limits _{{i = 1}}^{4} {\varvec{\psi }}_{{yyi}} \hat{x}_{i} , \quad {{\varvec{y}}} = \sum \limits _{{i = 1}}^{4} {\varvec{\psi }}_{{xxi}} \hat{y}_{i} \end{aligned}$$
(81)

where \({\varvec{x}}\) and \({\varvec{y}}\) are the coordinate of microscopical nodes on \(\Gamma ^{\prime }\) and \( \left( {\hat{x}_{i} ,\hat{y}_{i} } \right) \) is the coordinate of \( \hat{A}_{i} \). Due to the Property 5.2, the second equation in Eq. (81) is equivalent to Eq. (74). Thus, to verify Eq. (74), one could firstly obtain the boundary equation, by multiplying Eq. (76) by \( \hat{y}_{i}^{'} \), and summing over the index \(i\):

$$\begin{aligned} \left[ \begin{array}{c@{\quad }c} {\hat{{\varvec{K}}}_{{xx}} } &{} {\hat{{\varvec{K}}}_{{xy}} } \\ {\hat{{\varvec{K}}}_{{yx}} } &{} {\hat{{\varvec{K}}}_{{yy}} } \\ \end{array} \right] \left\{ {\begin{array}{c} {{{\varvec{y}}}'} \\ {\sum \limits _{{i = 1}}^{4} \varvec{\phi } _{{yxi}}^{'} \hat{y}_{i}^{'} } \\ \end{array} } \right\} = \left\{ {\begin{array}{c} {\sum \limits _{{i = 1}}^{4} \hat{{\varvec{f}}}_{{xi}} \hat{y}_{i}^{'} } \\ \mathbf{0} \\ \end{array} } \right\} \end{aligned}$$
(82)

The relation \( \sum \limits _{{i = 1}}^{4} {\varvec{\phi }} _{{xxi}} \hat{y}_{i}^{'} = {{\varvec{y}}}^{'} \), on account of \({\varvec{\phi }} _{xxi} ={\varvec{\phi }}_{yyi} \), is made use of to deduce the above equation. Due to the Property A.2 and Eq. (98), the property about the coupling terms is obtained by

$$\begin{aligned} \sum \limits _{{i = 1}}^{4} {\varvec{\phi }} _{{yxi}}^{'} \hat{y}_{i}^{'} = - {{\varvec{x}}}^{'} + \gamma \mathbf{1} \end{aligned}$$
(83)

where \(\gamma \) is determined by the constraint value \(\tilde{v}_m \)(see Appendix 1), which we do not need to care about. Thus, the terms on the left side of Eq. (82) could be written as

$$\begin{aligned} \sum \limits _{{i = 1}}^{4} \left\{ {\begin{array}{c} {{\varvec{\phi }}_{{xxi}}^{'} } \\ {{\varvec{\phi }}_{{yxi}}^{'} } \\ \end{array} } \right\} \hat{y}_{i}^{'} = \left\{ {\begin{array}{c} {{{\varvec{y}}}^{'} } \\ { - {{\varvec{x}}}^{'} + \gamma \mathbf{1 }} \\ \end{array} } \right\} \end{aligned}$$
(84)

The above equation represents the rigid displacement composed by the rotational and translational components. Based on the conclusions in Sect. 3.2, \(\left\{ {{\varvec{\phi }}_{xxi}^T ,\;{\varvec{\phi }}_{yxi}^T } \right\} ^{T}\) will also meet the similar equation

$$\begin{aligned} \sum \limits _{{i = 1}}^{4} \left\{ {\begin{array}{c} {{\varvec{\phi }}_{{xxi}} } \\ {{\varvec{\phi }}_{{yxi}} } \\ \end{array} } \right\} \hat{y}_{i}^{'} = \left\{ {\begin{array}{c} {{\varvec{y}}} \\ { - {{\varvec{x}}} + \gamma \mathbf{1 }} \\ \end{array} } \right\} \end{aligned}$$
(85)

Thus, Eq. (74) has been proved. A similar way could be adopted to deduce the rotational RDPs of \({\varvec{\phi }}_{yyi} \), i.e., \( {{\varvec{x}}} = \sum \limits _{{i = 1}}^{4} {\varvec{\phi }}_{{yyi}} \hat{x}_{i}^{{\text {'}}} \). Therefore, \({\varvec{\psi }} _x \) and \({\varvec{\psi }} _y \) in Eq. (67) also meet the requirement of the rotational RDP.

In conclusion, the NBFs on \(\Gamma \) fulfills the translational and rotational RDPs, so will the NBFs on \(K\). The NBFs of the oversampling technique generally oscillate on the OrgUC’s edge for heterogeneous materials, which suggest the heterogeneity of material. Four stiffness matrix decompositions are needed to calculate the NBFs for oversampling technique for the quadrilateral UC, which leads to a little larger computation quantity comparing with the boundary conditions in Sect. 4.14.3. One could refer to [28, 34] for the discussions on numerical performance of the oversampling technique.

6 Size effects

For the homogenization method, different sizes of UCs have considerable influence on the computational accuracy, which is related to the material properties and analysis type. For example, the constitutive equations of periodic composite materials show some dependence on the size of representative volume element [41], and the recent work on this problem can refer to [9, 42]. The UC’s size for EMsFEM also has effects on both computational accuracy and efficiency, which have been discussed in the paper of Hou et al. [30] and Zhang et al. [29]. On the basis of their work, more exhaustive discussions will be presented in this section.

6.1 Size effects on algorithm complexity

6.1.1 A special case of \(O\left( {K^{3}} \right) \)

Firstly, the flops for the solution of a linear algebraic equation are assumed to be proportional to \(K^{3}\), denoted as \(O\left( {K^{3}} \right) \), without thinking of the bandwidth and sparse storage, see the Appendix 2. Here, \(K\) is the total node number of a structure and \(O\left( \cdot \right) \) represents a linear time operator in some software and hardware environments. The total computation quantity is assumed to be about \(O\left( K \right) \) in the work by Hou et al. [30] and Zhang et al. [29], which may have some distinctions comparing with the actual computations.

Suppose that \(K\) is large enough and the structure is composed by \(Q\) coarse meshes, then, we have \(K\approx Q\cdot M\), where \(M\) is the number of microscopical nodes in each coarse mesh on average. The macroscopical nodes with respect to the coarse mesh become \(P\approx Q\), due to the conclusions in Appendix 2. The computation quantity for the construction of NBFs for each coarse mesh, as shown in Sect. 4.14.3, is about \(O\left( {M^{3}} \right) \); thus, the computation quantity (just for solving the linear algebraic equation, which will not be emphasized again) for all coarse meshes becomes \(N\cdot O\left( {M^{3}} \right) \approx K\cdot O\left( {M^{2}} \right) \approx O\left( {K^{3}/Q^{2}} \right) \). About \(O\left( {Q^{3}} \right) \) flops are needed on the macroscopical level, and the total computation quantity could be obtained by

$$\begin{aligned} S=O\left( {K^{3}/Q^{2}} \right) +O\left( {Q^{3}} \right) =O\left( {K^{3}/Q^{2}+N^{3}} \right) \end{aligned}$$
(86)

Afterwards, two extreme situations about the above equation are investigated. (1) The amount of the macroscopical node is almost equal to that of the fine mesh, i.e., \(Q\approx K\), as the amount of coarse mesh becomes small enough. Thus, Eq. (86) degenerates into \(O\left( {K+K^{3}} \right) \approx O\left( {K^{3}} \right) \). (2) On the contrary, as the size of coarse mesh becomes large enough, its number in the whole structure approximates to one, then Eq. (86) also tends to be \(O\left( {K^{3}} \right) \). The analyses state clearly that too many or too few coarse meshes are both disadvantageous on the computational efficiency. In other words, there exists a suitable coarse-mesh number, which makes the computation quantity minimum. Let the derivation of Eq. (86) be zeros, the optimal coarse-mesh number could be obtained by

$$\begin{aligned} N=\left( {\frac{2}{3}K^{3}} \right) ^{0.2}=0.922K^{0.6} \end{aligned}$$
(87)

and the corresponding minimum computation quantity becomes

$$\begin{aligned} \hat{S} = O\left( {1.960K^{{1.8}} } \right) \end{aligned}$$
(88)

which indicates that the computation quantity for EMsFEM is proportional to \(K^{1.8}\) in ideal cases. The computation quantity relative to the direct solution is as follows

$$\begin{aligned} \overline{S} = S \big / {O\left( {K^{3} } \right) } = 1 \big / {Q^{2} } + \left( Q \big / K \right) ^{3} \end{aligned}$$
(89)

the logarithmic curves of which versus the coarse-mesh number are shown in Fig. 10, corresponding to different number of microscopical nodes, i.e., \(1\times 10^{5}, 1\times 10^{6}, 1\times 10^{7}, 1\times 10^{8}\). The minimum relative computation quantity

$$\begin{aligned} \overline{S}_{{min}}&= {{O\left( {1.960K^{{1.8}} } \right) }\Big / {O\left( {K^{3} } \right) }} = 1.960K^{{ - 1.2}}\nonumber \\&= 1.666Q^{{ - 2}} \end{aligned}$$
(90)

is depicted by the dotted line in the same figure.

Fig. 10
figure 10

The relative computation quantity versus the coarse-mesh number corresponding to different \(K\)

Some messages could be inferred from the figure. (1) The values of \( \overline{S} \) are almost less than one, which indicate that less computation quantities are consumed for EMsFEM comparing with the direct solutions. (2) Indeed, for each curve there exists a minimum relative computation quantity, which diminishes with \(Q\) or \(K\), as shown in the magnification of the figure; at a fixed value of \(Q, \overline{S} \) decreases with \(K\), which means that the more the DOF of a FE model is, the more computational resource will be saved for EMsFEM; (3) \( \overline{S} \) tends to be stable at the vicinity of \( \overline{S}_{{{\text {min}}}} \) with respect to very large \(K\), such as the curve in case of \(K=1\times 10^{8}\). In this situation, more coarse meshes are probable to be helpful for the accuracy promotion without increasing too much computational time.

6.1.2 General cases for \(O\left( {K^{p}} \right) \)

In this section, more general assumptions on the solution of the linear equation, i.e., \(O\left( {K^{p}} \right) \), are adopted. The case \(p=3\) represents the standard LDLT decomposition in the last section. The exponent \(p\) should be approximately between one and three, considering the bandwidth or sparsity of the stiffness matrix, see Appendix 2. The analysis flow in the last section is also useful for \(O\left( {K^{p}} \right) \), thus, the computation quantity and its relative value become

$$\begin{aligned} S=O\left( {K^{p}Q^{1-p}+Q^{p}} \right) , \quad \overline{S} = Q^{{1 - p}} + \left( {{Q \big / K}} \right) ^{p}\nonumber \\ \end{aligned}$$
(91)

The optimal number of coarse mesh and the corresponding minimum computation quantity are expressed as, by means of the limit analysis of above equations:

$$\begin{aligned}&Q=\left( {\frac{p-1}{p}} \right) ^{\frac{1}{2p-1}}K^{\frac{p}{2p-1}}, \nonumber \\&\overline{S}_{{{\text {min}}}} = \left( \left( {\frac{{p - 1}}{p}} \right) ^{{\frac{{1 - p}}{{2p - 1}}}}+ \left( {\frac{{p - 1}}{p}} \right) ^{{\frac{p}{{2p - 1}}}} \right) K^{{\frac{{p\left( {1 \!-\! p} \right) }}{{2p \!-\! 1}}}} \end{aligned}$$
(92)

It can be verified that the above equations degenerate into Eqs. (89) and (90) as \(p=3\). The logarithmic curves of \(\overline{S}\) versus \(N\) are depicted in Fig. 11, with respect to different values of \(p\), i.e., 1, 1.5, 2, 2.5 and 3. Figure 13a, b are related to \(K=10^{8}\) and \(K=10^{9}\), respectively.

Fig. 11
figure 11

The relative computation quantity versus the coarse-mesh number for different \(p\), the total microscopical nodes in a and b are \(10^{8}\) and \(10^{9}\), respectively

Several conclusions could be drawn from the figure. (1) The trend of \(\overline{S}\) versus to \(Q\) is the same as that shown in Fig. 10, so the conclusions deduced from Fig. 10 are also applicative to that of Fig. 11. (2) \(\overline{S}\) diminishes with \(p\) for a fixed \(Q\); for example, \(\overline{S}\) is around \(10^{-2}\) as \(p\) is equal to 1.5 as shown in Fig. 11a, while decreases down to about \(10^{-8}\) as \(p\) is equal to three, which indicates that advantages on the computation efficiency of EMsFEM will be more apparent as the direct LDLT decomposition is employed to solve the equation. Thus, the conclusions for \(p=3\) in the last subsection are the most optimistic for the computation quantity saving. (3) One could find that \(\overline{S}\) is equal to one as \(p\) approximates to one. In this case, the computation quantity of EMsFEM is proportional with the scale of the problem.

The minimums of \( \overline{S}_{{{\text {min}}}} \) are marked by full circles as shown in Fig. 11, from which, it could be found that \(Q_p \), corresponding to \( \overline{S}_{{{\text {min}}}} \), increases with \(p\). In general, for a fixed amount of microscopical nodes, the more the coarse-mesh number is, the higher accuracy will be obtained for EMsFEM.

The above analysis is based on the series computing. In fact, it is of considerable convenience for the parallel computing, as the UC is independent with each other. Readers could refer to Sect. 7.2 for the details. Meanwhile, the NBFs are just calculated once for some material nonlinear problems, such as strain localization and elasto-plastic problems [29], and the equilibrium iteration is implemented on the coarse mesh; in such cases, more computational resources could be saved.

6.2 Numerical example

In this section, the homogeneous beam with sizes of \(6\times 18\) is considered as shown in Fig. 12. The elastic modulus and Poisson’s ratio of the materials are \(2.0\times 10^{11}\) and 0.3, respectively. The left side of the beam is fixed and a 1,000 concentrated force is applied at the bottom right corner. The size of fine mesh is set to be \(0.02\times 0.02\), which leads to 270,000 fine elements and 271,210 nodes. The configuration of mesh size for this example aims to be convenient for comparing the computation quantity of each model. Such fine mesh is surely not necessary in practice.

Fig. 12
figure 12

The testing model for the comparison of algorithm complexity

The following ten groups of the coarse-mesh size are chosen

$$\begin{aligned} a_c \in \left\{ \begin{array}{llllllllll} 3&{} 2&{} {1.2}&{} 1&{} {0.6}&{} {0.5}&{} {0.4}&{} {0.3}&{} {0.2}&{} {0.1} \\ \end{array} \right\} \end{aligned}$$
(93)

which leads to \({108}/{a_c^2 }\) coarse meshes. The coarse meshes corresponding to \(a_c \in \left\{ {3,\;2,\;1.2,\;1} \right\} \) are depicted at the left bottom of the beam with different rectangulars as shown in Fig. 12.

The computational program is implemented by MATLAB with version R2010b and carried out on a 64 bits Windows Server 2007 system with a 2.66 GHz CPU and 36 GBytes of memory. The preprocessing is implemented by the commercial software ANSYS.

The variables \(T_{Ex1} \) and \(T_{Ex2} \), which represents the time for the LDLT decomposition and that from reading the preprocessing files to obtaining the displacement results, are collected. The nondimensionalized time indicators are introduced, as a matter of convenience for comparisons

$$\begin{aligned} \overline{T}_{{Ex1}} = {{T_{{Ex1}} }\big / {T_{{F1}} ~}} , \quad \overline{T}_{{Ex2}} = {{T_{{Ex2}} } \big / {T_{{F2}} }} \end{aligned}$$
(94)

where \(T_{F1} \) and \(T_{F2} \) denote the time corresponding to the direct solutions. The relative time versus the coarse-mesh number are depicted in Fig. 13a, b, respectively. The relative time of LBC, PBC and RABC are given, from which, one can find that the time decreases at first and then increases with the coarse-mesh number; the trend is the same as that shown in Figs. 10 and 11.

Fig. 13
figure 13

Relative computational time and accuracy versus the number of coarse mesh for the cantilever beam. a and b represent \(\overline{T}_{Ex1} \) and \(\overline{T}_{Ex2} \), respectively. c and d are the errors of displacement and Von Mises stress, respectively

The minimum of \( \overline{T}_{{Ex1}} \) takes place at about \(Q_1 =1,200\), while the theoretical optimal value is about \(Q_0 =1,670\) as Eq. (87). However, there are almost no affections on the computation quantity, as \(N\) distributes in the interval of \(\left( {500,\;3000} \right) \), so the theoretical optimal value still show some reasonability. It also could be found that the minimum of \( \overline{T}_{{Ex1}} \) is less than 0.1, which means the efficiency of EMsFEM for the matrix decompositions is ten times higher than that of the direct solutions. The similar trend of \( \overline{T}_{{Ex2}} \) versus to \(Q\) could be detected from Fig. 13b; about \(Q_2 =500\) minimizes \(\overline{T}_{{Ex2}}\) within the interval between 0.1 and 0.2, which indicates that efficiency of EMsFEM is about an order higher than that of the direct simulations. \(\overline{T}_{{Ex1}}\) and \(\overline{T}_{{Ex2}}\) for different boundary conditions are almost the same for all coarse-mesh number.

The errors of the displacements and Von Mises Stress are shown in Fig. 13c, d, respectively. It could be revealed that the errors decrease rapidly at the low number of coarse mesh, and then tend to be stable with the higher coarse-mesh number, which indicates the convergence of EMsFEM. The errors of maximum displacements become stable at about 300 coarse meshes, while that of stress at about 1,200 coarse meshes; thus, the necessary amount of coarse meshes should be great than 1,000 and more coarse meshes are helpful for improving the accuracy.

To know more influence of the coarse-mesh number on the computation efficiency, the fine-mesh size of the structure in Fig. 12 is altered to the denser one, i.e., \(0.01\times 0.01\), which results in \(1.0824\times 10^{6}\) nodes. Twelve groups of coarse mesh are chosen with sizes

$$\begin{aligned} a_c \in \left\{ \begin{array}{llllllllllll} 3&{} 2&{} {1.2}&{} 1&{} {0.6}&{} {0.5}&{} {0.4}&{} {0.3}&{} {0.2}&{} {0.1}&{} {0.06}&{} {0.05} \\ \end{array} \right\} \end{aligned}$$
(95)

The relative time \(\overline{T}_{{Ex1}}\) and \(\overline{T}_{{Ex2}}\) for the new model are depicted in Fig. 14a, b, the trends of which are absolutely the same as that in Fig. 13a, b. As the coarse-mesh number becomes \(Q_1 =2,700, \overline{T}_{{Ex1}}\) descends to the minimum value, while the theoretical optimal coarse-mesh number in Eq. (87) is \(Q_0 =3,850\). However, the computation quantity differs a little at the range \(Q\in \left[ {2700,\;10800} \right] \), so the theoretical optimal coarse-mesh number also show some reasonability. Comparing with the relative time in Figs. 13 and 14, the minimum of relative time of the former is larger than the later one. In simple words, as the node number increases, the advantages on efficiency for EMsFEM become more obvious than the direct simulations, which exhibit a good perspective on the large scale scientific computing. It could be found easily that the inequality \(Q_0 >Q_1 >Q_2 \) is the same as that of the last model. Thus, considering the efficiency and accuracy simultaneously, theoretical coarse-mesh number in Eq. (87) is an acceptable choice.

Fig. 14
figure 14

Relative computational time versus coarse-mesh number, a and b represent \(\overline{T}_{Ex1} \) and \(\overline{T}_{Ex2} \), respectively

7 Numerical examples: applications for heterogeneous materials

Many kinds of engineering materials appear heterogeneous in the microscopical level, such as composites [16], on the section of which, there are many elliptical impurities approximately, and concrete [7], containing many disorderly-arranged aggregates with different sizes embedded in the matrix. Modeling and simulating the mechanical behavior of such kinds of materials are of significance.

Two main concepts to generate heterogeneous materials can be distinguished, i.e., processing the sequential sectioning image of natural materials and the artificial generation [7]. The second type material generator has been investigated by many researches, such as generator by Clément et al. [16], based on the statistical theory and Galli et al. [43], on the basis of Delaunay tetrahedron. In the paper, only the two-dimensional cases are considered and the impurities or holes included in the heterogeneous materials are supposed to be ellipse, shown in Fig. 15, which follows the parametric equation

$$\begin{aligned} \left\{ {\begin{array}{l} x=x_c +a\cos \theta \cos \varphi -b\sin \theta \sin \varphi \\ y=y_c +a\cos \theta \sin \varphi +b\sin \theta \cos \varphi \\ \end{array}} \right. \end{aligned}$$
(96)

Here, \(\theta \) is the variable parameter, ranging from 0 to \(2\pi \); \(\left( {x_c ,y_c } \right) \) denotes the central coordinate and \(a\) or \(b\) are the length of the long or short axis. The angle \(\varphi \) could be used for controlling the orientation of the ellipse.

Fig. 15
figure 15

The geometry of ellipse impurities or holes

As shown in Fig. 16, all kinds of UCs with elliptical impurities generated by Eq. (96) are plotted. Thus, it can be seen that various micro-structures could be designed by controlling the parameters in Eq. (96). One could refer to [7] for more exhaustive descriptions for the three-dimensional generators of heterogeneous materials.

Fig. 16
figure 16

Unit cells with impurities or holes corresponding to different parameters. For a, \(a, b\) and \(\varphi \) are fixed and the center coordinate \(\left( {x_c ,y_c } \right) \) is randomly distributed. In b, \(a\) is set to be equal to \(b\) and \(\varphi \) is out-of-operation, meanwhile, \(a\) and \(\left( {x_c ,y_c } \right) \) are generated randomly. For c, \(\varphi \) and \(\left( {x_c ,y_c } \right) \) are controlled periodically. In d, \(\varphi \) conforms to the random distribution and the other parameters are fixed

7.1 Cantilever beam with random holes

The cantilever beam with four large circular holes, as shown in Fig. 17, is composed by the materials with random elliptical holes in the microscopical view. The size of the beam is \(10\times 40\) and the radius of the hole is 2. The left side of the beam is fixed, while each coarse-mesh node on the right side are applied a force of 100. At the microscopical level, the location, size and orientation of the elliptical hole conform to random distributions, as shown in the magnified zone in Fig. 17. The elastic modulus and Poisson’s ratio of the materials are \(2.0\times 10^{11}\) and 0.3, respectively. In the macroscopical level, there are 453 nodes, and 374 irregular-shape quadrilateral UCs with feature size of one. There are 65,592 quadrilateral elements with feature size of 0.1 and 71,941 nodes at the fine scale. Each UC contains 175 fine elements on average. It should be noted that, the drilling DOF for RABC on the fixed boundary is set to be zero during simulations, which will not be mentioned repeatedly in the next example.

Fig. 17
figure 17

The coarse-mesh model of the cantilever beam with random holes

Comparisons of transversal displacement at \(y=0\) are depicted in Fig. 18, which includes the reference solution of the fine mesh, EMsFEM for LBC, PBC and RABC. As a whole, the error of EMsFEM models relative to the fine-mesh solution is tiny, even the maximum error does not exceed 1%. It could be found that, from the magnification of the tip, the result of LBC seems to be a little stiffer than the other solutions, which means that PBC and RABC are more recommended for the mechanical analysis of such kind of materials. The Von Mises stress for different models are depicted in Fig. 19, from which, one could found that the results of EMsFEM are almost the same as the reference solution, and stress concentration is also captured at the bottom and top of the fixed side. The results indicate that the UC’s shape for EMsFEM could extend to arbitrary quadrilateral, which expands application scope of EMsFEM to geometrically complicated domain. In addition, PBC is originally deduced based on the assumption of periodical distribution of the reinforcing phase [44], while the UC shown in Fig. 17 is not periodic. Therefore, it is reasonable to extend PBC to non-periodic structure in the framework of EMsFEM. This example is not large enough for comparing the efficiency, readers could refer to the next example.

Fig. 18
figure 18

Transversal displacements for different models

Fig. 19
figure 19

Results of Von Mises stress for different models. a denotes the reference solution, bd are the EMsFEM solutions for LBC, PBC, RABC

7.2 Heterogeneous structure with random impurities

The structure shown in Fig. 20 is a curve beam composed by the materials with random elliptical impurities. The bottom of the beam is fixed and each coarse-mesh node on the right side of the top is applied a downward force of 100. The heterogeneous materials have two phases, i.e., matrix and impurities, with the elastic modulus \(2.0\times 10^{10}\) and \(2.0\times 10^{11}\). The Poisson’s ratio of both phase are 0.3. There are 1500 rectangular coarse meshes with feature size 0.1, corresponding to 1661 nodes in the macroscopical level. Some elliptical impurities with the feature size 0.01 are included in the each coarse mesh, as shown in the magnified zone A and B in Fig. 20. The heterogeneity at the microscopical level leads to 1,112,493 fine elements with the feature size 0.001 and 1,112,042 nodes, which is amount to about 2.2 million DOFs.

Fig. 20
figure 20

The coarse mesh of the curved beam with random impurities

The comparison of displacement for different models is depicted in Fig. 21, which is located at the line \(P_1 P_2 P_3 \) as shown in Fig. 20. The displacement results of EMsFEM for LBC, PBC and RABC are almost the same as that of the fine mesh. The Von Mises stress, shown in Fig. 22, draws the similar conclusions. Especially, the stress concentration at the corner is also captured well, which may be beneficial for the nonlinear analyses. In conclusion, although EMsFEM solve the final problem at the macroscopical level, almost identical accuracy as the direct solution could be obtained, which is mainly because the fine properties of NBFs. The example also indicates the feasibility of PBC for the non-periodic materials.

Fig. 21
figure 21

Displacements of different models

Fig. 22
figure 22

Results of Von Mises stress for different models. a denotes the reference solution, bd are the EMsFEM solutions for LBC, PBC, RABC

Parallel computing is implemented for this example to compare the computational efficiency with the direct method. We utilize the parallel computational tool box in Matlab. The time from assembling the stiffness matrix to achieving the displacements is collected for both direct solutions and EMsFEM, which are assumed to be \(t_0 \) and \(t_n \), respectively. Here, \(t_n \) is the time corresponding to \(n\) processors. We have known that, in Sect. 6.2, the time of EMsFEM for different boundary conditions are almost the same. Thus, we just consider the time for linear boundary condition. The relative time \({t_n }/{t_0 }\) is depicted in Fig. 23a. It could be found that the relative time decreases with the number of processors. As \(n=1\), then \({t_n }/{t_0 }\approx 0.2\), and \({t_n }/{t_0 }\) approximate to 0.02, as \(n=10\), which indicates that the efficiency of EMsFEM is 50 times higher than the direct method. The scale-up, denoted by \({t_1 }/{t_n }\), is shown in Fig. 23b. It could be inferred that the scale-up is linear with the number of processors approximately, which means that a problem may be solved in half time when doubling the number of processors. The discrepancy between the EMsFEM and the optimum may be induced by communications between processors [45].

Fig. 23
figure 23

Time analysis for parallel computing of EMsFEM-LBC a The relative time of EMsFEM to the direct solution. b Scale-up for parallel computing

8 Conclusions

The key of EMsFEM is the construction of NBFs. In the paper, the necessary conditions of NBFs for the two-dimensional vector field, that is the RDPs, are investigated comprehensively in theory. Therein, the rotational RDP is proposed in analytical form for the first time, which could be considered as an extension of the traditional isoparametric interpolation and differs from that for the the scalar field. We prove theoretically that if the NBFs on the boundary of a UC satisfy the RDPs, then so will the NBFs inside the UC. The proposed conclusion has nothing to do with the geometries and material distributions of the UCs and could be considered as a basic principle to construct NBFs. The principle transforms the construction of NBFs on the two-dimensional domain into a line and alleviates the difficulties for constructing NBFs a lot. In addition, we find that only one decomposition of the stiffness matrix is necessary for all NBFs of each UC, which improves the efficiency a lot relative to the former works. The RDPs of LBC and PBC are demonstrated on the basis of the proposed theory. We find that the NBFs for PBC could be considered as a combination of LBC and periodic additional terms. A new rotational angle boundary condition is proposed, based on the membrane element with a drilling DOF. The new boundary condition is conductive to improve the computation accuracy relative to LBC and alleviate the modeling complexity comparing with PBC. The oscillating NBFs constructed by oversampling technique are also discussed in the theoretical aspect, which is helpful for us to understand the mechanism for describing oscillating displacement of heterogeneous materials.

The algorithm complexity of EMsFEM is analyzed from both theoretical and numerical aspects. The results indicate an interesting conclusion that there exists a suitable UC size, which makes the total computation quantity minimum. Thus, we have a criterion to decide which size of UC approximates to the best efficiency. Meanwhile, as the problem’s scale increases, more computation resources could be saved relative to the direct solutions and the advantages of EMsFEM will be more remarkable. In the paper, applications of EMsFEM to the heterogeneous materials with random holes or impurities are implemented and the parallel computing is also realized. The results state the accuracy and efficiency of the method for large scale problems.

The present EMsFEM has also been applied to inelastic problems, such as elasto-plastic analysis of heterogeneous materials [29, 35] and strain localization of lattice truss materials [36]. Numerical examples for elasto-plastic problems show excellent precision of the stress in the microscopical scale, even for the path-dependent cases with loading and unloading. The constructions and the properties of NBFs for inelastic problems are almost the same as presented in the paper and the final problems are also solved in the macroscopical scale. Detailed implementations of the method for inelastic problems are discussed in the above mentioned references. The computation practices in the present and previous publications demonstrate that EMsFEM could handle the large scale problems efficiently and provide a new tool for large-scale scientific computation.