A Generalized Framework for Microstructural Optimization using Neural Networks
Abstract
Microstructures, i.e., architected materials, are designed today, typically, by maximizing an objective, such as bulk modulus, subject to a volume constraint.
However, in many applications, it is often more appropriate to impose constraints on other physical quantities of interest.
In this paper, we consider such generalized microstructural optimization problems where any of the microstructural quantities, namely, bulk, shear, Poisson ratio, or volume, can serve as the objective, while the remaining can serve as constraints.
In particular, we propose here a neural-network (NN) framework to solve such problems.
The framework relies on the classic density formulation of microstructural optimization, but the density field is represented through the NN’s weights and biases.
The main characteristics of the proposed NN framework are: (1) it supports automatic differentiation, eliminating the need for manual sensitivity derivations, (2) smoothing filters are not required due to implicit filtering, (3) the framework can be easily extended to multiple-materials, and (4) a high-resolution microstructural topology can be recovered through a simple post-processing step.
The framework is illustrated through a variety of microstructural optimization problems.
Introduction
Topology optimization is a computational strategy for distributing material within a design domain, to optimize performance.
It is now a mature field with multitude of methods, including homogenization, density methods, level set, topological sensitivity and evolutionary [5, 32, 44, 11, 12, 41, 4, 18].
On the other hand, in microstructural optimization , one aims to find the optimal topology, within a representative unit cell, that maximizes a localized material property.
Through microstructural design, one can customize various material behavior including bulk/shear modulus, Poisson’s ratio, thermal expansion, elasticity tensor and other extremal properties[27, 20, 39, 45, 34, 31, 30].
There are many applications of microstructural optimization in engineering; for example, energy dissipation [3], fluid applications [16], thermal applications [50], phononic applications [35], medical implants [19], and so on.
Further, with the advent of additive manufacturing, the fabrication of such microstructures is possible today.
These microstructures, also referred to as architected materials , may be arranged in periodic arrays to “exhibit previously unattainable combinations of material properties at the bulk scale."
In a typical microstructural optimization problem, one attempts to maximize a quantity of interest (such as bulk modulus), subject to a mass constraint (or equivalently, volume-fraction constraint).
However, in many applications, the desired mass is not known a priori.
Therefore, instead of imposing an arbitrary mass constraint, we consider imposing constraints on other physical quantities.
The main objective of this paper is to develop a framework for solving such generalized microstructural optimization problems.
Further, it has been observed [30] that the design of negative Poisson ratio (NPR) materials, using standard optimization techniques, can be particularly challenging.
Either specialized methods need to be developed [48] or heuristic parameters must be used [43].
Here, we show that standard L-BFGS optimization can be used for the robust design of NPR materials.
The remainder of this paper is organized as follows.
First, the critical concept of homogenization is briefly reviewed in Section 2.1.
Then, the current methods of microstructural optimization are reviewed in Section 2.2, with an emphasis on the classic density-based formulation.
Then, in Section 3.1, a generalized microstructural optimization problem.
To solve such a class of problems, we introduce a neural-network (NN) framework in Section 3.2 where the density field is represented through the weights associated with the NN.
This allows for automatic sensitivity computation which is essential for solving generalized problems.
In Section 3.3 the methodology to solve such generalized problems is discussed followed by the proposed algorithm in Section A.1.
Numerical examples are presented in Section 4.
Finally, conclusions and open issues are discussed in Section 5.
Background 2.1 Homogenization
In microstructural design, a common hypothesis is that the microstructure is locally periodic, and there is scale separation.
For example, Figure illustrates locally periodic microstructures and two representative unit cells.
Given a unit cell (microstructure) in 2D, a forward problem is to find its homogenized elasticity 3 × 3 matrix C H .
The theory of homogenization is well developed, for example, see [47, 18].
A typical numerical strategy [1] for computing C H is to impose three independent periodic boundary conditions (in 2D), and solve the resulting finite element problems; see Figure 2.
The stresses and strains from the three problems are then used to compute C H as described in [1].
Next, assuming isotropic, plane stress behavior[36], various quantities of interest, namely, bulk modulus ( K ), shear modulus ( G ) and Poisson ratio ( ν ) can be extracted from C H as follows:
[Equation]
1a)
[Equation]
2.2 Microstructural Optimization Methods
The inverse problem is to arrive at an optimal topology that maximizes or minimizes one of these quantities of interest.
There are several methods available today for optimizing microstructures; see, for example, [27, 14, 39, 37, 21, 17].
In the popular density-based methods, one defines a pseudo-density ρ e ∈ (0 , 1] over the underlying finite element mesh.
Then the microstructural optimization problem, of say, maximizing the bulk modulus, subject to a mass constraint (we prefer here a mass constraint over a volume constraint since this generalizes more easily to multiple materials), may be posed as follows:
[Equation]
subject to
[Equation]
where K is the stiffness matrix, u i and f i are the displacement vector and the external force vector for the three problems in Figure 2, v e is the volume of the finite element, λ e is the physical density of the base material, and ˆ m is the mass constraint.
In addition, the solid isotropic material with penalization (SIMP) penalization model is employed to link the density variables to the base material
[Equation]
The field can now be optimized using, for example, optimality criteria [6] or MMA [38], resulting in the desired microstructural topology; see [43], for example.
Similar problems can be posed, for example, to minimize the Poisson ratio, subject to a mass constraint.
Proposed Framework 3.1 Generalized Microstructural Problems
As stated earlier, in many applications, the mass constraint ˆ m (see Equation 2c) is not known a priori.
Instead, it may be more advantageous to impose constraints on physical quantities.
In this paper, we consider such generalized microstructural optimization problems of the form:
[Equation]
subject to
[Equation]
where the objective ϕ
( C H ) represents one of the following: the bulk modulus ( K ), shear modulus ( G ), Poisson ratio ( ν ), that depend on the density via the elasticity matrix, or mass ( m ) that depends directly on the density, and h j are equality constraints involving these quantities.
For example, the problem of maximizing the bulk modulus subject to a Poisson ratio constraint may be posed as: minimize
[Equation]
subject
[Equation]
where ˆ ν is the desired Poisson ratio.
Similarly, the problem of minimizing the mass subject to constraints on the bulk modulus and Poisson ratio may be posed as:
[Equation]
where ˆ K is the desired bulk modulus, and ˆ ν is the desired Poisson ratio.
In the remainder of this paper, we will consider solving such problems.
3.2 Representing Density using Neural Networks
One of the challenges in solving such generalized problems is computing the sensitivities of the objective and constraints.
Manual derivation can be cumbersome and error-prone, especially when the problem is recast within the context of augmented Lagrangian formulation (see Section 3.3).
We, therefore, propose here a neural-network (NN) framework that supports automatic sensitivity computation for gradient-based optimization [8].
The framework not only eliminates the burden of manual sensitivity calculations, it offers other computational advantages as discussed in the remainder of the paper.
In particular, we employ a simple fully-connected feed-forward neural network [7].
The input to the network are points ( x , y ) within the domain; the NN has a series of hidden layers associated with activation functions [15], [24].
The output is the density ρ at that point; see Figure 3.
Observe that the final layer is a SoftMax activation function [7] that ensures that the density lies between 0 and 1.
The density will depend on the weights and bias, i.e., they serve as the design variables w .
Neural network architecture for representing the density field.
Thus, we can now repose the generalized problem as:
[Equation]
to
[Equation]
Observe that an explicit (bound) constraint on the density field is not needed since it is automatically satisfied by the Softmax function.
To generalize the above framework to multiple materials, the output of the NN is increased to ( M +1) variables, where M is the number of non-void materials; see Figure 4.
No other change is needed in the framework, i.e., one can use exactly the same number of design variables w .
Further, due to the nature of Softmax function, the partition of unity condition:
[Equation]
is automatically satisfied, i.e., the sum of all densities is guaranteed to be unity.
Finally, the SIMP material model in Equation 3 is generalized to multiple materials as follows:
[Equation]
3.3 Augmented Lagrangian
To solve both the single and multi-material problems, we will use the augmented Lagrangian method [26], i.e., let
[Equation]
where the penalty parameters α j and Lagrange multipliers µ j are updated through iterations.
First, starting with a small value for α j and a zero value for µ j the augmented Lagrangian is minimized using the popular L-BFGS method [26].
Then, the coefficients α and µ are updated as follows (see
Section 4):
[Equation]
The optimization is repeated until convergence.
For termination, we consider two quantities
[Equation]
and
[Equation]
The algorithm terminates when both quantities are less than a prescribed value (see Section 4 for details).
The overall framework is illustrated in Figure 5.
3.4 Automatic Differentiation
Since L-BFGS is a gradient-based optimizer, it requires sensitivities, i.e., derivative of the loss function with respect to the design variables (weights of the NN).
In the present framework, all computations including FEA are captured using PyTorch (that supports automatic differentiation) as illustrated in fig.
Thus, not only can we compute the spatial gradients of the density field, one can also compute the sensitivities of the loss function with respect to the weights in an automated fashion as illustrated.
Numerical examples
In this section
[Table]
we conduct several numerical experiments to illustrate the proposed algorithm (refer
Appendix for algorithm).
The implementation is in Python, within the PyTorch environment.
All experiments were conducted on an Intel i9-11900K @
3.50GHz GHz, equipped with 32 GB of RAM.
The default parameters are listed in Table 1.
We use the popular SIMP continuation scheme [29] for the material model.
For the default NN configuration of 5 layers and 30 neurons per layer, the number of design variables w (weight and bias) is 3872.
[Table]
The default initial topology is a square block as illustrated in Figure 7.
Through the experiments [Table] we investigate the following:
Validation : First, we consider classic mass constrained optimization of bulk modulus, shear modulus, and Poisson ratio, and compare some of the computed values against wellestablished theoretical results.
Convergence : The typical convergence of the algorithm is then illustrated.
Initial Topology : Next, we consider initial topologies different from the one in Figure 7 and optimize for maximum bulk modulus.(Appendix) 4.
Impact of NN Configuration : We then vary the NN size and consider its impact on Poisson ratio minimization.
(Appendix) 5.
Impact of Mesh Size : We repeat the above experiment but vary the mesh size instead of the NN size.(Appendix) 6.
Generalized Problems : We then consider several generalized microstructural problems.
High Resolution Sampling :
We then discuss the idea of high-resolution sampling that the proposed framework supports.(Appendix) 8.
Evaluation of Poisson Ratio : For designs with negative Poisson ratio, we compare the predicted homogenized Poisson ratio against those predicted through a full-scale analysis using ANSYS.(Appendix) 9.
Multi-Material Design : Finally, we present results for multiple materials.(Appendix)
4.1 Validation
First, we consider the classic problem of bulk modulus maximization subject to a mass-fraction constraint of 0.3.
The resulting topology, computed in 47 seconds, is illustrated in Figure 8a.
Similarly,
Figure 8b illustrates a microstructure with maximal shear modulus for the same mass constraint, computed in 53 seconds.
Finally, Figure 8c illustrates the microstructure when the Poisson ratio is minimized for the same mass constraint, computed in 55 seconds.
[Figure]
Table 2 compares the computed bulk modulus for various mass fractions, against the HashinShtrikman upper bound.
[Table]
4.2 Convergence
Recall that the error in the objective ϵ ϕ and error in the constraints ϵ g , defined in Equationand Equation 13 respectively, are computed at the end of every L-BFGS iteration.
The algorithm terminates when ϵ ϕ < ˆ ϵ ϕ
and ϵ g <
ˆ ϵ g specified in Table 1.
Figure 9a illustrates the objective error ϵ ϕ and the constraint error ϵ g for bulk modulus maximization, while Figure 9b illustrates the two errors for Poisson ratio minimization.
[Figure]
In the experiments, we observed that 3 to 20 L-BFGS iterations are sufficient.
Further, each L-BFGS iteration typically involves 2 to 10 inner iterations.
The homogenized properties are recorded at the end of every inner iteration.
Figure 10a illustrates these quantities for bulk modulus maximization, and Figure 10b illustrates these for Poisson ratio minimization.
The spikes observed in the two figures correspond to the start of a new L-BFGS iteration when the penalty parameters are updated. [Figure]
4.3 Generalized Problems
To illustrate the benefits of the proposed framework, we first used the MATLAB code published in [43] to minimize the Poisson ratio to a mass constraint of ˆ m = 0 .
The algorithm did not terminate; the final topology, after a maximum allowable 450 FE operations (15 seconds), is illustrated in Figure 11a; it exhibits the following characteristics ν
= − 0 .
23 , K = 0 .
015 and G = 0 .
Observe that the microstructure is weak in bulk and shear.
In the proposed framework, the bulk modulus was maximized subject to ν = − 0 .
23 and ˆ m = 0 .
5 , i.e., the constraints are consistent with the results obtained above.
The resulting topology, after[-
-]
FE operations (52 seconds), illustrated in Figure 11b exhibits the following characteristics m
= 0 .
5 , ν = − 0 .
23 , K = 0 .
027 and G = 0 .
Thus the proposed framework increases the bulk modulus by a factor of about 2 .
For approximately the same number of finite element operations, the proposed framework is slower due to the overhead of automatic differentiation.
Next, the shear modulus was maximized subject to ν = − 0 .
23 and ˆ m = 0 .
The resulting topology after 560 FE operations (91 seconds), illustrated in Figure 11c exhibits the following characteristics m = 0 .
5 , ν = − 0 .
23 , K = 0 .
027 and G = 0 .
027 , i.e., the bulk and shear moduli increased by a factor of 10 .
[Figure]
One can also impose multiple physical constraints within the proposed framework.
Consider the minimization of the mass, subject to bulk modulus and Poisson ratio constraints.
Figure 12 illustrates three designs obtained for three different scenarios.
The corresponding mass fractions are 0.34, 0.63, and 0.82.
One can also target a specific elasticity matrix ˆ C H .
We consider a specific example from [48]:
[Equation]
[Figure]
Note that there may exist multiple solutions (with significantly different masses) with the same C H [39].
Using our framework by imposing the target C H and a target mass as constraints, one can obtain different designs; these are illustrated in Figure 13a and 13b, with mass target of 0.40 and 0.52, respectively.
A solution, with a mass of 0.37 was reported in [48]; see Figure 13c.
[Figure]
Conclusions
This paper presents a generalized neural-network-based framework for microstructural optimization where any of the microstructural quantities, namely, bulk, shear, Poisson ratio, volume or mass, can serve as the objective, while the remaining can be subject to constraints.
The NN-based representation, which is independent of analysis finite element mesh, provides for greater design freedom.
The analytical representation also enables generation of high-resolution designs at no cost.
Since the sensitivities are computed in automated fashion, one can avoid the error-prone task of manual derivations.
This can be particularly useful, for example, when the material is non-linear.
Further, we avoided heuristics for designing NPR materials.
Instead we relied on standard L-BFGS optimization techniques.
Experiments demonstrate that the proposed method is more robust than existing methods for generalized problems.
This supports repeatability and wider adaption of the framework as a powerful design tool.
Due to the overhead cost of automatic differentiation (AD), the framework was found to be slower than, say, the MATLAB implementation presented in [43].
However, we believe the benefits of AD outweigh the computational costs.
We also noted that the designs were sensitive to mesh discretization.
Since this is not usually desirable in topology optimization, further investigation is needed to study the interplay between the neural network and mesh discretization.
There are several directions for future research: extension to multi-physics [10], 3D [2], geometric and material non-linearity [40], inclusion of stress constraints [9], multi-stable materials [46], and inclusion of feature size and manufacturing constraints [13, 22, 49] within the NN framework.
Acknowledgments
The authors would like to thank the support of the National Science Foundation through grant CMMI 1561899, and the U. S. Office of Naval Research under PANTHER award number N00014-21-1through Dr. Timothy Bentley.
Compliance with ethical standards
The authors declare that they have no conflict of interest.
Replication of Results
The Python code pertinent to this paper is available at https://github.com/UW-ERSL/MicroTOuNN.
[-▷ Inputs 2: Ω init → w ▷ Initialize NN weights 3: Ω 0 → Ω 0 h ▷ Domain discretization 4: x = { x e , y e } e ∈ Ω 
-]
[-NN (0 . 5( x 1 + x 2 ) , 0 . 
-]