A 99 Line Code For Discretized Michell Truss Optimization Written in Mathematica
A 99 Line Code For Discretized Michell Truss Optimization Written in Mathematica
A 99 Line Code For Discretized Michell Truss Optimization Written in Mathematica
DOI 10.1007/s00158-010-0557-z
RESEARCH PAPER
Received: 17 April 2010 / Revised: 15 July 2010 / Accepted: 25 July 2010 / Published online: 14 September 2010
c The Author(s) 2010. This article is published with open access at Springerlink.com
Graczykowski and Lewiński (2005), where a proof of van- been appended to the paper. This reference to the title of
ishing the duality gap between kinematic and static formu- the popular paper by Sigmund (2001) has been suggested
lations of this problem has been published. Note also, that by anonymous Reviewer. The code listed here can be freely
due to hyperbolicity of the governing equations of Michell’s downloaded from the internet web page connected with this
trusses the layouts are usually composed of many subdo- paper, see Online Resource 1.
mains with border lines being the lines of discontinuity of The software developed applies to the case of plas-
some stress components; see e.g. Fig. 3 in Graczykowski tic design with: (a) equal permissible stresses in tension
and Lewiński (2007). and compression: σT = σC , (b) unequal stress bounds
Having in view the above mentioned properties of for tension and compression: σT = σC . This numerical
Michell trusses it is not easy to predict a new solution cor- tool makes it possible to construct new optimal layouts for
rectly: many layouts can be imagined as correct for the same which the analytical solutions are unknown, and to check
load and the same feasible domain geometry. It is really not already published analytical solutions. In particular, the
clear which of them should be discussed and which of them present paper confirms that the analytical results published
should be rejected a priori. The new layouts are not the sim- in Lewiński et al. (1994a, b) for the case of σT = σC and in
ple composition of the known layouts. Some suggestions are Graczykowski and Lewiński (2007) for the case of unequal
very convincing, but may be misleading. Thus a theoretician stress limits—are correct. In particular, this software has
needs an unbiased hint from the purely numerical side. delivered a numerical confirmation of the huge family of
The really valuable numerical predictions of Michell-like benchmarks being published in Graczykowski and Lewiński
structures do not draw upon the properties of the known (2010).
analytical solutions. The genuine method of their construc- The software developed has also made it possible to pre-
tion was developed in Dorn et al. (1964); it is based on the dict a correct layout of the unsolved till now problem of
concept of the ground structure composed of all bars con- two symmetric parallel forces to be optimally transmitted
necting given regular set of nodes. Most of these bars are to fixed nodes, in the case of the feasible domain being the
not necessary to equilibrate the applied loading and, con- half-plane. This numerical prediction has paved the way to
sequently, disappear during the optimization process. This find the analytical solution. The optimal layout turns out
prediction, however, cannot be done in advance. The cross to compare favourably with the numerical results for the
section areas are the main but not the only design variables. ground structures of high density; the reader is referred to
The crucial point of this approach is that the cross section Sokół and Lewiński (submitted) for the details.
areas may assume nonnegative values. Thus the zero values Concluding, the software developed delivers numerical
are admissible, which paves the way to find the catenary predictions of the characteristics of the optimal layouts with
structures, capable of carrying only one set of loads. Let the volume predictions approaching the optimal volume
us remind here the funicular structures transmitting systems with arbitrary accuracy. Since the analytical predictions are
of parallel forces to fixed supports. Such a specific class of usually found by the kinematic method, while the numerical
structures should be encompassed by the numerical meth- predictions follow from static consideration, this consis-
ods. The ground structure methods satisfy this condition, tency of both the results—showing that the duality gap
provided that the global stiffness matrix is not required to is slowly vanishing with increase of the density of the
be invertible. ground structure - simultaneously confirms correctness of
The present paper is close in spirit to the paper by Gilbert the analytical results.
and Tyas (2003), where the initial optimization problem
has been rearranged to the so called plastic design formula-
tion assuming the form of the linear programming problem. 2 Minimum volume truss optimization problem
Gilbert and Tyas (2003) solved this problem with using the
interior point method. They significantly improved the tra- The goal of the present paper is to find a truss of minimal
ditional ground structure approach by the iterative member volume subject to the compliance constraint, as formulated
adding technique. bellow; cf. Achtziger (2007)
The same numerical problem is solved in the present
min LT A
paper by other implementation of the interior point method, A∈R M , q∈R N
announced in Sokół and Lewiński (2009). The code has s.t. K q = P (1)
been written in Mathematica 7 symbolic language, seek P T q ≤ W0
Wolfram (2003). The method as such would be use-
A≥0
less, without taking advantage of the geometric matrix
being sparse. The details of the program are explained in Here L = [L 1 , L 2 , ..., L M ]T represents the vector of bar
Section 3, while the whole 99-line optimization code has lengths, A = [A1 , A2 , ..., A M ]T represents the vector of
A 99 line code for discretized Michell truss optimization written in Mathematica 183
cross section areas, while P and q are the vectors of nodal truss topology optimization problem may be written in the
loads and displacements. K is the stiffness matrix and W0 is standard form of linear programming as follows
a given positive constant. The last inequality is understood
component-wise i.e. Ai ≥ 0. The cross section areas Ai are min vi = eT v
v∈R 2M
the main design variables. If the ground structure is viewed i
s.t. H v = P (5)
as fixed, the vector L of bar lengths is prescribed. Note that
the equilibrium equations are treated as equality constraints. v≥0
The displacements q j are state variables, independent of Ai .
with all cost coefficients in the objective function equal to
Thus the number of unknown variables is N + M. Finding
one (e is a vector of length 2M, whose entries are all equal
numerical solution to problem (1) requires expensive meth-
to 1).
ods of the nonlinear programming. Therefore, it is rather
The objective functions in (2) or (5) correspond to—but
not applicable for large tasks corresponding to the ground
are not exactly—the optimum volume determined by (1).
structures of high density, with big N and M numbers.
The problem consists just in simple scaling but to make the
To make the problem less complex we shall pass to the
paper self-contained the basic formulas will be outlined bel-
formulation with forces in members as the only state vari-
low. For easier comparison of results obtained in different
ables, see Achtziger (2007) and Gilbert and Tyas (2003).
ways it is worth to introduce a normalized, non-dimensional
The problem (1) can be reformulated to equivalent formula-
volume as well as other auxiliary quantities. The static prob-
tion (Achtziger 2007)
lem considered in the paper is linear. Consequently, if two
times bigger loading is applied two times bigger displace-
min LT (T + C) ments and axial forces will appear. Similarly the lengths
T∈R M , C∈R M
(2) of bars are proportional to the size of the structure. It is
s.t. BT (T − C) =P
worth to introduce the non-dimensional quantities (denoted
T ≥ 0, C≥0
by upper dash) in the following manner:
where T and C are the vectors of tension and compression P = PP, S = PS, L = hL, q = Phq, etc. (6)
forces in bars and B is the geometric matrix of components
representing directional cosines of bars. The latter problem, where the scalar P is a referential load intensity and h is an
being still equivalent to the problem (1), involves 2M design arbitrary chosen size of a structure (height, length, width,
variables but now it becomes a linear programming prob- etc.). The optimal volume subject to constrained compliance
lem that can be solved by well-developed numerical tools, may be written as
applicable for large number of unknowns. Thus the ground 2
|Si | L i P 2 h 2
2 P 2h2
structures of high density may be successfully analyzed. VW = = Si L i = VW,
The problem (2) may be rearranged to a standard form E W0 E W0 E W0
of a linear programming problem by introducing the new (7)
design variables: where V W is a non-dimensional compliance controlled
volume, given by
vi = Ti L i and v M+i = Ci L i for i = 1, . . . , M. (3)
2
VW = Si L i , (8)
and by introducing the matrix
Correspondingly, the optimal volume subject to con-
strained stresses is expressed by
H = BT , −BT , where
= diag[1/L 1 , 1/L 2 , . . . , 1/L M ]. (4) |Si | L i Ph
Ph
Vσ = = S i L̄ i = Vσ, (9)
σ0 σ0 σ0
Computation of this matrix may be performed by divid- where V σ is a normalized, non-dimensional stress con-
ing every column of matrix BT by the length of the cor- trolled volume, given by
responding bar, but H may also be derived directly by
computing the quotients xi /L i2 and yi /L i2 . Note that for Vσ = Si L i . (10)
integer increments xi and yi the components of matrix
H are rational numbers and may be preserved in exact form Note that equations linking stress and compliance controlled
(using appropriate software). For currently available opti- volumes are quadratic; for example:
mization method it is not any advantage, but it may be
important for future numerical treatments. To conclude, the Vσ = VW (11)
184 T. Sokół
Fig. 3 Long cantilever problem and the exact optimal truss layout by
Lewiński et al. (1994a) Fig. 8 Mesh 60 × 20:3 × 3; V = 13.6953 P h/σ0
Fig. 6 Mesh 6 × 2:2 × 2; V = 14.5 P h/σ0 Fig. 10 Mesh 60 × 20:20 × 20; V = 13.6343 P h/σ0
A 99 line code for discretized Michell truss optimization written in Mathematica 187
d
different densities of the mesh are shown in Fig. 14. The
results are collected in Table 2. The layouts of Fig. 14 have
recently played the role of hints of the analytical solution.
This solution is being put forward in the paper by Sokół and
Fig. 14 Optimal layouts for different densities of the ground structure Lewiński (submitted); see Fig. 15, where the optimal layout
of the problem of Fig. 13 is reported.
All trusses shown in Fig. 14 are structurally unstable.
the last densest mesh almost 3.5 millions of design vari- The same property characterizes the Michell continuum
ables were used (two times the number of bars). This task in Fig. 15. Despite this instability the solutions are cor-
requires more than 250 GB RAM just for storing matrix H rect, because the virtual work of the forces P on the
in full form and only 159 MB of RAM using sparse matrix zero-energy modes vanishes. This is discussed in detail in
representation. The profit is evident. The calculations were Sokół and Lewiński (submitted). The great advantage of
performed on Intel Core 2 Duo E8400/3 GHz based PC with the numerical method proposed is that it does not exclude
4 GB of RAM. This fact clearly demonstrates the power such unstable structures from the algorithm. This complies
and efficiency of the presented approach. The last problem with the Michell remark no III, p. 591 in Michell (1904).
took only about 13 min, which is an excellent result for so It should also be noted that due to direct solving of the lin-
large-scale problem. ear programming problem (2) the method terminates with a
The second example is shown in Fig. 13. It is a struc- guaranteed correct result.
ture transmitting two symmetrically located vertical forces The last example concerns the reliability of the pro-
to two fixed supports. The forces are applied at 1/4 and 3/4 gram in the case of different stress limits for tension and
of the span length. The feasible domain is the half plane compression: σT = σC . The corresponding optimization
over the line linking the supports. The layouts obtained for problem for this case is given in (13). The exact results of
5 Conclusions
c
The computational program developed should serve as a
convenient tool for predicting new exact solutions to the
Michell problems. The listing of the program can be found
in Appendix 1. It requires the Mathematica, version 6 or
higher. The program is based on the concept of the ground
structure and that is why it produces results which are not
d built on any knowledge of properties of the optimum lay-
outs. This is the essential virtue of the method, since the
complete theory of Michell structures has not been devel-
oped till now and we cannot unconditionally say that the
properties noted in the most cited reference sources hold
good in all specific cases.
The correct prediction of the solution of problem in
Fig. 17 Numerical solutions for: a κ = 1, b κ = 3, c κ = 9, d Fig. 13 seems to be a success, since the pseudo truss in
κ = 100 Fig. 15 is structurally unstable and this solution is highly
sensitive to the position of forces P, in contrast to the
better known cantilever solutions (e.g. Graczykowski and
Lewiński 2010; Lewiński et al. 1994a, b) in which the
the problem shown in Fig. 16 are given by Graczykowski Hencky net is independent of the loading applied.
and Lewiński (2010). The following ratios κ = σT /σC have
been examined: 1, 3, 5, 7, 9, 100. The selected optimal- Acknowledgments The paper was prepared within the Research
numerical layouts are presented in Fig. 17. All of them have Grant no N506 071338, financed by the Polish Ministry of Science
been executed for the ground structure of density 110 × and Higher Education, entitled: Topology Optimization of Engineer-
ing Structures. Simultaneous shaping and local material properties
40:20:20, with 4,551 nodes and 1,587,926 elements. The determination.
Open Access This article is distributed under the terms of the Cre-
ative Commons Attribution Noncommercial License which permits
Table 3 Comparison of analytical and numerical solutions
any noncommercial use, distribution, and reproduction in any medium,
√ provided the original author(s) and source are credited.
κ arctan( κ) Exact Num. vol. Relative CPU
volumea Vσ error [%] time [s]
Bhatti MA (2000) Practical optimization methods with Mathematica Lewiński T, Zhou M, Rozvany GIN (1994a) Extended exact solutions
applications. Springer, New York for least-weight truss layouts—part I: cantilever with a horizontal
Champion B, Strzebonski A (2008) Constrained optimization. axis of symmetry. Int J Mech Sci 36:375–398
Wolfram Mathematica Tutorial Collection. http://www.wolfram. Lewiński T, Zhou M, Rozvany GIN (1994b) Extended exact solutions
com/learningcenter/tutorialcollection/ConstrainedOptimization/ for least-weight truss layouts—part II: unsymmetric cantilevers.
ConstrainedOptimization.pdf. Wolfram Research, Inc Int J Mech Sci 36:399–419
Chan HSY (1967) Half-plane slip-line fields and Michell structures. Mehrotra S (1992) On the implementation of a primal-dual interior
Quart J Appl Mech 34:433–448 point method. SIAM J Optim 2:575–601
Dorn WS, Gomory RE, Greenberg HJ (1964) Automatic design of Michell AGM (1904) The limits of economy of material in frame
optimal structures. J Mec 3:25–52 structures. Phil Mag 8:589–597
Gilbert M, Tyas A (2003) Layout optimization of large-scale pin- Nocedal J, Wright S (1999) Numerical optimization. Springer, New
jointed frames. Eng Comput 20:1044–1064 York
Graczykowski C, Lewiński T (2005) The lightest plane structures of a Rozvany GIN (1996) Some shortcomings in Michell’s truss theory.
bounded stress level transmitting a point load to a circular support. Struct Optim 12:244–250
Control Cybern 34:227–253 Rozvany GIN, Bendsøe MP, Kirsch U (1995) Layout optimization of
Graczykowski C, Lewiński T (2007) Michell cantilevers constructed structures. Appl Mech Rev 48:41–119
within trapezoidal domains – part IV: complete exact solu- Sigmund O (2001) A 99 line topology optimization code written in
tions of selected optimal designs and their approximations by Matlab. Struct Multidisc Optim 21:120–127
trusses of finite number of joints. Struct Multidisc Optim 33:113– Sokół T, Lewiński T (2009) Application of the interior point method
129 to truss topology optimization. In: Proceeding of int. conf. on
Graczykowski C, Lewiński T (2010) Michell cantilevers constructed “Lightweight Structures in Civil Engineering” (XV LSCE 2009).
within a halfstrip. Tabulation of selected benchmark results. Struct Micro-Publisher-Consultant-Project, Warsaw, pp 162–168
Multidisc Optim (in press) Wolfram S (2003) The Mathematica book, 5th edn. Wolfram Media,
Hemp WS (1973) Optimum structures. Clarendon, Oxford Champaign
Karmarkar N (1984) A new polynomial time algorithm for linear Wright S (1997) Primal-dual interior-point methods. SIAM,
programming. Combinatorica 4:373–395 Philadelphia, PA