Abstract
We present a Matlab implementation of topology optimization for fluid flow problems in the educational computer code PolyTop (Talischi et al. 2012b). The underlying formulation is the well-established porosity approach of Borrvall and Petersson (2003), wherein a dissipative term is introduced to impede the flow in the solid (non-fluid) regions. Polygonal finite elements are used to obtain a stable low-order discretization of the governing Stokes equations for incompressible viscous flow. As a result, the same mesh represents the design field as well as the velocity and pressure fields that characterize its response. Owing to the modular structure of PolyTop, incorporating new physics, in this case modeling fluid flow, involves changes that are limited mainly to the analysis routine. We provide several numerical examples to illustrate the capabilities and use of the code. To illustrate the modularity of the present approach, we extend the implementation to accommodate alternative formulations and cost functions. These include topology optimization formulations where both viscosity and inverse permeability are functions of the design; and flow control where the velocity at a certain location in the domain is maximized in a prescribed direction.
Notes
1 Note, however, that not all Voronoi tessellations yield stable discretizations. For example, a structured quadrilateral mesh, corresponding to a Voronoi tessellation of a uniform grid of seeds, does not lead to a stable method.
2 The area/volume of the set A is denoted by \(\left |A\right |\).
3 It can also be seen from the weak form that terms \({\int }_{\Omega }p\,\text {div}\,\mathbf {v}\mathrm {d}\mathbf {x}\) and \({\int }_{\Omega }q\,\text {div}\,\mathbf {u}\mathrm {d}\mathbf {x}\) are not affected by the addition or subtraction of a constant to p or q. Indeed, for q≡c, a constant, and \(\mathbf {v}\in \mathcal {U}\) or \(\mathbf {v}\in \mathcal {V}\), we have \({\int }_{\Omega }q~\text {div}~\mathbf {v}\mathrm {d}\mathbf {x}=c{\int }_{\Omega }\mathbf {v}\cdot \mathbf {n}\mathrm {d}s=0\).
4 In Talischi et al. (2012b), P is used to denote the filtering matrix. In this paper, we will not use filtering so no confusion should arise.
5 In Matlab, if FreeDofs and PresDofs are arrays containing the indices of free and prescribed degrees of freedom, then M f U and M p U are simply obtained by U(FreeDofs,:) and U(PresDofs,:).
6 The strength of the singularity of the exact solution governs the convergence rates here.
7 We must note that, unlike optimization problem (12), this problem is ill-posed unless additional regularity is imposed on ρ, for instance, via filtering (Wiker et al. 2007). In the numerical result presented here, we do not consider filtering as we are mainly interested in comparing the results to the solutions of the optimization problem (12). However, we note that filtering can be easily enabled in PolyTop through the filtering matrix opt.P.
References
Allaire G (2001) Shape optimization by the homogenization method. Springer, New York
Beirão Da Veiga L, Lipnikov K (2010) A mimetic discretization of the Stokes problem with selected edge bubbles. SIAM J Sci Comput 32(2):875–893. doi:10.1137/090767029
Bendsøe MP, Sigmund O (2003) Topology optimization: theory, methods and applications. Springer-Verlag, Berlin
Bochev P, Lehoucq RB (2001) On finite element solution of the pure Neumann problem. SIAM Rev 47:50–66. doi:10.1137/S0036144503426074
Borrvall T, Petersson J (2003) Topology optimization of fluids in Stokes flow. Int J Numer Methods Fluids 41(1):77–107. doi:10.1002/fld.426
Challis VJ, Guest JK (2009) Level set topology optimization of fluids in Stokes flow. Int J Numer Methods Eng 79(10):1284–1308. doi:10.1002/nme.2616
Deng Y, Liu Z, Zhang P, Liu Y, Wu Y (2011) Topology optimization of unsteady incompressible Navier-Stokes flows. J Comput Phys 230(17):6688–6708. doi:10.1016/j.jcp.2011.05.004
Donea J, Huerta A (2003) Finite element methods for flow problems. Wiley, West Sussex
Evgrafov A (2005) The limits of porous materials in the topology optimization of Stokes flows. Appl Math Optim 52:263–277. doi:10.1007/s00245-005-0828-z
Gersborg-Hansen A, Sigmund O, Haber R (2005) Topology optimization of channel flow problems. Struct Multidiscip Optim 30(3):181–192. doi:10.1007/s00158-004-0508-7
Guest JK, Prévost JH (2006) Topology optimization of creeping fluid flows using a Darcy-Stokes finite element. Int J Numer Methods Eng 66(3):461–484. doi:10.1002/nme.1560
Kreissl S, Maute K (2012) Levelset based fluid topology optimization using the extended finite element method. Struct Multidiscip Optim 46(3):311–326. doi:10.1007/s00158-012-0782-8
Kreissl S, Pingen G, Maute K (2011) An explicit level set approach for generalized shape optimization of fluids with the Lattice Boltzmann method. Int J Numer Methods Fluids 65(5):496–519. doi:10.1002/fld.2193
Kreissl S, Pingen G, Maute K (2011) Topology optimization for unsteady flow. Int J Numer Methods Eng 87(13):1229–1253. doi:10.1002/nme.3151
Pereira A, Menezes IFM, Talischi C, Paulino GH (2011) An efficient and compact Matlab implementation of topology optimization: application to compliant mechanisms. In: XXXII Iberian Latin-American Congress on Computational Methods in Engineering
Pingen G, Evgrafov A, Maute K (2007) Topology optimization of flow domains using the lattice Boltzmann method. Struct Multidisc Optim 34(6):507–524. doi:10.1007/s00158-007-0105-7 10.1007/s00158-007-0105-7
Svanberg K (1987) The method of moving asymptotes—a new method for structural optimization. Int J Numer Methods Eng 24(2):359–373. doi:10.1002/nme.1620240207
Talischi C, Paulino GH, Pereira A, Menezes IFM (2012) PolyMesher: a general-purpose mesh generator for polygonal elements written in Matlab. Struct Multidiscip Optim 45(3):309–328. doi:10.1007/s00158-011-0706-z 10.1007/s00158-011-0706-z
Talischi C, Paulino GH, Pereira A, Menezes IFM (2012) PolyTop: a Matlab implementation of a general topology optimization framework using unstructured polygonal finite element meshes. Struct Multidiscip Optim 45 (3):329–357. doi:10.1007/s00158-011-0696-x
Talischi C, Pereira A, Paulino GH, de Menezes IFM, da Silveira Carvalho M (2014) Polygonal finite elements for incompressible fluid flow. Int J Numer Methods Fluids 74(2):134– 151. doi:10.1002/fld.3843
Wiker N, Klarbring A, Borrvall T (2007) Topology optimization of regions of Darcy and Stokes flow. Int J Numer Methods Eng 69(7):1374–1404. doi:10.1002/nme.1811
Acknowledgments
Glaucio H. Paulino acknowledges support from the US National Science Foundation through grants #1559594 (formerly #1335160) and #1624232 (formerly #1437535). Ivan F. M. Menezes and Anderson Pereira acknowledge the financial support provided by Tecgraf/PUC-Rio (Group of Technology in Computer Graphics), Rio de Janeiro, Brazil. The information presented in this publication is the sole opinion of the authors and does not necessarily reflect the views of the sponsors or sponsoring agencies.
Author information
Authors and Affiliations
Corresponding author
Additional information
Electronic supplementary material The online version of this article (doi:10.1007/s00158-014-1182-z) contains supplementary material, which is available to authorized users.
Appendices
Appendix A:: Additions to PolyMesher
The polygonal finite element meshes used in this work are generated by PolyMesher (Talischi et al. 2012a) but with one main modification that allows to specify the exact location of the inlets and outlets. To this effect, a new function is added to the kernel in order to generate meshes that included user-defined fixed points as vertices in the mesh. The function PolyMshr_FixedPoints uses the property of the Voronoi diagram that an empty circle through three or more points defines a vertex. As shown in Fig. 12, consider seeds x and y and their reflections R Ω(x) and R Ω(y) are the two closest points in the mesh to a given fixed point z ∗. If y has a smaller distance, then the function moves the seed x, R Ω(x) and R Ω(y) on a circle of radius \(r=\left |\mathbf {y}-\mathbf {z}^{*}\right |\) and center z ∗. The new points \(\bar {\mathbf {x}}\), \(\bar {R}_{\Omega }(\mathbf {x})\) and \(\bar {R}_{\Omega }(\mathbf {y})\) are now positioned such that the desired point z ∗ is a vertex of the resulting Voronoi diagram.
The user must define a list of fixed points within the Domain function, more specifically, in a function FixedPoints, which returns a two-column array containing a list with the coordinates of the fixed points. The PolyMesher kernel function is also modified on line 10 as follows:
During each iteration of the Lloyd’s algorithm, a call is made to the functionPolyMshr_FixedPoints. In particular, the line P=Pc (line 15) is replaced by the following line of code:
The code PolyMshr_FixedPoints function is short and is provided below:
In order to enforce velocity boundary conditions, the domain function must identify the nodes that lie on the boundary ∂Ω and assign prescribed velocity values to the associated degrees of freedom. This information is provided by a call to the auxiliary function PolyBoundary. This function uses the Matlab built-in function freeBoundary that queries the edges of a triangulation and outputs those incident on exactly one triangle. In PolyBoundary, each polygonal element of the mesh is first triangulated with respect to its centroid. The resulting triangulation is used as the input to freeBoundary. The list of boundary nodes is the list of nodes corresponding to the boundary edges output by freeBoundary.
Appendix B:: PolyScript
Appendix C:: PolyTop
Rights and permissions
About this article
Cite this article
Pereira, A., Talischi, C., Paulino, G.H. et al. Fluid flow topology optimization in PolyTop: stability and computational implementation. Struct Multidisc Optim 54, 1345–1364 (2016). https://doi.org/10.1007/s00158-014-1182-z
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00158-014-1182-z