Simplifying FFT-based methods for solid mechanics with automatic differentiation
간접 관련 엔지니어링 플라스틱 · (23) 컴파운드 (10) 아라미드(21) 에폭시수지
기본 정보
- 저자
- DOI
- 10.1016/j.cma.2024.117572
- 저널
- Computer Methods in Applied Mechanics and Engineering
- 발행년도
- 2024
- 발행기관
- Elsevier BV
- 피인용수
- 2
- 라이선스
- cc-by
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.1016/j.cma.2024.117572
- 토픽
- Composite Material Mechanics
- OpenAlex ID
- W4405055331
평가 내용
- 관련도
- 간접 관련
- 사업분야
- 엔지니어링 플라스틱 · (23) 컴파운드
- 부 분야
- (10) 아라미드, (21) 에폭시수지
- R&D 측면
- 분석·모델링
- 확신도
- 0.80
- 근거 용어
- FFT-based methods, solid mechanics, homogenization, automatic differentiation, multiscale mechanics
- 판단 근거
- 이 논문은 고체 역학에서 미시 구조와 거시적 물성 간의 관계를 계산하는 FFT 기반 균질화(homogenization) 기법에 자동 미분(AD)을 적용하는 수치 해석 방법론을 다룹니다. 이는 코오롱인더스트리의 복합소재(컴파운드)나 고기능성 섬유(아라미드)의 미세 구조 설계 및 물성 예측 모델링에 간접적으로 활용될 수 있습니다.
- R&D 활용 포인트
- 복합소재(컴파운드) 및 고강도 섬유의 미세 구조(Microstructure) 설계 시, 재료의 기계적 물성(강성, 응력 등)을 빠르고 정확하게 예측하는 수치 해석 시뮬레이션 프레임워크로 활용 가능합니다.
- 평가 입력
- 섹션 본문 64,397자 중 30,032자 발췌
초록
초록이 없습니다.
본문 65,913자
본문 펼치기
섹션 본문 85문단 · 63,244자
(제목 없음)
1Fast-Fourier Transform (FFT) methods have been widely used in solid mechanics to address complex homogenization problems.However, current FFT-based methods face challenges that limit their applicability to intricate material models or complex mechanical problems.These challenges include the manual implementation of constitutive laws and the use of computationally expensive and complex algorithms to couple microscale mechanisms to macroscale material behavior.Here, we incorporate automatic differentiation (AD) within the FFT framework to mitigate these challenges.We demonstrate that AD-enhanced FFT-based methods can derive stress and tangent stiffness directly from energy density functionals, facilitating the extension of FFT-based methods to more intricate material models.Additionally, automatic differentiation simplifies the calculation of homogenized tangent stiffness for microstructures with complex architectures and constitutive properties.This enhancement renders current FFT-based methods more modular, enabling them to tackle homogenization in complex multiscale systems, especially those involving multiphysics processes.Furthermore, we illustrate the use of the AD-enhanced FFT method for problems that extend beyond homogenization, such as uncertainty quantification and topology optimization where automatic differentiation simplifies the computation of sensitivities.Our work will simplify the numerical implementation of FFT-based methods for complex solid mechanics problems.
Introduction
2A crucial aspect of computational multiscale mechanics is understanding how microscale mechanisms impact macroscale material behavior.Features such as the distribution of heterogeneities, the formation of structures at the micro level, and physical processes occurring on the microscale can significantly influence the properties homogenized at a larger scale.The Fast-Fourier Transform (FFT) methods [1,2,3,4] are particularly well-suited for tackling such ng homogenization problems due to their computational efficiency [5,6], ease of implementation [7], and low memory footprint.Nonetheless, certain aspects of FFT frameworks limit their quick adaptation to various applications and extension to intricate mechanical systems.
3A significant challenge with FFT-based methods is that they still rely on manually implemented stress-strain relationships, which are computed "by hand" either analytically or through numerical differentiation [5].This makes the implementation of complex constitutive relations (e.g., hyperelastic materials and elastoplastic materials) intricate and error-prone within the FFT framework, especially for cases involving multi-physical processes [8].Hence, one of their major strength (i.e.ease of implementation) is lost for more complex problems.Another prominent limitation lies in determining the homogenized tangent stiffness in multiscale simulations [9,10,11,12,13].Current FFT-based multiscale frameworks require auxiliary solution schemes [14] to couple microscale mechanisms to the macroscale through a constitutive tangent stiffness, which can be computationally expensive and inaccurate for complex material models and large computational domains.
4Other numerical methods have similar challenges, which have been overcome by adopting a differentiable framework, which automates the process of computing derivatives [15].This allows the formulation of the governing equation in a high-level manner (usually as an expression of the functional energy), and the complex Jacobian and the Hessian are then strictly derived through automatic differentiation (AD) up to machine precision [8,16].
5Among prominent examples of such differentiable frameworks within the field of solid mechanics is FEniCSx [17] for Finite Element Methods.Concurrently, with the rise of AD libraries such as PyTorch [18] and JAX [19], the differentiable framework has become quite appealing, which is evident by the shift in porting existing frameworks such as molecular dynamics, discrete element method, and finite element method [20,21,22,23,24] to a differentiation-based framework.Similarly, automatic differentiation presents great potential for FFT-based methods [25] but has yet to be developed in a general and ease-of-use manner to overcome the main challenges of FFT-based methods.
6In this paper, we enhance the FFT framework by incorporating automatic differentiation.We investigate the capabilities of an AD-enhanced FFT framework and examine how automatic differentiation mitigates some of the aforementioned issues.Thereby making FFT-based frameworks more modular and easy to implement for complex solid mechanics problems.
How automatic differentiation works?
7Consider a function f : R n → R m that maps an n-dimensional input x to an mdimensional output.To determine the derivatives of the outputs relative to the inputs, specifically J ij = ∂f i /∂x j where i ∈ m and j ∈ n, one typically depends on the handcalculated closed-form expression of the derivative of the function.In case the function f has a complex closed-form mathematical expression, one can use symbolic differentiation to get the derivatives [26].In computational solid mechanics, f may represent a complex function consisting of numerous procedures that do not possess an explicit mathematical expression.For example, f might be a function that computes the Fourier transform of the input data with a conditional statement (if-then-else) or operates a minimization solver with for-loops on the inputs.In such cases, neither analytical nor symbolic differentiation is feasible, requiring the use of alternative approaches to estimate the derivatives ∂f i /∂x j .A classical approach is numerical differentiation.Its results are very sensitive to the perturbations used in the calculations, which may result in inaccuracies or numerical stability issues.Alternatively, automatic differentiation overcomes such limitations by computing exact derivatives for such functions.This is achieved by decomposing a complex function f into elementary functions, for which exact derivatives are known, and interconnecting them through basic arithmetic operations such as addition and subtraction.The chain rule of calculus is then applied to compute exact partial derivatives.For instance, if the function f can be decomposed as f = h(g(x)), such that x ∈ R n , g : R n → R k and h : R k → R m , then the partial derivative df i /dx j is computed as
8As automatic differentiation utilizes the exact derivatives of the sub-functions to determine the derivative of f , it is not affected by issues related to numerical stability or round-off errors.The derived values retain the same level of precision as the function results, thereby enabling the accurate calculation of derivatives even in the case of nonlinear or non-monotonic functions.Moreover, automatic differentiation can be repeatedly applied to a function to derive exact higher-order derivatives without accumulating errors.Automatic differentiation has two ways to calculate the derivative of f using the chain rule [15,19].The first technique involves evaluating the derivatives of sub-functions (inner derivatives) simultaneously with the function evaluation.This approach is known as forward-mode differentiation.Figure 1a illustrates forward-mode differentiation applied to a composite function f = g • h, mapping a scalar to a scalar, which requires only one pass to compute both the output of the function and its gradient.Alternatively, the second method involves first evaluating the function's output and then moving backwards to determine the derivatives, starting with outer derivatives followed by inner ones.This is called reverse-mode differentiation and requires at least two evaluations to extract the function's value and gradient.Figure 1a depicts this backward propagation of the function to first compute outer derivatives and then inner ones.The choice of method depends on how the function f maps the input space to the output space.We demonstrate this with two simple cases for a function f : R n → R m : (i) when n < m, i.e., f = (g 1 (h(x)), g 2 (h(x))) as shown in Figure 1b, and (ii) when n > m, i.e., f = g(h(x, y)) as shown in Figure 1c.In the case of n = 1 < 2 = m (see Figure 1b), forward-mode requires a single pass to calculate both partial derivatives (∂f 1 /∂x, ∂f 2 /∂x), while reversemode needs two backward computations to determine these derivatives.Conversely, when n = 2 > 1 = m, forward-mode requires two evaluations: one using x (assuming y = 0) and another using y (assuming x = 0), for computing partial derivatives (∂f /∂x, ∂f /∂y).However, reverse-mode achieves this with a single pass.Therefore, as a basic rule, for a function f : R n → R m , forward-mode is computationally efficient when mapping from a lower-dimensional space to a higher-dimensional one, i.e., when n ≪ m.In contrast, reverse-mode is efficient when the function maps from a higher to a lower dimension space, indicating n ≫ m.We use this guideline throughout the paper to find the most efficient way to differentiate.
9For this study, we use JAX for automatic differentiation due to its effective support for both forward-and reverse-mode differentiation, just-in-time (JIT) compilation, and efficient parallelization on GPUs.JAX is particularly well suited for scientific computing tasks requiring high-order derivatives, offering both flexibility and high performance.
Differentiable FFT-framework for solid mechanics
10For the purpose of this work, we incorporate automatic differentiation within the Fourier-Galerkin approach [3] for FFT-based solvers.To this end, we explore the specific arithmetic operations made more straightforward by automatic differentiation and present the relevant pseudo-code/algorithm.
11Consider a Representative Volume Element (RVE) Ω subjected to an overall strain e.The governing equation for static mechanical equilibrium in this RVE is thus given by ∇ • σ = 0, where σ is a function/operator that maps the overall deformation to the appropriate local stress field.Under small-strain conditions, the overall deformation e represents small-strain ε, and σ represents a function that maps local ε, to the Cauchy stress tensor τ .Conversely, for finite deformations, e represents the deformation gradient F and σ represents a function that maps the local deformation gradients F to the first Piola-Kirchhoff stress tensor P .Since this paper addresses both conditions, we will use the stress operator σ as a generic term for stresses in the description of the method throughout this section.We note that, consequently, the derivations and procedures remain consistent for both assumptions.
12In this study, we adopt the Fourier-Galerkin spectral method [3,4], and do so for several reasons.Primarily, the variational structure of this approach retains the convexity of the energy density [4,5], which ensures that a unique solution to a given problem exists.Secondly, to guarantee that the solution produces a compatible strain state, the method employs a projection operator G, which converts an arbitrary strain state to a compatible state (periodic and curl-free).This operator is independent of the material model and remains consistent for both small-strain and finite deformation scenarios [7].We will show def strain_energy(strain):
13# compute the energy based on the input `strainr eturn energy # create a function to compute stresses using the # derivative of energy w.r.t `strain`(Eq 2) compute_stresses = jax.jacrev(strain_energy)# using the above created function to compute stresses sigma = compute_stresses(strain)
14Listing 1: Automatic differentiation to compute stress from energy density functional that these characteristics of the Fourier-Galerkin approach make integrating automatic differentiation within the FFT-based framework straightforward.
15Applying the Fourier-Galerkin method, we reformulate the static equilibrium equation as
16where ξ is the wavevector, ⋆(ξ) is the Fourier transform of quantity ⋆, and F −1 {⋆} is the inverse Fourier transform.For details on the derivation of the above equation and the exact form of the projection operator G, please refer to [3,4,7,27].The above equation is solved using a Newton-Krylov solver, where the Newton-Raphson loop is employed to handle nonlinearities, and a Krylov-subspace solver, such as Conjugate Gradient, is employed to enforce the compatibility conditions (for details, see Appendix A).
17Here, we will show how automatic differentiation can be applied in an FFT-based framework.We will describe three use cases of automatic differentiation, namely the stress computation in elastic and hyperelastic materials, the computation of consistent tangent operator for nonlinear problems, and the computation of homogenized stiffness operator for multiscale simulations.For all cases, we include both the arithmetic operations as well as the counterpart pseudo-code to highlight the general applicability and ease of use of automatic differentiation in FFT-based methods.To this end, we employ the open-source JAX library [19] for automatic differentiation and demonstrate that only a few lines of code are needed to implement a general solution.
Automatic computation of stress tensor from energy functional
18We consider the stress computation of elastic and hyperelastic materials, for which the stress function σ is the first derivative of the strain energy density, as given by
19The application of automatic differentiation on Eq. 3 using the JAX library [19] is straightforward as we show in Listing 1.Here, we define a function that receives microscale strain as input and outputs the corresponding energy density.Since the function maps a 2 ndorder strain tensor to a scalar value, we use the reverse-mode technique to differentiate the function to calculate stresses.We note that the input strain to the strain-energy function may be either a small strain (ε) or a deformation gradient (F ) based on the defined energy density.In Sec.4.1, we will present examples for various material models # compute the incremental stresses as given in Eq 4 dsigma = jax.numpy.einsum('ijkl,kl -> ij', tangent_modulii, dstrain)
20Listing 2: Automatic differentiation to compute incremental stresses using forward-mode AD under small-strain and finite deformation settings.
Automatic computation of tangent moduli and incremental stresses
21We integrate automatic differentiation to ease the numerical implementation of the nonlinear Equation (2).In standard practice, Equation ( 2) is linearized, and the Newton-Raphson method is used to find the equilibrium.The linearization process involves computing the incremental stresses and the consistent tangent operator at each step of the Newton-Raphson scheme, which is expressed as follows,
22Consequently, the local tangent stiffness K is needed at the previous strain to calculate the incremental stresses.With automatic differentiation, there are three different ways in which one can differentiate the stress function to compute the local tangent stiffness.The straight-forward approach will be to simply differentiate the obtained stress function again.Since the stress function maps 2 nd -order strain tensor to 2 nd -order stress tensor, one can choose either the forward-mode or the reverse-mode for differentiation.Both will be computationally equivalent.The code-snippet for computing tangent stiffness using reverse-mode differentiation is given in Listing 2. This method explicitly computes and stores the local tangent stiffness in a matrix form which then must be multiplied with the incremental strains δe to get the incremental stresses δσ.This results in extra memory usage and two operations.Automatic differentiation and especially the JAX library provides two other methods, i.e. the jvp and linearize functions, to ease the calculation of directional derivatives.In both approaches, the local tangent stiffness can be represented as a push-forward function (or a linear operator) that maps incremental strains δe lying in the tangent space of e to incremental stresses δσ lying in the tangent space of the stress domain.This facilitates the direct computation of incremental stress as a Jacobian-vector product [28,29].The jvp function (an example code-snippet is shown in Listing 3) internally constructs the push-forward map and then applies it to the incremental strains to compute the incremental stresses.Representing K as a push-forward map rather than storing it explicitly in matrix form can significantly reduce the memory usage of FFT-based methods.However, creating this push-forward map with each function call can prove computationally expensive, particularly when utilized in the inner solver, like the conjugate gradient, of a # create a function to compute stresses compute_stresses = jax.jacrev(strain_energy)# computing the incremental stresses as given in Eq 4 dsigma = jax.jvp(compute_stresses,(prev_strain,), (dstrain,)) [1] Listing 3: Automatic differentiation to compute incremental stresses using jvp function # create a function to compute stresses compute_stresses = jax.jacrev(strain_energy)# compute the tangent stiffness function linearized around previous strain f_jvp = jax.linearize(compute_stresses,prev_strain) [1] # compute the incremental stresses as given in Eq 4 dsigma = f_jvp(dstrain) Listing 4: Automatic differentiation to compute incremental stresses using linearize function Newton-Krylov solver.
23A computationally more efficient approach involves computing the local tangent stiffness around a fixed point, such as e from the previous converged step, within the Newton-Raphson scheme.This local stiffness can then be used to calculate incremental stresses during iterations in the inner solver.We utilize the JAX linearize function to generate the push-forward map for K at a specified strain point and store it as a function, which is then utilized to compute the incremental stresses.An example implementation is given in Listing 4.
24We examine the computational efficiency of these three methods to determine the incremental stresses from tangent stiffness on two scenarios: calculating incremental stresses for a single pixel (see Figure 2a) and for a grid of pixels (see Figure 2b).We consider a linear elastic material law for which the strain energy is given as ψ = λtr(ε) 2 + µtr(ε : ε) where λ and µ are Lame's parameters.For reference, we show the computational time when the local stiffness tangent and the incremental stresses are computed from the analytical expression.We observe that the calculation time for a pixel in forward or reverse mode, which are the two options for the first approach, is nearly as fast as using the analytical method (see Figure 2a).A small overhead occurs when using automatic differentiation due to the combined computation of derivatives and function values.However, employing the push-forward map via the linearize function or the jvp function increases the overall computation time for a single pixel (see Figure 2a).Although direct evidence for this cost increase is unavailable, we speculate that it results from constructing the push-forward map.When considering the computation time of the incremental stresses on a pixel grid (e.g.63 2 , 127 2 , 255 2 ), we observe that all the tested methods are on par with the analytic approach (see Figure 2b).Our results show that the jvp and linearize functions are slightly faster than the forward or reverse mode differentiation.
Automatic computation of homogenized stiffness tensor
25We exploit the automatic differentiation technique to compute the homogenized stiffness tensor, which is the most significant aspect of computational homogenization [30,31] or the essential requirement for performing multiscale simulations [14,32].The effective stiffness tensor is the partial derivative of macroscale stresses with respect to macroscale strains, which reads
26where σ is the volume average of local stresses within the RVE.In the FFT-based framework, two methods are used to determine the effective properties from the local stress and strain distribution: (a) the perturbation approach [14,33] and (b) the algorithmic consistent approach [34].In the perturbation approach, each component of the effective tensor is computed by numerical differentiation (finite difference) between the perturbed state and the reference state.In the algorithmic consistent approach, the consistent tangent operator is computed by solving the Lippmann-Schwinger equation [34].Both approaches necessitate an auxiliary solution method alongside the primary one to determine effective properties.For instance, the perturbation method requires computing finite differences for every tensor component, leading to three computations in a 2D case and six in a 3D case.Similarly, resolving the Lippmann-Schwinger equation requires an iterative solver.Consequently, both approaches can be computationally intensive, especially for large computational domains or for nonlinear constitutive laws.In contrast to these approaches, automatic differentiation significantly simplifies the procedure by employing a single operation for the computation of the homogenized tangent stiffness, as shown in Listing 5.
27Here, we directly differentiate a function that takes macro-strain as input and outputs macro-stress (after solving Equation (3)) to compute the homogenized stiffness tensor.This function encompasses numerous complex operations or function calls, such as forward-FFT transform, inverse FFT transform, and a Newton-Krylov solver, to accurately determine the local strain and stress distribution in an RVE (for details, refer [7,27]).The ability of automatic differentiation to decompose complicated arithmetic operations into primitive ones allows for exact differentiation.Moreover, it facilitates the simultaneous computation of stresses and tangent stiffness, thus eliminating the need for any secondary solution method.
28# function to solve RVE using FFT approach for a given macroscale strain def solve_microscale(macro_strain):
29# solve RVE (Eq 1) using Newton-Krylov solver as given in Appendix A # and get the microscale strain local_strain = netwon_krylov_solver(macro_strain)
30# compute the microscale stresses from microscale strain local_sigma = compute_stresses(local_strain)
31# compute the macroscale stresses from microscale stress macro_sigma = mean(local_sigma) return macro_sigma, (macro_sigma)
32# create a function to compute homogenized tangent and stresses compute_macro_tangent_stiffness = jax.jacfwd(solve_microscale, argnums=0, has_aux=True ) # calling tangent function to get macroscale stresses and tangents macro_tangent, macro_stress = compute_macro_tangent_stiffness(macro_strain) Listing 5: Automatic derivation of homogenized stiffness tensor
Applications
33Incorporating automatic differentiation in an FFT-based framework can, as described in Section 3, greatly simplify the computation of complex derivatives, which is essential for many mechanical problems.Here, we employ the AD-enhanced Fourier-Galerkin method on problems of varying complexity to demonstrate its capabilities.Specifically, we examine mechanical problems with intricate material models, bodies undergoing largestrain deformation, and multiscale simulations.We show how automatic differentiation allows easy differentiation of functions with complex mathematical operations such as FFT transform or with logical operations such as conditional/unconditional-loops, which simplifies the entire numerical framework.We evaluate the computational performance and accuracy of the AD-enhanced FFT-based method.We provide the Python code for all the examples at [35].All simulations were performed as a serial job on a Linux system using a 4-core AMD EPYC™ 9654 CPU with 16 GB RAM and a clock speed of 2.4Hz.
Automatic derivation of stress and tangent operator
34We present two examples to demonstrate the applicability of automatic differentiation for the computation of stress and tangent operators for material laws with fundamentally different characteristics, i.e. hyperelastic and elastoplastic materials.
Example on hyperelastic material
35With this example, we aim to show that the reliance of FFT-based frameworks on explicit formulations for stress and tangent operators can be minimized [5].We consider hyperelastic materials, where the stresses and the tangent moduli are first-and secondorder derivatives of the strain energy density functional, respectively.We consider the St. Venant-Kirchhoff material for which the energy density functional is given as where E = F • F T − I is the Green-Lagrange strain, F is the deformation gradient, λ and µ are Lame's parameters.As described in Section 3, we apply automatic differentiation to derive the stress function (the Jacobian of the energy density) and the tangent function (the Hessian of the energy density).Foremost, we compare the AD implementation for St. Venant-Kirchhoff material with the implementation where the stress and tangent functions are computed from the analytical expression.Similar to [7], we consider a square RVE of dimension ℓ (see Figure 3a) with a square stiff inclusion (of dimension ℓ/3) at one of its corners.The RVE is subjected to a macroscopic shear loading in terms of F which in Voigt notation is given as [1, 1, 1 + 0.1ℓ].We discretize the RVE into 299 2 grid points.An odd number of grid points is chosen to maintain the compatibility of the deformation gradient [4].We solve the problem in one increment using a Newton-Krylov solver with a conjugate gradient (CG) solver for solving the linearized form of Equation (2).The tolerance for the outer Newton-Raphson (NR) loop is 10 −5 , and the tolerance for the inner loop of the CG solver is 10 −8 .We compute the local distribution of the first-Piola Kirchhoff stresses within the RVE (see Figure 3b) and the residual norm (δF /∥F ∥) for every NR iteration (see Figure 3c).Here, we use JAX's jvp function (see Section 3.2) to compute the incremental stresses within the CG iterations.The AD implementation gives identical results to the analytical expression, as the residual norm and the iteration counts (cumulative CG iterations for every NR iteration) to reach convergence are the same.The computational times for the simulations with AD implementation and with analytical implementation are approximately the same, around 19.5 seconds.Since we express the tangent operator as a function rather than storing it as a matrix, the memory footprint of the AD-enhanced version of our implementation is roughly 1/2 of that of the analytical expression.
36This example demonstrates that stress and the tangent operator can be easily derived from an energy functional for a material.This approach eliminates the need for FFT-based methods to rely on analytical expressions or numerical differentiation, thereby reducing computational cost (i.e., memory usage) and simplifying the numerical implementation of sophisticated hyperelastic materials.
Example on elastoplastic material
37Automatic differentiation is applicable to material laws in which the stresses and the tangent stiffness cannot be explicitly derived from the energy density.For instance, elastoplastic materials involve stress and tangent computations that depend on yielding criteria, plastic flow rule, and a return-mapping algorithm [36].For demonstration purposes, we consider a heterogeneous RVE with hard circular inclusions embedded in a soft matrix (see Figure 4a).We adopt an isotropic linear hardening model in a small-strain setting with each phase exhibiting distinct hardening exponents and yield stresses.The RVE is subjected to a macroscopic biaxial loading, in terms of ε which in Voigt notation is given as [10 −2 ℓ, 10 −2 ℓ, 0].The RVE is discretized into 199 2 grid points.The tangent stiffness operator in elastoplastic materials depends on the elastic strain, the plastic strain, the type of yield surface, and the normals to this yield surface [37,36].We selected J 2plasticity for both materials.We assume a linear isotropic hardening law with the yield criterion given as Φ = 3/2σ dev : σ dev − σ y where σ dev is the deviatoric stress and σ y is the yielding stress.The phase contrast between the yield stress and hardening moduli of the two phases is 2. The analytical expression for the consistent constitutive tangent is equal to the elastic tangent when the trial state is elastic and otherwise given as
38where C elas is the elastic stiffness matrix, µ is the shear modulus, ϵ p is the cumulative plastic strain, H is the hardening modulus, σ y is the yielding stress and N is the direction of the deviatoric strain.Automatic differentiation calculates the tangent stiffness on the fly by differentiating the stresses with respect to the strains.Unlike the previous case of hyper-elastic material, where the local stiffness tangent operator is computed as a double derivative of an energy density function, here we first implement a Python function to compute the correct stress state.The stress state is calculated using the elastic predictor- corrector approach (for details, see Appendix B), and a return mapping algorithm [37,36].
39Then, this function is automatically differentiated with respect to the input.Here, within the NR loop, we use JAX's linearize function (see Section 3) to create the push-forward map of tangent stiffness at a fixed strain value and then use it to calculate incremental stresses within the CG iterations.For details on the numerical implementation of an elastoplastic material for an AD-enhanced FFT-based method, see the pseudo-code in Appendix B. We observe that the local distribution of the plastic strain and the elastic strain (see Figure 4b and Figure 4c) for the AD-computed local tangent stiffness operator K matches the strains computed with the analytical expression of K (shown with dashed contour lines in Figure 4).We note that the computation time for the AD implementation and the analytical implementation was approximately the same, around 0.25 seconds.Through this example, we show that a local stiffness operator can also be achieved for the cases where the stresses are not a direct derivative of the energy functional.This increases the applicability of automatic differentiation to various other material models where the calculation of stresses involves complex computational functions or operations.
Computational performance
40We present scalability and memory usage (see Figure 5) for the two cases considered above, i.e. hyperelastic and elastoplastic.We report the total computational time required for all stages, starting with the tangent stiffness function derivation and proceeding through Newton-Krylov iterations, up to convergence.For the hyperelastic case, we applied the push-forward map, utilizing the jvp function, to calculate incremental stresses within each iteration of the Conjugate Gradient solver.As discussed in Section 3.2, constructing the push-forward map in an inner loop incurs overhead, making the AD-enhanced FFT slightly more expensive than the conventional FFT implementation with analytic expressions.Our scaling analysis shows that even with a high number of pixels, the difference in computation time remains minimal (see Figure 5a).However, memory consumption is reduced by approximately half since the tangent moduli are not stored (see Figure 5b).
41In the elastoplastic case, we computed and stored the push-forward map during Newton-Raphson iterations using the linearize function.The computation time here matches the standard method using analytic expressions because automatic differentiation overhead occurs only in the Newton-Raphson steps (see Figure 5a).However, unlike before, the AD-enhanced method uses more memory compared to standard FFT, probably due to the need to store the linearized function (see Figure 5b).
42Finally, we note that while we showed in Figure 2b that analytic computations cost more than the push-forward map, these analytic computations become cheaper than linearize and jvp functions for repeated executions.This occurs because the analytic expression, implemented in Numpy, is optimized for multiple uses, whereas the slight overhead of using automatic differentiation makes linearize or jvp marginally computationally more expensive.
Computational homogenization
43We apply the AD-enhanced FFT-based framework to perform computational homogenization of an RVE.As noted earlier, current approaches, such as numerical differentiation or the algorithmic consistent approach, require an auxiliary computationally intensive method to compute the homogenized stiffness tensor of an RVE.Here, we present two examples to illustrate the efficacy and efficiency of automatic differentiation in computing effective properties.
Validation with Eshelby's problem
44First, we consider the Eshelby problem [30] as a basic example to compare the numerical result against the analytical solution.Similar to [34], we model a periodic microstructure with a stiff circular inclusion embedded centrally in a compliant matrix.We compare the numerically computed effective elastic tensor C with Eshelby's solution.We consider a very low volume fraction (0.7%) of the inclusion to match the infinite medium assumption of Eshelby, similar to [34].We consider a linear elastic material law for both the matrix and the inclusion.Thus, the strain energy is ψ = λtr(ε) 2 + µtr(ε : ε).The material parameters chosen for the matrix are λ m = 2 GPa and µ m = 1 GPa, and for the stiff inclusion are λ i = 10 GPa and µ i = 5 GPa.We compute the homogenized or effective elastic tensor C of the material for a macro-strain of ε = [10 −2 , 10 −2 , 0].We observe that the results from the AD implementation are close to the analytical results (see Table 1).We note that for a computational grid of 199 2 , the total computation time was around 4 sec.Table 1: Components of the effective elastic tensor C as computed numerically by automatic differentiation using FFT solvers compared against Eshelby's solution for a stiff inclusion embedded in a compliant infinite matrix.
Example on architected materials
45We apply the AD-enhanced computational homogenization method to an RVE (of dimension ℓ) with intricate microstructure.We chose architected materials as our ex- ample.Architected materials are composed of two or more distinct phase materials arranged in a specific pattern that results in exceptional mechanical properties [38,39,40].We examine a two-phase linear elastic architected material as illustrated in Figure 6a, comprising a compliant phase and a stiff phase, where the stiff phase is arranged in a hexagonal pattern.We vary the phase contrast X = compliant/stiff from 1 to 10 −4 where a value of 1 represents a homogeneous material and value ≪ 1 approximates a lattice metamaterial [41].We apply a macroscopic compressive strain ε in x and y-directions under a small-strain setting.The macroscopic strain tensor in Voigt notation is given as [−10 −3 ℓ, −10 −3 ℓ, 0].For the case where X = 1, i.e. a homogeneous material, the computed macro stiffness values match the analytical solution (see Figure 6c).With increasing phase contrast, however, the macroscopic stiffness reduces, as expected, and the obtained values (C xxxx = 0.51, C yyyy = 0.42 and C xyxy = 0.059) saturates to the values that are indicative of a lattice metamaterials.The values obtained are similar to the values (C xxxx = 0.57, C yyyy = 0.52 and C xyxy = 0.15) obtained from a full-field Finite Element homogenization under affine displacement boundary conditions (for details, please refer to Appendix C).The properties obtained under periodic boundary conditions are expected to be lower than the properties obtained under affine displacement boundary conditions [42].
46While not depicted in Figure 6 we calculated the homogenized properties for a phase contrast of 10 −10 to approximate zero stiffness in the compliant phase to machine precision.The obtained homogenized values remain consistent, illustrating that the AD-enhanced approach is not affected by significant contrast (approaching zero) in phase properties.
Application to multiscale problem
47In this section, we showcase how the ease of computation of homogenized stiffness tensor allows seamless integration of the AD-enhanced FFT-based framework with an additional solver.To this end, we explore a multiscale framework where the macroscale problem is tackled using the Finite Element Method (FEM), while the microscale problem employs the FFT-based approach.This example demonstrates the flexibility of the ADenhanced FFT-based method by integrating it with a FEM solver.
48The macroscale problem involves a beam with dimensions L × H, where the left end is fixed in both the x and y directions.A displacement of 10 −2 L is applied to the right edge along the y-axis (see Figure 7a).At the microscale, we use the same composite RVE as in Section 4.2 but with the St. Venant-Kirchhoff material model to capture the geometric nonlinearity (see Equation ( 6)).A phase contrast of 0.01 is chosen between the compliant and stiff phases to represent voids, thus modeling a hexagonal-lattice metamaterial.We solve the macroscale problem in reference configuration with P and F as the stress-strain measures.The weak form at the macroscale thus reads, V C(F ) :
49where the δF is the virtual deformation gradient (or test function) and the C is the homogenized tangent operator computed from microscale.We discretize the beam into 16 quadrilateral finite elements (16 Gauss points) as shown in Figure 7b, where each Gauss point is linked to the RVE with 169 2 voxels.The deformation gradient F at each Gauss point within the macroscale domain is transferred as input to the corresponding RVE associated with that specific Gauss point.Similar to the example in Section 4.2, we determine the homogenized tangent operator C through automatic differentiation and pass it together with the average first-Piola Kirchhoff stress P to the FEM solver (see Figure 7a).We note that due to a non-symmetric deformation gradient, one needs to use a full deformation gradient (4 components) [33].This means that C is a 4 × 4 matrix.We perform the simulation in one displacement increment under static conditions and use FEniCSx to manage the FEM component [17,24].At the microscale, we apply the Newton-Krylov solver (with an outer tolerance of 10 −5 and an inner tolerance of 10 −6 ) to accurately capture the nonlinearity within the lattices.At the macroscale, a separate Newton-Raphson solver (with a tolerance of 10 −8 ) is used to ensure proper convergence.We observe that the chosen contrast of 0.01 between the two phases sufficiently replicates the voids, which is demonstrated by the stresses in the compliant phases dropping to 0, as shown by the stress profile across the crosssection in Figure 7c.We report that this simulation takes approx.20 minutes in total (for roughly 1 million degrees of freedom in total).A large part of the computational time is spent in the CG-solver because of the high contrast in the phase properties.This is a known issue for the Fourier-Galerkin approach [43], which can be improved using pre-conditioned solvers [6].A traditional FE-FFT framework [14], such as finitedifference-based computation of homogenized stiffness tensor, would require 4 operations per Gauss point, one for each component of non-symmetric deformation gradient, to compute C. Conversely, the AD-enhanced multiscale framework is notably advantageous in this scenario, as it demands only one operation per Gauss point for the same.
Beyond stress and tangent computations
50The application of automatic differentiation to compute derivatives extends beyond stress and tangent calculations.Several challenges in solid mechanics require derivatives that are difficult to compute, such as evaluating the sensitivity of a complex computational model to its input parameters.In this section, we illustrate two use cases where automatic differentiation can aid in computing sensitivities of complex computational models such as in uncertainty quantification and topology optimization.Here, we employ the FFT-based method, as presented in earlier sections, as the complex computational model.
Uncertainty Quantification
51We investigate how automatic differentiation can assist in optimizing uncertainty quantification within deterministic processes.Uncertainties may arise from variations in material parameters or inconsistencies in material arrangement.A common method to propagate these uncertainties (i.e., calculate the expected and covariance values of the output) employs Monte Carlo simulations, which, while being effective, are computationally demanding.When the input uncertainties are small, the expected value of the output E[y] and its covariance Cov[y] can be approximated using the Taylor series expansion.For example, the second-order approximation for the expected value and the first-order approximation for the variance can be expressed as
52Figure 8: Sensitivity calculation using automatic differentiation for uncertainty quantification and topology optimization (a) Computation of expected value of strain energy for two-phase hyperelastic material using the 2 nd -order approximation via AD (red line) and using the Monte Carlo approach on 600 samples as a reference (blue curve).(b) The covariance in strain energy computed through first-order approximation via AD (red) and through the Monte Carlo approach (blue) on 600 samples as a reference.(c) Microstructure optimized for a maximal homogenized shear modulus at a volume fraction of 30% (left), and the associated stress distribution (right).(d) The value of the homogenized shear modulus µ as it evolves over optimization iterations.The value is normalized by the shear modulus of the parent material.where C ij is covariance matrix of input parameters, E[x] is the expected value of the input variables x, ∂f /∂x i and ∂ 2 f /∂x i ∂x j are the first and the second order derivative of a objective function with respect to inputs x i .Typically, the covariance matrix of the input variables is known and therefore the task is to find the derivatives.Here, we employ automatic differentiation to derive the first derivative and the second derivative of the objective function f with respect to its input.To this end, we consider the same two-phase material as in Section 4.1.1.The material is hyperelastic and the expected values of the material parameters and their variance are given in Table 2.
53To simplify the analysis, we consider a function f that accepts material parameters as inputs, determines static equilibrium for a macroscopic deformation gradient F = [0, 0, 0.1], and then outputs the total strain energy of the two-phase material.Given that f maps a 4-dimensional space to a scalar space, we use reverse-mode AD to efficiently obtain the first derivative.We differentiate this newly derived function using forward-mode to compute the second-order derivative.Since the function that evaluates the first-order derivative maps a 4-dimensional space to another 4-dimensional space, forward-mode proves to be efficient.
54We assume that the covariance C ij between the different parameters is known and is computed by drawing 600 samples randomly from a normal distribution.Using the firstorder function, the second-order function and the known covariance matrix, we calculate the expected value of the total strain energy and its variance.We note that we only need 2 runs, first for the first-order derivative and second for second-order derivative.The results thus obtained are shown in Figure 8a & b.For reference, we also determine the expected values and variance through Monte-Carlo simulations using the drawn sample of 600.We observe that the AD-computed values match closely with the Monte-Carlo results (see Figure 8)a & b.Additionally, the total time required for the Monte-Carlo method to achieve a saturated value was approximately 7 minutes, whereas the AD-computed uncertainties took around 20 seconds.
Microstructure optimization
55Here, we utilize AD-enhanced FFT-based method for topology optimization and use automatic differentiation to simplify the sensitivity calculation.Topology optimization is frequently utilized to design microstructures with tailored homogenized properties, such as achieving the highest bulk modulus or shear modulus with a specific volume fraction.The microstructure, represented as a density field ρ(x) varying from 1 (material) to 0 (void), is optimized to achieve the desired properties under specified constraints.The optimization problem thus reads:
56where f is the objective function to be minimized.The first condition ensures static equilibrium.The second condition ensures the imposed volumetric constraint and the last condition ensures that the density field ρ(x) remains within physical limits i.e. ρ(x) ∈ [0, 1].Irrespective of the solution strategy (optimality criteria [44], MMA [45] or Lagrange multipliers) used for the aforementioned optimization problem, information about the gradients of both the objective function and the constraints with respect to the input is required.Recently, automatic differentiation has been adopted to simplify the computation of these gradients [46].Building on this concept, here we use automatic differentiation to determine both homogenized properties (i.e.homogenized shear modulus µ) and their sensitivities to the density field within a FFT framework.Similar to [47,48,46], we consider the classic microstructure optimization problem of maximizing the homogenized shear modulus µ of a microstructure (i.e.objective function f (ρ(x)) = −µ) with a given volume fraction.We examine a square domain under macroscopic strain ε.The material behaves as linear elastic with a Young's modulus E = 1 MPa and a Poisson ratio ν = 0.3.Additionally, we enforce a volumetric constraint of 0.3.We follow the optimality criteria method [44] to solve the above constrained optimization problem.This method requires the sensitivity of the objective function ∂f /∂ρ to update the density field ρ in successive iterations.Since the function f maps a high-dimensional space (ρ) to a scalar value (µ), we use reverse-mode AD to compute the sensitivities.For each update of the density field, we use the AD-enhanced FFT framework to calculate the homogenized stiffness tensor C of the microstructure for a macroscopic strain of ε = [0, 0, 1.] under plane-stress conditions, as discussed in Section 4.2.
57The optimized microstructure (see Figure 8b) and the converged shear modulus µ ≈ 0.075 match well the results from the literature [49,47,46].Thus, integrating ADenhanced computation of homogenized properties with AD-derived sensitivities streamlines the implementation of optimization problems.This approach allows for the simul-taneous calculation of all homogenized components, differing from previous studies that required solving the static equilibrium for three separate test strains [50].Furthermore, integrating simultaneous homogenization of the microstructure and computation of sensitivities within an FFT-based framework facilitates the optimization of computationally intensive cases.
Discussion & Outlook
58The integration of automatic differentiation (AD) with Fast-Fourier Transform (FFT) techniques can considerably simplify the numerical implementation of complex solid mechanics problems.A key advantage is the ease of deriving stress and tangent operators, thereby minimizing human error and enhancing precision.This work combines automatic differentiation with the Fourier-Galerkin method, whose variational structure facilitates straightforward integration of automatic differentiation.Here, we investigated the potential of automatic differentiation in FFT-based methods for solid mechanics, demonstrating how the automatic derivation of stress and tangent operators enables modular FFT approaches.This strengthens the use of FFT-based methods in more advanced models, particularly in multiscale scenarios where computing homogenized tangent stiffness has traditionally been a significant challenge.While we have emphasized potential applications in Section 4, several other research areas could also greatly benefit from combining automatic differentiation with FFT-based methods.
59A notable application in which we expect AD-based FFT-based methods to be beneficial is computational inelasticity.As shown in Section 4.1, automatic differentiation greatly simplifies the extraction of the local tangent stiffness for inelastic models and is computationally equivalent to analytical expressions.Therefore, one can leverage automatic differentiation for complex plasticity models such as multi-yield surface J 2plasticity [51], Simo-plasticity [36] or crystal plasticity [52,53] for which extracting the tangent stiffness is intricate and often relies on numerical differentiation [33].Automatic differentiation can also streamline the return-mapping algorithm by boosting the robustness of trial-state projections to the yield surface [37,36].Furthermore, multiphysical problems (or coupled problems) offer another promising avenue for the application of AD-enhanced FFT techniques [27,54,55].For example, automatic differentiation can support the creation of coupled or staggered operators, leading to more precise and efficient solutions for such problems.As discussed in [8], linearizing a thermo-mechanical problem requires four-tangent stiffness matrices; using automatic differentiation, one can greatly simplify this number to 1 or 2. Additionally, expressing them as operators can significantly reduce the memory footprint.We demonstrated that employing AD-derived operators for the St. Venant-Kirchhoff material model, which has a straightforward analytical form (with only a few mathematical operations) for tangent stiffness, can halve memory usage.
60We showed that automatic differentiation capabilities go beyond just computing stress and tangent values in an FFT-based framework.In Section 4.4, we utilized an ADenhanced FFT-based method for topology optimization, where an accurate and efficient computation of sensitivity is necessary for a correct and fast optimization.Automatic differentiation simplifies the calculation of the sensitivity by directly differentiating the objective function with respect to the input parameters, thus eliminating the need for adjoint calculations [56].Likewise, the high computational cost associated with uncertainty quantification, often due to the employed Monte Carlo approach, can be significantly reduced by using higher-order approximations to calculate expected values and variances of an output parameter.Automatic differentiation enables computing higher-order derivatives in a single simulation, thereby significantly reducing the computational cost.Furthermore, by broadening AD-FFT techniques to encompass second-order homogenization and strain gradient models, one can boost the precision and predictive power of multiscale simulations, thereby expanding the limits of computational mechanics and materials science.This adaptability highlights the potential of automatic differentiation in enhancing FFT-based methods for numerous mechanical applications.
61The biggest challenge in adding AD techniques to existing codes/libraries is selecting the appropriate AD framework.Many AD frameworks are language-specific, so it is often easier to do so if the code is already in that language.For example, transforming existing Python-based code to work with differentiable frameworks such as JAX is generally straightforward (as is evident in the code provided at [35]).JAX's functional programming makes it easy to fit into scientific workflows with minimal changes.In contrast, modifying C++ code to function with AD frameworks such as ADOL-C [57], autodiff [58] or Sacado [59] typically requires more changes to handle automatic differentiation structures.However, these C++ libraries, built for performance, excel in tasks with high performance requirements, unlike Python-based framework such as JAX or PyTorch, which incur a slight computational overhead.Although frameworks such as ADOL-C and Sacado enable efficient automatic differentiation for basic arithmetic and algebra operations, allowing the derivation of stresses or tangent moduli from energy density functions, they lack, to the best of authors' knowledge, native support for FFT differentiation.Therefore, enabling automatic differentiation for FFT functions in these frameworks requires either custom adjoint routines or defining the chain rule for FFT operations, both of which are often complex and time-consuming.In contrast, JAX and PyTorch natively support automatic differentiation through FFTs, as shown in this paper, making them suitable for FFT-based methods.Furthermore, JAX compensates for AD overhead with its just-in-time compilation and advanced parallelization capabilities (CPUs and GPUs).Recently, frameworks such as Enzyme-AD [60,61], an experimental differentiable library that works across languages, enable automatic differentiation without altering the original code or libraries.This offers both flexibility, differentiation of FFT functions and high performance and, therefore, could be a great balance between ease of integration and computational efficiency.
62Another important factor in selecting an AD framework is the range of differentiation techniques it offers, such as forward-mode and reverse-mode.As discussed in Section 2, both methods are crucial and can provide considerable efficiency depending on the function being differentiated.Although PyTorch provides AD support, mainly in reversemode, it does not offer as extensive support for both modes as JAX does (forward-mode, jvp function and linearize function).Therefore, the choice of a suitable framework for integrating automatic differentiation into existing code largely hinges on the user's specific requirements and preferences such as integration ease, flexibility, computing efficiency and support for parallelization.In this research, we opted for JAX to augment FFT-based methods with automatic differentiation.Nonetheless, it is feasible to employ any available AD framework, as the principles addressed in this paper remain applicable.
63Finally, in this paper, we employed the Fourier-Galerkin method for the FFT approach; however, the AD technique, as demonstrated here, is applicable to other FFT-based methods [1,62,63] as well.
Conclusion
64In this paper, we investigated the use of automatic differentiation (AD) within the FFT-based framework for solid mechanics.We have shown that automatic differentiation allows the computation of stresses and tangent operators directly from the energy density functional, which makes FFT-based methods more accessible for complex hyperelastic materials.Furthermore, we have demonstrated that automatic differentiation allows differentiation of intricate tensor operations, FFT transforms, and Newton-Krylov solvers, which enable the computation of tangent operators for materials where local stiffness is not derivable from strain density, e.g., elastoplastic materials.The incorporation of automatic differentiation into the FFT-based framework decreases the reliance on explicit expressions of stresses and tangent operators while preserving accuracy and computational efficiency.We further employed the AD-enhanced FFT-based method to simplify the computation of homogenized stiffness tensors, a notable computational bottleneck in multiscale problems.We show that the AD-enhanced FFT-based approach is applicable beyond stress and tangent calculations, extending to problems like uncertainty quantification and topology optimization by simplifying sensitivity computations.Our findings indicate that applying automatic differentiation within an FFT-based method is highly beneficial and greatly simplifies the implementation of complex solid mechanics problems, as is also evident by the simple code that we provide at [35].We believe this research will encourage further studies using automatic differentiation within the FFT-based frameworks and will help in advancing the field of computational solid mechanics.
Acknowledgements
65DSK and MP acknowledge support from the Swiss National Science Foundation under the SNSF starting grant (TMSGI2 211655).We thank Jan Zeman and Antoine Sanner for fruitful discussions and Alessandra Lingua for providing the scans of the lattice structure.We also thank Luca Michel for his feedback on the manuscript.
Code Availability
66The code [35] for the simulation is written in Python and is an extension of the code provided in [27].update : e(x) i+1 = e(x) i + F −1 { δe(ξ)} 6:
67if δe(x)/∥e∥ < tol then break For a given total strain ε t+∆t , we aim to find the stress state (σ)and the cumulative plastic strain (ϵ p ).The calculation of the stress state and the cumulative plastic strain for J2 plasticity using predictor-corrector approach is given as, The above calculation is implemented as Python function that takes the total strain at time t + ∆t and computes the total stress at time t + ∆t.We then use the Jacobian-Vector product (using the jvp function of JAX) to compute the incremental stresses.The implementation for which is given as # explicit implementation of a Python function to compute stresses def compute_stresses(strain):
68# Compute the trial state stresses # evaluate yield surface, set to zero if elastic (or stress-free)
69# plastic multiplier, based on hardening law # apply return-map algorithm to project stresses to a feasible state return sigma # computing the incremental stresses for an elasto-plastic material dsigma = jax.jvp(compute_stresses,(prev_strain,), (dstrain,)) [1] Appendix C. Computation of homogenized properties for architected material using FE
70We perform a full-field computational homogenization using Finite Element method.Unlike, FFT method where we have periodic boundary condition, here we apply Kinematic Uniform Boundary Conditions (KUBC) for computational homogenization [42,64].It assumes that the strain field is uniform on the boundary of the RVE.For a homogenized material the strain, strain relation in Voigt notation is given as σ = C : ε.We express the macroscopic strain as a Identity tensor such that: To compute the values of σ xx , σ yy and σ xy , we perform 3 FE simulations with 3 different boundary conditions.The microscale stresses for each boundary conditions are then average over the volume of the RVE as σ ij = σ ij (x)dV /Ω RVE .For the 2D case as considered in Section 4.2, we only need 3 boundary conditions: uniaxial strain along yaxis, uniaxial strain along x-axis andd simple shear strain.We used FEniCSx for the Finite Element solution.
Figure 1 :
71Figure 1: Forward vs. Reverse mode for a composable function f : g • h (a) Schematic illustration showing automatic differentiation applied to function f : R → R. The left column shows the execution graph for computing output of f .The center column illustrates the execution graph for calculating the derivative of f via forward-mode.Observe that each node representing a function call is substituted by its derivative and is traversed in the original function call direction.The right column indicates the call direction for the reverse-mode, note the backwards arrows.(b) Schematic illustration showing automatic differentiation applied to function f : R 1 → R 2 .Notice that the forward-mode differentiation requires only a single pass to compute the 2 partial derivatives whereas reverse-mode requires 2 passes to compute the partial derivatives.The 2 passes are indicated by the 2 separate graphs.(c) Schematic illustration showing automatic differentiation applied to function f : R 2 → R 1 .Here the forward-mode requires 2 passes to compute the partial derivatives with respect 2 input values whereas reverse-mode requires a single pass.
#
72create a function to compute stresses compute_stresses = jax.jacrev(strain_energy)# computing the function to compute local tangent modulii K as given in Eq 4 compute_local_tangent = jax.jacfwd(compute_stresses)# compute the tangent modulii tangent_modulii = compute_local_tangent(strain)
Figure 2 :
73Figure 2: Computational efficiency of AD methods for the computation of incremental stresses from tangent stiffness.(a) Computational time for calculation on a single grid point.We consider a single function evaluation.(b) Computational time for a varying number of grid points.We compute the incremental stresses simultaneously overall the grid points.
Figure 3 :
74Figure 3: Automatic computation of stress and tangent operator for a St. Venant-Kirchhoff material.(a) Schematic illustration of the microstructure of the considered RVE.(b) Local distribution of the first Piola-Kirchhoff stresses within the RVE.(c) Variation of the residual norm and the cumulative CG iterations for each NR iteration (shown as circles).
Figure 4 :
75Figure 4: Automatic computation of tangent operator for J 2 -plasticity.(a) The microstructure of the considered RVE.The hard circular inclusions have a higher yielding strength than the matrix.ribution of cumulative plastic strain ε p and (c) local distribution of strain within the RVE.The color map is the result of AD-enhanced FFT simulations, and the dashed contour lines represent the results of the analytical implementation of the elastoplastic material.
Figure 5 :
76Figure 5: Computational efficiency of AD-enhanced FFT method.(a) Scaling of computational time with increase in the number of grid points for two different constitutive laws.Computations with automatic differentiation and analytical expression are shown in red and blue, respectively.For hyperelastic material, we use JAX's jvp function to compute the incremental stresses and for elastoplastic material, we use JAX's linearize function.(b) Memory consumption for the two material laws for the case with 511 2 grid points.
C
77xxxx C yyyy C xyxy Analytical 4.037 4.037 1.011 Numerical 4.035 4.035 1.010
Figure 6 :
78Figure 6: Computational homogenization of an architected lattice material.(a) The architected RVE with a stiff phase arranged in a hexagonal pattern within a compliant phase.(b) Local distribution of shear stresses within the RVE for a phase contrast of X = 0.5 and a macroscopic strain e = [−10 −3 ℓ, −10 −3 ℓ, 0].(c) Components of the macroscale constitutive tangent stiffness as a function of phase contrast X .The dark grey horizontal lines show the stiffness component for the homogeneous case i.e.X = 1.
Figure 7 :
79Figure 7: Multiscale simulation of a hyperelastic lattice material.(a) Schematic illustration of the beam at the macroscale and the hexagonal lattice structure at the microscale.(b) The deformed state of the beam for an applied displacement of 10 −2 L. The color corresponds to the macroscale displacement along the y−axis.The finite element discretization is shown by black lines and two Gauss points are highlighted by colored (red and blue) points.(c) The local shear stress distribution within the RVEs associated with the 2 Gauss points highlighted in (b).(d) Normalized shear stress profile along line highlighted by white dashes in (c).
7 .
80CRediT authorship contribution statement Mohit Pundir: Conceptualization, Methodology, Formal analysis, Investigation, Software, Writing -Original Draft, Visualization; David S. Kammer: Writing -Review & Editing, Resources, Supervision, Funding acquisition
1 :
81For a given macroscopic strain e 2: r(x) = σ(e(x) i ), e(x) i = e ▷ σ(ε) = C : ε 3: while true do 4:solve : F −1 { G(ξ) : σ(δe)(ξ)} = −F −1 { G(ξ) : σ(r)(ξ)} ▷ Linear iterative solver 5:
else 8 :
82r(x) = σ(e(x) i+1 ) Appendix B. Computation of incremental stresses for an elastoplastic material
83∆ε = ε t+∆t − ε t σ tr elas = C elas : (ε t elas + ∆ε) tr eq − (σ y + Hp t )
1 )
84This means that under such condition the macroscopic compliance matrix will be equal to average stress.Therefore,
Table 2 :
85The expected and the standard deviation values of the elasticity modulus and the Poisson ratio for the inclusion (E i and ν i ) and the matrix (E m and ν m ).
참고문헌 55건
- Differential Equations, Dynamical Systems, and an Introduction to Chaos Elsevier eBooks · Elsevier BV · 2013 10.1016/c2009-0-61160-0
- Nonlinear finite elements for continua and structures Choice Reviews Online · Association of College and Research Libraries · 2001 10.5860/choice.38-3926
- An FFT-based Galerkin method for homogenization of periodic media Computers & Mathematics with Applications · Elsevier BV · 2014 10.1016/j.camwa.2014.05.014
- Accelerating a FFT-based solver for numerical homogenization of periodic media by conjugate gradients Journal of Computational Physics · Elsevier BV · 2010 10.1016/j.jcp.2010.07.010
- Algorithm 755: ADOL-C ACM Transactions on Mathematical Software · Association for Computing Machinery · 1996 10.1145/229473.229474
- Topological derivative for multi‐scale linear elasticity models applied to the synthesis of microstructures International Journal for Numerical Methods in Engineering · Wiley · 2010 10.1002/nme.2922
- Automatic differentiation for stress and consistent tangent computation Archive of Applied Mechanics · Springer Science+Business Media · 2014 10.1007/s00419-014-0939-6
- Phase-field model during static recrystallization based on crystal-plasticity theory Journal of Computer-Aided Materials Design · Springer Nature · 2007 10.1007/s10820-007-9083-8
- A numerical method for computing the overall response of nonlinear composites with complex microstructure Computer Methods in Applied Mechanics and Engineering · Elsevier BV · 1998 10.1016/s0045-7825(97)00218-1
- A computational scheme for linear and non‐linear composites with arbitrary phase contrast International Journal for Numerical Methods in Engineering · Wiley · 2001 10.1002/nme.275
- Multi-scale computational homogenization: Trends and challenges Journal of Computational and Applied Mathematics · Elsevier BV · 2009 10.1016/j.cam.2009.08.077
- The method of moving asymptotes—a new method for structural optimization International Journal for Numerical Methods in Engineering · Wiley · 1987 10.1002/nme.1620240207
- Computational micro-to-macro transitions of discretized microstructures undergoing small strains Archive of Applied Mechanics · Springer Science+Business Media · 2002 10.1007/s00419-002-0212-2
- Consistent tangent moduli for multi-yield-surface J2 plasticity model Computational Mechanics · Springer Science+Business Media · 2011 10.1007/s00466-011-0576-7
- Efficient topology optimization in MATLAB using 88 lines of code Structural and Multidisciplinary Optimization · Springer Science+Business Media · 2010 10.1007/s00158-010-0594-7
- Determination of the tangent stiffness tensor in materials modeling in case of large deformations by calculation of a directed strain perturbation Computer Methods in Applied Mechanics and Engineering · Elsevier BV · 2015 10.1016/j.cma.2015.11.034
- A finite element perspective on nonlinear FFT-based micromechanical simulations International Journal for Numerical Methods in Engineering · Wiley · 2016 10.1002/nme.5481
- Finite strain FFT-based non-linear solvers made simple Computer Methods in Applied Mechanics and Engineering · Elsevier BV · 2017 10.1016/j.cma.2016.12.032
- An algorithmically consistent macroscopic tangent operator for FFT‐based computational homogenization International Journal for Numerical Methods in Engineering · Wiley · 2017 10.1002/nme.5627
- Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis 2023 10.1145/3581784
- Efficient Multiscale FE-FFT-Based Modeling and Simulation of Macroscopic Deformation Processes with Non-linear Heterogeneous Microstructures Lecture notes in applied and computational mechanics · Springer Nature · 2017 10.1007/978-3-319-65463-8_7
- A two‐scale FE‐FFT approach to nonlinear magneto‐elasticity International Journal for Numerical Methods in Engineering · Wiley · 2018 10.1002/nme.5993
- A FFT solver for variational phase-field modeling of brittle fracture Computer Methods in Applied Mechanics and Engineering · Elsevier BV · 2019 10.1016/j.cma.2019.02.017
- DBFFT: A displacement based FFT approach for non-linear homogenization of the mechanical behavior International Journal of Engineering Science · Elsevier BV · 2019 10.1016/j.ijengsci.2019.103131
- An FFT-based spectral solver for interface decohesion modelling using a gradient damage approach Computational Mechanics · Springer Science+Business Media · 2019 10.1007/s00466-019-01801-4
- Automatic Differentiation for Solid Mechanics Archives of Computational Methods in Engineering · Springer Science+Business Media · 2020 10.1007/s11831-019-09396-y
- Efficient two-scale FE-FFT-based mechanical process simulation of elasto-viscoplastic polycrystals at finite strains Computer Methods in Applied Mechanics and Engineering · Elsevier BV · 2020 10.1016/j.cma.2020.113566
- A review of nonlinear FFT-based computational homogenization methods Acta Mechanica · Springer Science+Business Media · 2021 10.1007/s00707-021-02962-1
- AuTO: a framework for Automatic differentiation in Topology Optimization Structural and Multidisciplinary Optimization · Springer Science+Business Media · 2021 10.1007/s00158-021-03025-8
- AutoMat: automatic differentiation for generalized standard materials on GPUs Computational Mechanics · Springer Science+Business Media · 2021 10.1007/s00466-021-02105-2
- JAX, M.D. A framework for differentiable physics* Journal of Statistical Mechanics Theory and Experiment · Institute of Physics · 2021 10.1088/1742-5468/ac3ae9
- The toughness of mechanical metamaterials Nature Materials · Nature Portfolio · 2022 10.1038/s41563-021-01182-1
- Advances in neural information processing systems 7 Computers & Mathematics with Applications · Elsevier BV · 1996 10.1016/s0898-1221(96)90463-0
- A Review of FE-FFT-Based Two-Scale Methods for Computational Modeling of Microstructure Evolution and Macroscopic Material Behavior Archives of Computational Methods in Engineering · Springer Science+Business Media · 2022 10.1007/s11831-022-09735-6
- The determination of the elastic field of an ellipsoidal inclusion, and related problems Springer eBooks · Springer Nature · 2007 10.1007/1-4020-4499-2_18
- Computational Inelasticity Interdisciplinary applied mathematics · Springer Nature · 1998 10.1007/b98904
- Topology Optimization Springer eBooks · Springer Nature · 2004 10.1007/978-3-662-05086-6
- Efficient topology optimization using compatibility projection in\n micromechanical homogenization arXiv (Cornell University) · Cornell University · 2021 10.48550/arxiv.2107.04123
- Fast Jacobian-Vector Product for Deep Networks arXiv (Cornell University) · Cornell University · 2021 10.48550/arxiv.2104.00219
- FFT-based Inverse Homogenization for Cellular Material Design International Journal of Mechanical Sciences · Elsevier BV · 2022 10.1016/j.ijmecsci.2022.107572
- Automatic Differentiation of C++ Codes on Emerging Manycore Architectures with Sacado ACM Transactions on Mathematical Software · Association for Computing Machinery · 2022 10.1145/3560262
- FFT-based homogenization at finite strains using composite boxels (ComBo) Computational Mechanics · Springer Science+Business Media · 2022 10.1007/s00466-022-02232-4
- Auxetic mechanical metamaterials and their futuristic developments: A state-of-art review Materials Today Communications · Elsevier BV · 2022 10.1016/j.mtcomm.2022.105285
- An optimal preconditioned FFT-accelerated finite element solver for homogenization Applied Mathematics and Computation · Elsevier BV · 2023 10.1016/j.amc.2023.127835
- An FFT-based crystal plasticity phase-field model for micromechanical fatigue cracking based on the stored energy density International Journal of Fatigue · Elsevier BV · 2023 10.1016/j.ijfatigue.2023.107670
- JAX-FEM: A differentiable GPU-accelerated 3D finite element solver for automatic inverse design and mechanistic data science Computer Physics Communications · Elsevier BV · 2023 10.1016/j.cpc.2023.108802
- Prediction and control of fracture paths in disordered architected materials using graph neural networks Communications Engineering · 2023 10.1038/s44172-023-00085-0
- An FFT-based framework for predicting corrosion-driven damage in fractal porous media Journal of the Mechanics and Physics of Solids · Elsevier BV · 2023 10.1016/j.jmps.2023.105388
- Control of Mechanical and Fracture Properties in Two‐Phase Materials Reinforced by Continuous, Irregular Networks Advanced Materials · 2023 10.1002/adma.202305198
- Computational homogenization of linear elastic properties in porous non-woven fibrous materials Mechanics of Materials · Elsevier BV · 2023 10.1016/j.mechmat.2023.104868
- Efficient computational homogenisation of 2D beams of heterogeneous elasticity using the patch scheme International Journal of Solids and Structures · Elsevier BV · 2024 10.1016/j.ijsolstr.2024.112719
- JAX-SPH: A Differentiable Smoothed Particle Hydrodynamics Framework arXiv (Cornell University) · Cornell University · 2024 10.48550/arxiv.2403.04750
- PyTorch 2: Faster Machine Learning Through Dynamic Python Bytecode Transformation and Graph Compilation 2024 10.1145/3620665.3640366
- Learning Force Field Parameters from Differentiable Particle-Field Molecular Dynamics Journal of Chemical Information and Modeling · American Chemical Society · 2024 10.1021/acs.jcim.4c00564
- Design of materials using topology optimization and energy-based homogenization approach in Matlab Structural and Multidisciplinary Optimization · Springer Science+Business Media · 2015 10.1007/s00158-015-1294-0