Skip to main content
Log in

PolyMat: an efficient Matlab code for multi-material topology optimization

  • Educational Article
  • Published:
Structural and Multidisciplinary Optimization Aims and scope Submit manuscript

Abstract

We present a Matlab implementation of topology optimization for compliance minimization on unstructured polygonal finite element meshes that efficiently accommodates many materials and many volume constraints. Leveraging the modular structure of the educational code, PolyTop, we extend it to the multi-material version, PolyMat, with only a few modifications. First, a design variable for each candidate material is defined in each finite element. Next, we couple a Discrete Material Optimization interpolation with the existing penalization and introduce a new parameter such that we can employ continuation and smoothly transition from a convex problem without any penalization to a non-convex problem in which material mixing and intermediate densities are penalized. Mixing that remains due to the density filter operation is eliminated via continuation on the filter radius. To accommodate flexibility in the volume constraint definition, the constraint function is modified to compute multiple volume constraints and the design variable update is modified in accordance with the Zhang-Paulino-Ramos Jr. (ZPR) update scheme, which updates the design variables associated with each constraint independently. The formulation allows for volume constraints controlling any subset of the design variables, i.e., they can be defined globally or locally for any subset of the candidate materials. Borrowing ideas for mesh generation on complex domains from PolyMesher, we determine which design variables are associated with each local constraint of arbitrary geometry. A number of examples are presented to demonstrate the many material capability, the flexibility of the volume constraint definition, the ease with which we can accommodate passive regions, and how we may use local constraints to break symmetries or achieve graded geometries.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19

References

  • Bendsøe MP (1989) Optimal shape design as a material distribution problem. Structural Optimization 1 (4):193–202

    Article  Google Scholar 

  • Bendsøe MP, Sigmund O (2003) Topology optimization: theory, methods, and applications. Springer, Berlin

    MATH  Google Scholar 

  • Borrvall T, Petersson J (2001) Topology optimization using regularized intermediate density control. Comput Methods Appl Mech Eng 190:4911–4928

    Article  MathSciNet  Google Scholar 

  • Bourdin B (2001) Filters in topology optimization. Int J Numer Methods Eng 50(9):2143–2158

    Article  MathSciNet  Google Scholar 

  • Chau KN, Chau KN, Ngo T, Hackl K, Nguyen-Xuan H (2017) A polytree-based adaptive polygonal finite element method for multi-material topology optimization. Comput Methods Appl Mech Eng 332:712–739

    Article  MathSciNet  Google Scholar 

  • Doan QH, Lee D (2017) Optimum topology design of multi-material structures with non-spurious buckling constraints. Adv Eng Softw 114:110–120

    Article  Google Scholar 

  • Lieu QX, Lee J (2017) A multi-resolution approach for multi-material topology optimization based on isogeometric analysis. Comput Methods Appl Mech Eng 323:272–302

    Article  MathSciNet  Google Scholar 

  • Michell AG (1904) The limits of economy of material in frame structures. Philos Mag 8(6):589–597

    Article  Google Scholar 

  • Park J, Sutradhar A (2015) A multi-resolution method for 3D multi-material topology optimization. Comput Methods Appl Mech Eng 285:571–586

    Article  MathSciNet  Google Scholar 

  • Pereira A, Talischi C, Paulino GH, Menezes IFM, Carvalho MS (2016) Fluid flow topology optimization in PolyTop: stability and computational implementation. Struct Multidiscip Optim 54(5):1345–1364

    Article  MathSciNet  Google Scholar 

  • Sanders ED, Aguiló MA, Paulino GH (2018) Multi-material continuum topology optimization with arbitrary volume and mass constraints. Comput Methods Appl Mech Eng 340:798– 823

    Article  MathSciNet  Google Scholar 

  • Sigmund O (1994) Design of material structures using topology optimization. PhD thesis, Department of Solid Mechanics Technical University of Denmark

  • Sigmund O (1997) On the design of compliant mechanisms using topology optimization. J Struct Mech 25 (4):493–524

    Google Scholar 

  • Stegmann J, Lund E (2005) Discrete material optimization of general composite shell structures. Int J Numer Methods Eng 62(14):2009–2027

    Article  Google Scholar 

  • Stolpe M, Svanberg K (2001) An alternative interpolation scheme for minimum compliance optimization. Struct Multidiscip Optim 22(2):116–124

    Article  Google Scholar 

  • Talischi C, Paulino GH, Pereira A, Menezes IFM (2012a) PolyMesher: a general-purpose mesh generator for polygonal elements written in Matlab. Struct Multidiscip Optim 45(3):309–328

    Article  MathSciNet  Google Scholar 

  • Talischi C, Paulino GH, Pereira A, Menezes IFM (2012b) PolyTop: a Matlab implementation of a general topology optimization framework using unstructured polygonal finite element meshes. Struct Multidiscip Optim 45 (3):329–357

    Article  MathSciNet  Google Scholar 

  • Tavakoli R, Mohseni SM (2014) Alternating active-phase algorithm for multimaterial topology optimization problems: a 115-line matlab implementation. Struct Multidiscip Optim 49(4):621– 642

    Article  MathSciNet  Google Scholar 

  • Zegard T, Paulino GH (2014) GRAND – ground structure based topology optimization for arbitrary 2D domains using MATLAB. Struct Multidiscip Optim 50(5):861–882

    Article  MathSciNet  Google Scholar 

  • Zhang XS, Paulino GH, Ramos AS Jr (2018) Multi-material topology optimization with multiple volume constraints: a general approach applied to ground structures with material nonlinearity. Struct Multidiscip Optim 57:161–182

    Article  MathSciNet  Google Scholar 

  • Zhou M, Rozvany GIN (1991) The COC algorithm, part II: Topological, geometrical and generalized shape optimization. Comput Methods Appl Mech Eng 89(1-3):309–336

    Article  Google Scholar 

Download references

Acknowledgments

GHP and EDS acknowledge the financial support from the US National Science Foundation (NSF) under project #1663244, and the endowment provided by the Raymond Allen Jones Chair at the Georgia Institute of Technology. AP appreciates the financial support from the Carlos Chagas Filho Research Foundation of Rio de Janeiro State (FAPERJ) under grant E-26/203.189/2016, and from Tecgraf/PUC-Rio (Group of Technology in Computer Graphics), Rio de Janeiro, Brazil. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology and Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International, Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525. The information provided in this paper is the sole opinion of the authors and does not necessarily reflect the views of the sponsoring agencies.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Glaucio H. Paulino.

Additional information

Responsible Editor: Xu Guo

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Electronic supplementary material

Below is the link to the electronic supplementary material.

captions of movies

(zip 29.2 MB)

Appendices

Appendix A: Convergence plots for selected problems

Fig. 20
figure 20

Convergence plots: a 15-material Michell cantilever with continuation on the material interpolation parameters and with filter reduction in the final continuation step and b 1-material serpentine without continuation on the material interpolation parameters and with filter reduction after convergence

Appendix B: Summary of filtering techniques

The three filtering techniques discussed in Section 5.1 are summarized in Table 8.

Table 8 Summary of filtering techniques

Appendix C: Library of example problems

The Matlab files needed to run each of the problems discussed herein are provided with download of PolyMat. Table 9 summarizes the problems and indicates which files need to be called from PolyScript to run each.

Table 9 Examples provided with PolyMat

Appendix D: PolyScript

figure o

Appendix E: PolyMat

figure p
figure q
figure r
figure s

Appendix F: InitialGuess

figure t

Appendix G: MultiMatIntFnc

figure u

Appendix H: ConvertColors

The ConvertColors function is used to enable a result visualization in which white represents void. To plot the multi-material density in a given element, we sum the RGB Colors associated with each material in the element, scaled by the corresponding material densities, to find a point on the unit RGB color cube representing the mixing in that element. In general, the unit RGB color cube is defined such that black represents void (0, 0, 0) and white represents full mixing (1, 1, 1). Thus, ConvertColors is called before the optimization loop in PolyMat to compute a rigid body motion matrix, RBM, that can be applied to the RGB color cube so that white is at the origin. Using RBM, the RGB Colors specified by the user are converted to the corresponding colors on the rotated unit RGB color cube (e.g., red (1, 0, 0) goes to cyan (0, 1, 1), green (0, 1, 0) goes to yellow (1, 1, 0), and blue (0, 0, 1) goes to magenta (1, 0, 1)). These converted colors are scaled by the density of each material and summed in line 30 of PolyMat to find a point on the rotated unit RGB color cube representing the mixing in a given element, where void elements have RGB value (0, 0, 0). When rotated back to the original unit RGB color cube, we re-gain the specified color scheme and the void elements are now at (1, 1, 1), which represents white. The code used to compute the RBM matrix and convert the user-specified colors is provided in this Appendix.

figure v

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Sanders, E.D., Pereira, A., Aguiló, M.A. et al. PolyMat: an efficient Matlab code for multi-material topology optimization. Struct Multidisc Optim 58, 2727–2759 (2018). https://doi.org/10.1007/s00158-018-2094-0

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00158-018-2094-0

Keywords

Navigation