1 Introduction

Understanding the mechanical fatigue behavior of components made from polycrystalline materials requires either substantial experimental effort [1] or suitable analytical [2] and numerical methods [3, 4]. To reduce the experimental effort and to ensure accurate as well as reliable results, it is imperative to use models which take into account the influence of the underlying microstructure onto the fatigue behavior [3, 5].

For components with polycrystalline microstructures, models based on crystal plasticity (CP) [6] provide powerful tools to link the underlying microstructure to the macroscopic material properties. Starting from computational cells, see Bargmann et al. [7] for a recent overview, equipped with suitable boundary conditions and singe crystal material models, predictive models for the lifetime of polycrystalline microstructures can be constructed. Examples include, but are not limited to, investigating various loading conditions [8, 9], the influence of inclusions [9, 10] or different atmospheres [11] and microstructural short crack growth [12].

Utilizing micromechanical CP methods requires an accurate representation of the microstructure. Albeit it appears to be the most natural approach, solely relying on experimental image data poses quite a few challenges. 3D imaging techniques for polycrystalline materials, e.g., serial sectioning [13, 14] are available, but these techniques are still quite time and cost intensive. Additionally, there is ongoing discussion regarding the error introduced when computing on non-periodic images [15, 16].

Instead, using synthetic representative volume elements (RVE) [15, 17] provide a way to generate periodic computational cells within a reasonable amount of time. However, using these RVEs comes with the challenge of accurately reproducing the investigated microstructure, or at least the important characteristics of it. In case of polycrystalline materials, this problem may be divided into two tasks: matching the microstructure morphology and assigning suitable crystallographic orientations to the crystallites.

For the former problem, powerful so-called microstructure generators are available. A popular framework for creating RVEs for polycrystalline microstructures are tessellations, i.e., subdivisions of the considered computational into non-overlapping domains, which represent individual crystallites and whose union covers the entire cell. These tessellations can be tuned to match experimental data, like grain size and aspect ratio distributions [18]. For instance, based on an innovative reformulation as a convex optimization problem, Bourne et al. [19] proposed an algorithm to generate Laguerre tessellations matching prescribed grain volume fractions, which runs only a few minutes on a standard desktop computer. Using modern convex optimization solvers, Kuhn et al. [20] further reduced the required computation time and showed the capabilities of such an approach to reproduce a given grain size distribution. However, using these methods, it is not straightforward to match other geometric properties of polycrystalline microstructures, e.g., aspect ratios. Methods based on the Random Sequential Addition (RSA) algorithm provide a way to iteratively match aspect ratio distributions [21,22,23], with the drawback of increased computational cost.

For fixed grain morphology, the next step consists of assigning crystallographic orientations to the obtained grain representations. For polycrystalline microstructures, this is often treated as a post-processing step (in contrast, for example, to the RVE generation of short fiber reinforced composites [24]). There exist a variety of methods [18, 21, 25], basically following two different approaches. The first approach discretizes the one-point correlation function, describing the orientation state within the polycrystal, i.e., the crystallite orientation distribution function (CODF) [26, 27]. Subsequently, orientations are selected based on their respective CODF values, i.e., an orientation with a high value is more likely to be selected than one with a low value [26, 28]. Modern microstructure generators employ varieties of this discretization technique. For instance, the work of Groeber and Jackson [21] uses a discretization in combination with an iterative binning algorithm [29] to match the prescribed orientation state. Roters et al. [25] sample the discretized distribution function using a combination of deterministic and stochastic procedures [30]. In recent publications, these methods were further improved, either by iteratively adjusting the parameters [31, 32] of the generator or by improving the discretization of the CODF [23, 33]. A different approach is based on matching special cases of the CODF, e.g., uniform or aligned distributions. For instance, Quey et al. [34] proposed a dedicated algorithm to generate uniformly distributed orientations. It is also possible to approximate the CODF by a superposition of different so-called texture components [35,36,37]. By modeling these components [38] individually, it is possible to sample these orientations and assign them to cells [39].

However, these methods suffer from the drawback that they either need the CODF or a (possibly large) data set which serves as an accurate representation of the CODF. In this work, we propose a method based on condensing the information carried by the CODF via the coefficients of a tensorial series expansion [40, 41]. As these tensorial coefficients are easy to compute from experimental data, directly linked to the bounds of mechanical properties [42, 43] and easily applied in microstructural sensitive design [44, 45], we prefer them to an approach involving spherical harmonics [46, 47]. Moreover, Böhlke [48] introduced a method for estimating the crystallite orientation distribution function for a finite number of given texture coefficients and Junk et al. [49] analyzed this approach in the context of maximum entropy moment problems. Böhlke [50] derived a hierarchy of evolution equations for the texture coefficients under the Taylor-Voigt assumption of vanishing strain fluctuations on the microscale. Motivated by these observations, we propose to use a limited set of tensorial texture coefficients as the input of a microstructure generator, with the goal to obtain crystallographic orientations for each crystallite matching the prescribed texture coefficients. We follow a two-step procedure. First, the orientations are sampled randomly. In a second step, these orientations are corrected in terms of a gradient-based optimization technique, which ensures that the resulting texture coefficients match the prescribed ones up to a given tolerance.

To introduce the Texture coefficient Optimization for Prescribing orientations (TOP) method, we briefly revisit the used material model and the notation of rotations in Secs. 2.1 and  2.2, respectively. In Sec. 2.3, we outline the problem formulation and the solution scheme. We investigate the capabilities of the proposed method, by comparing it to state-of-the-art algorithms in Sec. 3.

2 Background on modeling and optimization

2.1 Crystal plasticity model

As studying the cyclic fatigue behavior in polycrystals serves as our primary motivation, we consider a small-strain crystal plasticity model with kinematic hardening as presented by Kuhn et al. [51], which we briefly summarize. The total strain tensor \(\varepsilon \) is additively decomposed into an elastic \(\varepsilon _e\) and a plastic \(\varepsilon _p\) contribution

$$\begin{aligned} \varepsilon = \varepsilon _e + \varepsilon _p. \end{aligned}$$

The stress \(\sigma \) is related to the elastic strain by Hooke’s law

$$\begin{aligned} \sigma = \mathbb {C} : \varepsilon _e \equiv \mathbb {C} : (\varepsilon - \varepsilon _p), \end{aligned}$$

where \(\mathbb {C}\) denotes the fourth order stiffness tensor.

Single crystal plasticity assumes that plastic deformation is the result of dislocation movement, the latter taking place on the corresponding crystallographic slip systems. We consider volume-preserving slip mechanisms, i.e., conservative glide. An arbitrary slip system \(\alpha \) is characterized by two orthogonal vectors, the slip direction \(m^\alpha \) and the slip plane normal \(n^\alpha \). Activating slip system \(\alpha \) requires the resolved shear stress

$$\begin{aligned} \tau ^\alpha = \sigma \cdot M^\alpha \,\,\, \text {with}\,\,\, M^\alpha = \frac{1}{2} \left( m^\alpha \otimes n^\alpha + n^\alpha \otimes m^\alpha \right) \end{aligned}$$

to exceed a critical value \(\tau _c^\alpha \). The flow rule arises by superposing the crystallographic slip rates on the individual slip systems

$$\begin{aligned} \dot{\varepsilon }_p = \sum _{\alpha =1}^{N_S}\dot{\gamma }^\alpha M^\alpha , \end{aligned}$$

involving the plastic slip rate \(\dot{\gamma }^\alpha \) of slip system \(\alpha \). As we consider cyclic loading scenarios, we use a model for the plastic slip rate \(\dot{\gamma }_\alpha \) which captures typical cyclic phenomena, such as the Bauschinger effect [52] and ratcheting [53]. More precisely, for the study at hand, we use the flow rule proposed by Hutchinson [54]

$$\begin{aligned} \dot{\gamma }^\alpha = \dot{\gamma }_0 \, \text {sgn}(\tau ^\alpha - \mathcal {X}^\alpha _b) \left| \frac{ \tau ^\alpha - \mathcal {X}^\alpha _b}{\tau ^\alpha _c} \right| ^m, \end{aligned}$$

augmented by a backstress term \(\mathcal {X}^\alpha _b\) following Cailletaud [55]. To describe the evolution of the backstresses \(\mathcal {X}^\alpha _b\) in terms of the slip rate, we use the Ohno-Wang kinematic hardening model [56]

$$\begin{aligned} \dot{\mathcal {X}^\alpha _b} = A\,\dot{\gamma }^\alpha - B\left( \frac{\left| \mathcal {X}^\alpha _b\right| }{{A}/{B}}\right) ^M \mathcal {X}^\alpha _b\left| \dot{\gamma }^\alpha \right| , \end{aligned}$$

which extends Chaboche’s formulation [57]. For a more sophisticated approach based on a backstress tensor, we refer to Harder [58] and the references therein.

2.2 Representing the texture

Describing the deformation behavior of a polycrystal, i.e., an agglomerate of crystals, by crystal plasticity requires taking the distinct orientation of each crystallite into account. For instance the stiffness tensor \(\mathbb {C}\) in Hooke’s law (2.2) depends on the crystal orientation. To describe the orientations in a polycrystalline material, for each crystallite we use a proper orthogonal tensor

$$\begin{aligned} Q= \sum _{i=1}^3 g_i \otimes e_i, \end{aligned}$$

where \(\left( e_1, e_2, e_3\right) \) and \(\left( g_1, g_2, g_3\right) \) represent the fixed orthonormal basis of the sample and the crystallite, respectively. Thus, the orientation of a crystallite is encoded by the rotation from the crystal coordinate system into the sample coordinate system. All orientation tensors \(Q\) are elements of the group of proper rotations in three dimensions, i.e., \(Q\in SO(3)\). In the following, we use the expressions rotation and orientation interchangeably.

For a given polycrystal, the orientation may be succinctly described in terms of the crystallite orientation distribution function (CODF) f, a probability distribution on \(SO(3)\) w.r.t. the Haar Measure dQ (normalized to unity). More precisely, the CODF f is non-negative,

$$\begin{aligned} f(Q)\ge 0 \quad \forall \quad Q\in SO(3), \end{aligned}$$

and normalized

$$\begin{aligned} \int _{SO(3)} f(Q)\,dQ = 1. \end{aligned}$$

For a (measurable) subset \(S\subseteq SO(3)\) of orientations, the expression \(\int _S f(Q)\, dQ\) computes the probability to find orientations contained in the set S. Due to the invariance properties of the Haar measure [59], the invariance property

$$\begin{aligned} \int _{SO(3)} f(Q)\,dQ = \int _{SO(3)} f(QQ_0)\,dQ \end{aligned}$$

holds for all \(Q_0 \in SO(3)\). Moreover, the CODF reflects the underlying symmetries of the crystals forming the aggregate, i.e.,

$$\begin{aligned} f(Q)= f(QH^C) \quad \forall \quad H^C\in S^C \subseteq SO(3), \end{aligned}$$

where \(S^C\) denotes the (discrete) symmetry group of the crystals, as the orientation states \(Q\) and \(QH^C\) correspond to the same physical orientation state of the crystallite. As a result of a forming process, the sample itself may possess a certain symmetry, encoded by a symmetry group \(S^S\). This is reflected by the CODF in terms of the condition

$$\begin{aligned} f(Q)= f(H^SQ) \quad \forall \quad H^S\in S^S \subseteq SO(3), \end{aligned}$$

where \(S^S\) denotes the symmetry group of the sample. For the sake of readability, we will only consider the case of cubic crystals and triclinic sample symmetry in the following [60, Ch. 3]. Our approach permits a straightforward extension to the general case with arbitrary crystal and sample symmetries, see Zheng and Fu [61, 62]. If the CODF is not uniform, i.e., \(f(Q)\ne 1\) for some \(Q\in SO(3)\), then the material will be said to possess a crystallographic texture.

Working with the full CODF is oftentimes impractical. Guidi et al. [40] proposed a way to condense the encoded information. More precisely, any square integrable function f may be expressed in terms of a tensorial Fourier series [40, 41]

$$\begin{aligned} f(Q)= 1 + \sum _{i=1}^{\infty } \mathbb {V}'_{\langle \alpha _i\rangle } \cdot \mathbb {F}'_{\langle \alpha _i\rangle }(Q), \end{aligned}$$

involving the tensorial Fourier, or texture, coefficients \(\mathbb {V}'_{\langle \alpha _i\rangle }\) and the tensor functions \(\mathbb {F}'_{\langle \alpha _i\rangle }\) [48, 63]. The subscript i denotes the number of linear independent harmonic cubic tensors of rank \(\alpha \). Harmonic tensors, denoted by a prime \((\cdot )'\), are completely symmetric and traceless, i.e., the relations

$$\begin{aligned} A'_{ijkl} = A'_{jikl} = A'_{jilk} = \cdots , \quad \sum _{i=1}^3 A'_{iikl} = 0 \end{aligned}$$

reduce the number of degrees of freedom to \(2\alpha + 1\) [48].

The tensor functions \(\mathbb {F}'_{\langle \alpha _i\rangle }(Q)\) in equation (2.13) arise by rotating suitable reference tensors \(\mathbb {T}'_{\langle \alpha _i\rangle }\) [40]

$$\begin{aligned} \mathbb {F}'_{\langle \alpha _i\rangle }(Q) = Q\star \mathbb {T}'_{\langle \alpha _i\rangle }, \end{aligned}$$


$$\begin{aligned} Q\star \mathbb {T} = T_{ij\dots p}(Qe_i)\otimes (Qe_j)\otimes \dots (Qe_p) \end{aligned}$$

denotes the Rayleigh product, i.e., the rotation of a tensor by \(Q\). Without loss of generality and following Böhlke et al. [64] and Dyck and Böhlke [65], we normalize the Frobenius norm of the reference tensors to

$$\begin{aligned} \left\| \mathbb {T}'_{\langle \alpha _i\rangle }\right\| = 2\alpha +1 \end{aligned}$$

instead of \(\left\| \mathbb {T}'_{\langle \alpha _i\rangle }\right\| = 1\) (as done by Guidi et al. [40]). Interpreting the texture coefficients \(\mathbb {V}'_{\langle \alpha _i\rangle }\) as a convex combination of normalized reference tensors of single crystal states [63], we compute the tensorial texture coefficients in the case of discrete (experimental) orientation data as [50]

$$\begin{aligned} \mathbb {V}'_{\langle \alpha _i\rangle }(Q_1,\ldots ,Q_K) = \frac{1}{2\alpha _i+1}\sum _{k=1}^{K} c_k\, Q_k \star \mathbb {T}'_{\langle \alpha _i\rangle }, \end{aligned}$$

where \(c_k\) denotes the volume fraction of orientation \(Q_k\) among K orientations. From Eqs. (2.17) and (2.18) it follows that the Frobenius norm of all texture coefficients \(\mathbb {V}'_{\langle \alpha _i\rangle }\) lies within the interval [0, 1]. Böhlke et al. [43, 50] use the norm to measure the degree of anisotropy. For a completely uniform CODF, all texture coefficients vanish, whereas for the case of single crystals the norm of all texture coefficients is equal to one.

As we seek a compact representation of the CODF in the following, we will restrict to the texture coefficients up to rank six. As the cubic reference tensor of rank two is zero and, because of the cubic crystal symmetry, odd-rank reference tensors up to a rank of eight vanish [40], we focus on the texture coefficients of rank four and six. For a precise overview and thorough discussion of texture coefficients in a more general context, the reader is referred to the work of Fernández and Böhlke [63].

2.3 Texture coefficient optimization for prescribing orientations (TOP)

To create digital representations of polycrystalline microstructures, it is not sufficient to solely match the grain morphology. In addition, we have to take the orientation state, i.e., the CODF, into account [66]. Many tools either rely on simple model CODFs [18, 34], need (possibly vast) experimental data [21] or at least a representation of the complete CODF [30] to generate orientations for digital microstructures. In this section, we propose a method to generate orientations based on tensorial texture coefficients. For a given unit cell, subdivided into individual grains, our goal is to prescribe the orientation per grain in such a way that the resulting texture coefficients \(\mathbb {V}'_{\langle \alpha \rangle }\) of the unit cell match the prescribed ones \(\bar{\mathbb {V}}'_{\langle \alpha \rangle }\) up to a given tolerance \(\text {tol}\), thus approximating the underlying CODF. To this end, we formulate our objective function as the difference in independent components between the current and the desired texture coefficients

$$\begin{aligned} \ell (Q_G) = \sqrt{\sum _{\beta =4}^{\alpha _{\text {max}}}\left\| \bar{\mathbb {V}}'_{\langle \beta \rangle } - \mathbb {V}'_{\langle \beta \rangle }(Q_G)\right\| ^{2}}, \end{aligned}$$

where \(Q_G=\left( Q_1,\ldots ,Q_K\right) \) is a vector of orientations (one for each of the K cells) and \(\alpha _{\text {max}}\) denotes the maximum rank of the considered texture coefficients.

Fig. 1
figure 1

Gradient descent on a linear space vs. descent along a geodesic (dashed line) on the manifold \(SO(3)\)

Starting from a randomly initialized set of orientations, we seek to minimize the objective function \(\ell (Q_G)\). The objective function \(\ell \) is continuously differentiable, and it is natural to use gradient-based optimization techniques. Indeed, the objective function \(\ell \) is actually a polynomial in the components of the individual grain orientations \(Q_{K}\). In particular, the function \(\ell \) is infinitely often differentiable.

The simplest conceivable approach proceeds via gradient descent, i.e., following the direction of steepest descent. Please keep in mind that the objective function \(\ell \) is defined (2.19) on the K-fold product of \(SO(3)\). The space of special orthogonal tensors \(SO(3)\) forms a non-linear subset of the space of second-order tensors. In particular, a simple explicit Euler discretization of gradient descent does not work, as the next trial point does not necessarily lead to vector whose components satisfy the constraints of \(SO(3)\) [67, 68]. This is illustrated in Fig. 1(a). On a curved space with Riemannian metric, the natural extension of straight lines are so-called geodesics, which emanate from a point in a specific (tangent) direction by parallel translation. On a (compact, matrix) Lie group with its natural Riemannian metric (the Killing form), following the geodesics may be computed in terms of the matrix exponential. In case of \(SO(3)\), this reduces to Rodrigues’ formula

$$\begin{aligned} \text {exp}\left( J(\omega )\right) = Id + \frac{\text {sin}(\theta )}{\theta }J(\omega ) + \frac{1-\text {cos}(\theta )}{\theta ^2}J^2(\omega ),\nonumber \\ \end{aligned}$$

describing a rotation around an axis u by an angle \(\theta \) and where we set \(\omega = \theta \, u\) as well as

$$\begin{aligned} J(\omega ) = \left( \begin{array}{ccc} 0 &{} -\omega _3 &{} \omega _2\\ \omega _3 &{} 0 &{} -\omega _1\\ -\omega _2 &{} \omega _1 &{} 0\\ \end{array} \right) . \end{aligned}$$

The gradient descent scheme, with a fixed step size \(t>0\), works as follows. Suppose the i-th iterate \(Q_{G}^i=(Q_{1}^i,\ldots ,Q_{K}^i)\) is given (\(i=0,1,\ldots \)). Then, we investigate the function

$$\begin{aligned} \ell _i(\omega ) = \ell (Q_{1}^i \text {exp}\left( J(\omega _1)\right) ,\ldots ,Q_{K}^i \text {exp}\left( J(\omega _K)\right) ), \end{aligned}$$

where \(\omega \equiv (\omega _1,\ldots ,\omega _K) \in \mathbb {R}^{3K}\). Computing \(\nabla \ell _i(0) \in \mathbb {R}^{3K}\) by the chain rule, gradient descent proceeds via

$$\begin{aligned} Q^{i+1}_G= & {} \left( Q_{1}^i \text {exp}\left( J(-t\,[\nabla \ell _i(0)]_1)\right) ,\ldots ,\right. \nonumber \\&\left. Q_{K}^i \text {exp}\left( J(-t\,[\nabla \ell _i(0)]_K)\right) \right) \end{aligned}$$

3 Computational investigations

3.1 Setup

In the following sections, we wish to provide insights into the performance of the proposed TOP method. As a first step, we consider linear elastic material behavior, i.e., we investigate the effective stiffness. Secondly, we study cyclic stress-strain hystereses.

To create the morphology of the microstructures under investigation, we use the algorithm described in Kuhn et al. [20] to generate digital polycrystalline microstructures with prescribed volume fractions. For the morphology we consider two cases, a unique and log-normal grain size distribution (GSD). The former means that all grains have the same volume, i.e., \(V_g=\nicefrac {1}{G}\), where G denotes the total number of grains in the volume element. Restricting to a unique grain size permits us to study the influence of the individual grain orientations exclusively. Due to their frequent occurrence in experiments [69], we also investigate microstructures with an equivalent diameter following a log-normal grain size distribution with mean equal to unity and a standard deviation of 0.15, see Kuhn et al. [20].

Table 1 Parameters used for the crystal plasticity model [73, 74]
Fig. 2
figure 2

Furnishing a grain microstructure with 128 grains of identical volume with orientations sampled by three different methods. The colors correspond to the inverse-pole-figure color key in 010 direction [85]

For a fixed morphology, we furnish the grains with orientations, where we investigate three different CODFs, namely a uniform, one with a slight texture and one with an increased texture. For the former, we compare the accuracy of TOP and the algorithm proposed by Quey et al. [18, 34], integrated into the polycrystal generation software Neper. In addition, we include a random orientation sampling (realized using the scipy implementation for sampling the Haar distribution [70]) as a benchmark. For the textured CODFs, we compare the TOP method to random sampling from discrete orientation measurements, which is a common practice [71, 72]. For the textured CODFs and a log-normal GSD, we additionally consider the Texture Discretization Technique (TDT) algorithm proposed by Melchior and Delannay [27], which, in a first step, samples orientations using the method proposed by Tóth and Van Houtte [26]. In a subsequent clustering step, a binary look-up table is computed by evaluating the misorientation of each pair of sampled orientations. If this misorientation is below a chosen threshold value, the corresponding entry in the look-up table is set to 1 otherwise to 0. To assign orientations to grains, each grain is associated with a number of so-called elementary volumes according to their size, which is used to find orientations in the look-up table with at least this number of orientations having low misorientation. The corresponding crystallographic grain orientation is then the average of orientations with low misorientation to each other. The parameters, i.e., the number of elementary volumes per grain and the threshold value for the misorientation, have to be chosen judiciously. The TOP method is implemented in Python with Cython extension following the optimization procedure outlined in Sec. 2.3. Unless otherwise specified, we use a tolerance of \(\text {tol}=10^{-{8}}\) to solve the optimization problem and consider texture coefficients up to rank six.

The material model described in Sec. 2.1 is implemented in a user-material-subroutine (UMAT). The coefficients of the elastic stiffness tensor are taken from the literature [73, 74], whereas the critical resolved shear stress, assumed to be identical for all slip systems, and the parameters of the kinematic hardening model were fitted to experimental stress-strain hystereses of the steel C45 using Bayesian optimization [51]. The complete set of used model parameters is summarized in Table 1.

To efficiently compute the effective stiffness as well as the macroscopic stress-strain hystereses, we use the FFT-based solver FeelMath [75,76,77]. For the stiffness computations we rely on the conjugate gradient method [78, 79], whereas for the non-linear problem we use a Newton-CG method [80, 81]. For both problems we use the Moulinec-Suquet discretization [82, 83]. For a perspective of solution schemes and discretizations, we refer to the recent review article by Schneider [84]. By default, we carry out the computations on periodic microstructures, discretized by \(64^3\) voxels. Please note that we apply periodic boundary conditions to compute the stiffness and hystereses.

3.2 Linear elastic stiffness

In this section, we study the effect of different orientation-sampling techniques on the effective stiffness of polycrystalline microstructures. In order to minimize the influence of the underlying microstructure morphology, we use a fixed grain microstructure for each realization and all orientation sampling methods. This is illustrated in Fig. 2, where we show the results of different sampling techniques for a fixed grain structure with grains of identical volume.

Fig. 3
figure 3

Isotropy and total error for effective stiffnesses computed from microstructures with uniform orientations and unique grain size distribution

3.2.1 Uniform CODF

We start with the case of a unique grain-size and a uniform orientation distribution, corresponding to mechanically isotropic behavior [86,87,88]. For the results to be representative, it is necessary to determine the number of grains which ensure an isotropic effective material response, see for example Kanit et al. [15] and Yang et al. [17]. In this spirit, we investigate microstructures with an increasing number of grains and study their effective stiffness.

As discussed in Sec. 2.2, for a uniform CODF, all texture coefficients vanish, i.e.,

$$\begin{aligned} \bar{\mathbb {V}}'_{\langle \beta \rangle =} 0 \end{aligned}$$

holds for all considered texture coefficients. To quantify the anisotropy of the stiffness tensor we compare to the best approximation by an isotropic tensor (see Eq. (3.5)), i.e., we project the computed stiffness tensor onto the space of isotropic tensors of fourth order. For a detailed discussion see the work by Federov [89] and Arts [90]. We compute the mean stiffness

$$\begin{aligned} \overline{\mathbb {C}}_G = \frac{1}{N} \sum _{n=1}^{N} \mathbb {C}_{G,n} \end{aligned}$$

of \(N=10\) realizations and extract the Lamé constants via

$$\begin{aligned} \mu ^{\text {app}}&= \frac{1}{3} \left( \bar{C}_{G,44} + \bar{C}_{G,55} + \bar{C}_{G,66} \right) \end{aligned}$$
$$\begin{aligned} \lambda ^{\text {app}}&= \frac{1}{6} \left( \bar{C}_{G,12} + \bar{C}_{G,13} + \bar{C}_{G,23}\right. \nonumber \\&\left. \quad + \bar{C}_{G,21} + \bar{C}_{G,31} + \bar{C}_{G,32} \right) , \end{aligned}$$

where \(\bar{C}_{G, ij}\) denotes the ij-th entry of the stiffness tensor in Voigt notation [91].

Using the best isotropic approximation \(\mathbb {C}^\text {iso}\left( \mu ^{\text {app}}, \lambda ^{\text {app}}\right) \) based on the extracted Lamé constants, we introduce the isotropy error \(\delta ^\text {iso}\) via

$$\begin{aligned} \delta ^\text {iso}\left( \mathbb {C}_{G,1}, \ldots , \mathbb {C}_{G,N} \right) = \frac{\left\| \mathbb {C}^\text {iso}\left( \mu ^{\text {app}}, \lambda ^{\text {app}}\right) - \overline{\mathbb {C}}_G\right\| }{\left\| \overline{\mathbb {C}}_G\right\| }, \end{aligned}$$

measuring the degree of anisotropy present in the computed stiffness.

Fig. 4
figure 4

One realization of microstructures with \(10\,000\) and 1024 grains with TOP based orientations. The color corresponds to the ipf color key in 100 direction

Table 2 Mean and \(95\%\) confidence intervals in GPa for the stiffness in Voigt’snotation computed by averaging ten realizations of microstructures with \(10\,000\) grains and uniformly distributed TOP orientations

For an increasing number of grains \(G \in \{32,64,96,128,256,384,512,768,1024,1536\}\), we show the resulting isotropy error for the three different orientation sampling methods in Fig. 3(a). We observe a decreasing isotropy error for all methods with an increasing number of considered grains. All methods decrease the isotropy error at a similar rate. However, they differ in the initial error level. For instance, all sampling techniques reach a low isotropy error for 1536 grains, namely \(0.251\%\), \(0.041\%\) and \(0.027\%\) for random sampling, the Neper and TOP method, respectively. To reach a mean error below \(1\%\), the microstructure has to consist of more than 64 grains if the orientations are sampled randomly or generated by Neper. For all investigated grain counts, the TOP method produces the lowest isotropy error. Neper starts with a substantially higher error (by roughly one order of magnitude) at low grain counts and reaches a similar performance to TOP for more than 300 grains. For the naive random sampling, the isotropy error has a quite large offset to the more involved algorithms. In addition to evaluating the degree of isotropy, we investigate the deviation from the effective, infinite-volume stiffness. As our ground truth, we consider the mean of ten apparent stiffnesses, each computed using volume elements consisting of \(10\,000\) grains and discretized by \(128^3\) voxels (see Fig. 4a). The orientations are sampled using the TOP method. The mean stiffness and the \(95\%\) confidence intervals, computed via Student’s t-distribution [92], are given in Table 2. The isotropy error of the mean stiffness is \(\delta ^\text {iso}=0.012\%\). We define the total error \(\delta ^\text {tot}\) as the mean relative error between the stiffness of each realization and the one given in Table 2, i.e.,

$$\begin{aligned} \delta ^\text {tot} = \frac{1}{N} \sum _{n=1}^{N}\frac{\left\| \mathbb {C} - \mathbb {C}_{G,n}\right\| }{\left\| \mathbb {C}\right\| }. \end{aligned}$$

For the total error, shown in Fig. 3(b), we make similar observations as for the isotropy error. All of the methods decrease the total error at a similar rate, but differ initially. For the case of orientations generated by Neper, the error for 32 grains is \(\delta ^\text {tot}=1.17\%\) and therefore roughly twice as large compared to the TOP method with \(\delta ^\text {tot}=0.521\%\). To reach a similar error with randomly sampled orientations about 768 grains have to be considered. Random sampling leads to a mean error of \(0.677\%\) for 1536 grains. The errors produced by the Neper and TOP method are similar to each other with \(0.073\%\) and \(0.078\%\), respectively.

To understand the similar rates of error decrease more thoroughly, it is helpful to decompose the total error \(\delta ^\text {tot}\) into two contributions [15]. The first part is the random error and quantifies the inaccuracy associated with working on a reduced representation of the ground truth. The second contribution quantifies artificial long-range correlations introduced by working on periodic microstructures [15, 16]. We attribute the visible offset in Figs. 3 and 6 to the random error, as we use the same geometric representations for each orientation sampling method. Thus, a smaller random error is achieved by the TOP method and further reduction of the total error \(\delta ^\text {tot}\) is attributed to increasing the cell-size, i.e., increasing the number of grains.

Fig. 5
figure 5

Polycrystalline microstructure realizations with 128 grains following a log-normal grain size distribution and orientations generated by three different methods. The colors correspond to the ipf color key in 010 direction

Fig. 6
figure 6

Isotropy and total error for the effective stiffnesses computed from microstructures with uniform orientations and log-normal grain size distribution

Fig. 7
figure 7

Comparison of the \(\delta ^\text {tot}\) and \(\delta ^\text {iso}\) for the stiffness computed for 1024 grains with TOP orientations and different considered texture coefficients plotted on a finely resolved y-axis

Up to this point, our investigations were based on a polycrystal with a unique GSD, i.e., a unique grain size. However, to account for the influence of the grain size on the mechanical response, it may often be necessary, and therefore desirable, to match more realistic grain size distributions when generating synthetic polycrystalline microstructures. Thus, we turn to polycrystals with a log-normal GSD, as typically observed in real-world samples [69], with a mean equivalent diameter equal to unity and a standard deviation of 0.15. Figure 5 shows an example of a microstructure consisting of 128 grains, equipped with orientations from the three different sampling techniques. The isotropy as well as the total error for different sampling methods are shown in Fig. 6. For the log-normal GSD, we register a notable decrease in accuracy for the Neper sampling method compared to the unique grain size. Considering the case of 32 grains, the isotropy error and total error increase from \(1.22\%\) and \(1.17\%\) to \(1.62\%\) and \(2.19\%\), respectively. This loss of accuracy persists, even for larger grain counts, e.g., for 1536 grains the total error for the unique and log-normal GSD are \(0.07\%\) and \(0.37\%\), respectively. For randomly sampling the Haar distribution, the influence of a log-normal grain size distribution is smaller. For instance the biggest difference in the isotropy error is \(1.23\%\) and \(1.60\%\) for the unique and log-normal GSD and 32 grains, respectively. The proposed TOP method takes the volume fraction of each grain into account in an explicit way when optimizing the orientations. This results in strikingly similar error levels for both the unique and the log-normal case. Whereas the total error values realized by microstructures with 32 grains differ slightly for the unique and log-normal case, the resulting isotropy error is \(\delta ^\text {iso}=0.16\%\) for both GSDs. We investigate the influence of

Fig. 8
figure 8

Pole figures of the (generated) textured CODF [93]

Table 3 Mean and \(95\%\) confidence intervals in GPa for the stiffness in Voigt notation computed by averaging ten realizations of microstructures with 10 000 grains and TOP orientations for a synthetic CODF

the maximum rank of the texture coefficients considered in our optimization scheme in the case of a uniform orientation distribution. For this purpose, we consider the case of ten microstructures consisting of 1024 grains, see Fig. 4(b) for an example of one realization. We study two different cases: Using solely the texture coefficient of rank four to optimize the orientations and considering the coefficients of rank four and six. For these two cases, the isotropy and total error are shown in Fig. 7 for different values of the tolerance \(\text {tol}\) used in the optimization procedure. Both errors show a decrease up to a value of \(\text {tol}=10^{-6}\), after which the resulting errors do not change. Interestingly, considering only the texture coefficient of rank 4 appears to be beneficial. As all total errors are below \(0.1\%\) and all isotropy errors even below \(0.03\%\), using texture coefficients of rank four and solving the problem up to a tolerance of \(\text {tol}=10^{-6}\) is sufficient for the case of a uniform orientation distribution when considering 1024 grains and solely the macroscopic stiffness is of interest.

Fig. 9
figure 9

Total error \(\delta ^\text {tot}\) of the effective stiffness computed for microstructures with a unique and log-normal grain size distribution and a synthetic CODF

3.2.2 Textured CODF

To further investigate the capabilities of the TOP method, we turn to a non-uniform CODF, i.e., a textured polycrystal. The prescribed CODF was generated by MTex [38], taken from the MTex documentation [93], see Fig. 8 for the corresponding pole figures. As MTex allows the sampling of CODFs, we draw \(50\,000\) samples at random for computing the texture coefficients, assuming the same weight for each sample.

As a ground truth we define the mean stiffness of ten realizations, each with \(10\,000\) grains. The resulting stiffness for TOP orientations is given, with its respective \(95\%\) confidence intervals, in Table 3. The isotropy error of this stiffness computes to \(\delta ^\text {iso}=5.54\%\), i.e., a slight anisotropy appears. For this texture, we investigate the approximation quality of the stiffness for a varying number of grains, each with identical volume. The total error for randomly sampling from the generated orientations and using texture coefficients is shown in Fig. 9(a). Randomly sampling the generated orientations gives a total error of \(\delta ^\text {tot}=4.47\%\) for 32 grains and reaches an error below \(1\%\) for 936 orientations. The mean total error achieved by the TOP method of \(\delta ^\text {tot} = 0.51\%\) for 32 grains actually lies below the error value achieved by randomly sampling 1536 orientations. For the latter number of grains, TOP achieves an error \(\delta ^\text {tot}=0.07\%\). This difference is attributed to the notable offset between the random sampling and TOP method, as both decrease \(\delta ^\text {tot}\) with the same rate.

Fig. 10
figure 10

Pole figures of the (generated) CODF with increased texture [93]

Let us consider the case of a log-normal grain size distribution. For the TDT algorithm we assign eight elementary volumes to the smallest grain and increase the number of elementary volumes for each grain according to its size. We set the threshold misorientation value to \(5^{\circ }\). In Fig. 9(b), we provide the total error \(\delta ^\text {tot}\) for ten realizations with a varying number of grains. For the case of randomly sampling from given orientations, we observe a slight increase in the error value induced by the underlying log-normal grain size distribution. For instance, for a microstructures with 32 grains, the mean error is \(\delta ^\text {tot}=3.12\%\) and \(\delta ^\text {tot}=3.74\%\) for the unique and log-normal GSD, respectively. This effect decreases when a larger number of grains is considered, as the effect of a single, large grain with specific orientation on the overall response decreases. In contrast, the TOP method is not adversely affected. Indeed, during optimization, the volume fraction is explicitly taken into account when computing the texture coefficients, see equation (2.18). Using the TDT algorithm results in a lower total error than random sampling for all grain numbers considered. For instance, for a 64-grain microstructure, the total error is \(\delta ^\text {tot}=3.75\%\) and \(\delta ^\text {tot}=2.77\%\) for random sampling and the TDT, respectively. For both algorithms the error decreases with a similar rate as for the proposed TOP algorithm, whereas they both result in higher total errors than using TOP.

Table 4 Mean and \(95\%\) confidence intervals in GPa for the stiffness in Voigt notation computed by averaging ten realizations of microstructures with 10 000 grains and TOP orientations for the synthetic CODF with increased texture
Fig. 11
figure 11

Total error \(\delta ^\text {tot}\) of the effective stiffness computed for microstructures with a unique and log-normal grain size distribution and a highly textured CODF

3.2.3 Highly textured CODF

In practical applications, e.g., cold rolled steel, the intensities in the pole figure may reach values as high as ten. To investigate this scenario, we next consider a case with an increased texture in the CODF. We rely on synthetically generating a CODF using MTex [38] and show the resulting pole figures in Fig. 10.

For the ground truth we proceed in the same way as for the slightly textured CODF, using ten microstructures with \(10\,000\) grains of equal volume, equipped with orientations from the TOP method to compute the mean stiffness. For this case, the mean and the \(95\%\) confidence intervals are given in Table 4. The isotropy error is \(\delta ^\text {iso}=18.78\%\) which is more than three times the error of the slightly textured case, i.e., \(\delta ^\text {iso}=5.54\%\).

First, we investigate the case of a unique grain size distribution and show the resulting total error in Fig. 11(a). For TOP and random sampling, the error decreases with a similar rate, which is consistent with our observations in the slightly textured case. For TOP as well as for random sampling the total error is slightly lower than for the previously investigated CODF, e.g., for 32 grains the total error is \(\delta ^\text {tot}=3.62\%\) and \(\delta ^\text {tot}=0.40\%\) for random sampling and TOP, respectively. This holds for higher grain numbers as well. Indeed, for 1536-grain microstructures, randomly sampling orientation data leads to a total error of \(\delta ^\text {tot}=0.53\%\), whereas using orientations generated by TOP results in an error of \(\delta ^\text {tot}=0.06\%\). However, the relative difference between the total errors for the two CODFs is lower for random sampling than for TOP.

For the case of a log-normal GSD, compared to microstructures with grains of equal volume, the total error increases for both methods. For microstructures with 64 grains equipped with orientations randomly sampled from experimental data, the total error is \(\delta ^\text {tot}=2.82\%\) and \(\delta ^\text {tot}=3.11\%\) for a uniform and log-normal GSD, respectively. This observation holds for the TOP method as well, e.g., using 64 grains leads to an error increase from \(\delta ^\text {tot}=0.40\%\) for a unique GSD to \(\delta ^\text {tot}=0.45\%\) if the grain sizes follow a log-normal distribution. For the TDT algorithm and a grain count below 768, we set the number of elementary volumes for the smallest grain to eight. To account for the increased grain count, we increase the number of elementary volumes to twelve for 1024 and 1536 grains in the microstructure, whereas we retain the threshold of \(5^{\circ }\) for the misorientation computations. For our choice of parameters and grain numbers up to 256, we observe that the resulting error is close to random sampling. For instance, the total error obtained using a 256-grain microstructure is \(\delta ^\text {tot}=0.94\%\) and \(\delta ^\text {tot}=1.37\%\) for orientations from random sampling and the TDT algorithm, respectively. When increasing the grain count, there seems to be a limiting accuracy that the TDT algorithm can reach. Indeed, the total error does not decrease below \(1\%\). The source of this phenomenon needs to be investigated more thoroughly, and is beyond the scope of this work.

3.3 Cyclic stress-strain hystereses

We expand our investigation into the elasto-plastic regime, focusing on the effect of the orientation sampling method on the cyclic stress-strain hystereses of the material. As boundary condition, we use a macroscopic strain which follows a triangular path with an amplitude of \(\varepsilon _a=0.7\%\) and a cycle time of four seconds. To ensure a stabilized cyclic stress-strain hystereses, we compute two cycles in total and use the last one as our quantity of interest [74].

Because of the increased computational cost, we restrict the investigations to grain counts

$$\begin{aligned} G \in \{32,64,128,256,512,1024\} \end{aligned}$$

and use five realizations per number of grains, i.e., \(N=5\). We use the material parameters specified in Table 1.

Fig. 12
figure 12

Hysteresis isotropy error, equation (3.8) for a varying number of grains G

3.3.1 Uniform CODF

For the uniformly distributed orientations, we asses the isotropy of the results. For this purpose, and a single realization, we compute three load cases to obtain the cyclic stress-strain hystereses in three different directions, i.e., XX-, YY- and ZZ-direction. For a perfectly isotropic response, the stress values would coincide for every considered direction. Thus, to measure the deviation from this isotropic result, we use the average stress values

$$\begin{aligned} \bar{\sigma }_s = \frac{1}{3}(\sigma _{XX,s} + \sigma _{YY,s} + \sigma _{ZZ,s}) \end{aligned}$$

of all directions at each time step s as our reference. Then, for each realization n, we compute the sum of the squared relative differences between the stresses in every direction and the mean of all directions weighted by the number of stress values S, i.e.,

$$\begin{aligned} \delta ^\text {hys,iso}_n = \sqrt{ \frac{1}{S}\sum _{s=1}^{S} \left( \frac{\sigma _{XX,s}}{\bar{\sigma }_s} - 1\right) ^2 + \left( \frac{\sigma _{YY,s}}{\bar{\sigma }_s} - 1\right) ^2 + \left( \frac{\sigma _{ZZ,s}}{\bar{\sigma }_s} - 1\right) ^2}. \end{aligned}$$

Eq. (3.8) measures the mean relative deviation in all directions from the mean stress value (3.7). The quantity \(\delta ^\text {hys,iso}\) extends the isotropy error defined for the stiffness, see equation (3.5), where the ideal isotropic case corresponds to the mean stress values in all directions. We compute the mean error of all realizations \(N=5\) by

$$\begin{aligned} \delta ^\text {hys,iso} = \frac{1}{N} \sum _{n=1}^N \delta ^\text {hys,iso}_n \end{aligned}$$

to get confidence in our results. We use the microstructures from Sec. 3.2 with orientations prescribed by Neper, TOP and random sampling.

Fig. 13
figure 13

Comparison of mean macroscopic stress-strain hystereses in different loading directions computed using five microstructures with \(10\,000\) grains and uniformly distributed TOP orientations

Fig. 14
figure 14

Hysteresis total error, equation (3.12) for a varying number of grains G with uniform CODF and unique GSD

For an increasing number of grains, we show the error \(\delta ^\text {hys,iso}\) in Fig. 12(a). Neper and TOP behave similar to each other, both lying below the error values achieved by random sampling. For example, the mean errors obtained from microstructures with 32 grains are \(\delta ^\text {hys,iso}=5.63\%\), \(\delta ^\text {hys,iso}=5.97\%\) and \(\delta ^\text {hys,iso}=1.10\%\) for random sampling, Neper and TOP, respectively. For an increasing number of grains in the microstructure and randomly sampled orientations, the error decreases more slowly than for the other methods. Also, random sampling results in the highest mean error value of \(\delta ^\text {hys,iso}=4.49\%\) for 1024 grains. We observe a steeper decrease in \(\delta ^\text {hys,iso}\) for an increasing number of grains for Neper and TOP, both lying close to each other. For example, microstructures with 64 grains produce an error of \(\delta ^\text {hys,iso}=1.19\%\) and \(\delta ^\text {hys,iso}=1.40\%\) for TOP and Neper orientations, respectively. For 1024 grains, the error levels are \(\delta ^\text {hys,iso}=0.27\%\) and \(\delta ^\text {hys,iso}=0.16\%\) for Neper and TOP orientations, respectively.

In Sect. 3.2, Fig. 7(a), we observed that taking a higher texture coefficient than rank four into account does not increase the degree of isotropy of the effective stiffness matrix significantly. Facing non-linear plastic behavior, we revisit the influence of higher order coefficients onto the macroscopic mechanical response. In Fig. 12(b), we show the isotropy error \(\delta ^\text {hys,iso}\) for different texture ranks and a varying number of grains. The curves show similar behavior for a small number of grains (up to about 256), with a comparable error of \(\delta ^\text {iso,hys}=1.69\%\) when considering solely rank four texture coefficients and \(\delta ^\text {iso,hys}=1.10\%\) when additionally optimizing rank six texture coefficients and using 32 grains. The difference becomes more pronounced for a larger number of grains, as the error obtained by optimizing the fourth rank coefficients is \(\delta ^\text {iso,hys}=0.36\%\), whereas accounting for the tensor of rank 6 reduces the error to \(\delta ^\text {iso,hys}=0.18\%\) for 512 grains. Following the procedure in Sec. 3.2, in addition to investigating the degree of isotropy, we would like to assess the ability to reproduce the effective mechanical response with a minimum number of grains. In the case of non-linear mechanical behavior, we define our ground truth as the stress-strain hystereses computed for five realizations of a microstructure with \(10\,000\) grains, discretized by \(128^3\) voxels. From these five realizations, we compute the mean stress-strain curve as

$$\begin{aligned} \hat{\sigma }_{r,s} = \frac{1}{N}\sum _{n=1}^{N} \sigma _{r,s,n}, \end{aligned}$$

where \(\sigma _{r,s,n}\) denotes the macroscopic stress value in direction r at a given time step s and N refers to the number of realizations, i.e., \(N=5\). For the considered loading directions, the resulting stress-strain hystereses are shown in Fig. 13. We observe that the individual curves lie on top of each other, i.e., there is no anisotropy present. For each number of grains G and each realization, we compute the root of the mean squared relative error in each direction as

$$\begin{aligned} \delta ^\text {hys,gt}_{n,r} = \sqrt{ \frac{1}{S} \sum _{s=1}^S \left( \frac{\sigma _{s,r,n}}{\hat{\sigma }_{s,r}} - 1\right) ^2}, \end{aligned}$$
Fig. 15
figure 15

Comparison of \(\delta ^\text {hys,gt}\) and \(\delta ^\text {hys,iso}\) for varying number of grains G with uniform CODF and log-normal GSD

where r refers to the loading direction, i.e., \(r \in \{XX,YY,ZZ\}\) in our case. Then, we compute the mean error over all considered directions

$$\begin{aligned} \delta ^\text {hys,gt} = \frac{1}{N} \sum _{n=1}^N \frac{1}{R} \sum _{r=1}^R \delta ^\text {hys,gt}_{n,r}, \end{aligned}$$

where R denotes the number of considered directions, i.e., \(R=3\) in this case. Comparing \(\delta ^\text {hys,gt}\) for different orientation sampling methods in Fig. 14, we observe similar trends as for the isotropy error \(\delta ^\text {hys,iso}\). For all methods, the error decreases with an increasing number of grains in the microstructure. For a small number of grains, the error resulting from TOP orientations is smallest with \(\delta ^\text {hys,gt}=1.80\%\) and \(\delta ^\text {hys,gt}=0.78\%\) for 32 and 256 grains, respectively. The error from using Neper orientations is higher, with \(\delta ^\text {hys,gt}=3.93\%\) and \(\delta ^\text {hys,gt}=0.82\%\). Randomly sampling the Haar distribution results in an error of \(9.00\%\) and \(2.15\%\) for the same number of grains. The error for all three methods and 1024 grains are \(0.43\%\), \(0.44\%\) and \(1.18\%\) for TOP, Neper and random orientations, respectively.

Fig. 16
figure 16

Comparison of mean macroscopic stress-strain hystereses in different directions computed for a microstructure with \(10\,000\) grains and a slightly textured CODF

Fig. 17
figure 17

\(\delta ^\text {hys,gt}\) for varying number of grains G with a slightly textured CODF

The error \(\delta ^\text {hys,gt}\) for taking only the texture coefficient of rank four into account, is shown in Fig. 14(b) together with the previously discussed results for considering texture coefficients with rank four and six. We observe that the error when accounting solely for rank four texture coefficients is higher than the error produced when considering higher ranks. The difference is less pronounced than for \(\delta ^\text {hys,iso}\). To extend our studies to a non-unique grain size distribution, we use microstructures with a log-normal grain size distribution. We fix the mean and standard deviation to \(\text {mean}=1\) and \(\text {stdev}=0.15\), respectively. To reduce the computational effort and because Neper and TOP provided the most promising results, we only consider orientations generated by Neper and TOP in the following.

Figure 15(a) shows \(\delta ^\text {hys,iso}\) for an increasing number of grains G. For every number of grains, the TOP methods provides a smaller error compared to Neper. For instance, using 32 grains, the error for TOP and Neper is \(\delta ^\text {hys,iso}=3.72\%\) and \(\delta ^\text {hys,iso}=12.02\%\), respectively. The influence of the underlying GSD manifests. Indeed, for both cases, the values are larger than for the unique grain size distribution.

Similar to the uniform GSD, the hystereses error closely follows the trend observed fo the isotropy error, see Fig. 15(b).

3.3.2 Textured CODF

For the case with mild anisotropy, we consider the synthetic CODF described in Sec. 3.2. We compute the stress-strain hystereses using five microstructures consisting of \(10\,000\) grains discretized by \(128^3\) voxels, see Fig. 4(a). In accordance with the case of a uniform orientation distribution, we use the mean stress values of these five realizations as our ground truth. The resulting stress-strain hystereses are shown in Fig. 16 for all three considered loading directions. We observe a slight anisotropy in YY-direction, whereas the stress-strain curves in XX- and ZZ-direction coincide. We show the total error to the mean stress values, i.e., Eq. (3.12), in Fig. 17(a) for the TOP method as well as for randomly sampling from given orientations.

Using random orientation sampling produces a larger error for all grain numbers considered. Especially for a small number of grains, the TOP method results in a visibly smaller error than for random sampling the experimental data. For 32 grains, the hysteresis total error \(\delta ^\text {hys, tot}\) is \(3.60\%\) and \(1.28\%\) for random sampling and TOP, respectively. For random sampling, the error reduces to \(0.76\%\) for 1024 grains, which is close to the value achieved by TOP, with \(\delta ^\text {hys,gt}=0.52\%\). We observe similar behavior for the case of a log-normal grain size distribution with \(\text {mean}=1\) and \(\text {stdev}=0.15\) in Fig. 17(b). The error for 32 grains increases for both kinds of orientation sampling methods, namely to \(3.84\%\) and \(1.41\%\) for random and TOP sampling, respectively. For both the unique and log-normal case, similar errors of \(0.85\%\) and \(0.44\%\) are achieved for randomly sampling experimental orientations and using 1024 grains. Interestingly, the error for a log-normal GSD is actually smaller than for the unique GSD. For instance using the TOP method and 512 grains, we observe an error of \(\delta ^\text {hys,gt}=0.66\%\) and \(\delta ^\text {hys,gt}=0.49\%\) for the unique and log-normal distributions, respectively.

For the TDT algorithm, we observe a lower error than for random sampling when an intermediate number of grains is considered, i.e., for grain counts of 64, 128 and 256. For instance, the error for a microstructure consisting of 64 grains equipped with orientations of the TDT algorithm is \(\delta ^\text {hys,gt}=2.23\%\) and \(\delta ^\text {hys,gt}=2.22\%\) for 128 grains. With 64 and 128 grains, the random sampling leads to an error of \(\delta ^\text {hys,gt}=3.84\%\) and \(\delta ^\text {hys,gt}=2.80\%\), respectively. For a larger number of grains, above 256, the error computed for the TDT algorithm exceeds the error of the randomly sampled orientations from given data. For 1024 grains, the error for random sampling is \(\delta ^\text {hys,gt}=0.85\%\) and \(\delta ^\text {hys,gt}=1.00\%\) for the TDT algorithm. All of the observed error values are above the errors obtained by TOP, e.g., using 32 grains, the error for the TOP method is \(\delta ^\text {hys,gt}=1.42\%\) whereas the TDT algorithm and random sampling lead to an error of \(\delta ^\text {hys,gt}=4.37\%\) and \(\delta ^\text {hys,gt}=3.84\%\), respectively.

3.3.3 Highly textured CODF

Last but not least, we consider the GSD outlined in Sec. 3.2 with an increased degree of anisotropy. Similar to the case of a slight anisotropy, we compute the stress-strain hystereses for five microstructures consisting of \(10\,000\) grains and a discretization of \(128^3\) voxels. As our ground truth we use the mean stress of these five realizations.

Fig. 18
figure 18

\(\delta ^\text {hys,gt}\) for a varying number of grains G with a highly textured CODF

For microstructures with grains having a unique grain size distribution and orientations from TOP or randomly sampling experimental data, we show the total error in Fig. 18(a). We observe that, for all grain counts considered, using the TOP method results in lower error values compared to randomly sampling from given orientation data. For instance, using microstructures with 32 grains leads to a total error of \(\delta ^\text {hys,gt}=7.54\%\) and \(\delta ^\text {hys,gt}=17.44\%\) for TOP and random sampling, respectively. Thus, we observe an increase in the total error in comparison to the slightly textured CODF for both sampling methods and all microstructures. Indeed, for a 1024-grain microstructure equipped with orientations from TOP, the error increases from \(\delta ^\text {hys,gt}=1.42\%\) for the slightly textured case to \(\delta ^\text {hys,gt}=5.24\%\) for the case of higher texture. This observation holds for randomly selecting orientations from given orientation data, e.g., for a microstructure consisting of 256 grains the error for the highly textured CODF is \(\delta ^\text {hys,gt}=10.1\%\) whereas it is \(\delta ^\text {hys,gt}=1.82\%\) for the slightly textured case.

Figure 18(b) shows the total error for the case of a log-normal GSD equipped with orientations from TOP, TDT and random sampling. We make similar observations to the slightly textured CODF, i.e., an increase in the total error compared to the results for the unique GSD. For instance, a 64-grain microstructure with TOP orientations leads to an increase in the total error from \(\delta ^\text {hys,gt}=5.36\%\) for a unique GSD to \(\delta ^\text {hys,gt}=9.62\%\) for a log-normal GSD. Comparing the same microstructures equipped with orientations from randomly sampled orientation data, the error increases from \(\delta ^\text {hys,gt}=13.2\%\) to \(\delta ^\text {hys,gt}=16.3\%\) for a unique and a log-normal GSD, respectively. For lower grain counts, i.e., below 256, using the TDT algorithm results in similar error values as randomly sampling orientation data. An exception is the 32-grain microstructure, for which the total error value \(\delta ^\text {hys,gt}=11.7\%\) is close to the value obtained using TOP, i.e., \(\delta ^\text {hys,gt}=8.02\%\). For higher grain counts, i.e., above 256, the TDT algorithm does not decrease the total error but instead we observe an increase in the error values obtained, in line with observations made investigating the performance for the linear elastic properties in Sec. 3.

4 Conclusion

In this work, we proposed to use the coefficients of a tensorial Fourier expansion of the crystallite orientation distribution function [40] to equip digital polycrystalline microstructures with crystallographic orientations for micromechanical simulations. Our proposed method is based on minimizing the difference between the current and the prescribed tensorial Fourier, or texture, coefficients and uses a gradient descent scheme on the Lie group \(SO(3)\).

We compared the proposed texture optimization for prescribing orientations (TOP) method to different state-of-the-art methods, e.g., implemented in the sophisticated microstructure generation tool Neper [34]. In a first step, we investigated the homogenized stiffnesses of polycrystals for the case of a uniform and two textured crystallite orientation distribution functions (CODF). Subsequently, we extended our studies to the non-linear case, where we investigated the macroscopic cyclic stress-strain hystereses of the microstructures. For both, the linear elastic and the non-linear plastic case, we considered a unique as well as a log-normal grain size distribution (GSD). By introducing suitable error measures we investigated and compared the performance of the proposed method.

In the isotropic, linear elastic case, TOP provided better results compared to the Neper method and random sampling of orientations. Using TOP, an isotropic effective stiffness could already be achieved for small grain numbers. Owing to the fact that the volume fraction of each individual grain is explicitly accounted for, the advantage becomes more pronounced when dealing with microstructures having a log-normal grain size distribution. Additionally, with TOP it is possible to reproduce the linear-elastic behavior of polycrystals with a unique GSD and a textured CODF more accurately and efficiently than via a random sampling from experimental orientation data. This holds as well for the case of a log-normal grain size distribution. Comparing to the Texture Discretization Technique (TDT) algorithm proposed by Melchior and Delannay [27], which also considers grain size during orientation assignment, the TOP method performed better for both CODFs considered. Our intensive numerical studies revealed that the performance of the TDT algorithm, in our setting, critically depends on the choice of parameters, i.e., the misorientation value and the number of elementary volumes per grain.

For the non-linear plastic behavior, the results of the Neper method were very similar to the ones provided by TOP, showing the capabilities of the dedicated algorithm. Although the effect was less pronounced than for the case of linear-elastic behavior, we observed that a underlying log-normal GSD results in a decreased performance for the Neper method. TOP, on the other hand, was able to produce similar results as for the unique GSD. In addition, microstructures with orientations provided by the TOP method allow to accurately compute the effective, non-linear behavior of polycrystals with an underlying texture. For both textured CODFs considered in this work, the defined error measures were lower compared to randomly sampling orientation data. The errors for a log-normal GSD obtained by TOP were below the ones obtained with random sampling or the algorithm of Melchior and Delannay [27], even for a small number of grains. Investigating a highly textured CODF and physically non-linear visco-plastic behavior, we observed higher error values compared to the slightly textured CODF for all algorithms considered. This contrasts with the linear elastic case where we observed a smaller error for the highly textured CODF. However, using orientations generated by the TOP method leads to significantly smaller errors than using the other two algorithms. Concerning the maximum number of texture coefficients which should be taken into consideration, we observed that, for the linear elastic case, a low tolerance and only the texture coefficient of rank four a sufficient. For the non-linear behavior, we observed that accounting for the texture coefficient of rank six is beneficial.

As the computational effort of micromechanical studies is mainly dominated by computing the effective behavior we omitted a comparison of the computational performance of TOP to the other methods.

To conclude, we showed that extracting relevant data from the CODF in terms of tensorial texture coefficients leads to the most flexible and performing method for generating crystallite orientations for digital representations of polycrystalline microstructures. As orientation assignment is typically treated as a post-processing step in microstructure generation, it is possible to couple the proposed algorithm with well-established microstructure generators [21,22,23]. With this modular structure, it is possible to use TOP for generating polycrystalline representations for a variety of applications [94, 95]. As an additional benefit, for generating orientations, the TOP method requires only nine (or 22 variables, depending on the highest texture coefficient rank considered) to be stored, contrasting with methods that rely on the entire experimental database. Because of this low number of parameters, it is possible to fuel data driven methods [96, 97]. Additionally, as experimental data is always afflicted with some degree of measurement uncertainty, investigating the influence of the texture on the overall macroscopic response might be an interesting topic, i.e., via uncertainty quantification [98, 99].