1 Introduction

For many materials, such as metals, design strength and stiffness characteristics are usually met by providing excess unnecessary strength in unloaded directions leading to weight and cost increase. The alternative is composite materials, which can be designed with customisable properties to support the applied loads, leading to a significant decrease in weight, and potentially creating parts with specific capabilities. These properties are the result of using materials differing in composition, where the individual constituents retain their separate identities [1], and act together to give the necessary mechanical strength and stiffness to the composite part [2]. However, engineering with composites is more challenging than metals, because their properties are inherited from constituent materials and depend on manufacturing process, material properties, geometrical configurations, etc., which leads to uncertainties at different scales. Nevertheless, much research has been conducted to address these design issues [3]. A common approach to designing parts with composite materials is to homogenise the elastic stiffness properties between scales, which provides an estimate for the effective elastic properties. Several theoretical homogenisation methods are available, such as Chamis’ micromechanical model equations [4], and the asymptotic mean-field homogenisation approach by Mori–Tanaka [5]. However, these methods are incapable of accommodating the effect of geometrical variations of constituent materials at the microscale. Thus, using a finite element-based numerical approach such as the representative volume element (RVE) homogenisation method is more accurate, widely recommended to predict the effective elastic properties of composites [6], and it is becoming the standard approach for composite materials [7]. The same concept can be applied for other hybrid materials such as solids with voids inclusion.

The RVE term was first used by Hill [8] and it can be defined as the smallest material volume element for which the macroscopic constitutive representation is a sufficiently accurate model to represent mean constitutive response [9]. Therefore, the RVE shall be selected/modelled such that duplicating it provides sufficient accuracy of representing the material’s larger scales (see Fig. 1). When it comes to the RVE homogenisation method, it requires imposition of uniform strains on a microscale RVE to compute the effective elastic properties. Periodic boundary conditions (PBCs) are also required to simulate the deformation of the material surrounding the RVE. In other words, PBCs will ensure that the RVE-deformed external surfaces remain periodic (see Fig. 2).

Fig. 1
figure 1

Representation of two-phase composite component build-up from duplicated RVEs

Fig. 2
figure 2

Illustration of periodical RVEs build-up before and after loading

The implementation of these PBCs is achievable using commercial finite element software, such as ABAQUS [10]. Some benefits of using commercial software are the complete control over the RVE geometry, and access to a wide range of analysis data, i.e., stresses, strains, reaction forces and energy values. Nevertheless, there are no built-in tools that can automatically impose these PBCs. Therefore, complex and time-consuming user inputs and/or using other software is required. EasyPBC (for easy generation of PBCs) is developed to automatically find and generate the required boundary node sets, constraint equations, displacement boundary conditions, and post-processing calculations to find the effective elastic properties, all within a graphical user interface (GUI) running under the ABAQUS CAE, as shown in Fig. 3. This interface is presented in the simplest possible way, allowing the user to select the required homogenised elastic property(ies), and set the mesh mapping accuracy limit if required, making it less complicated and more user-friendly by eliminating viewport selection operations. At the same time, embedded step-by-step checks are run to ensure that the homogenisation computation is running without errors, otherwise, it notifies the user of their occurrence.

Fig. 3
figure 3

EasyPBC main window

This article briefly explains the periodic RVE homogenisation method, then thoroughly illustrates the two-stage methodology of EasyPBC. This is followed by applications of analysing RVEs with geometrical variations, and comparisons with other tools. Moreover, as part of explaining the plugin’s algorithm in this article, it addresses the literatures’ lack of information surrounding the implementation of periodic RVE homogenisation in commercial FE software.

2 Periodic RVE homogenisation

The concept of RVE homogenisation is to numerically impose uniform strains to compute the effective elastic properties of a composite model, as can be seen in Fig. 4. Generally, these strains are applied in several independent sets, with each set calculating specific elastic material properties, as detailed in Sect. 3.2. The RVE is assumed to be a part of a periodic material, therefore, it is important to simulate the periodicity of the RVE with the surrounding material before and after being strained in FE software. Earlier homogenisation studies achieved periodicity by imposing boundary conditions that ensure RVE’s plane boundary surfaces remain plane after deformation [11, 12]. This is only correct for a transversely isotropic RVE under longitudinal and transverse strains. However, that is not the case for orthotropic representation and shear modulus estimation, since it will over-constrain the RVE, leading to overestimating the composite elastic properties [13]. Thus, it is necessary to apply node-to-node periodic conditions, at which deformed boundary surfaces can distort and no longer remain plane [14, 15]. Achieving these periodicity conditions requires linking nodal degrees of freedom (DoF) in commercial FE software, based on concepts of unified periodic RVE homogenisation [13] as illustrated in Eq. 19.

Fig. 4
figure 4

Schematic representation of displacement boundary conditions required to estimate the effective elastic properties

figure a

For elastic modulus E11:

$${X_{{\text{Front}}}} - ~{X_{{\text{Back}}}}={\text{Assigned value}}$$
(1)
$${X_{{\text{Top,Left}}}} - ~{X_{{\text{Bottom,Right}}}}=0$$
(2)
$${Y_{{\text{Top,Front,Left}}}} - {Y_{{\text{Bottom,Back,}}\;{\text{Right}}}}=0$$
(3)
$${Z_{{\text{Front,Top,Left}}}} - {Y_{{\text{Back,Bottom,Right}}}}=0$$
(4)

For shear modulus G12:

$${X_{{\text{Front,Left}}}} - ~{X_{{\text{Back,Right}}}}=0$$
(5)
$${Y_{{\text{Front}}}} - ~{Y_{{\text{Back}}}}={\text{Assigned value}}$$
(6)
$${X_{{\text{Top}}}} - ~{X_{{\text{Bottom}}}}={\text{Assigned value}}$$
(7)
$${Y_{{\text{Top,Left}}}} - {Y_{{\text{Bottom,Right}}}}=0$$
(8)
$${Z_{{\text{Front,Top,Left}}}} - {Y_{{\text{Back,Bottom,Right}}}}=0$$
(9)

where X, Y, and Z are displacement components along X, Y, and Z direction, respectively. Assigned value is the prescribed displacement value. Refer to Fig. 6 to identify Front-Back, Left-Right, and Top-Bottom surface alignment with X, Y, and Z direction.

3 Software methodology

EasyPBC is written in the Python programming language utilising ABAQUS commands. To make the plugin available in ABAQUS CAE interface, the code is simply placed in abaqus_plugin directory before start-up. The plugin runs two main phases to estimate the homogenised elastic properties by implementing concepts of unified periodic RVE homogenisation method, these are the pre-processing and post-processing phases. The first phase determines RVE’s geometrical dimensions, identifies boundary surfaces, creates nodal sets, creates node-to-node constraint equations, and applies the required displacement boundary conditions. Whereas the post-processing phase handles stress–strain calculations, and other operations related to estimating the elastic properties. These main operations are shown in EasyPBC flowchart (Fig. 5), and explained thoroughly next.

Fig. 5
figure 5

EasyPBC processing flowchart

3.1 Pre-processing phase

The input for EasyPBC to start the pre-processing phase is the user’s created RVE model, including definition of constituent materials’ properties and meshing. This allows the user to have full control of geometry creation and meshing options. Once done, the software imports the above information and work specifically on the selected model and instance (see Fig. 3), using nodal coordinates as input data to find maximum and minimum points in all three directions of the RVE (Max. and Min. of X, Y and Z directions). These values are the foundation for calculating the RVE’s boundary dimensions and finding its corners, edges, and surfaces, as shown in Fig. 6. To categorise nodes into these sets, each node must meet specific coordinate conditions, similar to the four examples illustrated in Fig. 7. Once a node meets the condition(s) of a specific node set (corner, edge or surface), it is inserted into an array that contains the label(s) of that set. To decrease processing time, the code avoids checking any node embedded within the RVE between boundary surfaces, which are nodes with none of its coordinates equal to any maximum or minimum values.

Fig. 6
figure 6

Sets required to perform EasyPBC homogenisation

Fig. 7
figure 7

Examples of node set categorisation conditions

The generated node sets now require sorting to facilitate the linking of nodal degrees of freedom to implement PBCs. To achieve this, for each node in associated sets/pairs (as illustrated in Table 1), the code identifies its corresponding node in the opposite set when the coordinate difference between the two nodes is smaller than a specified mapping accuracy. The default value of mapping accuracy is 1E-7 as shown in Fig. 1, which assumes the mesh structure is nearly identical on opposite sides of the RVE, this value is adjustable based on users mapping accuracy. Once a pair of nodes is found, both are appended in the same order in their sets as illustrated in Fig. 8.

Fig. 8
figure 8

Algorithm for appending nodes within associated sets

With the generation of the required 32 node sets, the code completes the set generation phase. The occurrence of any error stops further operations (beyond creating sets) and the user is provided with an error message. If the error is a result of mismatch mesh mapping, the code will create a set of the nodes that are causing that error, helping the user to rectify model meshing and/or adjust the EasyPBC mapping accuracy value. For example, analysing the Model shown in Fig. 9 using the default mapping accuracy value 1E-7 will trigger mapping mismatch error indicating mesh mapping differences. The solution is either improved re-meshing and/or increasing mapping accuracy value. In this example, the use of 1E-5 was sufficient to avoid mesh mapping error. It is important to note that if the selected mapping accuracy value is large, there will be possibilities of linking more than two nodes in each constraints equation, yet, EasyPBC will detect that through size checks for opposite sets to ensure that each node in a set is linked to a single node in the opposite/associated set and inform the user. In case of no errors, the next step is to link nodal degrees of freedom for opposite/associated sets.

Fig. 9
figure 9

Illustration of mesh mapping error set

Estimating each elastic property requires a different combination of PBCs and displacement boundary conditions, which involves different ABAQUS analysis jobs. Yet, Poisson’s ratios for the two transverse directions can be calculated using data from the Young’s moduli jobs (see Fig. 3). PBCs are implemented using linear constraint equations to link nodal degrees of freedom. The process starts by converting boundary sets to single-node sets, because the linear constraint equation function in the ABAQUS CAE interface is operationally limited to sets containing a single node [10]. Hence, the sorting process explained earlier becomes useful, because these single-node sets can be created with matching node labels and locations for associated sets to ease linking every pair using a linear constraint equation. These constraint equations take coefficients, i.e., degrees of freedom and reference points. The use of reference points is necessary to impose boundary displacements, and accommodate rigid body motion. These constraint equations associated with elastic and shear moduli are detailed in Table 1 and will be applied by the code as part of this phase.

PBC constraint equations are mainly divided into two sets: Young’s moduli (and Poisson’s ratios), and shear moduli. The code creates these two sets of constraint equations based on required homogenised properties, where the different moduli are implemented by changing applied displacements on specific reference points through boundary conditions. For example, if the user requests E11, E22 and G12 homogenised properties, the code will create a single set of PBC constraint equations that will be applied for both E11 and E22, after completion, the code will delete the previous set, and create shear set of PBC constraint equations for G12. See Eq. 19 and Table 1.

Table 1 EasyPBC liner constraints equations and displacement boundary conditions

3.2 Post-processing phase

During pre-processing, essential data are collected and stored such as RVE dimensions, corner coordinates, user input requests, etc., however, key data are established once job submission is completed, marking the start of the post-processing phase. Post-processing for estimating the Young’s moduli and Poisson’s ratios is different than shear moduli, therefore, each is explained individually in the following sections.

3.2.1 Post-processing for Young’s modulus and Poisson’s ratio

Applied displacements on the RVE surface are resisted internally, creating boundary nodal forces at the displaced boundary surfaces. Default settings of ABAQUS does not output reaction force data. Therefore, as stated earlier, these are requested for the reference point assigned to apply the displacement on a specific surface based on required elastic modulus. The value of the reaction force at a reference point is the sum of relevant direction principle boundary nodal forces generated at the effected boundary nodes. This value is divided by the area of that effected surface to provide the stress value that corresponds to the prescribed strain (prescribed displacement divided by RVE length along the main effected axis). The stress value is then used to estimate Young’s modulus by dividing it by the known strain as illustrated in Eq. 10 and Fig. 10.

Fig. 10
figure 10

Model subjected displacements to estimate Young’s modulus, Poisson’s ratios and shear modulus

Aforementioned, the data output generated in the same job for calculating Young’s modulus is also used to estimate Poisson’s ratios (for two transverse directions) using transverse strain data. This is achieved by calculating the transverse strain and dividing it by the applied axial strain, as illustrated in Eq. 11 and Fig. 10.

3.2.2 Post-processing for Shear modulus

Shear moduli are estimated by dividing the shear stress value by the shear strain of both corresponding direction, i.e., for G12. The shear stress value is calculated by extracting the sum of relevant direction principle boundary nodal forces from the assigned reference point reaction forces of either strained surface (see Fig. 4; Table 1), divided by the effected surface area, as shown in Eq. 12 and Fig. 10.

$$E=\frac{{{\text{Stress}}}}{{{\text{Axial strain}}}},~~~{E_{11}}=\frac{{\frac{{\mathop \sum \nolimits^{} {\text{Front surface nodal force}}{{\text{s}}_{{\text{ in 1-Direction}}}}}}{{{\text{Front surface area}}\left( {H \times W} \right)}}}}{{\frac{{\Delta L}}{L}}}$$
(10)
$$v=\frac{{ - {\text{Transvers strain}}}}{{{\text{Axial strain}}}},~~~{v_{12}}=\frac{{\frac{{\Delta H}}{H}}}{{\frac{{\Delta L}}{L}}} ,\; {v_{13}}=\frac{{\frac{{\Delta W}}{W}}}{{\frac{{\Delta L}}{L}}}$$
(11)
$$G=\frac{{{\text{Shear stress}}}}{{{\text{Tensors of shear strain}}}} , {G_{12}}=\frac{{\frac{{\mathop \sum \nolimits^{} {\text{Top surface nodal force}}{{\text{s}}_{{\text{ in 1-Direction}}}}}}{{{\text{Top surface area }}\left( {L \times W} \right)}}}}{{\frac{{\Delta 1}}{H}+\frac{{\Delta 2}}{L}}}$$
(12)

4 Application

Chamis micromechanical model equations [4] are being used widely to estimate matrix–fibre composite elastic properties, it assumes that both matrix and fibres are linearly elastic and fibres are spaced periodically in square-packed or hexagonal-packed arrays [16]. Thus, this model only takes into consideration constituent material properties and their volume ratio. Consequently, it is not possible to account for other geometrical configurations. Such geometric variations exist in composites and their effect is explored in many studies [11, 17, 18]. Therefore, using the periodic RVE homogenisation approach is essential, as it can analyse general geometries [19]. Moreover, using FE allows collecting analysis data for further investigations. This is possible using EasyPBC as it allows the user to request additional outputs if needed, and allow access to ABAQUS job output data.

To demonstrate the use of EasyPBC and the capability of capturing geometric variations, the elastic properties are determined for an RVE with identical fibres, arranged hexagonally and spaced equally with properties given in Table 2. This is compared with the properties of three more RVEs modelled with: off-centre fibre shift, elliptical cross-sectional fibre and change in fibre diameter, as detailed in Fig. 11. It can be seen that EasyPBC is capable of capturing these variations even though all RVEs have the exact same fibre volume ratio \({V_{\text{f}}}\), see Table 3.

Table 2 Material properties of boron–aluminium composite [14]
Fig. 11
figure 11

Fibre–matrix composite RVEs modelled with geometrical variations and constant Vf ratio

Table 3 Effective elastic properties estimated using EasyPBC and Digimat

On the other hand, to verify the above result, good agreement is observed between the properties estimated using EasyPBC and the FE tool available in Digimat software [20] as can be seen in Table 3 for both the deterministic and the off-centre fibre shifting RVEs. The other two RVEs (cross-sectional shape, and change in fibre diameter) are not analysed with Digimat FE due to software’s modelling options limitation. This highlights the modelling flexibility that EasyPBC provides within the ABAQUS software. Results obtained are for RVEs modelled in ABAQUS, and analysed using approximately 36,000 wedge elements. Whereas, approximately 74,000 tetrahedral elements are used in the model generated and analysed by Digimat FE.

In addition to the above composite RVE applications, and because EasyPBC allows the user to create models within ABAQUS, it can analyse models constructed with multiple phase, phases with different shapes within the model, any material property orientations and inclusion of voids, etc. However, it is important to note that the current version of the plugin can only analyse cuboid models, with external faces parallel to the global ABAQUS coordinate system. The user supplied model must also contain at least eight nodes (i.e., the corners).

5 Conclusions

Estimating the effective elastic properties is an important step in designing and analysing composite materials. Therefore, several methods have been developed to estimate these properties such as the theoretical Chamis equations that are based on rule of mixture, and the more accurate numerical periodic RVE homogenisation. Nevertheless, in case of the latter method, there are no clear instructions and built-in tools that allow the user to calculate elastic properties of a desired model within a commercial FE software in an efficient and accurate manner. As a solution, the EasyPBC plugin is created to work with ABAQUS CAE without the need to use a third-party software. The mechanical concept of the plugin is imposing uniform strains on the RVE to compute the effective elastic properties. Meanwhile, maintaining RVE’s unified periodicity by automatically applying the required constraint equations and displacement boundary conditions. The plugin makes all of this possible within the user interface without the need for further calculations, coding, or using other software, which contributes to improving the efficiency by reducing error possibilities, saving the user’s effort and time. Moreover, EasyPBC is capable of analysing a user’s fully customised models, whereas other software are limited by specific geometry creation options. This make EasyPBC an effective open-source tool for studies of various backgrounds requiring periodic RVE homogenising, with the ability to use analysis data for further examinations. It is also thought that the approach detailed in this paper could be developed for other commercial FE software packages.