Objective Function & Constraints
Objective Function & Constraints
1. Abstract
Based on some examples calculated using the 99-line code made by Sigmund [1], the structural topology
optimization model construction is discussed to propose a problem that whether the topology optimization model
construction could be more reasonable. In order to solve this problem, a topology optimization model according
to practical engineering is constructed to search for the minimization of structural weight with a displacement
constraint. And a corresponding 120-line code written in Matlab is made by us. Calculation results of the
examples show that the model of the 120-line topology optimization code is more reasonable.
2. Keywords: structural topology optimization; optimization model; choosing an objective function and
constraint conditions; 99-line topology optimization code; 120-line topology optimization code
3. Introduction
The purpose of structural topology optimization is to seek the optimum layout of structural components or
sub-domains within a given design space under a given set of loads and boundary conditions such that the
resulting layout meets a prescribed set of performance targets. As an important branch of structural optimization
research, topology optimization has been enriched by lots of solution methods. An exhaustively detailed
summary for the development of topology optimization was made by Bendse and Sigmund [2], and the
application and development of numerical modeling methods used in structural topology optimization were also
reviewed in details by Rozvany [3].
Looking back the research of truss structure topology optimization led by Michell [4], a great progress has
been made since then. The Michell truss theory is not only developed by Rozvany et al. [5-6], but also the
research objects of topology optimization have developed from skeleton structures such as truss and frame into
continuum structures. Although the paper [7] superficially stated to be the homogenization method, Bendse and
Kikuchi broaden the research objects of structural topology optimization, because they presented the concept of
topological optimization for the continuum structures. The ground structure approach [8], which was only used
in topological optimization of skeleton structures, has become the foundation of the homogenization method in
topological optimization of continuum structures, and also the foundation of the methods seeking the optimum
layout of sub-regions for a given domain, such as the variable thickness method [9], the artificial material
method [1,10-12], the evolutionary structural optimization method [13], the independent continuous and
mapping method [14-17], the level set method [18-20], etc. Due to limited length of the paper, we cant list all of
the research here and can only mention the methodologies above, which are a few of thousands.
Among many studies, the 99-line topology optimization code written in Matlab by Sigmund has been a
unique significant research [1]. The code has been published on web (http://www.topopt.dtu.dk/?q=node/2),
which could be downloaded. We notice that Rozvany gave a good evaluation for this work. He said it played an
Ee = E ( e ) = ep E0
e [0,1]
where Ee and E0 are the Youngs modulus of artificial and real material respectively,
(1)
is the elementary
For
min
s.t.
c ( ) = U T KU =
KU = F
V ( )
= f
V*
0 < min e 1
u eT k e u e
e =1
(2)
( e = 1, L , N )
where K, U and F are the structural global stiffness matrix, total displacement vector and total force vector,
respectively, ue is the displacement vector of the e-th element, k e = k ( e ) = E ( e ) k e is the element
0
stiffness matrix of the e-th element, k e is the element stiffness matrix for unit Youngs modulus, is the
artificial relative density vector. In order to avoid singularity of the stiffness matrix, the minimum relative density
min is usually taken as 0.001. N is the total number of elements, and the penalty factor p is usually equal to 3.
V ( ) and V* are the total volumes of the designed structure and the ground structure, respectively, f is the
pre-setting volume ratio. Eq. (2) has been solved by an optimality criteria method.
During trying to adopt the 99-line topology optimization code, a number of examples were computed. We
found that the pre-setting volume ratio had a decisive influence on the results of structural topology optimization:
different volume ratios would produce different topological configurations. This awaken us to think further on
the relationship between the pre-setting volume ratios and optimal topological configurations. Based on this, we
consider a question: whether structural topology optimization has a more reasonable model?
Following the train of thinking, this paper proposes a structural topology optimization model of minimizing
structural weight with a displacement constraint, and develops a corresponding 120-line topology optimization
code. Through the example calculations by the 120-line code and then they are compared with the calculation
results by the 99-line code. Research results show that constructing a more reasonable structural topology
optimization model is a significant mention.
4. Expression of structural topology optimization with a more reasonable model construction
The optimization problems discussed in this paper will be focused on structures that are able to bear external
forces, rather than force inverter or compliant mechanisms. Therefore, 4 simple structures are used as examples
in this paper, which are shown in Figure 1.
Example 1, shown in Figure 1 (a), is the half of MBB-beam, with a ground structure of 60mm20mm1mm,
unit force F=1, unit Youngs modulus E0=1.0 and the Poissons ratio v = 0.3 .
Example 2, shown in Figure 1 (b), is the short cantilever beam, with a ground structure of
32mm20mm1mm, unit force F=1, unit Youngs modulus E0=1.0 and the Poissons ratio v = 0.3 .
Example 3, shown in Figure 1 (c), is the short cantilever beam with a fixed hole, with a ground structure of
45mm30mm1mm, unit force F=1, unit Youngs modulus E0=1.0 and the Poissons ratio v = 0.3 . The center of
the hole is located at the intersection of 1/3 horizontal length and 1/2 vertical length from left to right, while the
radius is equal to 1/3 vertical length.
Example 4, shown in Figure 1 (d), is the cantilever beam, with a ground structure of 80mm50mm1mm,
loading force F=9kN , Youngs modulus E0=1.0106MPa and the Poissons ratio v = 0.3 .
(a)
(b)
(c)
(d)
Figure 1: Ground structures and boundary conditions for the four test examples
The first three examples are from paper [1]. There are 9 sub-examples for each example, where the
pre-setting volume ratios are 9 equally distributing numbers between 0.1 and 0.9.
A total of 36 sub-examples are all computed by the 99-line topology optimization code and the results are
shown in Table 1. Meanwhile, the optimal results of four examples with the pre-setting volume ratio of 0.1 are
examined in more detail and shown in Table 2, where in the Number of elements column, Black presents the
number of black elements with a relative density of 1.0, White presents the number of white elements with a
relative density of 0.001, and Grey presents the number of grey elements with various relative densities on the
open interval (0.001, 1.0).
Volume ratio
Iterations
0.9
96
80
106
134
56
17
81
79
50
23
129
94
69
34
58
63
71
35
47
135
42
66
44
363
222
83
44
1132
756
740
1971
Opt. Config.
Iterations
0.1
29
Opt. Config.
Iterations
0.2
Opt. Config.
Iterations
0.3
44
Opt. Config.
Iterations
0.4
45
Opt. Config.
Iterations
0.5
Example 4
Opt. Config.
Iterations
0.6
Example 3
Opt. Config.
Iterations
0.7
Example 2
Opt. Config.
Iterations
0.8
Example 1
Opt. Config.
structure
Number of elements
Compliance
analysis
Total volume of
Average density of
Black
White
Grey
grey elements
grey elements
119.3960
0.2003
Example 1
1132
4785.2511
604
596
Example 2
756
899.0410
382
258
63.6180
0.2466
Example 3
740
787.8421
904
440
128.0961
0.2911
Example 4
1971
33266.6946
2740
1254
391.2600
0.3120
From the results of 36 sub-examples in Table 1, we observe dependency of the structural optimal
topological configurations on the pre-setting volume ratios, and summarize the following three aspects:
(1) 3 or 4 different kinds of typical structural configurations are obtained in all 4 examples.
(2) When the pre-setting volume ratio is too small, the structure will be broken off or disconnected, and it
degenerates into a mechanism. According to the data shown in Table 2, when the pre-setting volume ratio of each
example is 0.1, the number of the black elements in the structural optimal topological configurations is very
small or even zero. At the same time, the average densities of grey elements are 0.2003, 0.2466, 0.2911 and
0.3120, respectively. These show that the structures have already degenerated into mechanisms.
(3) Along with the reduction of pre-setting volume ratios, all 4 examples go through an evolution from
cumbersome structures, Michell-truss-like structures, light structures into degenerating mechanisms at the
end.
Since the optimal topological configurations are really dependent on the pre-setting volume ratios, there is a
question that how a reasonable pre-setting volume ratio can be selected in the stage of conceptual design, Could
the most appropriate volume ratio be found logically? In other words, rather than using a presumed volume ratio,
why dont we determine an optimal volume ratio at the same time with searching for an optimal topological
configuration?
5. Presentation of a topology optimization model best fitting practical engineering problems
Many examples in the last section inspire us to seek the optimal volume ratio at the same time with searching
for an optimal topological configuration. This means that there will be a new volume ratio objective function
besides the compliance objective function when we use the 99-line topology optimization code. If there are a
compliance objective function and a volume ratio objective function at the same time, the optimization problem
wouldnt be the one with a single objective function and the optimum solutions wouldnt be determined.
Could the volume ratio only be considered as a single objective function? Since the compliance is not taken
as the objective function, it should be transformed into a constraint condition. However, what should the
compliance constraint value be selected? Therefore, there is a similar difficulty like that one in the 99-line
topology optimization code, in which a constraint value of the most appropriate volume ratio is not determinate.
How can the difficulty of selecting a compliance constraint value be overcome? In fact, if we move our
focus from compliance into another one, there is a solution. Actually, rather than the compliance constraint, the
strength or stiffness constraint is considered for practical engineering problems. That is, we can use the strength
or stiffness constraint instead of the compliance constraint.
In order to try to put this idea into practice, we present a topology optimization model of minimizing
structural weight with satisfying a displacement constraint at a certain point of interest. Why is the volume ratio
objective function changed into the structural weight objective function? This is because minimizing structural
weight is equivalent to minimizing structural volume with the same material, while the minimum structural
volume is equivalent to the minimum structural volume ratio with the same ground structure. So minimizing
structural weight should be equivalent to minimizing the volume ratio. The advantage of using the structural
weight objective function is that the formulation of topology optimization is in line with formulations of the
section optimization and the shape optimization.
A minimum weight formulation for topology optimization with a displacement constraint can be presented
as follows:
For
N
min W ( ) = e we0
e =1
s.t. u ( ) = u
(3)
where we is the element weight when the density of the e-th element equals to 1, W ( ) and u () are the
structural total weight and the displacement at a point of interest respectively, u is the displacement allowable
value. Similarly with the 99-line code, the minimum density is set as min = 0.001 for an avoidance of
singular stiffness matrix in seeking optimum solutions.
5.1. Derivation for the explicit displacement function at the point of interest
Using the unit virtual load method [21], the displacement at a point of interest can be expressed by calculating
the virtual work as follows:
N
u = ue = RT v dv
e =1
(4)
e =1 e
where ue is the e-th elements contribution to the displacement value at the point of interest,
R and v
denote the element stress vectors associated to the real load and the element strain vectors associated to the
virtual load, respectively.
According to the work energy theorem, the virtual work in Eq. (4) is equal to the virtual work obtained
from nodal forces and nodal displacements:
N
u = ( PeR ) T uev
(5)
e =1
where Pe
and ue are the elements nodal force vector associated to the real load and the corresponding
elements nodal displacement vector associated to the virtual load in the e-th element, respectively, and
ue = ( PeR ) T uev .
Due to the element stiffness equation, we have:
K e uev = Pev
(6)
where K e and Pe are the elements stiffness matrix and the elements nodal force vectors associated to the
u = ( PeR ) T ( K e ) 1 Pev
(7)
e =1
Since the element stiffness is proportional to the Youngs modulus, the elements stiffness can be written as:
K e = ke0 Ee = ke0 E0 ep = K e0 ep
(8)
where K e is the element stiffness matrix; k e is the element stiffness matrix for unit Youngs modulus; Ee
is the element Youngs modulus for linear isotropic material (artificial material); E0 is the Youngs modulus of
solid material (real material,
e = 1 ); K e0
e = 1
modulus E0 .
Substituting Eq. (8) into Eq. (7), we obtain:
N
e =1
e =1
e =1
u = ue = ( PeR )T ( K e0 ) 1 Pev e p
De0
(9)
ep
where De is the constant coefficient of the displacement contribution component of the e-th element to the
0 1
point of interest. In Eq. (9), the reason of ( Pe ) ( K e ) Pe De rests with introducing an assumption of the
R T
statically determinate structure. Because the displacements of the statically determinate structure have no
relationship with the nodal force vectors and our structure is regarded as a statically determinate one in each
0
structural optimization iteration, De is a constant which is not dependent on Pe and Pe for each iteration.
For
N
=
min
W
(
)
e we0
e =1
N D0
s.t. ep = u
e =1 e
(10)
e =1
e =1
L( , ) = e we0 + (
De0
ep
u)
The first order derivatives of the Lagrangian function are found as:
(11)
L
D0
= we0 p pe+1 = 0
e
e
(12)
L N De0
=
u = 0
e =1 ep
(13)
e = (
pDe0
we0
1
p +1
(14)
( p )
1
p +1
=(
(D )
e =1
e = (
(D )
k =1
1
p +1
(w )
0
e
p
p +1
0
e
0
k
1
p +1
1
p
(15)
is eliminated by substituting Eq. (15) into Eq. (14), and the solutions
0
k
(w )
p
p +1
1
p
D0
) ( e0 ) p +1
we
(16)
In order to think of contribution of element densities to the displacement at the point of interest, the partial
derivative of Eq. (9) with respect to densities are obtained as follows:
u
pD 0
= p +e1
e
e
When De > 0 , we have
0
displacement
(17)
u
> 0 . Thats to say, if the element density e is increased, the
e
u at the point of interest will be increased; if the element density e is decreased, the
is not economical in
terms of design. In this case, the element density values have to be decreased to reach the minimum value,
therefore the displacement contribution and stiffness contribution of the corresponding element can reach
minimum and maximum values, respectively. We dont need to design the density of this element in this case, so
it is called as passive design variable.
When De 0 , we have
0
displacement
u
< 0 . Thats to say, if the element density e is increased, the
e
u at the point of interest will be decreased; if the element density e is decreased, the
displacement at the point of interest will be increased. In other words, the element density
is increased,
displacement contribution and stiffness contribution of the corresponding element will be decreased and
increased, respectively. This is a reasonable return on economic investment in increasing the element density e .
In this case, the density should be designed, and it is called as the active design variable.
The discussion above is summarized as following: the elements satisfied with De 0 are designable
0
elements,
and
the
corresponding
density
variables
are
the
active
variables
included
in
set
I a = e De0 0, e = 1,L , m ; the elements satisfied with De0 < 0 are not designable and the corresponding
density variables are in the passive design variable set.
The values of the density variables in the passive design variable set are to remain constant during each
iteration of seeking the optimum solutions. Therefore, the topology optimization model in Eq. (9) can be
rewritten as follows:
For
m
=
e we0 + W0
min
W
(
)
e =1
m D0
e
s.t. p + u0 = u
e =1 e
W0 =
w
e
eI a
0
e
, and u0 =
De0
eI a
p
e
(18)
nothing to do with seeking optimization, can be eliminated from the objective function. Similar to the previous
deduction, we can obtain the following equation to replace Eq. (16) as:
1
p
m
0 p +1
0 p +1
1
1
( Dk ) ( wk )
De0 p +1
p
e = ( k =1
) ( 0 )
u u0
we
min or 1 (e I a )
(e I a )
(19)
The active design variables calculated from the equation above are not ensured to have a smaller value than
1 or a larger value than the minimum density min . Then an adjustment should be made as below:
where e I a (if e 1)
(20)
Now that the active/passive design variable set is adjusted, the calculation according to Eq. (19) has to be
re-performed, which is called as a small optimization iteration. The active/passive design variable set classified
0
by the sign of De is a global pre-judgment after one structural analysis before the topology optimization model
construction for iterative solutions, but Eq. (20) is a local adjustment of reclassifying the active/passive design
variable set after a small optimization iteration. This kind of small optimization iteration should be computed
continuously according to Eq. (19) until the active/passive design variable sets are no longer changedand the
process of small optimization iterations stops. Thus, the optimal solutions of the model Eq. (18) for the
corresponding structural analysis are obtained. Here, we say that a big optimization iteration is finished. Before a
new big optimization iteration, a new structural analysis should be made. However, the whole optimization
process needs sequential reconstructions of optimization models corresponding to sequential big optimization
iterations.
To ensuring mesh-independency, a filter function expressed in Eq. (21) [17] is used in this paper. The
displacement contribution component of each element to the point of interest in Eq. (9) is filtered. Thus the new
coefficients for the filtered displacement components are obtained in Eq. (22) as follows:
u~e =
w( x ) u
w( x )
j N e
j N e
(21)
De0 = u~e ep
(22)
where x j is the spatial location of geometric center for the j-th element; N e = j x j xe rmin
} denotes the
neighborhood of the e-th element within a given filter radius rmin of the center of the e-th element;
w( x j ) = max(0, rmin x j xe ) is a weight function, also a linearly decaying weighting function, which is
linearly reduced along the distances of the neighbor elements to the center element.
In order to keep the comparability of our topology optimization, the same convergence criterion as that in
the 99-line topology optimization code is used in this paper. The optimal solutions
iteration and
(k )
( k +1)
(23)
10
M nd =
where
4
e =1
*
e
(1 e* )
100%
(24)
e* is the optimum relative density of the e-th element. Once the design is converged, M nd with a
value of 0% denotes all element relative densities are equal to 0 or 1, and M nd with a value of 100% denotes
all element relative densities are equal to 0.5. Therefore, a smaller value of M nd means less grey elements and
is expected to give a better design.
In Table 3, the meanings of Black, White and Gray in the Number of elements column are the same as
those in Table 2. Total weight denotes the structural weight without the white elements with a relative density
of 0.001, including the weight of all black and grey elements. Weight of grey elements denotes the total weight
of all grey elements, and Ratio of grey elements is the percentage ratio of the number of grey elements in the
number of all elements.
Table 3: Results for 4 examples
Number of
Example
structural
analysis
99-line
Example
code
120-line
code
99-line
Example
code
120-line
code
99-line
Example
code
120-line
code
99-line
Example
code
120-line
code
Total
weight
Displacement
at the point of
interest
Number of elements
Black
White
Grey
Weight of
grey
elements
Ratio of
grey
Mnd
elements
(%)
(%)
94
599.67
203.2980
447
321
432
152.67
36.00
17.55
121
599.15
203.2961
467
370
363
132.15
30.25
16.35
71
255.74
57.3525
197
257
186
58.74
29.06
13.96
70
255.81
57.3543
208
273
159
47.81
24.84
12.75
34
674.60
52.0993
544
467
339
130.60
25.11
12.91
26
673.29
52.0988
565
491
294
108.29
21.78
11.67
58
1998.54
0.3488
1718
1458
824
280.54
20.60
9.56
68
1990.17
0.3488
1764
1532
704
226.17
17.60
8.70
In Figure 2, five parameters between parentheses in each of eight captions for configurations all have their
own meaning on the left side and right side, respectively. For example on the left side, in Figure 2 a1) there is a
caption 99-line code (60,20,0.5,3.0,1.5), which represents concrete computing data of an example for using the
11
99-line code, where 60 elements grids in x-direction, 20 elements grids in y-direction, volume ratio constraint
value 0.5, penalty factor 3.0 and filter radius 1.5. For example on the right side, in Figure 2 a2), there is a caption
120-line code (60,20,203.2980,3.0,1.5), which represents concrete computing data of an example for using
120-line code, where 60 elements grids in x-direction, 20 elements grids in y-direction, displacement constraint
value 203.2980, penalty factor 3.0 and filter radius1.5.
Topology optimization model of Eq. (2)
12
13
[4] A.G. M. Michell, The limits of economy of material in frame structure, Philosophical Magazine, 6(8),
589-597, 1904.
[5] G. I. N. Rozvany and W. Gollub, Michell layouts for various combinations of line support, International
Journal of Mechanical Sciences, 32(12), 1021-1043, 1990.
[6] G. I. N. Rozvany, Some shortcomings in Michells truss theory, Structural Optimization, 12(4), 244-250,
1996.
[7] M. P. Bendse and N. Kikuchi, Generating optimal topologies in structural design using a homogenization
method, Computer Method in Applied Mechanics Engineering, 71(1), 197-224, 1988.
[8] W. S. Dorn, R. E. Gomory, and H. J. Greenberg, Automatic design of optimal structures, Journal de
Mecanique, 3(1), 25-52, 1964.
[9] G. D. Cheng and X. Guo, -relaxed approach in structural topology optimization, Structural Optimization,
13, 258-266, 1997.
[10] M. P. Bendse, Optimal shape design as a material distribution problem, Structural Optimization, 1,
193-202, 1989.
[11] M. Zhou and G. I. N. Rozvany, The COC algorithm, part II: topological, geometry and generalized shape
optimization, Computer Method in Applied Mechanics Engineering, 89(1-3), 309-336, 1991.
[12] H. P. Mlejnek, Some aspects of the genesis of structures, Structural Optimization, 5, 64-69, 1992.
[13] Y. M. Xie and G. P. Steven, A simple evolutionary procedure for structural optimization, Computers and
Structures, 49(5), 885-896, 1993.
[14] Y. K. Sui, Modeling, Transformation and Optimization New Developments of Structural Synthesis
Method. Dalian University of technology Press, 1996. (in Chinese)
[15] Y. K. Sui and D. Q. Yang, A new method for structural topological optimization based on the concept of
independent continuous variables and smooth model, Acta Mechanica Sinica, 14(2), 179-185, 1998.
[16] Y. K. Sui, J. Z. Du, and Y. Q. Guo, Topological optimization of frame structures under multiple loading
cases, International Conference on Computational Methods, 15-17, Singapore, 2004.
[17] Y. K. Sui and X. R. Peng, The ICM method with objective function transformed by variable discrete
condition for continuum structure, Acta Mechanica Sinica, 22(1), 68-75, 2006.
[18] J. A. Sethian and A. Wiegmann, Structural boundary design via level set and immersed interface methods,
Journal of Computational Physics, 163, 489-528, 2000.
[19] M. Wang, X. Wang, and D. Guo, A level set method for structural topology optimization, Computer
Method in Applied Mechanics Engineering, 192(1-2), 227-246, 2003.
[20] G. Allaire, F. Jouve, and A. M. Toader, Structural optimization using sensitivity analysis and a level-set
method, Journal of Computational Physics, 194(1), 363-393, 2004.
[21] R. C. Hibbeler, Structural analysis, 8th edition. Prentice Hall, Inc. 2012.
[22] O. Sigmund, Morphology-based black and white filters for topology optimization, Structural
Multidisciplinary Optimization, 33(4-5), 401-424, 2007.
14