0% found this document useful (0 votes)
26 views11 pages

A 149 Line Homogenization Code

Uploaded by

wyichen751
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views11 pages

A 149 Line Homogenization Code

Uploaded by

wyichen751
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

A 149 Line Homogenization Code

Guoying Dong
Department of Mechanical Engineering, for Three-Dimensional Cellular
McGill University,
817 Rue Sherbrooke Ouest, Room G53,
Montreal, QC H3A 0C3, Canada
Materials Written in MATLAB
e-mail: [email protected]
Cellular architectures are promising in a variety of engineering applications due to
Yunlong Tang attractive material properties. Additive manufacturing has reduced the difficulty in the
Department of Mechanical Engineering, fabrication of three-dimensional (3D) cellular materials. In this paper, the numerical
McGill University, homogenization method for 3D cellular materials is provided based on a short, self-
817 Rue Sherbrooke Ouest, Room G53, contained MATLAB code. It is an educational description that shows how the homogenized
Montreal, QC H3A 0C3, Canada constitutive matrix is computed by a voxel model with one material to be void and
e-mail: [email protected] another material to be solid. A voxel generation algorithm is proposed to generate the
voxel model easily by the wireframe scripts of unit cell topologies. The format of the wire-
Yaoyao Fiona Zhao1 frame script is defined so that the topology can be customized. The homogenization code
is then extended to multimaterial cellular structures and thermal conductivity problems.
Department of Mechanical Engineering,
The result of the numerical homogenization shows that different topologies exhibit aniso-
McGill University,
tropic elastic properties to a different extent. It is also found that the anisotropy of cellu-
817 Rue Sherbrooke Ouest, Room 148,
lar materials can be controlled by adjusting the combination of materials.
Montreal, QC H3A 0C3, Canada
[DOI: 10.1115/1.4040555]
e-mail: [email protected]
Keywords: cellular material, lattice structure, MATLAB, numerical homogenization

1 Introduction decades. It assumes that each field quantity depends on two differ-
ent scales: macroscopic level and microscopic level. The basic
Cellular materials are evolved from nature to achieve high stiff-
theory has been covered in detail in some literature [7,8]. Bendsøe
ness and strength with low density. Humankind had manufactured
and Kikuchi [9] used this method to get the effective elastic mod-
cellular architectures such as foams and honeycombs to mimic
ulus of a unit cell. It was also implemented in a design procedure
natural cellular materials decades ago. However, they were less
to find the optimal topology of a unit cell under a certain boundary
sophisticated than natural cellular materials due to the limitation
condition. Arabnejad and Pasini [10] investigated the mechanical
of manufacturing techniques. Recently, with the development of
properties of six different lattice topologies for a whole range of
additive manufacturing (AM), cellular materials have been fabri-
relative density by asymptotic homogenization. The homogeniza-
cated with more complicated structures and novel architectures
tion equation is discretized and solved via FEA. This is often
[1]. The lattice structure, which is a type of cellular material with
referred as numerical homogenization. Hassani and Hinton [6,11]
interconnected structs and nodes in a three-dimensional (3D)
reviewed the methods of numerical homogenization to solve gen-
space, has been successfully manufactured by several types of
eral boundary value problems with periodic boundary conditions.
AM techniques. Due to controllable properties, periodic lattice
Andreassen and Andreasen [12] summarized the formula to com-
structures with different topologies and relative densities are
pute the homogenized elasticity tensor EH ijkl and used numerical
widely used in engineering applications for high stiffness-to-
methods to solve the two-dimensional (2D) homogenization prob-
weight ratio [2,3], energy absorption [4], thermal management
lem by MATLAB. EH ijkl can be computed as
[5], etc.
The complex structure of cellular materials not only makes it ð   
1 ðijÞ ðijÞ
difficult for fabrications but also leads to high computational cost EH
ijkl ¼ Epqrs e0ðijÞ
pq  epq e 0ðijÞ
rs  ers dX (1)
for the simulation of their property. Because of small features j Xj X
inside the material, finite element analysis (FEA) requires fine
mesh to model cellular materials. If the structure is constructed by where Epqrs is the locally varying elasticity tensor, jXj is the vol-
0ðijÞ
lots of unit cells, the computational cost is extremely high. To ume of the unit cell, epq are prescribed macroscopic strain fields,
reduce the complexity of simulation, homogenization methods ðijÞ
while the locally varying strain fields epq are defined as
can be used to compute the macroscopic cellular material proper-
ties. Homogenization refers to a method that can replace the com- 1  ij 
posite with an equivalent material model in order to resolve the eðijÞ ð ij Þ ¼
pq ¼ epq X X p;q þ X ijq;p (2)
2
difficulty in the analysis of boundary value problem with high het-
erogeneities [6]. In this method, the local problem is solved to where X kl is the displacement fields which can be found by solv-
obtain the homogenized material property based on unit cell. ing the following equation:
Then the overall problem is computed by assigning a solid mate- ð ð
rial with the homogenized property to substitute the periodic
structure. Eijpq eij ðvÞepq ðX kl ÞdX ¼ Eijpq eij ðvÞepq
0ðklÞ
dV 8v 2 X (3)
X X
Asymptotic homogenization has been widely used to character-
ize the mechanical properties of cellular materials for several where v is a virtual displacement field. The code provided in Ref.
[12] can solve Eq. (3) and computes the homogenized elasticity
tensor for a 2D composite material. It can also be used to solve
1
Corresponding author. 2D cellular material by assigning an extremely soft second
Contributed by the Materials Division of ASME for publication in the JOURNAL OF material.
ENGINEERING MATERIALS AND TECHNOLOGY. Manuscript received October 25, 2017;
final manuscript received May 24, 2018; published online July 10, 2018. Assoc. However, as AM has greatly relieved the manufacturing con-
Editor: Toshio Nakamura. straints in the fabrication of 3D cellular materials, the interest in

Journal of Engineering Materials and Technology JANUARY 2019, Vol. 141 / 011005-1
C 2019 by ASME
Copyright V

Downloaded From: http://materialstechnology.asmedigitalcollection.asme.org/ on 07/25/2018 Terms of Use: http://www.asme.org/about-asme/terms-of-use


cellular materials is shifting from 2D to 3D. Three-dimensional (address) is the address of the wireframe file. The third argument
cellular materials have more design freedoms so that the mechani- (radius) is the radius of the lattice strut. There are two outputs.
cal performance can be further optimized than 2D cellular materi- The first output “voxel” is a 3D logical matrix, in which “0”
als. The implementation of 2D problem detailed in Ref. [12] is not means the voxel in this place does not have material, and “1”
enough for the need of designers. Nevertheless, the difficulty in means this voxel has material. The second output measures the
the analysis of cellular materials is increased by adding one relative density of the lattice structure.
dimension. The existing implementations of the homogenization
method for 3D problems are mathematically complex. It is diffi- 2.2 Generate the Voxel in the Design Space. The design
cult for designers without strong mathematical backgrounds to uti- space in this research is dimensionless, which is inside a cube
lize this method. Therefore, it is necessary to have a simple, self- with a unit length. By dividing the unit length with the number of
contained code that can analyze the mechanical properties of 3D voxel on each axis, the size of each voxel can be obtained. To
cellular materials. store the information of each voxel, the index and the center coor-
In this paper, an educational MATLAB code is provided in the dinates are calculated and saved. The index is used to identify the
Appendix, which can compute the homogenized constitutive position of the voxel in the 3D logical matrix. As shown in
matrix for 3D cellular materials. It removes the barrier for design- Fig. 2(a), the voxels are all generated in the first octant of the 3D
ers who want to use the numerical homogenization. It also gives Cartesian coordinate and they start from the origin. Figure 2(b)
instructions for those who want to understand how the asymptotic shows voxel in each layer along the z-axis. The gray voxel means
homogenization method is implemented. The implementation of it has material, while the white color means there is no material in
the homogenization code is restricted to analyzing the linear elas- this voxel. The 3D logical matrix that represents this voxel model
tic property of the cellular material. The input of this code is a 3D is shown in Fig. 2(c). The coordinates measure the center position
voxel model with isotropic material properties for each element. of each voxel which is used to calculate the distance between the
The voxel model can be obtained by the voxelization of the geo- voxel and the lattice strut. Once the number of voxels along each
metrical model. Furthermore, to reduce the complex procedure of axis is determined, the size, index, and position of each voxel can
geometrical modeling and voxelization of 3D cellular materials, a be generated.
simple and concise MATLAB code provided in the Appendix can
directly generate the voxel model of predefined topologies. In
Sec. 2, the voxelization code is introduced. The format of the pre- 2.3 Determine if the Voxel has Material. After the genera-
defined topology will be explained, which is the input of the voxe- tion of voxels, the next step is to determine if the voxel has mate-
lization code. In Sec. 3, the implementation of numerical rial. The criterion is to measure the minimum distance from the
homogenization will be illustrated. Section 4 discusses the result center of the voxel to each line segment of the wireframe. If the
obtained from the homogenization code. In Sec. 5, some extension distance is less than the radius of the lattice strut, that means this
of the MATLAB code will be introduced to broaden the application. voxel is inside the lattice. Therefore, the value of this voxel will
Finally, this paper is concluded in Sec. 6 with some future work. be set to 1, which means it has material. Otherwise, the value of
this voxel will be set to 0, which means it is empty. When calcu-
lating the minimum distance, two cases should be considered as
2 Voxel Generation shown in Fig. 3. Two planes, plane A and plane B, are defined to
Numerical homogenization requires a finite element model of distinguish case 1 and case 2. Plane A and plane B are located at
the lattice structure. That means a geometrical model should be the start point and the end point of the line segment, respectively.
generated at first. Then, the geometrical model is discretized by Both planes are perpendicular to the line segment. In case 1, the
3D solid elements. These procedures are tedious and time- center of the voxel is located inside the area between plane A and
consuming. Another way is to use a voxel model to represent the plane B. In this case, the minimum distance is from the center
lattice structure. This still requires the generation of the geometri- point to the line. However, if the center of the voxel is located out-
cal model. To facilitate the procedure of getting the homogeniza- side the area between plane A and plane B, which is case 2, the
tion model of lattice structures, a voxelization algorithm based on minimum distance is from the center point to the start point or the
the lattice wireframe has been proposed. In this algorithm, the endpoint of the line segment. If the center point is exactly on
voxels are directly generated from the lattice wireframe, which plane A or plane B, it is included in case 2.
skips the generation of the geometrical model. This voxel model To decide whether a voxel is in case 1 or case 2, two angles, a
can be used as an input to the numerical homogenization code. and b; are defined in Fig. 3. If both a and b are acute angles, this
voxel is in case 1. Otherwise, it is in case 2. Therefore, the first
2.1 Read the Information of Lattice Wireframe. To gener- step to determine whether a voxel has material or not is to calcu-
ate the voxel model, the information of the lattice topology wire- late a and b. Then, the minimum distance between the voxel cen-
frame needs to be predefined. The wireframe contains two parts: ter and the ling segment is determined. The last step is to compare
GRID and STRUT. GRID defines the coordinates of all the nodes the minimum distance with the radius of lattice strut. If the mini-
in the wireframe. Its format is shown in Table 4 in the Appendix, mum distance is smaller than the radius, the index of this voxel
where “ID” is the grid index, x is the x-coordinate, y is the y- will be set to 1. Otherwise, it is set to 0. After calculating all the
coordinate, and z is the z-coordinate. STRUT defines the start grid voxels, the 3D logical matrix representing the voxel model of lat-
index and end grid index. Its format is shown in Table 5 in the tice structures is obtained. Examples of voxel models for seven
Appendix, where ID is the strut index, “Start” is the grid index of topologies of lattice structures are shown in Fig. 4. These models
the start node, and “End” is the grid index of the end node. These can be directly used for the proposed homogenization method in
grid indices refer to the ID in the GRID. Each field of GRID and MATLAB.
STRUT takes eight spaces. The wireframe script can be down-
loaded from the link in the Appendix. Furthermore, users can 3 MATLAB Implementation for Three-Dimensional
define new wireframe script based on the format shown in Tables
4 and 5 in the Appendix. The visualization of these topologies is Homogenization
shown in Fig. 1. In the implementation of numerical homogenization by MATLAB,
The next step is to use the information of the wireframe to gen- there are three inputs (lx), (ly), and (lz), which indicate the length
erate the voxel model. The MATLAB code provided in the Appendix of the unit cell along x, y, and z axes, respectively. The input argu-
named “GenerateVoxel.m” computes the voxel model. The first ments (lambda) and (mu) are the Lame’s first and second parame-
argument (n) is the resolution of the voxel, which means the num- ter for the solid material which the lattice structure is made of.
ber of voxels along x, y, and z axes. The second argument The last input argument (voxel) is the material indicator matrix,

011005-2 / Vol. 141, JANUARY 2019 Transactions of the ASME

Downloaded From: http://materialstechnology.asmedigitalcollection.asme.org/ on 07/25/2018 Terms of Use: http://www.asme.org/about-asme/terms-of-use


Fig. 1 Wireframe of seven topologies

Fig. 2 An example of the voxel model of a lattice structure with cubic topology: (a) perspective view, (b) top view
of each layers, and (c) 3D logical matrix

Fig. 3 Two cases when calculating the minimum distance from voxel center to the line seg-
ment of lattice wireframe

which specifies whether a finite element contains materials n, g, and l. These coordinates are also shown in Fig. 5. The shape
(voxele ¼ 1) or not (voxele ¼ 0). This matrix can be obtained by function can be summarized as
the method proposed in Sec. 2. It requires the finite elements with
materials to be connected. If they are not connected, a two- 1
Nie ¼ ð1 þ nni Þð1 þ ggi Þð1 þ lli Þ (4)
material model with a very soft second material should be used, 8
which will be introduced in Sec. 5.
where ni , gi , and li are the natural coordinates of the ith node.
The element stiffness matrix is given by the standard formula
3.1 Stiffness Matrix and Load Vectors of Hexahedron. The
type of element used in this homogenization is an eight-node hex- ð
ahedron element [13]. The local node number of hexahedron ele- KðeÞ ¼ BT CðeÞ BdXðeÞ (5)
ment is shown in Fig. 5. The natural coordinates for it are called XðeÞ

Fig. 4 Voxel models of seven topologies

Journal of Engineering Materials and Technology JANUARY 2019, Vol. 141 / 011005-3

Downloaded From: http://materialstechnology.asmedigitalcollection.asme.org/ on 07/25/2018 Terms of Use: http://www.asme.org/about-asme/terms-of-use


where B is the strain-displacement matrix, and C is the constitu- Fig. 6(d). The relationship between the nonperiodic and periodic
tive matrix for the element, which is constant over the element. degrees-of-freedom is obtained in lines 34–37 and stored in
The material is assumed to be isotropic over each element. The “dofVector.” Finally, line 38 updates the degrees-of-freedom of
constitutive matrix can be expressed by Lame’s parameters as each element from nonperiodic to the periodic condition.
2 3
1 1 1 0 0 0 3.3 Global Stiffness Matrix and Load Vector. Before
61 1 1 0 0 07 assembly of the global stiffness matrix, the indices of the nonzero
6 7 entries in the global stiffness matrix are created in two vectors by
61 1 1 0 0 07
CðeÞ ¼ kðeÞ 6
60 0 0 0 0 07
7 lines 42 and 43. These two vectors are used to denote the position
6 7 of the entry in the global stiffness matrix. For single material lat-
40 0 0 0 0 05
tice structures, there are two types of elements. One type is the
0 0 0 0 0 0
2 3 solid part that will be assigned to material properties. The other
2 0 0 0 0 0 type is void in the lattice structure, where the Lame’s parameters
60 2 0 0 0 07 are zero. Line 45 creates the matrices with material properties kðeÞ
6 7
6
ðeÞ 6 0 0 2 0 0 07 and lðeÞ for each element by the indicator matrix “voxel.” These
þl 6 7 (6) matrices are then used to compute the stiffness matrix for each
7
60 0 0 1 0 07 element by multiplying the material properties kðeÞ and lðeÞ with
40 0 0 0 1 05
0 0 0 0 0 1 kk and kl in line 47. After obtaining the stiffness matrix for each
element, the sparse global stiffness matrix is assembled by indices
vectors and element stiffness matrix in line 48. Due to rounding
where kðeÞ and lðeÞ are the first parameter and second parameter of
errors, the global stiffness matrix may not be exactly symmetric.
Lame’s constants. They can be computed by the following for-
Line 49 can eliminate the error to make the matrix symmetric so
mula [14]:
that the speed of the solver can be accelerated. For 3D problems,
E E the computational cost could be a problem. Therefore, the symme-
k¼ ;l ¼ (7) try of global stiffness matrix is important in solving the large sys-
ð1 þ Þð1  2Þ 2ð1 þ Þ tem of linear equations.
In the assembly of load vectors, the indices vectors “iF” and
where E is Young’s modulus, and  is Poisson’s ratio. By using “jF” are generated in lines 51–52 to denote the row and column of
Lame’s parameters, the element stiffness matrix can be split into nonzero entries of the global load vector. For the element with
two parts as solid materials, the local load vector is calculated by multiplying
the material properties kðeÞ and lðeÞ with f k and f l in line 54. For
KðeÞ ¼ kðeÞ kk þ lðeÞ kl (8) the elements that are void, the load vectors are zero. Finally, the
global load vector is assembled in line 55.
which will simplify the extension to two or more materials. How-
ever, it should be noted that Eq. (8) is restricted to isotropic mate- 3.4 Solution by Preconditioned Conjugate Gradients
rials. The load vector is calculated by the macroscopic volumetric Method. Compared with 2D problems, the 3D problem consider-
straining ably increases the computational cost. Using vi ¼ Knf i in MATLAB
ð to solve global equation costs a lot of memory if the number of
f iðeÞ ¼ BT CðeÞ ei dXðeÞ (9) elements is large. Preconditioned conjugate gradients (PCG)
XðeÞ method is used to solve the system of linear equations. Even
though it not as fast as using vi ¼ Knf i in some cases, it can save
where the macroscopic strains are lots of memory. The comparison between these two methods is
shown in Table 1. It is found that both methods have advantages
e1 ¼ ð1; 0; 0; 0; 0; 0ÞT ; e2 ¼ ð0; 1; 0; 0; 0; 0ÞT ; e3 ¼ ð0; 0; 1; 0; 0; 0ÞT in different cases. In this code, PCG is the default method. How-
e4 ¼ ð0; 0; 0; 1; 0; 0ÞT ; e5 ¼ ð0; 0; 0; 0; 1; 0ÞT ; e6 ¼ ð0; 0; 0; 0; 0; 1ÞT ever, vi ¼ Knf i is also an optional method which is deactivated in
(10) lines 65–66. If users need to use the direct method, they can

Similarly, the load vector f iðeÞ can also be split into two parts as

f iðeÞ ¼ kðeÞ f ik þ lðeÞ f il (11)

The split parts of element stiffness matrix and load vector are cal-
culated by calling the function “hexahedron,” which will output
kk , kl , f ik ; and f il .

3.2 Periodic Boundary Conditions. The structure of the


mesh to model the unit cell is illustrated in Fig. 6. There are eight
elements in this example. The ID of each element is shown in Fig.
6(a). The nodes can be divided into three layers: First, the node
number without the periodic boundary condition for each node is
shown in Fig. 6(b). As for each element, the 24 degrees-of-freedom
(DOFs) are saved in “edof.” Each row of edof is for one element,
and the bold number represents the element ID. The sequences of
degrees-of-freedoms in each row of edof are arranged according to
the local degrees-of-freedoms. To demonstrate it, the comparison
between global node numbers and local node numbers for the first
element is shown in Fig. 6(c). Second, lines 24–32 generate the per-
iodic boundary condition by mirroring the back, left, and top border Fig. 5 Local node numbers and the natural coordinate of hexa-
in sequence, and the periodic degrees-of-freedom are shown in hedron element

011005-4 / Vol. 141, JANUARY 2019 Transactions of the ASME

Downloaded From: http://materialstechnology.asmedigitalcollection.asme.org/ on 07/25/2018 Terms of Use: http://www.asme.org/about-asme/terms-of-use


Fig. 6 An example of hexahedron mesh used to model the unit cell: (a) the ID of each element, (b) the nonperiodic node
number, (c) global node number of element 1 compared to local node number, and (d) periodic node numbers

simply activate lines 65–66 and deactivate lines 60–64. It should between the 2D and 3D problem is the number of constrained
be noted that when using PCG method, the matrix should be sym- degrees-of-freedom. The 2D problem only needs to constrain three
metric and positive definite. The global stiffness matrix satisfies degrees-of-freedom, while the 3D problem needs to constrain six
these requirements so that it can be efficiently solved by PCG degrees-of-freedom so that the element stiffness matrix is not singular.
method. To accelerate the speed of computation, only the degrees- Line 72 explains which degrees-of-freedom are constrained to calcu-
of-freedom of element with solid materials are activated in line late the elementary displacements. Because all the elements are equiv-
58. The void element without material properties will not be con- alent, the resulting displacements are the same for each element.
sidered in the computation. But this procedure requires these The next step is to use the element displacements and the global
active elements to be connected. displacement field to calculate the homogenized constitutive
To accelerate the convergence of PCG method, a proper pre- matrix CH . The entries in CH can be calculated by the following
conditioner should be obtained at first. The function “ichol” with equation:
only one input argument is used to construct an incomplete Cho- ð 
1 X 
lesky factorization with zero-fill. The output can be used as a pre- ðÞ ðiÞ 0ðjÞ ðjÞ
CHij ¼ vð0eÞi  vðeÞ ÞT ke ðvðeÞ  vðeÞ dXðeÞ (12)
conditioner in PCG method. Furthermore, the PCG method should jXj ðeÞ XðeÞ
specify the tolerance and the maximum number of iteration. If the
relative residual is less than the tolerance or if the number of itera- ðÞ
tion exceeds the maximum value, the PCG method will stop and where vð0eÞi is the element displacements corresponding to the ith
return a result with the minimum relative residual. In this paper, ðiÞ
unit strain in Eq. (10). vðeÞ is the displacement field obtained from
the default tolerance is 1010 , and the maximum number of itera-
the global stiffness equation. X is the total volume of the unit cell
tion is 300. These two parameters can be adjusted by users. For
of the lattice structure. The summation is computed in lines
instance, a lower tolerance and a larger number of iteration will
85–96. The k part and l part are computed separately, and these
return a more accurate result, but it takes more time to run the
PCG method. In lines 61–64, PCG is run six times to get the dis- two parts are multiplied with kðeÞ and lðeÞ . Then, the result for all
placement field under six loading conditions. the elements is summed together to get CH ij . After the iteration for
all six unit strains, the 6  6 homogenized constitutive matrix CH
is obtained.
3.5 Homogenization. The homogenization procedure is similar
to the procedure for 2D problems proposed by Andreassen and 4 Results and Discussion
Andreasen [12]. First, the element displacements corresponding to
unit strain cases are found in lines 69–82. Elements’ nodal displace- 4.1 Homogenized Constitutive Matrix. In this section, an
ment is solved under the uniform strains in Eq. (3). The difference example is used to illustrate how to use the proposed method to

Table 1 The comparison between the PCG method and the direct method

PCG method vi ¼ Knf i

Resolution Topology Relative density (%) Memory (MB) Time (s) Memory (MB) Time (s)

50 Grid 30 3250 46 6300 15


50 3690 77 19,600 127

Journal of Engineering Materials and Technology JANUARY 2019, Vol. 141 / 011005-5

Downloaded From: http://materialstechnology.asmedigitalcollection.asme.org/ on 07/25/2018 Terms of Use: http://www.asme.org/about-asme/terms-of-use


get the homogenized property of lattice structures. To run the voxel model of lattice structure is generated with three different
homogenization code, the voxel model has to be generated first. relative densities: 10%, 30%, and 50%. Because the total strut
The lattice structure with the cubic topology is used as an exam- lengths in different topologies are different, the strut radius needs
ple. The strut radius of the lattice structure is set to be 0.1; the to be determined case by case. Table 2 shows the strut radius for
path of the strut file is saved in variable “address”; the resolution each topology with different relative densities. The strut radius is
is set to be 50. Run the file “GenerateVoxel.m,” and it can be dimensionless, and the length of the unit cell is regarded as one.
downloaded in the Appendix as Because the elastic properties of lattice structures exhibit high
anisotropy, the homogenized Young’s modulus varies in different
[voxel, Density] ¼ GenerateVoxel(50, address, 0.1) orientations [15]. To illustrate the anisotropy of different types of
where voxel is a logical matrix that indicates the element in the lattice structures, the effective Young’s modulus surfaces are used
lattice structure has materials or not. “Density” estimates the rela- to display the Young’s modulus in all the directions in a 3D space
tive density of this lattice structure, which is 8.44% in this case. as shown in Figs. 8–10.
The next step is to determine material property. It is assumed that It can be found that the cubic and X-shape topologies exhibit
the Young’s modulus of the material is 200 GPa, and the Poisson’s the higher anisotropy than other topologies. Because for isotropic
is 0.3. From Eq. (7), the Lame’s first and second parameters are materials, the Young’s modulus surface should be a spherical sur-
calculated as 115.4 and 76.9, respectively. The size of the unit cell face, which means the Young’s modulus is identical in all the
is 1 in x, y, and z directions. Run the file “homo3D.m,” and it can directions. However, the cubic topology has much higher Young’s
be downloaded in the Appendix as modulus in axial directions, while the X-shape topology has
higher Young’s in diagonal directions. When the relative density
CH ¼ homo3D(1,1,1,115.4,79.6,voxel) is 10%, the strength of these two topologies in weak direction is
The homogenized constitutive matrix is close to zero, which means they are very soft in those directions
(diagonal direction for cubic and axial direction for X-shape).
2 3 However, with the increase of relative density, the anisotropy in
7:06 0:37 0:37 0 0 0
6 0:37 7:06 0:37 0 0 0 7 these two topologies is decreasing. For instance, the maximum
6 7 Young’s modulus is more than ten times larger than the minimum
6 0:37 0:37 7:06 0 0 0 7
H
C ¼6 6 7 (13) Young’s modulus of the cubic topology when relative density is
6 0 0 0 0:14 0 0 7 7 10%. But the ratio is reduced to around 2:1 when the relative den-
4 0 0 0 0 0:14 0 5 sity increases to 50%. The X-shape topology follows the similar
0 0 0 0 0 0:14 trend. Even though they exhibit high anisotropy, the maximum
Young’s modulus in these two topologies is higher than other top-
From the homogenized constitutive matrix, it can be concluded ologies. Therefore, if the principal stress is in a certain direction,
that this lattice structure has orthotropic material properties. these two topologies might be preferred. But if the loading case is
Because of symmetry, the property along x, y, and z directions is varying and the stress field is complex, these two topologies with
the same. To get the Young’s modulus along the axial direction, a low relative density should be avoided.
the inverse of the constitutive matrix should be calculated, which The material property of tesseract topology also exhibits high
is the homogenized compliance matrix SH . In the compliance anisotropy when the relative density is low. But when the relative
matrix, it has density reaches to 50%, it is close to isotropic materials. As for
cubic center, face center, octet, and vintiles topologies, they are
1 1 1 less anisotropic compared to other topologies. For example, when
SH
11 ¼ ; SH
22 ¼ ; SH
33 ¼ (14)
Ex Ey Ez the relative density is 10%, the face-center topology has a maxi-
mum Young’s modulus around 5.5 GPa and a minimum Young’s
where Ex , Ey ; and Ez are the Young’s modulus along x, y, and z modulus around 4.8 GPa. It is suitable for complex loading cases
directions. From Eq. (14), it can be computed that because the stiffness in all the directions is higher than other top-
Ex ¼ Ey ¼ Ez ¼ 7:0225 GPa. Because the material property is ologies. Furthermore, the anisotropy of these four types of topolo-
anisotropic, the Young’s modulus is different along different orien- gies does not reduce much with the increase of relative density. It
tations. To get the Young’s modulus in other directions, the consti- is also found that these topologies have a lower maximum
tutive matrix has to be transformed. First, the 6  6 constitutive Young’s modulus than cubic and X-shape topologies. However,
matrix is rewritten as a fourth-order stiffness tensor. Then the tensor the tesseract topology has a lowest maximum Young’s modulus in
is transformed with a rotation matrix. The transformed tensor can all topologies. Therefore, if the design objective is a high stiffness,
be used to get elastic modulus along the new direction. Through it should be avoided to use tesseract topology. Another interesting
this procedure, directional properties of a cellular can be obtained. finding in Fig. 10 is that these topologies can be classified into
The proposed method can also be used to homogenize the periodic two groups according to the direction of their maximum Young’s
cellular materials with the randomized unit cell as shown in Fig. 7. modulus. The cubic, face center, tesseract, and vintiles topologies
The length of the randomized unit cell is two in x-axis and one in y have a higher stiffness along axial directions. On the contrary, the
and z axes. Therefore, the input of the unit cell length in the code X-shape, cubic center, and octet topologies have a higher stiffness
should correspond to designed length. The dimension of the voxel along diagonal directions. As a result, designers can choose the
model of the unit cell is 120  60  60 as shown in Fig. 7(c). Run topology based on the direction of the principal stress if a higher
the file homo3D.m, and it can be downloaded in the Appendix as stiffness is required. The result from the homogenization code can
be used as a guide for designers to make decisions.
CH ¼ homo3D(2,1,1,115.4,79.6,voxel)
The result of this type of cellular material is
Ex ¼ 2:2 GPa; Ey ¼ 3:2 GPa; and Ez ¼ 3:1 GPa. 4.3 Convergence of the Result. It is known that a higher
resolution will result in more computational costs. Appropriate
voxel size must be chosen to ensure accurate results with allow-
4.2 Effective Young’s Modulus Surface. To further illus- able computational costs. In this section, the relationship between
trate how the homogenized constitutive matrix CH can be used to the resolution of the voxel model and the convergence of the
predict the elastic properties of lattice structure in different direc- result will be discussed. The cubic-center topology is used in this
tions. Seven types of topologies listed in Fig. 1 have been ana- investigation. The resolution is set from 20 to 100 with five as an
lyzed by the proposed MATLAB code. The bulk material properties increment. The resolution means the number of voxels in the
are the same as those used in Sec. 4.1. For each topology, the voxel model along x, y, and z directions. The axial Young’s

011005-6 / Vol. 141, JANUARY 2019 Transactions of the ASME

Downloaded From: http://materialstechnology.asmedigitalcollection.asme.org/ on 07/25/2018 Terms of Use: http://www.asme.org/about-asme/terms-of-use


Fig. 7 An example of periodic cellular materials with randomized unit cell: (a) periodic Voronoi structure, (b) one unit
cell, and (c) voxel model

Table 2 Strut radius of lattice structures with different topologies

Cubic X-shape Cubic center Face center Octet Tesseract Vintiles

10% 0.113 0.074 0.063 0.058 0.045 0.054 0.065


30% 0.208 0.134 0.114 0.109 0.087 0.100 0.128
50% 0.287 0.187 0.157 0.150 0.120 0.138 0.177

modulus is selected to represent the result. The bulk material Nevertheless, the incomplete Cholesky with threshold dropping
property is also the same as in Sec. 4.1. The homogenized consti- (ICT) can perform better convergence than zero-fill. A non-
tutive matrix is computed for two relative densities: 10% and negative scalar is used as a drop tolerance when performing ICT.
30%. The result is shown in Fig. 11. It can be found that when the Elements which are smaller in magnitude than a local drop toler-
number of voxels reaches to 100, the result has a trend to con- ance are dropped from the resulting factor except for the diagonal
verge. However, because the computational cost is quite large element which is never dropped. However, incomplete Cholesky
when the resolution is 100, there is no need to set such a high factorizations of positive definite matrices do not always exist.
resolution if high accuracy is not the primary goal of simulation. Sometimes nonpositive will be encountered when constructing an
A resolution around 50 can already give an indicative result. But incomplete Cholesky preconditioner. To solve this problem, the
if a high accuracy is required, 100 resolution is recommended. “diagcomp” option is used to construct a shifted incomplete Cho-
lesky factorization. That is, instead of constructing L such that
5 Extension L*L0 approximates A, incomplete Cholesky factorization with
diagonal compensation constructs L such that L  L0 approxi-
5.1 Shifted Incomplete Cholesky Factorization. To further mates M ¼ A þ alpha  diagðdiagðAÞÞ without explicitly forming
accelerate the convergence of the PCG method, the shifted incom- M. As incomplete factorizations always exist for diagonally
plete Cholesky factorization with threshold dropping can be used dominant matrices, alpha can be found to make M diagonally
to modify the preconditioner. The default preconditioner in this dominant. These can be done by substituting line 61 in the
code is an incomplete Cholesky factorization with zero-fill. Appendix with the following lines:

Fig. 8 Effective Young’s modulus of lattice structures with 10% relative density

Journal of Engineering Materials and Technology JANUARY 2019, Vol. 141 / 011005-7

Downloaded From: http://materialstechnology.asmedigitalcollection.asme.org/ on 07/25/2018 Terms of Use: http://www.asme.org/about-asme/terms-of-use


Fig. 9 Effective Young’s modulus of lattice structures with 30% relative density

Fig. 10 Effective Young’s modulus of lattice structures with 50% relative density

Fig. 11 The relationship between the resolution of the voxel and the axial Young’s
modulus

011005-8 / Vol. 141, JANUARY 2019 Transactions of the ASME

Downloaded From: http://materialstechnology.asmedigitalcollection.asme.org/ on 07/25/2018 Terms of Use: http://www.asme.org/about-asme/terms-of-use


Table 3 Material properties of three materials in the multimate-
rial structure

Material k l

1 170:8 117:8
2 80:8 55:7
3 115:4 79:6

multimaterial cellular architectures, the homogenization code can


be extended to assign more than one material properties. In this
section, the extension to three materials is described. First, the
indicator matrix will not only have 0 and 1 elements to represent
the void and the first material but also have “2” and “3” elements
to represent the second and the third materials, respectively.
Because the bulk material property is divided into two parts, k and
l. If there is only one material, k and l are scalars. But if there
are more than one material, k and l will be vectors. Line 45 in the
Fig. 12 The convergence plot for PCG method with different Appendix needs to be replaced by
preconditioners
lambda ¼ lambda(1)*(voxel¼¼1) þ lambda(2)
opts.type ¼ ’ict’ *(voxel¼¼2)…þ lambda(3)*(voxel¼¼3)
opts.droptol ¼ 1e-3 mu ¼ mu(1)*(voxel¼¼1) þ mu(2)*(voxel¼¼2)…
alpha ¼ 0.01 þ mu(3)*(voxel¼¼3)
opts.diagcomp ¼ alpha The vectors k and l should have three entries, which are the
L ¼ ichol(K(activedofs(4:end),activedofs Lame’s first and second parameters for three materials, respec-
(4:end)),opts) tively. Also, the active degrees-of-freedom should also be
changed to consider the elements with the second material and
where “opts” saves the options for “ichol,” the drop tolerance is the third material. The line 62 should be substituted by
0.001, and the diagonal compensation is 0.01. To show the
improvement of the shifted incomplete Cholesky factorization, a activedofs ¼ edof((voxel¼¼1 | voxel¼¼2 |
PCG method is performed on the octet topology with a 10% rela- voxel¼¼3),:)
tive density. The result is shown in Fig. 12. It can be found that the
result did not converge to 1010 in 300 iterations when incomplete which means if the element has material 1, 2, or 3, its degrees-of-
Cholesky preconditioner had zero-fill. When the threshold dropping freedom will be activated in the global stiffness equation. Figure 13
is active and the diagonal compensation is 0.1, the result converged shows an example of a three-material lattice structure model with
to 1010 in 250 iterations. Furthermore, when the diagonal compen- 10% relative density. The cubic-center topology can be disassembled
sation is 0.01, the result converged in 150 steps. But it is also found to cubic topology and X-shape topology. The voxels in the cubic
that if there is no diagonal compensation or the diagonal compensa- topology is assigned with material 1; the voxels in the X-shape topol-
tion is less than 0.001, the nonpositive pivot error will be encoun- ogy are assigned with material 2; the connection between these two
tered. Therefore, a proper diagonal compensation should be topologies is assigned with material 3. These three types of voxels are
selected in the shifted incomplete Cholesky factorization. assembled together to get the multimaterial cubic-center topology.
To get the homogenized constitutive matrix of this three-
5.2 Two or More Materials. Recently, multimaterial struc- material structure, the material properties are assigned with the
tures have received more and more attention from researchers and data in Table 3. The anisotropy can be controlled by adjusting the
have been successfully fabricated by some AM technologies [16]. material properties. Calling the modified function as
Cellular architectures fabricated with multimaterials can realize
specific functions such as controllable thermal expansion [17] and CH ¼ homo3D(1,1,1,[170.8,80.8,115.4],
self-deformation [18]. To simulate the material properties of [117.8,55.7,79.6],voxel)

Fig. 13 A three-material lattice cellular structure with cubic-center topologies

Journal of Engineering Materials and Technology JANUARY 2019, Vol. 141 / 011005-9

Downloaded From: http://materialstechnology.asmedigitalcollection.asme.org/ on 07/25/2018 Terms of Use: http://www.asme.org/about-asme/terms-of-use


Even though lambda has no meaning in the thermal conductiv-
ity problem. lambda is kept here so that the code can be modified
as less as possible. Because every three rows and columns are
saved in one row and column, the solution of the global stiffness
equation should be modified. Lines 59–66 are replaced by the fol-
lowing lines:
L ¼ ichol(K(4:3:end,4:3:end))
X ¼ zeros(ndof,3)
for i ¼ 1:3
X(4:3:end,i) ¼ pcg(K(4:3:end,4:3:end),
F(3þi:3:end,i),1e-10,300,L,L’);
end

Also, element strain cases in line 75 should be modified as

Fig. 14 The Young’s modulus surface of cubic-center lattice X0_e(4:3:end,1:3) ¼ keMu(4:3:end,4:3:end)…


with (a) multimaterials and (b) single material \[feMu(4:3:end,1),feMu(5:3:end,2),feMu
(6:3:end,3)]
The loops start from line 85, and line 85 should only run three
The homogenized constitutive matrix for the multimaterial lat- times instead of six times. By modifying the code like this, the 3D
tice structure is obtained. To visualize the elastic properties along conductivity problem with two materials can be solved. If three or
different orientations, the Young’s modulus surface of the multi- more materials exist in the unit cell, the code can be further
materials lattice is shown in Fig. 14(a). Figure 14(b) shows the extended by the procedure similar to that in Sec. 5.2.
Young’s modulus surface of the single material lattice with k ¼
115:4 and l ¼ 79:6. The multimaterials lattice has an isotropic
elastic property because the Young’s modulus is the same along 6 Conclusion
all the directions. Therefore, this homogenization code can help In this paper, a simple and efficient 3D homogenization code
designers to design lattice structure with isotropic material written in MATLAB is provided to reduce the barrier of the imple-
properties. mentation of numerical homogenization. Designers can use this
code to obtain the homogenized constitutive matrix of 3D cellular
5.3 Thermal Conductivity. In thermal conductivity prob- materials or multimaterial composites even without strong mathe-
lems, the temperature is a scalar field. The homogenization equa- matical background. To further facilitate the implementation of
tions are analogous to those of the elastic problem, which can be this code, an algorithm is proposed to generate the voxel model of
written as [12] lattice structures. This model can be directly imported into the
homogenization code. A wireframe script is needed in the genera-
ð ð tion of voxel models. Its format is defined so that users can cus-
ðkÞ
t;i lij T;j dX ¼
0ðkÞ
t;i lij T;j dX8 2 X (15) tomize the topology of the lattice structure.
X X By using the proposed method, the homogenized constitutive
matrix and the Young’s modulus surface of lattice structures with
seven topologies are calculated. The results have shown that the
ð     lattice structures exhibit high anisotropy. The cubic, face center,
1 0ðiÞ ðiÞ ðiÞ
lH
ij ¼
0ðiÞ
T;l  T;l llm T;m  T;m dX (16) tesseract, and vintiles topologies have a higher stiffness along
j Xj X axial directions. On the contrary, the X-shape, cubic center, and
octet topologies have a higher stiffness along diagonal directions.
where T is the temperature field, t is a virtual temperature field, The convergence of the PCG method in the homogenization
and lij is the conductivity tensor. Unlike the elastic problem, only code is accelerated by using shifted incomplete Cholesky factoriza-
one material parameter is used to determine the conductivity of an tion. The code is then extended to multimaterials and thermal con-
isotropic material. Therefore, the input argument “lambda” is a ductivity problems. It is found that the anisotropy of multimaterial
zero vector. The conductivity of different materials is given by the lattice structures can be controlled. With the proper combination of
input argument “mu.” To change it in the code, line 101 is substi- material properties, the cubic center lattice structure is able to have
tuted by isotropic elastic properties. Finally, future work can focus on the
further improvement of the efficiency. For instance, the assembly
CMu ¼ diag([1 1 1 0 0 0]); CLambda ¼ zeros(6) free method can be implemented to reduce the computational cost.

The element matrix “keMu” contains the contributions in x, y,


and z directions in different rows and columns. Because only a Funding Data
scalar field is necessary, the contributions in x, y and z directions
can be summed together to form an 8  8 element matrix. The  National Sciences and Engineering Research Council of Can-
summation is done by adding the following line after line 15: ada (Discovery Grant No. RGPIN436055-2013).

keMu(1:3:end,1:3:end) ¼ keMu(1:3:end,1:3:end)… Appendix: MATLAB Files and the Wireframe Definition


þ
All the MATLAB files including the “homo3D.m” and the
keMu(2:3:end,2:3:end) þ keMu(3:3:end,3:3:end)
“GenerateVoxel.m” and other supporting files can be downloaded
To consider the conductivity of both materials in the cellular by the links.2,3
architecture, line 45 is changed to

lambda ¼ lambda(1)*(voxel¼¼0) þ lambda(2)* 2


https://github.com/GuoyingDong/homogenization
(voxel¼¼1)mu ¼ mu(1)*(voxel¼¼0) þ mu(2)*(voxel 3
https://www.mathworks.com/matlabcentral/fileexchange/67457-3d-homogenization-
¼¼1) of-cellular-materials

011005-10 / Vol. 141, JANUARY 2019 Transactions of the ASME

Downloaded From: http://materialstechnology.asmedigitalcollection.asme.org/ on 07/25/2018 Terms of Use: http://www.asme.org/about-asme/terms-of-use


Table 4 Definition and description of GRID [7] Bensoussan, A., Lions, J. L., and Papanicolaou, G., 2011, Asymptotic Analysis
for Periodic Structures, Vol. 374, Elsevier, Providence, RI.
1 2 3 4 5 [8] Torquato, S., 2013, Random Heterogeneous Materials: Microstructure and
Macroscopic Properties, Vol. 16, Springer Science & Business Media,
New York.
GRID ID x y z [9] Bendsøe, M. P., and Kikuchi, N., 1988, “Generating Optimal Topologies in
Structural Design Using a Homogenization Method,” Comput. Methods Appl.
Mech. Eng., 71(2), pp. 197–224.
[10] Arabnejad, S., and Pasini, D., 2013, “Mechanical Properties of Lattice Materials
Table 5 Definition and description of STRUT Via Asymptotic Homogenization and Comparison With Alternative Homogeni-
zation Methods,” Int. J. Mech. Sci., 77, pp. 249–262.
[11] Hassani, B., and Hinton, E., 1998, “A Review of Homogenization and Topol-
1 2 3 4 ogy Optimization II: Analytical and Numerical Solution of Homogenization
Equations,” Comput. Struct., 69(6), pp. 719–738.
STRUT ID Start End [12] Andreassen, E., and Andreasen, C. S., 2014, “How to Determine Composite
Material Properties Using Numerical Homogenization,” Comput. Mater. Sci.,
83, pp. 488–495.
[13] Chandrupatla, T. R., Belegundu, A. D., Ramesh, T., and Ray, C., 2002, Intro-
References duction to Finite Elements Engineering, Vol. 2, Prentice Hall, Upper Saddle
[1] Schaedler, T. A., and Carter, W. B., 2016, “Architected Cellular Materials,” River, NJ.
Annu. Rev. Mater. Res., 46(1), pp. 187–210. [14] Lautrup, B., 2005, Physics of Continuous Matter: Exotic and Everyday Phe-
[2] Queheillalt, D. T., and Wadley, H. N., 2005, “Cellular Metal Lattices With Hol- nomena in the Macroscopic World, CRC Press, Boca Raton, FL.
low Trusses,” Acta Mater., 53(2), pp. 303–313. [15] Xu, S., Shen, J., Zhou, S., Huang, X., and Xie, Y. M., 2016, “Design of Lattice
[3] Clough, E. C., Ensberg, J., Eckel, Z. C., Ro, C. J., and Schaedler, T. A., 2016, Structures With Controlled Anisotropy,” Mater. Des., 93, pp. 443–447.
“Mechanical Performance of Hollow Tetrahedral Truss Cores,” Int. J. Solids [16] Vaezi, M., Chianrabutra, S., Mellor, B., and Yang, S., 2013, “Multiple Material
Struct., 91, pp. 115–126. Additive Manufacturing—Part 1: A Review,” Virtual Phys. Prototyping, 8(1),
[4] Schaedler, T. A., Ro, C. J., Sorensen, A. E., Eckel, Z., Yang, S. S., Carter, W. pp. 19–50.
B., and Jacobsen, A. J., 2014, “Designing Metallic Microlattices for Energy [17] Xu, H., and Pasini, D., 2016, “Structurally Efficient Three-Dimensional
Absorber Applications,” Adv. Eng. Mater., 16(3), pp. 276–283. Metamaterials With Controllable Thermal Expansion,” Sci. Rep., 6(1), p.
[5] Wadley, H. N., and Queheillalt, D. T., 2007, “Thermal Applications of Cellular 34924.
Lattice Structures,” Mater. Sci. Forum, 539–543, pp. 242–247. [18] Yu, C.-H., Haller, K., Ingber, D., and Nagpal, R., 2008, “Morpho: A Self-
[6] Hassani, B., and Hinton, E., 1998, “A Review of Homogenization and Topol- Deformable Modular Robot Inspired by Cellular Structure,” International
ogy Optimization I—Homogenization Theory for Media With Periodic Conference on Intelligent Robots and Systems (IROS 2008), Nice, France,
Structure,” Comput. Struct., 69(6), pp. 707–717. Sept. 22–26, pp. 3571–3578.

Journal of Engineering Materials and Technology JANUARY 2019, Vol. 141 / 011005-11

Downloaded From: http://materialstechnology.asmedigitalcollection.asme.org/ on 07/25/2018 Terms of Use: http://www.asme.org/about-asme/terms-of-use

You might also like