Introduction

Indentation is a very powerful technique to characterize the hardness of metals and alloys. The experiment can generate high-throughput data with low costs. Using indentation has a very long history to characterize the mechanical properties of materials [1]. In the case of metals and alloys, the indentation has found new applications. For instance, it has been used to characterize the spatial variation in the microstructure. Relating the indentation to other mechanical properties is still a challenge, considering the complex relationship between indentation load/displacement and stress/strain. Simulations of indentation experiment provide a method to investigate the relation between indentation test results and other mechanical properties. Accordingly, integrated experimental and numerical frameworks for indentation have gained a lot of attention [2,3,4]. Indentation testing has been combined with finite element method (FEM) simulations to determine yield strength and hardening response of polycrystalline metals with increased accuracy [5,6,7,8]. This requires an inverse method, i.e., calibrating the plasticity model parameters to reproduce the indentation test data [9]. Whereas most indentation work has used the load–displacement curve as the key data, recently, profilometry-based approaches have been increasingly considered [10,11,12] for determining macroscopic plasticity. These profilometry-based methods rely on FEM simulations. An open-source framework for multi-scale indentation FEM simulations is well situated to accelerate indentation-based research on metal deformation.

Indentation testing of metals and alloys has been simulated at different length scales from atomistic simulations to macroscopic plasticity models. At the atomistic level, parallel MD code LAMMPS is an open-source software developed at Sandia National lab which has built-in features to simulate the response of the metals and alloys during indentation [13,14,15,16,17]. This simulation can provide insight about defect structures beneath the indenter along with the correlation between the hardness with dislocation network, grain size, strain rate, temperature, etc. The indentation has been modeled at the mesoscale using crystal plasticity finite element (CPFE) method. However, most of the indentation crystal plasticity simulations are single crystal samples [18,19,20,21,22,23,24,25] or samples with only a few grains [26]. The CPFE indentation framework requires very high efficiency and scalability to be abe to model indentation in polycrystal sample. Lack of a very efficient and scalable indentation module for CPFE framework leads to the scarcity of indentation simulations of very large polycrystals in literature. At macroscale plasticity, many studies have been conducted on indentation [10, 27,28,29]. Although these simulations can model larger indentation depth with lower costs, they generally do not provide much information regarding the underlying microstructure.

In order to simulate the indentation experiment, the contact between the indenter and sample should be accurately captured. This contact problem has been solved with different techniques, of which the most common ones are the penalty methods, Lagrange multiplier methods, and Augmented Lagrange methods [30]. Mortar method is a surface-to-surface, Lagrange multiplier-type contact, which has recently gained a lot of attention within the computational contact mechanics community. Within the mortar method, the Lagrange multipliers are introduced to weakly impose the contact constraints [31,32,33,34]. A primal–dual active set strategy based on dual Lagrange multipliers has been effectively incorporated along with the mortar method to handle the contact problem [35,36,37]. A primal–dual active set strategy has been used to capture contact in both infinitesimal and finite strain elasticity and elastoplasticity [37,38,39,40]. However, the mortar framework has not been incorporated to model the contact for mesoscale simulation of metals and alloys using crystal plasticity.

Development of open-source software has contributed to the materials community at various levels. The community can use open-source codes for their applications without spending tremendous resources on development of redundant functionality. Instead, they can use resources to contribute to the features of shared software. Furthermore, shared software eases the reproducibility of the results, and model and code documentation. PRISMS-Plasticity has been introduced as an open-source CPFE software that has been successfully incorporated for different applications of twinning [41,42,43,44,45], grain size effects [46], processing sequence design using machine learning [47], and fatigue [48,49,50,51,52]. In the current work, the PRISMS-Indentation is presented as a multi-scale elasto-plastic virtual indentation module for metals and alloys which is integrated with PRISMS-Plasticity software [53]. A primal–dual active set strategy is incorporated to model the contact between the indenter and the sample. The current indentation framework can provide various opportunities in any of the mentioned applications. The applications of the current PRISMS-Indentation module are shown at both mesoscale and macroscale using finite strain crystal plasticity and conventional macroplasticity models, respectively.

Methodology

Contact Model

The contact problem is implemented in the current work according to the primal–dual active set approach to mimic frictionless contact with a rigid obstacle [37]. The deformable body is indicated as \(\Omega \), with some subset of the surface on which contact may occur \({\Gamma }_{{\text{c}}}\). At each point \(\mathbf{X}\) on that surface in the reference configuration, unit surface normal vector \(\mathbf{N}=\mathbf{N}\left(\mathbf{X}\right)\) is defined. At each point in \(\Omega \) there is also defined displacement \(\mathbf{u}=\mathbf{u}\left(\mathbf{X}\right)\). Each point of \({\Gamma }_{{\text{c}}}\) has a position in the reference frame of \({{\varvec{\phi}}}_{\Omega }\). The nearest point of the obstacle is \({{\varvec{\phi}}}_{O}\) and the gap between the surface and the obstacle is defined as,

$${\text{g}}=\left({{\varvec{\phi}}}_{O}-{{\varvec{\phi}}}_{\Omega }\right)\cdot \mathbf{N}$$
(1)

Two conditions are included in the strong form alongside the governing equations of the elastoplastic deformation problem:

$$\upsigma \mathbf{N}-\left[\mathbf{N}\cdot \left(\sigma \mathbf{N}\right)\right]\mathbf{N}=0,\mathbf{N}\cdot \left(\upsigma \mathbf{N}\right)\le 0 \;\mathrm{on }\;{\Gamma }_{{\text{c}}}$$
(2)
$$\left[\mathbf{N}\cdot \left(\sigma \mathbf{N}\right)\right]\left(\mathbf{N}\cdot \mathbf{u}-{\text{g}}\right)=0,\mathbf{N}\cdot \mathbf{u}-{\text{g}}\le 0\;\mathrm{on }\;{\Gamma }_{{\text{c}}}$$
(3)

where \(\upsigma ={{\varvec{\upsigma}}}^{{\text{PK}}2}\left(\mathbf{x}\right)\) is the Second Piola–Kirchhoff stress at each point, in what are known as the Signorini contact conditions. The constraint of zero tangential contact forces present in the conditions indicates a frictionless contact.

The application of this contact formulation to a flat surface is numerically convenient. In the Lagrangian (reference) frame, the surface normal vector \(\mathbf{N}\) is aligned with the z direction for the material volume defined in this case, i.e., \(\mathbf{N}=\left[\mathbf{0},\mathbf{0},\mathbf{1}\right]\mathrm{ on }{\Gamma }_{{\text{c}}}\). As a result, the contact constraints are imposed without adding new degrees of freedom. Using Dirichlet conditions acting on \({u}_{z}\) alone, the inequality in Eq. (3) can be enforced for the nodes in contact. Enforcing the inequality in Eq. (2) is accomplished using an active set method, described in the following. Finding the active set of nodes in the presence of nonlinear elastoplastic response requires an iterative procedure. Once determined, the active set will meet the inequality constraints while allowing the solution to be found using equality constraints.

The variational formulation is based on the formulation elaborated in [37]. The novelty in the current work is the application of the active set method for the macroscopic plasticity and crystal plasticity finite element frameworks of PRISMS-Plasticity. In the current indentation framework, the inequality constraints are reconfigured as equality constraints using an active set method. Indeed, it is possible to state the discretized problem in matrix–vector form as,

$$\left(\begin{array}{cc}A\left({U}^{i-1}\right)& B\\ {B}^{T}& 0\end{array}\right)\left(\begin{array}{c}{\widetilde{U}}^{{\varvec{i}}}\\\Lambda \end{array}\right)=\left(\begin{array}{c}F\left({U}^{i-1}\right)\\ G\end{array}\right)$$
(4)

where \(A\) is the Newton matrix, \(\Lambda \) contains the Lagrange multipliers, \(B\) is a diagonal matrix of ansatz functions, i.e., \({\overline{B} }_{pq}={\langle \mathbf{N}\cdot {\varphi }_{p}, \mathbf{N}\cdot {\varphi }_{q}\rangle }_{{\Gamma }_{{\text{c}}},h}\) that couple the displacements with the Lagrange multipliers, with shape functions \(\varphi \), \(F\) contains the right-hand-side, and vector \(G\) contains the gap functions, i.e., \({G}_{p}={\langle g,\mathbf{N}\cdot {\varphi }_{p}\rangle }_{{\Gamma }_{{\text{c}}},h}\). \({\widetilde{U}}^{{\varvec{i}}}\) is the set of displacement solutions for the current nonlinear iteration \(i\).

In addition, the set of points on \({\Gamma }_{{\text{c}}}\), \(\mathcal{S}\), must be partitioned into an active set \({\mathcal{A}}^{i}\) and inactive set \({\mathcal{F}}^{i}\). Using the primal–dual method, the active set is determined as

$$ {\bf{\mathcal{A}}}^{i} : = \left\{ {p \in {\bf{\mathcal{S}}}_{c}^{i} :\left[ {R\left( {u^{{i - 1}} } \right)_{p} + c\left( {\left[ {\bar{B}^{T} U^{{i - 1}} } \right]_{p} - G_{p} } \right)} \right] \le 0} \right\} $$
(5)

Using nonlinear residual \(R\) from the previous iteration and the penalty parameter \(c=100E\), where \(E\) is the Young’s modulus. Ultimately, the Lagrange multipliers are zero except for the nodes in the active set, for which they become Dirichlet boundary conditions. The values of these conditions are given as,

$${\widetilde{{\text{U}}}}_{p}^{i}=g\left({\mathbf{X}}_{p}\right)\quad \forall p\in {\mathcal{A}}^{i}$$
(6)

where \(p\) is a point, and the displacement solution of each point, \({\widetilde{U}}_{p}^{i}\) in the active set is equal to the gap function value at that point. The determination of the active set is incorporated into the convergence loop used to solve the nonlinear plasticity problem, as described in Appendix C. Additional details of the mathematical spaces for this formulation are included in Appendix A.

Macroscopic and Crystal Plasticity Models

The PRISMS -Plasticity software includes two frameworks: one for crystal plasticity and one for macroscale plasticity. Both frameworks are compatible with the new boundary conditions and subroutines developed as a part of PRISMS-Indentation. The constitutive model formulations for macroscale and crystal plasticity used in the development of PRISMS-Indentation are included in Appendices B and C, respectively.

The rate-dependent crystal plasticity model employed in the current work is the more novel capability. The model uses finite deformation framework in which the deformation gradient tensor \(\mathbf{F}\) is multiplicatively decomposed to elastic and plastic parts, i.e., \({\mathbf{F}}^{{\text{e}}}\) and \({\mathbf{F}}^{{\text{p}}}\), respectively. The details of the model are included in Appendix C.

Code Convergence and Structure

PRISMS-Indentation is a fork of PRISMS-Plasticity that includes additional routines for solving frictionless contact and finding convergent solutions to both the active set and the stiffness matrix within the same iterative loop. A Newton–Raphson method is used to solve the weak form of the equilibrium equation, for each time increment of the indentation simulation. The active set is updated at each iteration of the Newton–Raphson loop. If the active set changes, the active set is held fixed for one additional iteration, to allow the residuals of the stiffness matrix to reduce (and adjust for the changing boundary condition). This allows both nonlinear aspects of the simulation to be addressed at once in a combined iterative loop. An algorithmic tangent modulus is used to assemble the stiffness matrix. The solution to the linear equation is obtained using the PETSc library [54] included in deal.ii [55]. Preconditioning of the sparse stiffness matrix is also used to improve iterative convergence.

The contact Lagrange multipliers are either Dirichlet conditions or zero, as described in Eq. (6). As a result, no new degrees of freedom need to be introduced. However, the determination of the active set must be convergent. The methods used to support a convergent active set of nodes are embedded within the existing convergence loops. The full convergence diagram is shown in Fig. 1. The convergence of the typical plasticity simulations in PRISMS-Plasticity includes a loop of nonlinear iterations and a nested loop of linear iterations. The active set is solved (and Dirichlet conditions updated) on each nonlinear iteration. Two adjustments of the active set criterion are made to promote active set convergence in the simulation of heterogeneous and nonlinear material response: (1) if the active set changes size in a nonlinear iteration, the active set is frozen for the next nonlinear iteration. This prevents oscillations in the active set from interfering with convergence in the elastoplastic problem. (2) a very small positive bias is added to the active set criterion. In many meshes, small machine precision errors cause there to be nearly negligible variations in the stresses that are calculated when no deformation has occurred. When these variations are negative, they can prevent the initial contact from occurring (given the primal–dual active set criterion, in which the gap must be zero or less, and the stress must be zero or greater in compression). The small (around 0.1) biasing term allows the active set to be insensitive to these numerical errors.

Fig. 1
figure 1

A diagram of the convergence algorithm used in the PRISMS-Indentation routine

The PRISMS-Indentation module relies on input files to provide all the specific details of a simulation. Primarily, these input files are identical to the inputs for PRISMS-Plasticity. There have been updates to the macroscale plasticity code to allow input files to be similarly structured to the files required for CPFE simulations. Both length-scales use files to determine the boundary conditions. BCinfo.txt contains the non-contact boundary conditions. Details needed for the indentation boundary condition are provided in IndentationBCsConstraints.txt. Within, the indenter displacement over time is controlled using ‘key frames’, i.e., a sequence of (x, y, z) coordinates. An equal proportion of time steps are used moving the indenter from each defined coordinate to the next in the sequence. The indenter shape, size, the face ID of the sample being indented, and the option for frictionless or rough contact are also provided there. Also, the parameters.prm file for each simulation provides the bulk of the information, including the constitutive model parameters and the dimensions of the simulated volume, the time-step size and number, and often the mesh. In cases that use an externally defined mesh, the mesh must be defined in a.msh format, and the file name becomes a parameter as well.

The files used only for CPFE describe microstructure: (1) orientation.txt defines the grain orientations in the Rodrigues space and phases (for multiphase simulations) and (2) grainID.txt, which defines the grain ID map inside the sample. A latent hardening matrix, which can accommodate complex cases of latent hardening ratios in a matrix format, crystallographic information for slip (twin) directions and normal to the slip (twin) planes are also included. The outputs of the simulations can be observed using Paraview [56].

Application Examples

Hertzian Elasticity

The Hertzian analytical solution of elastic contact is used as a verification of the PRISMS-Indentation implementation of the contact formulation. For purely elastic, infinitesimal strain, frictionless contact between a spherical indenter and a flat surface, the indentation load can be written as follows [57]:

$$P=\frac{4}{3}\overline{E}\sqrt{{\delta }^{3}{R}^{*}}$$
(7)

where \(P\) is the indentation load, \(\overline{E }\) is the effective stiffness modulus, \(\delta \) is the displacement, and \({R}^{*}\) is the effective indentation radius, determined as,

$$\frac{1}{{R}^{*}}=\frac{1}{{R}_{i}}+\frac{1}{{R}_{s}}$$
(8)

using the radius of the indenter, \({R}_{i}\), and the radius of the surface, \({R}_{s}\), which is infinite for a flat sample and negative for a concave sample.

For verification, the macroscopic plasticity and crystal plasticity frameworks are both compared with the Hertzian solution. The material properties in all cases are isotropic elasticity, with Lamé parameters of \(\lambda \)= 100.6582 GPa and \(\mu \)= 45.6473 GPa. The indenter radius was set as \(r=2000\), and the maximum indentation depth was set at \(\delta =0.0005\). The elastic deformable volume was a hexahedral volume with size of 8 mm in all dimensions, to examine the effect of the finite mesh. A mesh of 64 by 64 by 64 elements was used. The face opposite the indentation was fixed in translation on x, y, and z.

The numerical indentation load follows the Hertzian load quite closely, as is shown in Fig. 2a. To see deviations in greater detail, the FE calculated load relative to the analytical load is shown in Fig. 2b. Limited mesh resolution and finite simulated volumes complicate the comparison between the 3D FEM simulation and the analytical solution. The contact is only enforced at nodes, leading to discrepancy with the Hertzian load at lower displacements while few nodes are in the active set. Indeed, this trend can be observed in Fig. 1b.

Fig. 2
figure 2

The elastic spherical indentation simulation, using PRISMS-Indentation compared with the Hertzian analytical solution (shown as a dashed line). The number of elements in each simulation is used to indicate the two sizes of mesh compared

According to the Hertzian formulation, the contact pressure should vary across the contact patch. The pressure at a given point drops off toward the edges of the contact patch from a maximum in the center, as follows [58]:

$$ \frac{{\sigma _{{zz}} }}{{p_{m} }} = - \frac{3}{2}\left( {1 - \frac{{r^{2} }}{{a^{2} }}} \right)^{0.5} $$
(9)

where \({\sigma }_{zz}\) is the component of the Cauchy stress tensor normal to the contact surface in the reference frame, \({p}_{m}\) is the mean pressure defined as load, \(P\), divided by contact patch area, and \(r\) is the distance from the contact patch center. A comparison of the numerical and analytical contact pressure as a function of radial distance from the center of the contact patch is shown in Fig. 3. The Hertzian solution is shown to agree closely with the numerical implementation.

Fig. 3
figure 3

The comparison of the nodal contact pressure to the Hertzian solution for the purely elastic case

CPFE Plasticity

Indentation of a polycrystalline sample is challenging to simulate using CPFE. However, it provides microstructure sensitive information that is not available using a macroscale simulation. To demonstrate the capability of the developed framework, indentation of polycrystalline Cu samples with initial random texture are simulated. Two representative volume elements are generated using Dream3D software [59] as presented in [48,49,50] with the length of 1 mm, which consist of ~ 7500 grains with mean grain diameter of 0.06 mm (Fig. 4). These are referred to as microstructure 1 (MS1) and microstructure 2 (MS2). The meshes are 90 × 90 × 90 hexahedral C3D8 linear brick elements. A frictionless spherical indenter with the radius, \({R}_{i}\), of 0.2 mm is used. The centers of the sample and indenter are aligned in the x–y plane, and the sample is indented up to the depth of 0.06 mm parallel to the z-axis. Nodes on the bottom face of the sample are fixed in z. Nodes on the x–z faces are fixed in y and nodes on the y–z faces are fixed in x. The constitutive model employed is the rate-sensitive formulation defined in Appendix C, calibrated by Bronkhorst et al. [60] and Annand and Kothari [61] for polycrystalline Cu. Material parameters are given values of \({h}_{0}^{\vartheta }={h}_{0}=180 {\text{MPa}}\), \({s}_{0}^{\vartheta }={s}_{0}=16 {\text{MPa}}\), \({s}_{s}^{\vartheta }={s}_{s}=148 {\text{MPa}}\), and \({a}^{\vartheta }=a=2.25\) along with the latent hardening parameter of \(q=1.4\). The elastic constants of \({C}_{11}=170 {\text{GPa}}, {C}_{12}=124 {\text{GPa}},\mathrm{ and} {C}_{44}=75 {\text{GPa}}\) are incorporated [61]. Reference shearing rate of \({\dot{\gamma }}_{0}=0.001 {s}^{-1}\) and inverse strain rate sensitivity exponent of \(m=25\) are used.

Fig. 4
figure 4

The microstructures used in the crystal plasticity FEM simulations. Microstructure 1 (a) is used for a tensile simulation in addition to the indentation simulations

Indentation imposes stresses unequally within the test specimen. As a result, determining material properties from indentation results is not trivial. The plastic zone associated with an indentation test is often used to help describe the volume of material primarily involved in the test. The plastic zone is determined for each simulation according to a threshold of effective plastic strain, \({\varepsilon }_{{\text{thr}}}=0.001\). The simulated plastic volume is determined as,

$${V}_{{\text{pl}}}=\int {z}_{{\text{pl}}}\left({\varepsilon }_{{\text{pl}}}\right) {\text{d}}V,\quad \mathrm{ where} \quad\left\{\begin{array}{c}{z}_{{\text{pl}}}\left({\varepsilon }_{{\text{pl}}}\ge {\varepsilon }_{{\text{thr}}}\right)=1\\ {z}_{{\text{pl}}}\left({\varepsilon }_{{\text{pl}}}<{\varepsilon }_{{\text{thr}}}\right)=0 \end{array}\right.,$$
(10)

where \({z}_{{\text{pl}}}\) is a Boolean threshold function of the effective plastic strain, \({\varepsilon }_{{\text{pl}}}\). This plastic volume is shown for the CPFE simulations in Fig. 5a as a function of indentation displacement. The indentation load is shown in Fig. 5b. The two simulations show similar load–displacement curves and similar plastic zone volumes as a function of indentation displacement. The effective strain at the maximum indentation depth is shown for cross-sections of MS1 and MS2 in Fig. 6. While the plasticity is isochoric, the high compressive pressure present at the timestep shown in Fig. 6 presents a notable elastic volume change. Despite the broad similarity of the strain distributions shown in Fig. 6, local variations in response due to the microstructure are observable. It is noted that the indentation load curve provides limited information about the spatial distribution of strain during the indentation. The displacement in z of the indented surface for both simulations is shown in Fig. 7. It is emphasized that, although spherical indentation is demonstrated in this work, support for octahedral (sharp) indenter shape is also included in the module.

Fig. 5
figure 5

The indentation displacement-load curves (left) and plastic zone volume (right) as a function of indentation displacement for the two microstructures simulated

Fig. 6
figure 6

The von Mises effective strain of the indentation simulations at indentation displacement of 5.2 mm. For visual clarity, only a 2D cross-section of the 3D simulated volume is shown for each of the two microstructure instantiations. Microstructure 1 is on the left, microstructure 2 is shown on the right

Fig. 7
figure 7

The top surface displacements from the elastoplastic indentation simulations. It is noted that the surface displacements shown are taken at the peak indentation stress

It is desirable to obtain an effective stress–strain curve from an indentation, either to estimate material properties or to compare an indentation result with tensile test stress–strain curves. Many analytical approaches to derive an indentation stress and strain exist [8], however numerical approaches are not as common. In general, the analytical approaches assume a homogeneous and isotropic material. It has not been shown how heterogeneity influences the relationship between tensile stress–strain curves and indentation stress–strain curves. A numerical estimate of indentation stress and strain is useful in conjunction with the CPFE framework, to allow exploration of the effect of heterogeneity on effective properties as determined by indentation test. To support this, an analytical indentation stress–strain measure is compared to a numerical estimate of the effective stress and strain.

An analytical approach suitable for property identification from elastoplastic indentation is employed. Many analytical derivations of indentation stress and strain exist. Here, the formulation follows the work in [8]. While elastic indentation follows the Hertzian formulation in Eq. 7, plasticity requires modifications to the parameters, including the adjustment of effective radius, \({R}^{*}\), as plastic deformation changes the residual shape of the sample surface (and thus \({R}_{s}\)). \({R}_{s}\) can be measured by unloading periodically during the indentation. Here, the value is estimated as \({R}_{s}=-k{R}_{i}, k\cong \frac{{\overline{\varepsilon }}_{{\text{tot}}}}{{\overline{\varepsilon }}_{{\text{pl}}}}=1.001\). This value of \({R}^{*}\) is assumed to be constant for the simulation. The contact radius, \(a\), is defined as

$$a={\left(\frac{4P{R}^{*}}{3\overline{E} }\right)}^{1/3}$$
(11)

The indentation stress and indentation strain are calculated as

$${\tilde{\sigma }}_{{\text{ind}}}=\frac{P}{\pi {a}^{2}} ,\quad {\overline{\varepsilon }}_{{\text{ind}}}=\frac{4\delta }{3\pi a}$$
(12)

The indentation stress and strain calculated in this manner are presented as a point of comparison.

A novel approach to the numerical effective indentation stress and strain is proposed here. To usefully estimate the material response associated with an indentation test, requirements must be met: (1) the effective stress and strain should summarize the distributions of stress and strain states present at each timestep of the simulation with scalar quantities, (2) the summary formulation should discriminate between the local stress–strain states that are physically relevant to the observed indentation load–displacement and those states that are not physically relevant, (i.e., it should not assume all material points in the simulated volume are equally involved in the indentation result) and (3) the formulation should distinguish relevance of a local state without relying on an arbitrary threshold parameter, if possible. A formulation that meets all of these requirements is given as follows.

For the numerical calculation of indentation stress and strain, the contributions of each grain are incorporated in a weighted average. Weights are defined as incremental strain-work density, grain-wise, i.e.,

$${w}_{i}^{s}\left(t\right)={\int }_{{V}_{i}}\Delta U\left(t\right){\text{d}}V\quad \text{for i in }{N}_{{\text{grains}}}$$
(13)

where \({w}_{i}^{s}\) is the statistical weight of grain \(i\), \({V}_{i}\) is the grain volume, and \(\Delta U\left(t\right)\) is the increment of strain work density at time \(t\). The strain work density increment is calculated as

$$\Delta U\left(t\right) ={P}_{\left(t-\Delta t\right)}\Delta F+\frac{1}{2}\Delta P\Delta F$$
(14)

where F is the deformation gradient and P is the first Piola–Kirchhoff stress tensor. The weighting imposed by the work increment is thus able to evolve and include strain energy dissipation.

The numerical estimate given here is compared against a commonly used analytical method. It is not clear whether the quantities should match, given the difference in their formulations. However, if the potential uses of the methods are aligned (for instance, to evaluate correspondence to tensile stress–strain curves), discussion of the differences between the two methods is necessary. The numerical and analytical indentation stress–strain curves are shown in Fig. 8. It is shown that the numerical method predicts a higher stress value at a given strain than the analytical method. The cause of this could be due to an inaccurate value of \({R}_{s}\), or due to the effect of incompatibility stresses. Some other considerations about the influence of stress and strain incompatibility on the numerical estimate are expanded on in the discussion section.

Fig. 8
figure 8

The numerical and analytical indentation stress–strain curves for the two microstructure instantiations with which indentation test simulations are performed. The effective radius of the indentation tests is estimated

Although micromechanical interactions are complex, it is reasonable to assume that the effective weighting imposed by the mechanical test is proportional to the mechanical work increment of each grain. It is noted that incompatibility stresses and strains (that do not show up in boundary condition-based stress and strain determinations) influence the result of this weighted averaging when von-mises stress or strain are used. Incompatibility does not influence the volume average of axial stress and axial strain in a tensile test simulation; the weighted average produces accurate results for axial stress and strain. Some other considerations about the influence of stress and strain incompatibility on the numerical estimate are expanded on in the discussion.

Indentation tests are most heavily influenced by a smaller volume of the simulated sample near the indenter. Often, unstructured meshes are used to increase the mesh density in the plastic region while leaving most of the mesh coarse. Unstructured meshes are compatible with PRISMS-Indentation. To demonstrate the capability, one microstructure is simulated with three different meshes. The meshes have the same density around the indenter contact region in a hexahedral volume. Geometric scaling is used to increase the size of elements as they move away from the indenter tip. A cross-section of the unstructured meshes used is shown in Fig. 9. The number of elements is reduced to 32% of the full mesh in the reduced mesh shown in 4 (a) and to 6.2% in (b).

Fig. 9
figure 9

The unstructured meshes used to demonstrate the speed up possible with the PRISMS-Indentation capability

Grain orientations in the new meshes are obtained from the microstructure of the full resolution mesh. The orientation for a given element was determined by the element center and by consulting the orientation of the original element containing the center. The new meshes had slightly different microstructures as a result. Determining the effect of the microstructure differences on the results is left to future work. The indentation stress–strain curves for the same simulations are shown in Fig. 10. The numerical estimate of the indentation stress and strain was much more sensitive to the mesh resolution than was the analytical estimate based on the load–displacement curve. The indentation load–displacement curves are shown in Fig. 11. It is shown that as the plastic volume expands, the coarsened mesh has a larger influence on the simulation.

Fig. 10
figure 10

The numerical and analytical indentation stress–strain curves for the unstructured meshes, along with the original mesh for comparison

Fig. 11
figure 11

The indentation (a) displacement-load curves and (b) plastic zone volume as a function of indentation displacement for the reduced meshes and the full mesh as reference

The computational cost of a simulation depends on more than the mesh size. The costs of the indentation and other PRISMS-Plasticity-based simulations are included in this work. The CPU counts and wall times of each of the simulations in this work are shown in Table 1. The simulations that employed reduced meshes (with 32% or 6.2% of the original number of elements) were executed in 51.3% and 5.9% of the CPU hours required for the uniform mesh, respectively. A uniaxial tension simulation using MS1 and reaching 5% strain is included to allow an estimation of the additional costs of the indentation boundary conditions. The indentation test required 2.38 times the cpu hours of a comparable uniaxial tension simulation. In the indentation simulations, additional nonlinear and linear iterations are often required to allow for determining a convergent active set, or due to the larger strain gradients present, relative to a uniaxial tension configuration.

Table 1 The number of processors and wall times for the simulations included in this work

It is important that the indentation simulations are suitable for parallelization, to support larger meshes. PRISMS-Plasticity has been shown to have excellent performance with respect to parallelization [53]. Figure 12 compares the strong scaling of the indentation simulation, for number of processors from 9 to 579 to the ideal scaling. The results show that the strong scaling of the indentation simulation is comparable to those presented in [53], and indentation simulation does not introduce any overhead for the scaling of the framework.

Fig. 12
figure 12

The change in wall time corresponding to changes in the number of CPUs used in a single indentation simulation. The dashed line is the ideal scaling, given as a comparison

Discussion

The simulations in this work were chosen to demonstrate the capability of the PRISMS-Indentation framework to investigate the effects of microstructure on indentation test results. The material choice of Cu, the random crystallographic texture, and the indenter radius to grain size ratio of greater than 3.0 contribute to the simulation results being consistent between the two microstructure instantiations. Simulating multi-phase materials, strong anisotropic texture, or larger average grain size could provide much more variability in indentation test results. Nevertheless, the results in this work can demonstrate some implications of material heterogeneity in indentation testing. Here, the discussion will address (1) the expected variance of indentation tests, (2) the relationship between indentation and tensile test stress and strain, and (3) the impact of the choice of data in interpreting indentation tests.

For a given polycrystalline metal, the number of grains involved in a macroscale plasticity test determines its variability. The determination of how many grains influence an indentation test measurement is not trivial. However, the full-field simulation of the indentation allows the contributions of individual grains to be evaluated. Indentation boundary conditions involve larger variation in how much each grain affects the measured mechanical response when compared to tensile test boundary conditions. In an indentation test, grain-specific work increments vary by many orders of magnitude, even within the plastic zone. The unequal weighting of individual grain response may bias measurement of effective properties and can affect the expected statistical error of those properties. Using the simulations, these effects can be shown for the case of the polycrystalline Cu constitutive model. The statistical variability of the indentation test can be estimated by calculating the standard error of the weighted mean of the tangent modulus, i.e.,

$${\text{SE}}\left[\overline{T}\right]=\frac{\widehat{{\sigma }_{\overline{T}}}}{\sqrt{{N}_{{\text{grains}}}}}{P}_{w} \quad \text{if }{w}^{s}\,\, \text{is independent of }T$$
(15)

where \(\widehat{{\sigma }_{\overline{T}}}\) is the estimate of the standard deviation in the grain-specific tangent modulus \({T}_{i}\), and \({P}_{w}\) is a factor that depends on the inequality among weights, specifically,

$${P}_{w}=\frac{\sqrt{{N}_{{\text{grains}}} {\sum }_{i=1}^{{N}_{{\text{grains}}}}{\left({w}_{i}^{s}\right)}^{2}}}{{\sum }_{i=1}^{{N}_{{\text{grains}}}}{w}_{i}^{s}}$$
(16)

The value of \({P}_{w}\) has a value of 1 if all weights are equal, and can increase to a value of \(\sqrt{{N}_{{\text{grains}}}}\) if only one weight is nonzero. The formulation can be used to translate the expected error of the measurement at each point in the indentation into an equivalent number of equally weighted grains, by calculating a factor: \({N}_{{\text{grains}}}\cdot {P}_{w}^{-2}\) as a function of the indentation displacement. This is shown for the crystal plasticity indentation simulations in this work in Fig. 13. The simulations include over 7000 grains, but the effective number of grains (when considering the effect on the random error on mean estimated properties) is much lower.

Fig. 13
figure 13

The equivalent number of grains in an equal weighted average that would have the same expected error as the effective weighted sampling determined by work-increment in the indentation simulations

Indentation tests are often used as a proxy for tensile tests in cases when material costs are prohibitive. It is not immediately clear how heterogeneity impacts correspondence between the two tests. It is given that mechanical tests (e.g., a tensile test or indentation test) measure effective material properties, attached to a length scale and/or boundary condition. Tensile test stress–strain curves are calculated under the assumption of homogeneous material response. In CPFE simulations of tensile tests, significant heterogeneity can be observed, as is shown in Fig. 14. Figure 14 displays the von Mises effective stress for a cross-section of a tensile test boundary condition, in which the Dirichlet condition is imposed on the top surface and the bottom surface is fixed in the z direction. It is shown that the stress levels vary from 70 to 210 MPa at different points in the simulated microstructure. Clearly, there is a difference between the measured stress and strain of a tensile test and the stress–strain history of a single material point. The tensile test simulation is a special case in which the Hill condition is met [62], allowing mean stress and strain to be used in lieu of the local variations. It is the uniform displacement boundary condition that leads to this condition. In indentation testing, the Hill condition is not met.

Fig. 14
figure 14

The elemental solutions of von Mises effective stress during a uniaxial tensile simulation. Only a 2D cross-section of the 3D simulation is shown, for clarity

Typically, to determine stress and strain, the traction and deformation at the boundary condition is measured, to be consistent with experimental tensile tests. Reproducing the boundary-measured effective response from the individual elemental solutions is not always a trivial process. For instance, an average of the elemental solutions for von Mises stress will be higher than the effective von Mises stress, as stress incompatibilities, i.e., stress-field eddies, contribute to the local stresses only, and not the effective stresses. This difference is shown in Fig. 15. The same weighted average used in Eq. 13 is also shown here. For comparison, the effective stress–strain curves for the uniaxial tension and indentation simulations are both shown. Notably, the averaging is an overestimate of stress for the tension simulation. It is likely that the numerical estimate of the indentation stress is also an overestimate, as the heterogeneity in the material leads to strain incompatibility in the indentation simulation, similarly to that in the tension simulation. Not all estimates are accurate, as the effective response and the response of constituent material points do not necessarily correspond to the same quantities.

Fig. 15
figure 15

The effective stress–strain measures for indentation and tensile test of a single microstructure instantiation. Not all estimates are accurate, as the effective response and the response of constituent material points do not necessarily correspond

The deformation imposed in an indentation test leads to a distribution of stresses and strains at material points within the sample. Depending on heterogeneity in the sample, the distributions that arise may vary significantly, even for two indentations with similar load–displacement curves. This point is illustrated in Fig. 16. Considering the two microstructures simulated, the relative difference in the load, \(P\), effective stress, \({\sigma }_{vm}\), and effective strain, \({\varepsilon }_{vm}\), as a function of the indentation displacement, \({\delta }_{{\text{ind}}}\), is shown in Fig. 12a–c, respectively. Although the load shows relatively small variation, the strain and the stress histories are quite different, especially during the beginning of the indentation. The analysis of an indentation load–displacement curve to determine stress and strain would not detect this significant effect of heterogeneity unless a continuous stiffness measurement is used. Profilometry-based methods, in which an indentation profile is measured and used to determine a stress strain curve, may provide more sensitivity to heterogeneous mechanical response.

Fig. 16
figure 16

The relative difference in the load, \(P\), effective stress, \({\sigma }_{vm}\), and effective strain, \({\varepsilon }_{vm}\), as a function of the indentation displacement, \(\delta \). MS1 is the reference for the comparison

Future Work and Summary

PRISMS-Indentation was presented as a newly developed module for crystal plasticity and macroscale plasticity finite element simulations with frictionless contact boundary conditions. The primal–dual active set method and a customized convergence loop enable robust convergence in indentation simulations with indentation depth to radius ratios of up to 0.3. The tool supports unstructured meshes with the ability to reduce degrees of freedom to less than 7% of a full mesh without loss of stability. The capability this tool provides will be instrumental to the analysis of indentation testing and the effects of highly heterogeneous microstructures on the interoperability of indentation test and tensile test data.

Finally, the PRISMS-Indentation module will be integrated with the Materials Commons; it is anticipated that a broad community of practice will develop for application of this framework to a wide range of scientific studies on indentation testing of structural materials, especially regarding additively and advanced manufactured metals. Ongoing development and future contributions will be accessible in the open-source PRISMS-Indentation github repository as updates are completed. Among other planned expansions, a graphical user interface (GUI) is under development to simplify use of PRISMS-Indentation for educational purposes.