Abstract
An effective and straightforward method to implement topology optimization using high-level programming is presented. The method uses the LiveLink for MATLAB, which couples the commercial COMSOL Multiphysics software with MATLAB programming environment via COMSOL Application Programming Interface (API). The integrated environment allows one to implement advanced and customized functions and methods from scratch easily. Topology optimization of an acoustic-structure interaction problem with a mixed displacement–pressure (u/p) formulation is employed to demonstrate the effectiveness of the presented implementation method to design multiphysics problems systematically. The governing equations of the system are derived in a weak form, which is inserted directly in equation-based modeling in COMSOL Multiphysics via MATLAB programming environment. The tight integration of MATLAB and COMSOL Multiphysics allows one to easily pass the matrices and derivatives to perform design sensitivity analysis. A comprehensive code to perform the optimization of the acoustic-structure interaction problem is provided in Appendix. The well-structured code can be used as a platform for educational and research purposes, and it can be extended to other topology optimization applications involving various types of physical problems that use the equation-based modeling functionality of COMSOL.
References
Aage N, Andreassen E, Lazarov BS (2015) Topology optimization using PETSc: An easy-to-use, fully parallel, open source topology optimization framework. Struct Multidisc Optim. https://doi.org/10.1007/s00158-014-1157-0
Andreasen CS, Elingaard MO, Aage N (2020) Level set topology and shape optimization by density methods using cut elements with length scale control. Struct Multidisc Optim 62(2):685–707. https://doi.org/10.1007/s00158-020-02527-1
Andreasen CS, Gersborg AR, Sigmund O (2009) Topology optimization of microfluidic mixers. Int J Numer Meth Fluids. https://doi.org/10.1002/fld.1964
Andreasen CS, Sigmund O (2013) Topology optimization of fluid-structure-interaction problems in poroelasticity. Comput Methods Appl Mech Eng. https://doi.org/10.1016/j.cma.2013.02.007
Andreassen E, Clausen A, Schevenels M, Lazarov BS, Sigmund O (2011) Efficient topology optimization in MATLAB using 88 lines of code. Struct Multidisc Optim. https://doi.org/10.1007/s00158-010-0594-7
Atani K, Makrizi A, Radi B (2016) Topology optimization of 3D structures using ANSYS and MATLAB. IOSR J Mathem
Bathe KJ, Nitikitpaiboon C, Wang X (1995) A mixed displacement-based finite element formulation for acoustic fluid-structure interaction. Comput Struct. https://doi.org/10.1016/0045-7949(95)00017-B
Bendsøe MP, Sigmund O (2004) Topology optimization. Topol Optim. https://doi.org/10.1007/978-3-662-05086-6
Chen Q, Zhang X, Zhu B (2019) A 213-line topology optimization code for geometrically nonlinear structures. Struct Multidisc Optim. https://doi.org/10.1007/s00158-018-2138-5
Christiansen RE, Sigmund O (2021) Inverse design in photonics by topology optimization: tutorial. J Opt Soc Am B. https://doi.org/10.1364/josab.406048
COMSOL Inc. (2020a). COMSOL Multiphysics LiveLink For MATLAB Users Guide (version 5.6). In Comsol.
COMSOL Inc. (2020b). COMSOL Multiphysics programming reference manual (Version 5.6).
Dilgen CB, Dilgen SB, Aage N, Jensen JS (2019) Topology optimization of acoustic mechanical interaction problems: a comparative review. Struct Multidisc Optim 60(2):779–801. https://doi.org/10.1007/s00158-019-02236-4
Dühring MB, Jensen JS, Sigmund O (2008) Acoustic design by topology optimization. J Sound Vib. https://doi.org/10.1016/j.jsv.2008.03.042
Ferrari F, Sigmund O (2020) A new generation 99 line Matlab code for compliance topology optimization and its extension to 3D. Struct Multidisc Optim. https://doi.org/10.1007/s00158-020-02629-w
Goo S, Kook J, Wang S (2020) Topology optimization of vibroacoustic problems using the hybrid finite element–wave based method. Comput Methods Appl Mech Eng. https://doi.org/10.1016/j.cma.2020.112932
Goo S, Wang S, Hyun J, Jung J (2016) Topology optimization of thin plate structures with bending stress constraints. Comput Struct. https://doi.org/10.1016/j.compstruc.2016.07.006
Goo S, Wang S, Kook J, Koo K, Hyun J (2017) Topology optimization of bounded acoustic problems using the hybrid finite element-wave based method. Comput Methods Appl Mech Eng. https://doi.org/10.1016/j.cma.2016.10.027
Haertel JHK, Nellis GF (2017) A fully developed flow thermofluid model for topology optimization of 3D-printed air-cooled heat exchangers. Appl Therm Eng. https://doi.org/10.1016/j.applthermaleng.2017.03.030
Hu J, Yao S, Huang X (2020) Topology optimization of dynamic acoustic–mechanical structures using the ersatz material model. Comput Methods Appl Mech Eng 372:113387. https://doi.org/10.1016/j.cma.2020.113387
Hyun J, Wang S, Yang S (2014) Topology optimization of the shear thinning non-Newtonian fluidic systems for minimizing wall shear stress. Comput Math Appl. https://doi.org/10.1016/j.camwa.2013.12.013
Jensen JS (2019) A simple method for coupled acoustic-mechanical analysis with application to gradient-based topology optimization. Struct Multidisc Optim. https://doi.org/10.1007/s00158-018-2147-4
Kook J (2019) Evolutionary topology optimization for acoustic-structure interaction problems using a mixed u/p formulation. Mech Based Design Struct Mach. https://doi.org/10.1080/15397734.2018.1557527
Kook J, Jensen JS (2014) Analysis of enhanced modal damping ratio in porous materials using an acoustic-structure interaction model. AIP Adv. https://doi.org/10.1063/1.4901881
Kook J, Jensen JS (2017) Topology optimization of periodic microstructures for enhanced loss factor using acoustic–structure interaction. Int J Solids Struct. https://doi.org/10.1016/j.ijsolstr.2017.06.001
Kook J, Jensen JS, Wang S (2013) Acoustical topology optimization of Zwicker’s loudness with Padé approximation. Comput Methods Appl Mech Eng. https://doi.org/10.1016/j.cma.2012.10.022
Kook J, Koo K, Hyun J, Jensen JS, Wang S (2012) Acoustical topology optimization for Zwicker’s loudness model—Application to noise barriers. Comput Methods Appl Mech Eng. https://doi.org/10.1016/j.cma.2012.05.004
Lazarov BS, Sigmund O (2011) Filters in topology optimization based on Helmholtz-type differential equations. Int J Numer Methods Eng. https://doi.org/10.1002/nme.3072
Lin H, Xu A, Misra A, Zhao R (2020) An ANSYS APDL code for topology optimization of structures with multi-constraints using the BESO method with dynamic evolution rate (DER-BESO). Struct Multidisc Optim. https://doi.org/10.1007/s00158-020-02588-2
Liu C (2015a) Implementing the weak form in COMSOL multiphysics. COMSOL Blog
Liu C (2015b) Implementing the Weak Form with a COMSOL App. COMSOL Blog
Liu K, Tovar A (2014) An efficient 3D topology optimization code written in Matlab. Struct Multidisc Optim 50(6):1175–1196. https://doi.org/10.1007/s00158-014-1107-x
Oh S, Wang S, Cho S (2016) Topology optimization of a suction muffler in a fluid machine to maximize energy efficiency and minimize broadband noise. J Sound Vib. https://doi.org/10.1016/j.jsv.2015.10.022
Olesen LH, Okkels F, Bruus H (2006) A high-level programming-language implementation of topology optimization applied to steady-state Navier-Stokes flow. Int J Numer Meth Eng. https://doi.org/10.1002/nme.1468
Picelli R, Vicente WM, Pavanello R, Xie YM (2015) Evolutionary topology optimization for natural frequency maximization problems considering acoustic-structure interaction. Finite Elem Anal Des. https://doi.org/10.1016/j.finel.2015.07.010
Sigmund O (2001) A 99 line topology optimization code written in matlab. Struct Multidisc Optim. https://doi.org/10.1007/s001580050176
Sigmund O, Clausen PM (2007) Topology optimization using a mixed formulation: an alternative way to solve pressure load problems. Comput Methods Appl Mech Eng. https://doi.org/10.1016/j.cma.2006.09.021
Soprani S, Haertel JHK, Lazarov BS, Sigmund O, Engelbrecht K (2016) A design approach for integrating thermoelectric devices using topology optimization. Appl Energy. https://doi.org/10.1016/j.apenergy.2016.05.024
Suresh K (2010) A 199-line Matlab code for Pareto-optimal tracing in topology optimization. Struct Multidisc Optim. https://doi.org/10.1007/s00158-010-0534-6
Svanberg K (1987) The method of moving asymptotes—a new method for structural optimization. Int J Numer Meth Eng. https://doi.org/10.1002/nme.1620240207
Vicente WM, Picelli R, Pavanello R, Xie YM (2015) Topology optimization of frequency responses of fluid-structure interaction systems. Finite Elem Anal Des. https://doi.org/10.1016/j.finel.2015.01.009
Wang F, Lazarov BS, Sigmund O (2011) On projection methods, convergence and robust formulations in topology optimization. Struct Multidisc Optim. https://doi.org/10.1007/s00158-010-0602-y
Wei P, Li Z, Li X, Wang MY (2018) An 88-line MATLAB code for the parameterized level set method based topology optimization using radial basis functions. Struct Multidisc Optim. https://doi.org/10.1007/s00158-018-1904-8
Yoon GH, Jensen JS, Sigmund O (2007) Topology optimization of acoustic-structure interaction problems using a mixed finite element formulation. Int J Numer Meth Eng. https://doi.org/10.1002/nme.1900
Zuo ZH, Xie YM (2015) A simple and compact Python code for complex 3D topology optimization. Adv Eng Softw. https://doi.org/10.1016/j.advengsoft.2015.02.006
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
On behalf of all authors, the corresponding author states that there is no conflict of interest.
Replication of results
The code for carrying out the optimization using the LiveLink for MATLAB is provided in Appendix. MATLAB code (gensub) for the MMA algorithm, the optimizer for the topology optimization problem, is obtained from (Andreasen et al. 2020), which can be downloaded from www.topopt.dtu.dk. It is necessary to launch MATLAB using “COMSOL Multiphysics 5.x with MATLAB” to run a COMSOL Multiphysics model in the MATLAB environment.
Additional information
Responsible Editor: Gengdong Cheng
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary Information
Below is the link to the electronic supplementary material.
Appendix
Appendix
Rights and permissions
About this article
Cite this article
Kook, J., Chang, J.H. A high-level programming language implementation of topology optimization applied to the acoustic-structure interaction problem. Struct Multidisc Optim 64, 4387–4408 (2021). https://doi.org/10.1007/s00158-021-03052-5
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00158-021-03052-5